From f7659f9f347f9b5f2b0b6ff1c6669e4b4f150abf Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 6 Oct 2016 12:48:48 -0700 Subject: [PATCH 01/36] Commencing work on v1.30.1 --- apps/pcx86/1981/visicalc/manifest.xml | 2 +- apps/pcx86/1982/esuite/manifest.xml | 2 +- apps/pcx86/1985/rogue/manifest.xml | 2 +- apps/pcx86/1987/thinktank/manifest.xml | 2 +- apps/pcx86/1988/moria/manifest.xml | 2 +- apps/pcx86/1992/moria/manifest.xml | 2 +- devices/c1p/machine/32kb/machine.xml | 2 +- .../c1p/machine/8kb/all/debugger/machine.xml | 2 +- devices/c1p/machine/8kb/all/machine.xml | 2 +- devices/c1p/machine/8kb/array/machine.xml | 2 +- .../machine/8kb/large/debugger/machine.xml | 2 +- devices/c1p/machine/8kb/large/machine.xml | 2 +- devices/c1p/machine/8kb/small/machine.xml | 2 +- .../machine/exerciser/machine-8080ex1.xml | 2 +- .../machine/exerciser/machine-8080pre.xml | 2 +- .../machine/exerciser/machine-cputest.xml | 2 +- .../pc8080/machine/exerciser/machine-test.xml | 2 +- devices/pc8080/machine/exerciser/machine.xml | 2 +- .../machine/invaders/debugger/machine.xml | 2 +- devices/pc8080/machine/invaders/machine.xml | 2 +- .../pc8080/machine/vt100/debugger/machine.xml | 2 +- devices/pc8080/machine/vt100/machine.xml | 2 +- .../5150/cga/384kb/softkbd/machine.xml | 2 +- .../5150/cga/64kb/donkey/debugger/machine.xml | 2 +- .../machine/5150/cga/64kb/donkey/machine.xml | 2 +- .../machine/5150/cga/64kb/softkbd/machine.xml | 2 +- .../pcx86/machine/5150/dual/64kb/machine.xml | 2 +- .../5150/mda/64kb/debugger/machine.xml | 2 +- .../pcx86/machine/5150/mda/64kb/machine.xml | 2 +- .../machine/5150/mda/64kb/softkbd/machine.xml | 2 +- .../machine/5160/cga/256kb/array/machine.xml | 2 +- .../5160/cga/256kb/demo/debugger/machine.xml | 2 +- .../machine/5160/cga/256kb/demo/machine.xml | 2 +- .../5160/cga/256kb/softkbd/machine.xml | 2 +- .../cga/256kb/win101/debugger/machine.xml | 2 +- .../machine/5160/cga/256kb/win101/machine.xml | 2 +- .../5160/cga/256kb/win101/softkbd/machine.xml | 2 +- .../5160/cga/512kb/win101/softkbd/machine.xml | 2 +- .../5160/cga/640kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/cga/640kb/machine.xml | 2 +- .../5160/cga/640kb/softkbd/machine.xml | 2 +- .../5160/ega/256kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/ega/256kb/machine.xml | 2 +- .../machine/5160/ega/640kb/array/machine.xml | 2 +- .../5160/ega/640kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/ega/640kb/machine.xml | 2 +- .../5160/mda/256kb/debugger/machine.xml | 2 +- .../mda/256kb/fake188/debugger/machine.xml | 2 +- .../5160/mda/256kb/fake188/machine.xml | 2 +- .../pcx86/machine/5160/mda/256kb/machine.xml | 2 +- .../machine/5160/mda/64kb/softkbd/machine.xml | 2 +- .../5170/cga/640kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/cga/640kb/rev3/machine.xml | 2 +- .../5170/ega/1152kb/rev1/debugger/machine.xml | 2 +- .../machine/5170/ega/1152kb/rev1/machine.xml | 2 +- .../rev3/debugger/backtrack/machine.xml | 2 +- .../5170/ega/1152kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/ega/1152kb/rev3/machine.xml | 2 +- .../rev3/debugger/backtrack/machine.xml | 2 +- .../5170/ega/2048kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/ega/2048kb/rev3/machine.xml | 2 +- .../5170/ega/640kb/rev1/debugger/machine.xml | 2 +- .../machine/5170/ega/640kb/rev1/machine.xml | 2 +- .../5170/mda/640kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/mda/640kb/rev3/machine.xml | 2 +- .../5170/vga/2048kb/debugger/machine.xml | 2 +- .../pcx86/machine/5170/vga/2048kb/machine.xml | 2 +- .../5170/vga/4096kb/debugger/machine.xml | 2 +- .../pcx86/machine/5170/vga/4096kb/machine.xml | 2 +- .../att/6300/cga/640kb/debugger/machine.xml | 2 +- .../machine/att/6300/cga/640kb/machine.xml | 2 +- .../mpc1600/cga/640kb/debugger/machine.xml | 2 +- .../machine/cdp/mpc1600/cga/640kb/machine.xml | 2 +- .../ega/2048kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/ega/2048kb/machine.xml | 2 +- .../ega/4096kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/ega/4096kb/machine.xml | 2 +- .../2048kb/debugger/backtrack/machine.xml | 2 +- .../other/2048kb/debugger/machine.xml | 2 +- .../vga/2048kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/vga/2048kb/machine.xml | 2 +- .../vga/4096kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/vga/4096kb/machine.xml | 2 +- devices/pcx86/machine/custom/machine.xml | 2 +- .../z150/cga/640kb/debugger/machine.xml | 2 +- .../machine/zenith/z150/cga/640kb/machine.xml | 2 +- devices/pdp11/machine/1170/machine.xml | 2 +- devices/pdp11/machine/1170/test/machine.xml | 2 +- .../pcx86/apps/ibm/topview/1.01/manifest.xml | 2 +- disks/pcx86/apps/lotus/123/1.0a/manifest.xml | 2 +- .../apps/micropro/wordstar/3.30/manifest.xml | 2 +- .../apps/micropro/wordstar/4.00/manifest.xml | 2 +- .../apps/microsoft/chart/2.02/manifest.xml | 2 +- .../apps/microsoft/winword/2.0c/manifest.xml | 2 +- .../apps/microsoft/word/3.0/manifest.xml | 2 +- .../apps/microsoft/word/3.1/manifest.xml | 2 +- .../apps/microsoft/word/5.0/manifest.xml | 2 +- .../apps/sunnyhill/omniview/4.30/manifest.xml | 2 +- disks/pcx86/cpm/1.1b/machine.xml | 2 +- disks/pcx86/cpm/1.1b/manifest.xml | 2 +- disks/pcx86/diags/ibm/manifest.xml | 2 +- disks/pcx86/dos/compaq/1.11/manifest.xml | 2 +- disks/pcx86/dos/compaq/1.12/manifest.xml | 2 +- disks/pcx86/dos/compaq/2.12/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.00/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.10/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.31/manifest.xml | 2 +- disks/pcx86/dos/ibm/1.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/1.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/2.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/2.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.20/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.30/manifest.xml | 2 +- disks/pcx86/dos/ibm/4.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/5.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/6.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/6.30/manifest.xml | 2 +- disks/pcx86/dos/ibm/7.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.20/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.21/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.30/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.31/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.00/manifest.xml | 2 +- .../dos/microsoft/4.01/720K/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.01/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.0M/manifest.xml | 2 +- disks/pcx86/dos/microsoft/5.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.20/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.22/manifest.xml | 2 +- disks/pcx86/empty/manifest.xml | 2 +- disks/pcx86/games/id/wolf3d/manifest.xml | 2 +- disks/pcx86/games/infocom/hhiker/manifest.xml | 2 +- disks/pcx86/games/infocom/machine.xml | 2 +- disks/pcx86/games/infocom/planet/manifest.xml | 2 +- .../games/infocom/zork1/debugger/machine.xml | 2 +- disks/pcx86/games/infocom/zork1/manifest.xml | 2 +- disks/pcx86/games/infocom/zork2/manifest.xml | 2 +- disks/pcx86/games/infocom/zork3/manifest.xml | 2 +- .../games/microsoft/adventure/machine.xml | 2 +- .../games/microsoft/adventure/manifest.xml | 2 +- .../microsoft/flightsim/1982/manifest.xml | 2 +- .../microsoft/flightsim/1984/manifest.xml | 2 +- disks/pcx86/minix/1.1/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.0/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.1/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.3/manifest.xml | 2 +- disks/pcx86/os2/microsoft/1.0/manifest.xml | 2 +- disks/pcx86/os2/misc/manifest.xml | 2 +- .../tools/borland/pascal/3.00b/manifest.xml | 2 +- .../tools/borland/pascal/3.01a/manifest.xml | 2 +- .../pcx86/tools/ibm/bascom/1.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/basic/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/2.03/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/3.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/4.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/5.00/manifest.xml | 2 +- .../tools/microsoft/c/5.10-os2/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/5.10/manifest.xml | 2 +- .../tools/microsoft/masm/1.00/manifest.xml | 2 +- .../tools/microsoft/masm/3.00/manifest.xml | 2 +- .../tools/microsoft/masm/3.01/manifest.xml | 2 +- .../tools/microsoft/masm/4.00/manifest.xml | 2 +- .../tools/microsoft/masm/5.00/manifest.xml | 2 +- .../tools/microsoft/masm/5.10/manifest.xml | 2 +- .../tools/microsoft/masm/6.00/manifest.xml | 2 +- .../tools/microsoft/masm/6.11/manifest.xml | 2 +- .../tools/microsoft/mouse/5.00/manifest.xml | 2 +- .../tools/microsoft/os2/sdk/1.02/manifest.xml | 2 +- .../microsoft/windows/sdk/1.01/manifest.xml | 2 +- .../microsoft/windows/sdk/1.03/manifest.xml | 2 +- .../microsoft/windows/sdk/1.04/manifest.xml | 2 +- .../microsoft/windows/sdk/2.03/manifest.xml | 2 +- .../microsoft/windows/sdk/3.00/manifest.xml | 2 +- disks/pcx86/tools/misc/manifest.xml | 2 +- disks/pcx86/unix/ibm/pcix/1.0/manifest.xml | 2 +- .../unix/microport/system-v/2.3/manifest.xml | 2 +- .../unix/sco/xenix/8086/2.1.3/manifest.xml | 2 +- disks/pcx86/windows/1.00/manifest.xml | 2 +- disks/pcx86/windows/1.01/manifest.xml | 2 +- disks/pcx86/windows/1.02/manifest.xml | 2 +- disks/pcx86/windows/1.03/manifest.xml | 2 +- disks/pcx86/windows/1.03a/manifest.xml | 2 +- disks/pcx86/windows/1.03b/manifest.xml | 2 +- disks/pcx86/windows/1.04/manifest.xml | 2 +- disks/pcx86/windows/2.03/manifest.xml | 2 +- disks/pcx86/windows/2.0x/manifest.xml | 2 +- disks/pcx86/windows/2.10/manifest.xml | 2 +- disks/pcx86/windows/2.11/manifest.xml | 2 +- disks/pcx86/windows/3.00/720K/manifest.xml | 2 +- disks/pcx86/windows/3.00/manifest.xml | 2 +- disks/pcx86/windows/3.10/manifest.xml | 2 +- disks/pcx86/windows/3.11/manifest.xml | 2 +- .../pcx86/windows/win95/4.00.499/manifest.xml | 2 +- .../pcx86/windows/win95/4.00.950/manifest.xml | 2 +- disks/pcx86/windows/wincomm/manifest.xml | 2 +- docs/pcx86/examples/components.xsl | 4 +- docs/pcx86/examples/pcx86-dbg.js | 22 +- docs/pcx86/examples/pcx86.js | 18 +- package.json | 6 +- .../demos/machine-debugger.xml | 2 +- .../Graphics_for_the_IBM_PC/demos/machine.xml | 2 +- pubs/pc/programming/manifest.xml | 2 +- .../reference/ibm/5150/techref/manifest.xml | 2 +- .../reference/ibm/5160/techref/manifest.xml | 2 +- pubs/pc/reference/ibm/5170/setup/manifest.xml | 2 +- .../reference/ibm/5170/techref/manifest.xml | 2 +- pubs/pc/reference/ibm/ps2/manifest.xml | 2 +- pubs/pc/reference/ibm/video/ega/manifest.xml | 2 +- pubs/pc/reference/intel/80286/manifest.xml | 2 +- .../software/os2/microsoft/sdk10/manifest.xml | 2 +- pubs/pc/software/windows/sdk200/manifest.xml | 2 +- versions/c1pjs/1.30.1/c1p-dbg.js | 168 +++ versions/c1pjs/1.30.1/c1p.js | 129 ++ versions/c1pjs/1.30.1/common.css | 265 ++++ versions/c1pjs/1.30.1/common.xsl | 58 + versions/c1pjs/1.30.1/components.css | 108 ++ versions/c1pjs/1.30.1/components.xsl | 588 ++++++++ versions/c1pjs/1.30.1/document.css | 162 +++ versions/c1pjs/1.30.1/document.xsl | 452 ++++++ versions/c1pjs/1.30.1/machine.xsl | 49 + versions/c1pjs/1.30.1/manifest.xsl | 247 ++++ versions/c1pjs/1.30.1/outline.xsl | 47 + versions/pc8080/1.30.1/common.css | 265 ++++ versions/pc8080/1.30.1/common.xsl | 58 + versions/pc8080/1.30.1/components.css | 159 ++ versions/pc8080/1.30.1/components.xsl | 1275 +++++++++++++++++ versions/pc8080/1.30.1/document.css | 162 +++ versions/pc8080/1.30.1/document.xsl | 452 ++++++ versions/pc8080/1.30.1/machine.xsl | 49 + versions/pc8080/1.30.1/manifest.xsl | 247 ++++ versions/pc8080/1.30.1/outline.xsl | 47 + versions/pc8080/1.30.1/pc8080-dbg.js | 251 ++++ versions/pc8080/1.30.1/pc8080.js | 166 +++ versions/pcx86/1.30.1/common.css | 265 ++++ versions/pcx86/1.30.1/common.xsl | 58 + versions/pcx86/1.30.1/components.css | 159 ++ versions/pcx86/1.30.1/components.xsl | 1275 +++++++++++++++++ versions/pcx86/1.30.1/document.css | 162 +++ versions/pcx86/1.30.1/document.xsl | 452 ++++++ versions/pcx86/1.30.1/machine.xsl | 49 + versions/pcx86/1.30.1/manifest.xsl | 247 ++++ versions/pcx86/1.30.1/outline.xsl | 47 + versions/pcx86/1.30.1/pcx86-dbg.js | 823 +++++++++++ versions/pcx86/1.30.1/pcx86.js | 641 +++++++++ versions/pdpjs/1.30.1/common.css | 265 ++++ versions/pdpjs/1.30.1/common.xsl | 58 + versions/pdpjs/1.30.1/components.css | 159 ++ versions/pdpjs/1.30.1/components.xsl | 1275 +++++++++++++++++ versions/pdpjs/1.30.1/document.css | 162 +++ versions/pdpjs/1.30.1/document.xsl | 452 ++++++ versions/pdpjs/1.30.1/machine.xsl | 49 + versions/pdpjs/1.30.1/manifest.xsl | 247 ++++ versions/pdpjs/1.30.1/outline.xsl | 47 + versions/pdpjs/1.30.1/pdp11-dbg.js | 230 +++ versions/pdpjs/1.30.1/pdp11.js | 160 +++ 258 files changed, 12921 insertions(+), 235 deletions(-) create mode 100644 versions/c1pjs/1.30.1/c1p-dbg.js create mode 100644 versions/c1pjs/1.30.1/c1p.js create mode 100644 versions/c1pjs/1.30.1/common.css create mode 100644 versions/c1pjs/1.30.1/common.xsl create mode 100644 versions/c1pjs/1.30.1/components.css create mode 100644 versions/c1pjs/1.30.1/components.xsl create mode 100644 versions/c1pjs/1.30.1/document.css create mode 100644 versions/c1pjs/1.30.1/document.xsl create mode 100644 versions/c1pjs/1.30.1/machine.xsl create mode 100644 versions/c1pjs/1.30.1/manifest.xsl create mode 100644 versions/c1pjs/1.30.1/outline.xsl create mode 100644 versions/pc8080/1.30.1/common.css create mode 100644 versions/pc8080/1.30.1/common.xsl create mode 100644 versions/pc8080/1.30.1/components.css create mode 100644 versions/pc8080/1.30.1/components.xsl create mode 100644 versions/pc8080/1.30.1/document.css create mode 100644 versions/pc8080/1.30.1/document.xsl create mode 100644 versions/pc8080/1.30.1/machine.xsl create mode 100644 versions/pc8080/1.30.1/manifest.xsl create mode 100644 versions/pc8080/1.30.1/outline.xsl create mode 100644 versions/pc8080/1.30.1/pc8080-dbg.js create mode 100644 versions/pc8080/1.30.1/pc8080.js create mode 100644 versions/pcx86/1.30.1/common.css create mode 100644 versions/pcx86/1.30.1/common.xsl create mode 100644 versions/pcx86/1.30.1/components.css create mode 100644 versions/pcx86/1.30.1/components.xsl create mode 100644 versions/pcx86/1.30.1/document.css create mode 100644 versions/pcx86/1.30.1/document.xsl create mode 100644 versions/pcx86/1.30.1/machine.xsl create mode 100644 versions/pcx86/1.30.1/manifest.xsl create mode 100644 versions/pcx86/1.30.1/outline.xsl create mode 100644 versions/pcx86/1.30.1/pcx86-dbg.js create mode 100644 versions/pcx86/1.30.1/pcx86.js create mode 100644 versions/pdpjs/1.30.1/common.css create mode 100644 versions/pdpjs/1.30.1/common.xsl create mode 100644 versions/pdpjs/1.30.1/components.css create mode 100644 versions/pdpjs/1.30.1/components.xsl create mode 100644 versions/pdpjs/1.30.1/document.css create mode 100644 versions/pdpjs/1.30.1/document.xsl create mode 100644 versions/pdpjs/1.30.1/machine.xsl create mode 100644 versions/pdpjs/1.30.1/manifest.xsl create mode 100644 versions/pdpjs/1.30.1/outline.xsl create mode 100644 versions/pdpjs/1.30.1/pdp11-dbg.js create mode 100644 versions/pdpjs/1.30.1/pdp11.js diff --git a/apps/pcx86/1981/visicalc/manifest.xml b/apps/pcx86/1981/visicalc/manifest.xml index 49b80df94..64d70f13e 100644 --- a/apps/pcx86/1981/visicalc/manifest.xml +++ b/apps/pcx86/1981/visicalc/manifest.xml @@ -1,5 +1,5 @@ - + VisiCalc diff --git a/apps/pcx86/1982/esuite/manifest.xml b/apps/pcx86/1982/esuite/manifest.xml index 5f977b5c4..0f3e1acdc 100644 --- a/apps/pcx86/1982/esuite/manifest.xml +++ b/apps/pcx86/1982/esuite/manifest.xml @@ -1,5 +1,5 @@ - + Executive Suite diff --git a/apps/pcx86/1985/rogue/manifest.xml b/apps/pcx86/1985/rogue/manifest.xml index 30e930b80..bef1c91b1 100644 --- a/apps/pcx86/1985/rogue/manifest.xml +++ b/apps/pcx86/1985/rogue/manifest.xml @@ -1,5 +1,5 @@ - + Rogue diff --git a/apps/pcx86/1987/thinktank/manifest.xml b/apps/pcx86/1987/thinktank/manifest.xml index 86522caaa..a84f480e3 100644 --- a/apps/pcx86/1987/thinktank/manifest.xml +++ b/apps/pcx86/1987/thinktank/manifest.xml @@ -1,5 +1,5 @@ - + ThinkTank 2.41NP diff --git a/apps/pcx86/1988/moria/manifest.xml b/apps/pcx86/1988/moria/manifest.xml index bad620a14..916c1fe30 100644 --- a/apps/pcx86/1988/moria/manifest.xml +++ b/apps/pcx86/1988/moria/manifest.xml @@ -1,5 +1,5 @@ - + The Dungeons of Moria 4.872 diff --git a/apps/pcx86/1992/moria/manifest.xml b/apps/pcx86/1992/moria/manifest.xml index a8a818acc..3e1b6535e 100644 --- a/apps/pcx86/1992/moria/manifest.xml +++ b/apps/pcx86/1992/moria/manifest.xml @@ -1,5 +1,5 @@ - + The Dungeons of Moria 5.5 diff --git a/devices/c1p/machine/32kb/machine.xml b/devices/c1p/machine/32kb/machine.xml index f24254bd5..bf328e837 100644 --- a/devices/c1p/machine/32kb/machine.xml +++ b/devices/c1p/machine/32kb/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (32Kb) with Disk Support diff --git a/devices/c1p/machine/8kb/all/debugger/machine.xml b/devices/c1p/machine/8kb/all/debugger/machine.xml index 48835736c..de23306ff 100644 --- a/devices/c1p/machine/8kb/all/debugger/machine.xml +++ b/devices/c1p/machine/8kb/all/debugger/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb, Additional Software) diff --git a/devices/c1p/machine/8kb/all/machine.xml b/devices/c1p/machine/8kb/all/machine.xml index 04e7b48c7..25b39f339 100644 --- a/devices/c1p/machine/8kb/all/machine.xml +++ b/devices/c1p/machine/8kb/all/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb, Additional Software) diff --git a/devices/c1p/machine/8kb/array/machine.xml b/devices/c1p/machine/8kb/array/machine.xml index cb0b0b266..7435dcf9b 100644 --- a/devices/c1p/machine/8kb/array/machine.xml +++ b/devices/c1p/machine/8kb/array/machine.xml @@ -1,5 +1,5 @@ - + Challenger 1P (8Kb) "Server Array" diff --git a/devices/c1p/machine/8kb/large/debugger/machine.xml b/devices/c1p/machine/8kb/large/debugger/machine.xml index 5e16ecfe9..fee1cfa54 100644 --- a/devices/c1p/machine/8kb/large/debugger/machine.xml +++ b/devices/c1p/machine/8kb/large/debugger/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb) with Debugger diff --git a/devices/c1p/machine/8kb/large/machine.xml b/devices/c1p/machine/8kb/large/machine.xml index 72dc1a1f6..22271c96b 100644 --- a/devices/c1p/machine/8kb/large/machine.xml +++ b/devices/c1p/machine/8kb/large/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (circa 1978) diff --git a/devices/c1p/machine/8kb/small/machine.xml b/devices/c1p/machine/8kb/small/machine.xml index be5561863..6d86b09e1 100644 --- a/devices/c1p/machine/8kb/small/machine.xml +++ b/devices/c1p/machine/8kb/small/machine.xml @@ -1,5 +1,5 @@ - + diff --git a/devices/pc8080/machine/exerciser/machine-8080ex1.xml b/devices/pc8080/machine/exerciser/machine-8080ex1.xml index d3ebefac0..d15f5cc0c 100644 --- a/devices/pc8080/machine/exerciser/machine-8080ex1.xml +++ b/devices/pc8080/machine/exerciser/machine-8080ex1.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Test Machine diff --git a/devices/pc8080/machine/exerciser/machine-8080pre.xml b/devices/pc8080/machine/exerciser/machine-8080pre.xml index f27b112fe..c43b27344 100644 --- a/devices/pc8080/machine/exerciser/machine-8080pre.xml +++ b/devices/pc8080/machine/exerciser/machine-8080pre.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Preliminary Test Machine diff --git a/devices/pc8080/machine/exerciser/machine-cputest.xml b/devices/pc8080/machine/exerciser/machine-cputest.xml index 26c5b970f..7d65f4b52 100644 --- a/devices/pc8080/machine/exerciser/machine-cputest.xml +++ b/devices/pc8080/machine/exerciser/machine-cputest.xml @@ -1,5 +1,5 @@ - + 8080 CPUTEST Machine diff --git a/devices/pc8080/machine/exerciser/machine-test.xml b/devices/pc8080/machine/exerciser/machine-test.xml index 66efde401..14bb853d4 100644 --- a/devices/pc8080/machine/exerciser/machine-test.xml +++ b/devices/pc8080/machine/exerciser/machine-test.xml @@ -1,5 +1,5 @@ - + 8080 "Kelly Smith" Test Machine diff --git a/devices/pc8080/machine/exerciser/machine.xml b/devices/pc8080/machine/exerciser/machine.xml index d3ebefac0..d15f5cc0c 100644 --- a/devices/pc8080/machine/exerciser/machine.xml +++ b/devices/pc8080/machine/exerciser/machine.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Test Machine diff --git a/devices/pc8080/machine/invaders/debugger/machine.xml b/devices/pc8080/machine/invaders/debugger/machine.xml index fd74aa4d8..6d5b3ea36 100644 --- a/devices/pc8080/machine/invaders/debugger/machine.xml +++ b/devices/pc8080/machine/invaders/debugger/machine.xml @@ -1,5 +1,5 @@ - + Space Invaders diff --git a/devices/pc8080/machine/invaders/machine.xml b/devices/pc8080/machine/invaders/machine.xml index 9ece76a10..de56787d8 100644 --- a/devices/pc8080/machine/invaders/machine.xml +++ b/devices/pc8080/machine/invaders/machine.xml @@ -1,5 +1,5 @@ - + Space Invaders diff --git a/devices/pc8080/machine/vt100/debugger/machine.xml b/devices/pc8080/machine/vt100/debugger/machine.xml index 02b4d1c69..814c90b64 100644 --- a/devices/pc8080/machine/vt100/debugger/machine.xml +++ b/devices/pc8080/machine/vt100/debugger/machine.xml @@ -1,5 +1,5 @@ - + VT100 Terminal diff --git a/devices/pc8080/machine/vt100/machine.xml b/devices/pc8080/machine/vt100/machine.xml index 7f97daa7c..9565f1e3a 100644 --- a/devices/pc8080/machine/vt100/machine.xml +++ b/devices/pc8080/machine/vt100/machine.xml @@ -1,5 +1,5 @@ - + VT100 Terminal diff --git a/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml b/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml index 23db6c2b2..56f39065e 100644 --- a/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 384K diff --git a/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml b/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml index 8245db776..56ab05d25 100644 --- a/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml b/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml index 70dbcbc30..4d5806684 100644 --- a/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml b/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml index 5edb022e9..5012f20f2 100644 --- a/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/dual/64kb/machine.xml b/devices/pcx86/machine/5150/dual/64kb/machine.xml index cc2ded11d..e6c62b7ca 100644 --- a/devices/pcx86/machine/5150/dual/64kb/machine.xml +++ b/devices/pcx86/machine/5150/dual/64kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Dual Displays diff --git a/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml b/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml index b7d55c55f..d2590236f 100644 --- a/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/5150/mda/64kb/machine.xml b/devices/pcx86/machine/5150/mda/64kb/machine.xml index 8b21e2374..c4b71bd93 100644 --- a/devices/pcx86/machine/5150/mda/64kb/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml b/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml index f3d9feda2..0c78041bd 100644 --- a/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), MDA, 64K diff --git a/devices/pcx86/machine/5160/cga/256kb/array/machine.xml b/devices/pcx86/machine/5160/cga/256kb/array/machine.xml index f5a449967..a78bff12d 100644 --- a/devices/pcx86/machine/5160/cga/256kb/array/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/array/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml b/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml index dfc6e7757..00195582f 100644 --- a/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml b/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml index 280941e49..73589e268 100644 --- a/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml index ea7b2921a..a1fcdf401 100644 --- a/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml index 95a9c92df..7d7419c36 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160) running Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml index 1f9601b4b..de2921bfe 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160) running Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml index c31d9778a..0d73ff780 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml index 1adf5967a..bbff9a1dd 100644 --- a/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 512K, WIN101 diff --git a/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml index cee265b69..289c41071 100644 --- a/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/640kb/machine.xml b/devices/pcx86/machine/5160/cga/640kb/machine.xml index 34b242fcb..a0fa95841 100644 --- a/devices/pcx86/machine/5160/cga/640kb/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml index 77bb46e77..55e2aeb56 100644 --- a/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml b/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml index fc9985848..5e93580cf 100644 --- a/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), 64K EGA, 256K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/256kb/machine.xml b/devices/pcx86/machine/5160/ega/256kb/machine.xml index b8655f557..3cd2a01ae 100644 --- a/devices/pcx86/machine/5160/ega/256kb/machine.xml +++ b/devices/pcx86/machine/5160/ega/256kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), 64K EGA, 256K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/array/machine.xml b/devices/pcx86/machine/5160/ega/640kb/array/machine.xml index 4d4771f96..e2a72bed1 100644 --- a/devices/pcx86/machine/5160/ega/640kb/array/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/array/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml b/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml index 062e5f0df..00dd1db92 100644 --- a/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/machine.xml b/devices/pcx86/machine/5160/ega/640kb/machine.xml index b546da4cb..5ebac4f0a 100644 --- a/devices/pcx86/machine/5160/ega/640kb/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml b/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml index 18e2f7373..42a07ae48 100644 --- a/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml b/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml index 2b5424a48..ac5c97bf5 100644 --- a/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml b/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml index f0107b908..bb1cc605f 100644 --- a/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/machine.xml b/devices/pcx86/machine/5160/mda/256kb/machine.xml index 0a6b2ff54..00696f94f 100644 --- a/devices/pcx86/machine/5160/mda/256kb/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml b/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml index 11803ac97..b8e5893d0 100644 --- a/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 64K, 10Mb Drive diff --git a/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml index 40d474b0f..3a9950079 100644 --- a/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Color Display diff --git a/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml b/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml index 255c1e9c9..265d29b7c 100644 --- a/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Color Display diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml index 4d5deeeec..887e94468 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (6Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml index 92bfe40b4..58cd1e0e9 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (6Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml index 39ffef790..0a18814a1 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml index 0545ad736..3b1f0d82b 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml index 57a0c74be..f07ff6555 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml index 161c26cb7..0d6b2f60a 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml index 01afa427a..ff50a896c 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml index 1b03e57b2..dd72b0e95 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml b/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml index 46a343e80..9dabb3e2f 100644 --- a/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT, 128K EGA, 640Kb RAM diff --git a/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml b/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml index 566acae97..ef8c2625b 100644 --- a/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml +++ b/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT, 128K EGA, 640Kb RAM diff --git a/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml index e0addc4f5..60427adc5 100644 --- a/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Monochrome Display diff --git a/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml b/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml index fcaf5d9fc..fece2e50b 100644 --- a/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Monochrome Display diff --git a/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml b/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml index dd43d4e78..7fb25f94a 100644 --- a/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 2Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/2048kb/machine.xml b/devices/pcx86/machine/5170/vga/2048kb/machine.xml index 8936a7ad8..7a0756e3e 100644 --- a/devices/pcx86/machine/5170/vga/2048kb/machine.xml +++ b/devices/pcx86/machine/5170/vga/2048kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 2Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml b/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml index 1f5edddf4..08b7c0423 100644 --- a/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 4Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/4096kb/machine.xml b/devices/pcx86/machine/5170/vga/4096kb/machine.xml index b6aeea7d9..5e96f63eb 100644 --- a/devices/pcx86/machine/5170/vga/4096kb/machine.xml +++ b/devices/pcx86/machine/5170/vga/4096kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), VGA, 4Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml index a21cbffbe..90d6ca0a7 100644 --- a/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + AT&T Personal Computer 6300 with Color Display diff --git a/devices/pcx86/machine/att/6300/cga/640kb/machine.xml b/devices/pcx86/machine/att/6300/cga/640kb/machine.xml index 5713a7919..cd915e7af 100644 --- a/devices/pcx86/machine/att/6300/cga/640kb/machine.xml +++ b/devices/pcx86/machine/att/6300/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + AT&T Personal Computer 6300 with Color Display diff --git a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml index 878217854..e2248b1a5 100644 --- a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + Columbia Data Products MPC 1600 with Color Display diff --git a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml index b5cf70934..f1ee9bd23 100644 --- a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml +++ b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + Columbia Data Products MPC 1600 with Color Display diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml index 5bebd2d28..78089becd 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml index 7ac61db32..027bc108d 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml index 85039d3f9..cdbd485f2 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml index 813b9dac2..02afc2bcb 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml index 7b20f04de..0f188f3ff 100644 --- a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, COMPAQ VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml index 58af67c13..0f506bef7 100644 --- a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, COMPAQ VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml index 3e5f20536..4f5a9b042 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml index 75640d2f7..c936825e1 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml index 7c74e4a7b..59339af3e 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml index 29eb3c70f..acc96bc09 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/custom/machine.xml b/devices/pcx86/machine/custom/machine.xml index 9df943822..c6e54ea31 100644 --- a/devices/pcx86/machine/custom/machine.xml +++ b/devices/pcx86/machine/custom/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml index bf727f575..f52374c25 100644 --- a/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + Zenith Z-150 with Color Display diff --git a/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml b/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml index ce2b23418..9fd22eb5e 100644 --- a/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml +++ b/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + Zenith Z-150 with Color Display diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/machine.xml index a97be9c25..0210592e0 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Test Machine diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index 2c7f044fb..f4a587aee 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Test Machine diff --git a/disks/pcx86/apps/ibm/topview/1.01/manifest.xml b/disks/pcx86/apps/ibm/topview/1.01/manifest.xml index b8fb2ca21..bc561911a 100644 --- a/disks/pcx86/apps/ibm/topview/1.01/manifest.xml +++ b/disks/pcx86/apps/ibm/topview/1.01/manifest.xml @@ -1,5 +1,5 @@ - + TopView 1.01 diff --git a/disks/pcx86/apps/lotus/123/1.0a/manifest.xml b/disks/pcx86/apps/lotus/123/1.0a/manifest.xml index b4b0f5be1..8413eef45 100644 --- a/disks/pcx86/apps/lotus/123/1.0a/manifest.xml +++ b/disks/pcx86/apps/lotus/123/1.0a/manifest.xml @@ -1,5 +1,5 @@ - + 1-2-3 1.0a diff --git a/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml b/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml index c7eef9ee7..eace7a9ca 100644 --- a/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml +++ b/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml @@ -1,5 +1,5 @@ - + WordStar 3.30 diff --git a/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml b/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml index cb9fc06b6..3470524a7 100644 --- a/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml +++ b/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml @@ -1,5 +1,5 @@ - + WordStar 4.00 diff --git a/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml b/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml index 2d618cdac..f98785fcd 100644 --- a/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml +++ b/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Chart 2.02 diff --git a/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml b/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml index b345fa04a..8f9409892 100644 --- a/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml +++ b/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml @@ -1,5 +1,5 @@ - + Word for Windows 2.0c diff --git a/disks/pcx86/apps/microsoft/word/3.0/manifest.xml b/disks/pcx86/apps/microsoft/word/3.0/manifest.xml index 157c6ff46..d7b7a8b1a 100644 --- a/disks/pcx86/apps/microsoft/word/3.0/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/3.0/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 3.0 diff --git a/disks/pcx86/apps/microsoft/word/3.1/manifest.xml b/disks/pcx86/apps/microsoft/word/3.1/manifest.xml index cb72606f5..102d6f7c8 100644 --- a/disks/pcx86/apps/microsoft/word/3.1/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/3.1/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 3.1 diff --git a/disks/pcx86/apps/microsoft/word/5.0/manifest.xml b/disks/pcx86/apps/microsoft/word/5.0/manifest.xml index 71f6c010b..73882770e 100644 --- a/disks/pcx86/apps/microsoft/word/5.0/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/5.0/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 5.0 diff --git a/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml b/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml index 7f5ba8a8a..a32d53f99 100644 --- a/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml +++ b/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml @@ -1,5 +1,5 @@ - + Omniview 386 4.30 diff --git a/disks/pcx86/cpm/1.1b/machine.xml b/disks/pcx86/cpm/1.1b/machine.xml index 1a2c1c0ae..68f8ef085 100644 --- a/disks/pcx86/cpm/1.1b/machine.xml +++ b/disks/pcx86/cpm/1.1b/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) running CP/M-86 diff --git a/disks/pcx86/cpm/1.1b/manifest.xml b/disks/pcx86/cpm/1.1b/manifest.xml index 00a0ffd90..ed0520d57 100644 --- a/disks/pcx86/cpm/1.1b/manifest.xml +++ b/disks/pcx86/cpm/1.1b/manifest.xml @@ -1,5 +1,5 @@ - + CP/M-86 1.1B diff --git a/disks/pcx86/diags/ibm/manifest.xml b/disks/pcx86/diags/ibm/manifest.xml index 7a8ee51a3..cbf200e41 100644 --- a/disks/pcx86/diags/ibm/manifest.xml +++ b/disks/pcx86/diags/ibm/manifest.xml @@ -1,5 +1,5 @@ - + IBM PC Diagnostics Diagnostics diff --git a/disks/pcx86/dos/compaq/1.11/manifest.xml b/disks/pcx86/dos/compaq/1.11/manifest.xml index e63aaa155..efb881f77 100644 --- a/disks/pcx86/dos/compaq/1.11/manifest.xml +++ b/disks/pcx86/dos/compaq/1.11/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 1.11 diff --git a/disks/pcx86/dos/compaq/1.12/manifest.xml b/disks/pcx86/dos/compaq/1.12/manifest.xml index 506fa0c52..48a53f028 100644 --- a/disks/pcx86/dos/compaq/1.12/manifest.xml +++ b/disks/pcx86/dos/compaq/1.12/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 1.12 diff --git a/disks/pcx86/dos/compaq/2.12/manifest.xml b/disks/pcx86/dos/compaq/2.12/manifest.xml index 9523e7cb1..1e30bfd40 100644 --- a/disks/pcx86/dos/compaq/2.12/manifest.xml +++ b/disks/pcx86/dos/compaq/2.12/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 2.12 diff --git a/disks/pcx86/dos/compaq/3.00/manifest.xml b/disks/pcx86/dos/compaq/3.00/manifest.xml index 780ae3573..626944ae5 100644 --- a/disks/pcx86/dos/compaq/3.00/manifest.xml +++ b/disks/pcx86/dos/compaq/3.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.00 diff --git a/disks/pcx86/dos/compaq/3.10/manifest.xml b/disks/pcx86/dos/compaq/3.10/manifest.xml index e521d8451..e2052cb7c 100644 --- a/disks/pcx86/dos/compaq/3.10/manifest.xml +++ b/disks/pcx86/dos/compaq/3.10/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.10 diff --git a/disks/pcx86/dos/compaq/3.31/manifest.xml b/disks/pcx86/dos/compaq/3.31/manifest.xml index 2a43011a9..c555d03d9 100644 --- a/disks/pcx86/dos/compaq/3.31/manifest.xml +++ b/disks/pcx86/dos/compaq/3.31/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.31 diff --git a/disks/pcx86/dos/ibm/1.00/manifest.xml b/disks/pcx86/dos/ibm/1.00/manifest.xml index 415543731..c81a6ed63 100644 --- a/disks/pcx86/dos/ibm/1.00/manifest.xml +++ b/disks/pcx86/dos/ibm/1.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 1.00 diff --git a/disks/pcx86/dos/ibm/1.10/manifest.xml b/disks/pcx86/dos/ibm/1.10/manifest.xml index 8506c70c4..270dc9078 100644 --- a/disks/pcx86/dos/ibm/1.10/manifest.xml +++ b/disks/pcx86/dos/ibm/1.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 1.10 diff --git a/disks/pcx86/dos/ibm/2.00/manifest.xml b/disks/pcx86/dos/ibm/2.00/manifest.xml index 6abe61c45..e0919b4df 100644 --- a/disks/pcx86/dos/ibm/2.00/manifest.xml +++ b/disks/pcx86/dos/ibm/2.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 2.00 diff --git a/disks/pcx86/dos/ibm/2.10/manifest.xml b/disks/pcx86/dos/ibm/2.10/manifest.xml index 8fb37fb72..b5d884754 100644 --- a/disks/pcx86/dos/ibm/2.10/manifest.xml +++ b/disks/pcx86/dos/ibm/2.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 2.10 diff --git a/disks/pcx86/dos/ibm/3.00/manifest.xml b/disks/pcx86/dos/ibm/3.00/manifest.xml index 11c015b12..dd83057f3 100644 --- a/disks/pcx86/dos/ibm/3.00/manifest.xml +++ b/disks/pcx86/dos/ibm/3.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.00 diff --git a/disks/pcx86/dos/ibm/3.10/manifest.xml b/disks/pcx86/dos/ibm/3.10/manifest.xml index b78a95907..285a14cab 100644 --- a/disks/pcx86/dos/ibm/3.10/manifest.xml +++ b/disks/pcx86/dos/ibm/3.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.10 diff --git a/disks/pcx86/dos/ibm/3.20/manifest.xml b/disks/pcx86/dos/ibm/3.20/manifest.xml index ff155c8b5..775a58f08 100644 --- a/disks/pcx86/dos/ibm/3.20/manifest.xml +++ b/disks/pcx86/dos/ibm/3.20/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.20 diff --git a/disks/pcx86/dos/ibm/3.30/manifest.xml b/disks/pcx86/dos/ibm/3.30/manifest.xml index 78b984009..c389c502e 100644 --- a/disks/pcx86/dos/ibm/3.30/manifest.xml +++ b/disks/pcx86/dos/ibm/3.30/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.30 diff --git a/disks/pcx86/dos/ibm/4.00/manifest.xml b/disks/pcx86/dos/ibm/4.00/manifest.xml index 7b9ed24c0..61eea0c04 100644 --- a/disks/pcx86/dos/ibm/4.00/manifest.xml +++ b/disks/pcx86/dos/ibm/4.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 4.00 diff --git a/disks/pcx86/dos/ibm/5.00/manifest.xml b/disks/pcx86/dos/ibm/5.00/manifest.xml index 5c4cd230a..38ecc9cab 100644 --- a/disks/pcx86/dos/ibm/5.00/manifest.xml +++ b/disks/pcx86/dos/ibm/5.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 5.00 diff --git a/disks/pcx86/dos/ibm/6.10/manifest.xml b/disks/pcx86/dos/ibm/6.10/manifest.xml index 9f52f6289..325d12c1d 100644 --- a/disks/pcx86/dos/ibm/6.10/manifest.xml +++ b/disks/pcx86/dos/ibm/6.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 6.10 diff --git a/disks/pcx86/dos/ibm/6.30/manifest.xml b/disks/pcx86/dos/ibm/6.30/manifest.xml index baa3b07ec..0d998ee96 100644 --- a/disks/pcx86/dos/ibm/6.30/manifest.xml +++ b/disks/pcx86/dos/ibm/6.30/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 6.30 diff --git a/disks/pcx86/dos/ibm/7.00/manifest.xml b/disks/pcx86/dos/ibm/7.00/manifest.xml index c8be4cee9..54606f362 100644 --- a/disks/pcx86/dos/ibm/7.00/manifest.xml +++ b/disks/pcx86/dos/ibm/7.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 7.00 diff --git a/disks/pcx86/dos/microsoft/3.20/manifest.xml b/disks/pcx86/dos/microsoft/3.20/manifest.xml index 9b34bdebc..e168aa01a 100644 --- a/disks/pcx86/dos/microsoft/3.20/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.20/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.20 diff --git a/disks/pcx86/dos/microsoft/3.21/manifest.xml b/disks/pcx86/dos/microsoft/3.21/manifest.xml index 5b6998985..57597fe70 100644 --- a/disks/pcx86/dos/microsoft/3.21/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.21/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.21 diff --git a/disks/pcx86/dos/microsoft/3.30/manifest.xml b/disks/pcx86/dos/microsoft/3.30/manifest.xml index 0df4e3e27..05465d2b0 100644 --- a/disks/pcx86/dos/microsoft/3.30/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.30/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.30 diff --git a/disks/pcx86/dos/microsoft/3.31/manifest.xml b/disks/pcx86/dos/microsoft/3.31/manifest.xml index d5584a3db..62ca456ff 100644 --- a/disks/pcx86/dos/microsoft/3.31/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.31/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.31 diff --git a/disks/pcx86/dos/microsoft/4.00/manifest.xml b/disks/pcx86/dos/microsoft/4.00/manifest.xml index c8c189f80..7d0f5564f 100644 --- a/disks/pcx86/dos/microsoft/4.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.00 diff --git a/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml b/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml index 6307a410b..951138d3c 100644 --- a/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.01 diff --git a/disks/pcx86/dos/microsoft/4.01/manifest.xml b/disks/pcx86/dos/microsoft/4.01/manifest.xml index 558fa19f8..80edef227 100644 --- a/disks/pcx86/dos/microsoft/4.01/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.01/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.01 diff --git a/disks/pcx86/dos/microsoft/4.0M/manifest.xml b/disks/pcx86/dos/microsoft/4.0M/manifest.xml index 0ca882aa5..33d910be1 100644 --- a/disks/pcx86/dos/microsoft/4.0M/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.0M/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.0M diff --git a/disks/pcx86/dos/microsoft/5.00/manifest.xml b/disks/pcx86/dos/microsoft/5.00/manifest.xml index 8313d6722..a9ace9a09 100644 --- a/disks/pcx86/dos/microsoft/5.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/5.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 5.00 diff --git a/disks/pcx86/dos/microsoft/6.00/manifest.xml b/disks/pcx86/dos/microsoft/6.00/manifest.xml index 6c55566aa..588c05b31 100644 --- a/disks/pcx86/dos/microsoft/6.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.00 diff --git a/disks/pcx86/dos/microsoft/6.20/manifest.xml b/disks/pcx86/dos/microsoft/6.20/manifest.xml index f3b906786..27250b566 100644 --- a/disks/pcx86/dos/microsoft/6.20/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.20/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.20 diff --git a/disks/pcx86/dos/microsoft/6.22/manifest.xml b/disks/pcx86/dos/microsoft/6.22/manifest.xml index 8fd83242b..cd25d5577 100644 --- a/disks/pcx86/dos/microsoft/6.22/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.22/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.22 diff --git a/disks/pcx86/empty/manifest.xml b/disks/pcx86/empty/manifest.xml index 73b5659c2..ca51f28d9 100644 --- a/disks/pcx86/empty/manifest.xml +++ b/disks/pcx86/empty/manifest.xml @@ -1,5 +1,5 @@ - + Empty Diskettes diff --git a/disks/pcx86/games/id/wolf3d/manifest.xml b/disks/pcx86/games/id/wolf3d/manifest.xml index 0fb747229..ddbd375ff 100644 --- a/disks/pcx86/games/id/wolf3d/manifest.xml +++ b/disks/pcx86/games/id/wolf3d/manifest.xml @@ -1,5 +1,5 @@ - + Wolfenstein 3D diff --git a/disks/pcx86/games/infocom/hhiker/manifest.xml b/disks/pcx86/games/infocom/hhiker/manifest.xml index 05dc3ce06..92587d4a7 100644 --- a/disks/pcx86/games/infocom/hhiker/manifest.xml +++ b/disks/pcx86/games/infocom/hhiker/manifest.xml @@ -1,5 +1,5 @@ - + The Hitchhiker's Guide to the Galaxy diff --git a/disks/pcx86/games/infocom/machine.xml b/disks/pcx86/games/infocom/machine.xml index d4001855a..cd3b56773 100644 --- a/disks/pcx86/games/infocom/machine.xml +++ b/disks/pcx86/games/infocom/machine.xml @@ -1,5 +1,5 @@ - + IBM PC Model 5150 (CGA, 64K) diff --git a/disks/pcx86/games/infocom/planet/manifest.xml b/disks/pcx86/games/infocom/planet/manifest.xml index 81a4d3b18..79e1cfb0f 100644 --- a/disks/pcx86/games/infocom/planet/manifest.xml +++ b/disks/pcx86/games/infocom/planet/manifest.xml @@ -1,5 +1,5 @@ - + Planetfall diff --git a/disks/pcx86/games/infocom/zork1/debugger/machine.xml b/disks/pcx86/games/infocom/zork1/debugger/machine.xml index 47a8b9445..622b1c926 100644 --- a/disks/pcx86/games/infocom/zork1/debugger/machine.xml +++ b/disks/pcx86/games/infocom/zork1/debugger/machine.xml @@ -1,5 +1,5 @@ - + Zork I (IBM PC Model 5150) diff --git a/disks/pcx86/games/infocom/zork1/manifest.xml b/disks/pcx86/games/infocom/zork1/manifest.xml index 4e306506a..88af750e9 100644 --- a/disks/pcx86/games/infocom/zork1/manifest.xml +++ b/disks/pcx86/games/infocom/zork1/manifest.xml @@ -1,5 +1,5 @@ - + Zork I diff --git a/disks/pcx86/games/infocom/zork2/manifest.xml b/disks/pcx86/games/infocom/zork2/manifest.xml index 583a8678d..659a7793e 100644 --- a/disks/pcx86/games/infocom/zork2/manifest.xml +++ b/disks/pcx86/games/infocom/zork2/manifest.xml @@ -1,5 +1,5 @@ - + Zork II diff --git a/disks/pcx86/games/infocom/zork3/manifest.xml b/disks/pcx86/games/infocom/zork3/manifest.xml index 6ae861127..964a95e8e 100644 --- a/disks/pcx86/games/infocom/zork3/manifest.xml +++ b/disks/pcx86/games/infocom/zork3/manifest.xml @@ -1,5 +1,5 @@ - + Zork III diff --git a/disks/pcx86/games/microsoft/adventure/machine.xml b/disks/pcx86/games/microsoft/adventure/machine.xml index c40f5b529..6c30df8ce 100644 --- a/disks/pcx86/games/microsoft/adventure/machine.xml +++ b/disks/pcx86/games/microsoft/adventure/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) running Microsoft Adventure diff --git a/disks/pcx86/games/microsoft/adventure/manifest.xml b/disks/pcx86/games/microsoft/adventure/manifest.xml index c5fa99de4..07ea909fd 100644 --- a/disks/pcx86/games/microsoft/adventure/manifest.xml +++ b/disks/pcx86/games/microsoft/adventure/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Adventure 1.00 diff --git a/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml b/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml index 51bac7f05..5d70ca983 100644 --- a/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml +++ b/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Flight Simulator diff --git a/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml b/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml index 4afc2b36b..094559907 100644 --- a/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml +++ b/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Flight Simulator diff --git a/disks/pcx86/minix/1.1/manifest.xml b/disks/pcx86/minix/1.1/manifest.xml index d8f33810f..97a65bc3c 100644 --- a/disks/pcx86/minix/1.1/manifest.xml +++ b/disks/pcx86/minix/1.1/manifest.xml @@ -1,5 +1,5 @@ - + MINIX 1.1 diff --git a/disks/pcx86/os2/ibm/1.0/manifest.xml b/disks/pcx86/os2/ibm/1.0/manifest.xml index d02ad6ed1..2f2483520 100644 --- a/disks/pcx86/os2/ibm/1.0/manifest.xml +++ b/disks/pcx86/os2/ibm/1.0/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.0 diff --git a/disks/pcx86/os2/ibm/1.1/manifest.xml b/disks/pcx86/os2/ibm/1.1/manifest.xml index 9b7c71d1b..1fe0a0285 100644 --- a/disks/pcx86/os2/ibm/1.1/manifest.xml +++ b/disks/pcx86/os2/ibm/1.1/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.1 diff --git a/disks/pcx86/os2/ibm/1.3/manifest.xml b/disks/pcx86/os2/ibm/1.3/manifest.xml index 88aebe046..ed22b80c8 100644 --- a/disks/pcx86/os2/ibm/1.3/manifest.xml +++ b/disks/pcx86/os2/ibm/1.3/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.3 diff --git a/disks/pcx86/os2/microsoft/1.0/manifest.xml b/disks/pcx86/os2/microsoft/1.0/manifest.xml index f5235d4ec..42d3e2cd9 100644 --- a/disks/pcx86/os2/microsoft/1.0/manifest.xml +++ b/disks/pcx86/os2/microsoft/1.0/manifest.xml @@ -1,5 +1,5 @@ - + MS OS/2 1.0 diff --git a/disks/pcx86/os2/misc/manifest.xml b/disks/pcx86/os2/misc/manifest.xml index 9890c7364..dcb154b43 100644 --- a/disks/pcx86/os2/misc/manifest.xml +++ b/disks/pcx86/os2/misc/manifest.xml @@ -1,5 +1,5 @@ - + OS/2 Prototype Disks diff --git a/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml b/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml index 80adda3b8..cf9707205 100644 --- a/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml +++ b/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml @@ -1,5 +1,5 @@ - + Borland Turbo Pascal diff --git a/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml b/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml index 89697206b..a7dcfdf6e 100644 --- a/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml +++ b/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml @@ -1,5 +1,5 @@ - + Borland Turbo Pascal diff --git a/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml b/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml index 637d7b6bc..d12e8822f 100644 --- a/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml +++ b/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml @@ -1,5 +1,5 @@ - + IBM BASIC Compiler 1.00 diff --git a/disks/pcx86/tools/microsoft/basic/manifest.xml b/disks/pcx86/tools/microsoft/basic/manifest.xml index 43e72d728..308046e14 100644 --- a/disks/pcx86/tools/microsoft/basic/manifest.xml +++ b/disks/pcx86/tools/microsoft/basic/manifest.xml @@ -1,5 +1,5 @@ - + MS BASIC diff --git a/disks/pcx86/tools/microsoft/c/2.03/manifest.xml b/disks/pcx86/tools/microsoft/c/2.03/manifest.xml index 8b4aba16b..6bfa83a75 100644 --- a/disks/pcx86/tools/microsoft/c/2.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 2.03 diff --git a/disks/pcx86/tools/microsoft/c/3.00/manifest.xml b/disks/pcx86/tools/microsoft/c/3.00/manifest.xml index a376dedf6..078bc7654 100644 --- a/disks/pcx86/tools/microsoft/c/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 3.00 diff --git a/disks/pcx86/tools/microsoft/c/4.00/manifest.xml b/disks/pcx86/tools/microsoft/c/4.00/manifest.xml index 212ca18dc..9fc381018 100644 --- a/disks/pcx86/tools/microsoft/c/4.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/4.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 4.00 diff --git a/disks/pcx86/tools/microsoft/c/5.00/manifest.xml b/disks/pcx86/tools/microsoft/c/5.00/manifest.xml index de734c41b..feadc4bcf 100644 --- a/disks/pcx86/tools/microsoft/c/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.00 diff --git a/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml b/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml index 4c97f8139..99a7c08b1 100644 --- a/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.10-OS2 diff --git a/disks/pcx86/tools/microsoft/c/5.10/manifest.xml b/disks/pcx86/tools/microsoft/c/5.10/manifest.xml index 33adf5c1d..5c6946da4 100644 --- a/disks/pcx86/tools/microsoft/c/5.10/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.10 diff --git a/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml index 683a79386..36aa2fe0e 100644 --- a/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 1.00 diff --git a/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml index ffabc72c7..11bfe41c5 100644 --- a/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 3.00 diff --git a/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml b/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml index 4cb4d0fe1..91f40fe04 100644 --- a/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 3.01 diff --git a/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml index b48f286cc..8a693b884 100644 --- a/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 4.00 diff --git a/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml index c1d7c5c95..dec7ef51b 100644 --- a/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 5.00 diff --git a/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml b/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml index c4791aa14..cd86cbe60 100644 --- a/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 5.10 diff --git a/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml index a937697d9..1f22d0dec 100644 --- a/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 6.00 diff --git a/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml b/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml index 7d68365e8..8b06a17be 100644 --- a/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 6.11 diff --git a/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml b/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml index 52aec9bbd..81173345e 100644 --- a/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml @@ -1,5 +1,5 @@ - + MS Mouse 5.00 diff --git a/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml b/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml index 231a3abca..6e9ae350a 100644 --- a/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml +++ b/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml @@ -1,5 +1,5 @@ - + MS OS/2 SDK 1.02 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml index 29b51a36b..6266c61ca 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.01 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml index 3d0e0055f..ee86022bd 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.03 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml index 61b8b7156..9b8d50e84 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.04 os2museum.com diff --git a/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml index 4e5e168a6..f721bfdb8 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 2.03 os2museum.com diff --git a/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml index 1cc393f08..16a55053c 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 3.00 diff --git a/disks/pcx86/tools/misc/manifest.xml b/disks/pcx86/tools/misc/manifest.xml index ce35a700e..0b7140351 100644 --- a/disks/pcx86/tools/misc/manifest.xml +++ b/disks/pcx86/tools/misc/manifest.xml @@ -1,5 +1,5 @@ - + Enhanced DEBUG PC DOS Retro: Enhanced DEBUG for PC DOS and MS-DOS diff --git a/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml b/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml index 78f9afc3b..2928e8be7 100644 --- a/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml +++ b/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml @@ -1,5 +1,5 @@ - + PC/IX 1.0 diff --git a/disks/pcx86/unix/microport/system-v/2.3/manifest.xml b/disks/pcx86/unix/microport/system-v/2.3/manifest.xml index e4760830a..b533c83df 100644 --- a/disks/pcx86/unix/microport/system-v/2.3/manifest.xml +++ b/disks/pcx86/unix/microport/system-v/2.3/manifest.xml @@ -1,5 +1,5 @@ - + Microport's AT&T UNIX System V-AT 2.3 (5¨) diff --git a/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml b/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml index 658a9968e..4e8921592 100644 --- a/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml +++ b/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml @@ -1,5 +1,5 @@ - + SCO Xenix 8086 Operating System v2.1.3 diff --git a/disks/pcx86/windows/1.00/manifest.xml b/disks/pcx86/windows/1.00/manifest.xml index f17f19c26..1672f68e2 100644 --- a/disks/pcx86/windows/1.00/manifest.xml +++ b/disks/pcx86/windows/1.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.00 diff --git a/disks/pcx86/windows/1.01/manifest.xml b/disks/pcx86/windows/1.01/manifest.xml index 4ec50ec24..bb99981a8 100644 --- a/disks/pcx86/windows/1.01/manifest.xml +++ b/disks/pcx86/windows/1.01/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.01 diff --git a/disks/pcx86/windows/1.02/manifest.xml b/disks/pcx86/windows/1.02/manifest.xml index 2f0ee425a..d7aa548f7 100644 --- a/disks/pcx86/windows/1.02/manifest.xml +++ b/disks/pcx86/windows/1.02/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.02 diff --git a/disks/pcx86/windows/1.03/manifest.xml b/disks/pcx86/windows/1.03/manifest.xml index d8a4fcd6a..53eb7d984 100644 --- a/disks/pcx86/windows/1.03/manifest.xml +++ b/disks/pcx86/windows/1.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03 diff --git a/disks/pcx86/windows/1.03a/manifest.xml b/disks/pcx86/windows/1.03a/manifest.xml index 2e8480ca2..f48123bb0 100644 --- a/disks/pcx86/windows/1.03a/manifest.xml +++ b/disks/pcx86/windows/1.03a/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03a diff --git a/disks/pcx86/windows/1.03b/manifest.xml b/disks/pcx86/windows/1.03b/manifest.xml index aed6bf888..7006d8688 100644 --- a/disks/pcx86/windows/1.03b/manifest.xml +++ b/disks/pcx86/windows/1.03b/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03b diff --git a/disks/pcx86/windows/1.04/manifest.xml b/disks/pcx86/windows/1.04/manifest.xml index 3b0ef9a12..c1a73300a 100644 --- a/disks/pcx86/windows/1.04/manifest.xml +++ b/disks/pcx86/windows/1.04/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.04 os2museum.com diff --git a/disks/pcx86/windows/2.03/manifest.xml b/disks/pcx86/windows/2.03/manifest.xml index 900d796d8..b924a5c1b 100644 --- a/disks/pcx86/windows/2.03/manifest.xml +++ b/disks/pcx86/windows/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 2.03 diff --git a/disks/pcx86/windows/2.0x/manifest.xml b/disks/pcx86/windows/2.0x/manifest.xml index 3c4e8e452..5438e6883 100644 --- a/disks/pcx86/windows/2.0x/manifest.xml +++ b/disks/pcx86/windows/2.0x/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows/386 2.0x diff --git a/disks/pcx86/windows/2.10/manifest.xml b/disks/pcx86/windows/2.10/manifest.xml index 38cc50fcd..234748876 100644 --- a/disks/pcx86/windows/2.10/manifest.xml +++ b/disks/pcx86/windows/2.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows/386 2.10 diff --git a/disks/pcx86/windows/2.11/manifest.xml b/disks/pcx86/windows/2.11/manifest.xml index 2abd500fa..8223bd982 100644 --- a/disks/pcx86/windows/2.11/manifest.xml +++ b/disks/pcx86/windows/2.11/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 2.11 diff --git a/disks/pcx86/windows/3.00/720K/manifest.xml b/disks/pcx86/windows/3.00/720K/manifest.xml index d3054b9a1..eca44f1cf 100644 --- a/disks/pcx86/windows/3.00/720K/manifest.xml +++ b/disks/pcx86/windows/3.00/720K/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.00 diff --git a/disks/pcx86/windows/3.00/manifest.xml b/disks/pcx86/windows/3.00/manifest.xml index 7111b6279..a5f6acef9 100644 --- a/disks/pcx86/windows/3.00/manifest.xml +++ b/disks/pcx86/windows/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.00 diff --git a/disks/pcx86/windows/3.10/manifest.xml b/disks/pcx86/windows/3.10/manifest.xml index 12f7ee8b3..fc5d2f884 100644 --- a/disks/pcx86/windows/3.10/manifest.xml +++ b/disks/pcx86/windows/3.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.10 diff --git a/disks/pcx86/windows/3.11/manifest.xml b/disks/pcx86/windows/3.11/manifest.xml index 27b0d4f4c..292042944 100644 --- a/disks/pcx86/windows/3.11/manifest.xml +++ b/disks/pcx86/windows/3.11/manifest.xml @@ -1,5 +1,5 @@ - + Windows for Workgroups 3.11 diff --git a/disks/pcx86/windows/win95/4.00.499/manifest.xml b/disks/pcx86/windows/win95/4.00.499/manifest.xml index e3e27f968..10c03a3f8 100644 --- a/disks/pcx86/windows/win95/4.00.499/manifest.xml +++ b/disks/pcx86/windows/win95/4.00.499/manifest.xml @@ -1,5 +1,5 @@ - + Windows 95 (Build 499) diff --git a/disks/pcx86/windows/win95/4.00.950/manifest.xml b/disks/pcx86/windows/win95/4.00.950/manifest.xml index 2b1fdc70d..02ac45132 100644 --- a/disks/pcx86/windows/win95/4.00.950/manifest.xml +++ b/disks/pcx86/windows/win95/4.00.950/manifest.xml @@ -1,5 +1,5 @@ - + Windows 95 (RTM) 4.00.950 diff --git a/disks/pcx86/windows/wincomm/manifest.xml b/disks/pcx86/windows/wincomm/manifest.xml index 0cc39a55a..eb5dbd9de 100644 --- a/disks/pcx86/windows/wincomm/manifest.xml +++ b/disks/pcx86/windows/wincomm/manifest.xml @@ -1,5 +1,5 @@ - + Windows COMM Driver (Source) diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl index bf09079c3..c48ca5c2c 100644 --- a/docs/pcx86/examples/components.xsl +++ b/docs/pcx86/examples/components.xsl @@ -13,11 +13,11 @@ pcjs pcx86 PCx86 - 1.30.0 + 1.30.1 www.pcjs.org - + diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 590af5c84..83f97359b 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -779,28 +779,28 @@ g[0]){Lr(a,g[1],!0);break}Mr(a,g);break;case "m":if("mouse"==g[0]){var si=g[1],v null;else if("off"==Ma)vc=!1,Ma=null;else{"keys"==Ma&&(Ma="key");"kbd"==Ma&&(Ma="keyboard");for(uc in Eb)if(Ma==uc){rd=Eb[uc];vc=!!(a.wc&rd);break}if(!rd){a.O("unknown message category: "+Ma);break a}}rd&&("on"==g[2]?(a.wc|=rd,vc=!0):"off"==g[2]&&(a.wc&=~rd,vc=!1))}var qs=0,af="";for(uc in Eb)if(!Ma||Ma==uc){var rs=!!(a.wc&Eb[uc]);if(null===vc||vc==rs)af&&(af+=","),++qs%10||(af+="\n\t"),"key"==uc&&(uc="keys"),af+=uc}void 0===Ma&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off"); a.O((null!==vc?vc?"messages on: ":"messages off: ":"message categories:\n\t")+(af||"none"));yq(a)}break;case "o":var ti=g[1],ss=g[2];if(ti&&"?"!=ti){var ui=rq(a,ti,"port #"),vi=rq(a,ss);void 0!==ui&&void 0!==vi&&(zc(a.ga,ui,1,vi),a.O(v(ui)+": "+u(vi)))}else a.O("output commands:"),a.O("\to [p] [b]\twrite byte [b] to port [p]"),a.O("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){Nr(a,b.substr(5));break}var Tn="pr"==g[0]?1:0,de=1+Tn;if(a.U)a.O("step in progress"); else{var wg,Un=!1,kb=wq(a,M(a.F),a.F.wa.Z);do switch(wg=!1,a.Qa(kb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:fr(a,kb,1);wg=!0;break;case 204:case 206:a.U=de;fr(a,kb,1);break;case 205:case 224:case 225:case 226:a.U=de;fr(a,kb,kb.Rb?4:2);break;case 232:a.U=de;fr(a,kb,kb.Rb?5:3);break;case 154:a.U=de;fr(a,kb,kb.Rb?7:5);break;case 255:var Vn=a.tb(kb)&14591;if(4351==Vn||6399==Vn)a.U=de,yr(a,kb);break;case 243:case 242:fr(a,kb,1);Un=wg=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:Un&& -(a.U=de,fr(a,kb,1))}while(wg);a.U?(a.Rd(a.B,kb,!0),a.Ne()||(a.X&&a.X.wd(),a.U=0)):Pr(a,Tn?"tr":"t")}break;case "r":if("reset"==b){a.X&&a.X.reset();break}qr(a,g);break;case "t":Pr(a,g[0],g[1]);break;case "u":rr(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Kr(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.30.0 ("+a.F.ja+",RELEASE,NOPREFETCH"+(Ab?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ca());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var bf;void 0!==g[3]&&(bf=+g[3]);switch(g[2]){case "int":a.F.Y.jf= +(a.U=de,fr(a,kb,1))}while(wg);a.U?(a.Rd(a.B,kb,!0),a.Ne()||(a.X&&a.X.wd(),a.U=0)):Pr(a,Tn?"tr":"t")}break;case "r":if("reset"==b){a.X&&a.X.reset();break}qr(a,g);break;case "t":Pr(a,g[0],g[1]);break;case "u":rr(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Kr(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.30.1 ("+a.F.ja+",RELEASE,NOPREFETCH"+(Ab?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ca());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var bf;void 0!==g[3]&&(bf=+g[3]);switch(g[2]){case "int":a.F.Y.jf= bf;break;case "start":a.F.Y.Mf=bf;break;case "stop":a.F.Y.lf=bf;break;default:a.O("unknown cs option");break a}void 0!==bf&&$c(a.F);a.O("checksums "+(a.F.la.Xe?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(dd(a.F,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.F.Y.He.toFixed(2)+"Mhz")+" ("+a.F.Y.Wd+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"), a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){Nr(a,b.substr(1));break}var wi="commands:",xi;for(xi in Dq)wi+="\n"+pa(xi,7)+Dq[xi];ag(a)||(wi+="\nnote: frequency/history disabled if no exec breakpoints");a.O(wi);break;default:a.O("unknown command: "+b),d=!1}}}catch(Wn){a.O("debugger error: "+(Wn.stack||Wn.message)),d=!1}return d}function Aq(a,b,c){b=a.Ng(b,c);for(var d in b)if(!xr(a,b[+d]))return!1;return!0} Xa(function(){for(var a=tb(document,"pcx86","debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.0","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +function Xr(a,b){var c=new qf(a,"1.30.1","validate");if(c.load()&&Yr(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.Na("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}} +l.cg=function(a){void 0===a&&(a=this.A||(this.aa?1:Tr));if(!this.N){this.N++;var b=!1,c=!1;this.ka=!1;var d=this.ea||new qf(this,"1.30.1");if(-1==a)b=!0;else if(a>Tr){if(d.load(this.aa)){this.X=new qf(this,"1.30.1","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): ("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; -function Zr(a,b){if(Ea("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.ie();b=b.toString();var d={app:"PCx86",ver:"1.30.0"};d.url=a.ua;d.user=c;d.type="bug";d.data=b;Aa("http://www.pcjs.org/api/v1/report",d,!0)}} -function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.0"),g=new qf(a,"1.30.0","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.0");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad).*?(<\/xsl:variable>)/,"$1pcx86$2") function ts(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Aa(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 k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);ts(a,b,c)}})}else c(a,null)} function us(a,b,c,d){function e(a){if(void 0===h){var b=g&&tb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);k&&(--fs||Za(!0));k=!1}var g,h,k=!0;fs++;lb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=m:t.appendChild(document.createTextNode(m));n.appendChild(t)}c|| -(c="/versions/pcx86/1.30.0/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--fs||Za(!0)):f("invalid machine element: "+ +(c="/versions/pcx86/1.30.1/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--fs||Za(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gs(b,a,d,!0,e,m):hs(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return k}function vs(a,b,c,d){Za(!1);return us(a,b,c,d)}window.embedPC=vs;window.embedPCx86=vs;window.enableEvents=Za;window.sendEvent=$a; function ws(a,b,c,d){if(!c&&b){d.push(b);a=lb[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Aa(b,null,!0,function(a,b){xs(b,d)}):xs(null,d)}else w("Error ("+c+") requesting "+a)} function xs(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=lb[f],k={},m;for(m in h){var n=h[m],t=ka(m);if("xml"==t){for(t=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=t.exec(h[m]);){var q=d[2];q&&(h[q]||(n=n.replace(d[0],"")))}d=m=ja(m)}else"xsl"==t&&(e=m=ja(m));k[m]=n}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, "©"),a=Na(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('
\n')+"...\n",a=a+(' +
+ + + + + + + + + + + + + +
+ + + + js + , + + +
+
+ + + + + + + + + + + + + , + + + + + + + + + + + + .machine + . + + + + + + + + + + + + + + border:1px solid black;border-radius:10px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + position:; + position:absolute; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
+ + + + + + +
+ +
+
+ +
+ +
+
+ +
+ + +
[XML]
+ +
+ +
+
+
+
+ + + + + text-align:center; + + + +

+
+ + +
+
+ + + + type:'' + + + binding:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + position:absolute; + float:left; + float:right; + margin:0 auto; + ; + float:left; + + + + + + + + +
+ + + font-size:; + + + + + -label + + + width:; + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+
+
+ +
+
+ +

+
+ +
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + null + + + + + + ,autoStart: + + + + + + + + + + + + + + + 600 + + + + + keyboard + ,model: + + + + + + + + + + + + + + + false + + + + + serial + ,demo: + + + + + + + + + + + + + + disk + + + + + + + + + + + + + + + 0 + + + + + + + + + + + rom + ,size:,image:'' + + + + + + + + + + + + + + + 0 + + + + + ram + ,size: + + + + + + + + + + + + + + + 600 + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 32 + + + + + + 32 + + + + + + + 0 + + + + + + + 0 + + + + + + + + + + + + + + null + + + + + video + ,model:,screenWidth:,screenHeight:,charCols:,charRows:,charWidth:,charHeight:,charSet:'',screenColor:'',smoothing: + + + + + + + + + + + + + + debugger + + + + + + + + + + + + + + panel + + + + + + + + + + + + + [ + {} + , + ] + + + + computer + ,modules: + + + + + type:'',refID:'',start:,end: + + + diff --git a/versions/c1pjs/1.30.1/document.css b/versions/c1pjs/1.30.1/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/c1pjs/1.30.1/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/c1pjs/1.30.1/document.xsl b/versions/c1pjs/1.30.1/document.xsl new file mode 100644 index 000000000..339728837 --- /dev/null +++ b/versions/c1pjs/1.30.1/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

+
+ + + + + + + +

+
+ +

+
+
+
+ + + + + + +
+
+ + +
+ +   + + +
+
+ +
+
+ + + + + + + + + + + + + + + + +

+
+ + +

+
+ + +

+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + +
+
+ + +
+
+ + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/c1pjs/1.30.1/machine.xsl b/versions/c1pjs/1.30.1/machine.xsl new file mode 100644 index 000000000..c8a704734 --- /dev/null +++ b/versions/c1pjs/1.30.1/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/c1pjs/1.30.1/manifest.xsl b/versions/c1pjs/1.30.1/manifest.xsl new file mode 100644 index 000000000..b19846719 --- /dev/null +++ b/versions/c1pjs/1.30.1/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/c1pjs/1.30.1/outline.xsl b/versions/c1pjs/1.30.1/outline.xsl new file mode 100644 index 000000000..0ef6281a4 --- /dev/null +++ b/versions/c1pjs/1.30.1/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.1/common.css b/versions/pc8080/1.30.1/common.css new file mode 100644 index 000000000..6b1c0f887 --- /dev/null +++ b/versions/pc8080/1.30.1/common.css @@ -0,0 +1,265 @@ +@CHARSET "UTF-8"; +/** + @author Jeff Parsons (@jeffpar) + @website http://www.pcjs.org/ + @created 2013-05-05 + @modified 2014-02-23 + @license http://www.gnu.org/licenses/gpl.html + */ +body { + margin: 0; + background: #202020; +} +h1, h2 { + margin-top: 0; + color: #cccccc; +} +h1, h2, h3, h4 { + word-wrap: break-word; +} + +h4 a { + color: #cccccc !important; +} +p { + line-height: 1.5em; +} +img { + max-width: 100%; +} +a img { + vertical-align: bottom; +} +pre, code { + color: #000000; + background-color: #cccccc; + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; +} +pre { + margin: 1em 2em; + padding: 1em; + border-radius: 5px; + overflow: auto; +} +code { + padding: 1px; +} +pre a, code a { + color: #006400 !important; +} +.common { + width: 100%; + margin: 0 auto; + color: #cccccc; +} +.common a { + + color: #7fc07f; + text-decoration: none; +} +.common hr { + border-color: #808080; +} +.common a:hover { + text-decoration: underline; +} +.common, .machine { + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; + font-size: 15px; +} +.machine { + margin: 15px; + overflow: hidden; +} +.c1pjs { + overflow: visible; +} +.machine-placeholder { + text-align: center; + font-weight: bold; +} +.common-top { + background: #202020; + font-size: small; +} +.common-top-left { + float: left; + width: 60%; +} +.common-top-left ul { + line-height: 1.5em; + list-style-type: none; + margin: 0; + padding: 1em 1em 1em 9px; + overflow: hidden; +} +.common-top-left ul li { + display: block; + float: left; +} +.common-top-left ul li a { + border-right: 1px solid #6f6f6f; + padding: 2px 6px 2px 6px; +} +.common-top-left ul li:last-child a { + border-right: none; +} +.common-top-right { + float: right; + width: 40%; +} +.common-top-right p { + float: right; + margin: 0; + padding: 1em; +} +.common-middle { + clear: both; + padding: 1px 1em 1px 1em; + background: #404040; +} +.common-sidebar { + float: left; + font-size: small; + width: 140px; + padding-bottom: 20px; + overflow: hidden; + white-space: nowrap; + word-wrap: break-word; +} +.common-list { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list li { + + padding-bottom: 7px; +} +.common-list-data { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list-data li { + line-height: 1.5em; +} +.common-list-data-items, .common-list-data-subitems { + font-size: x-small; + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} +.common-list-data-items li, .common-list-data-subitems li { + padding-bottom: 0; +} +.common-main { + margin-left: 150px; + +} +.common-main blockquote { + text-align: justify; +} +.common-image-gallery { + margin: 0 auto; + text-align: center; +} +.common-image-gallery:after { + content: ''; + display: block; +} +.common-image-frame { + display: inline-block; + margin: 8px; + text-align: center; +} +.common-image-link { + padding: 5px; + border: 1px solid black; + border-radius: 5px; + background-color: #FAEBD7; +} +.common-image-label { + font-size: x-small; +} +.common-bottom { + clear: both; + padding-top: 1em; +} +.common-bottom:after { + content: ''; + display: block; + clear: both; +} +.common-reference { + float: left; + font-size: x-small; +} +.common-reference a { + text-decoration: none; +} +.common-copyright { + float: right; + font-size: x-small; +} +.common-copyright a { + text-decoration: none; +} +.md-list { +} +.md-list li { + line-height: 1.5em; + margin-bottom: 1em; +} +.md-list li p { + padding-left: 2em; +} +.md-list-compact { +} +.md-list-compact li { + margin-bottom: 0; +} +.md-list-none { + list-style-type: none; + padding-left: 2em; +} +.md-list-none li { + margin-bottom: 0; +} +@media screen and (max-width: 900px) { + + .common-sidebar { + width: 100%; + white-space: normal; + } + .common-list { + padding-left: 0; + } + .common-list-data { + padding-left: 0; + } + .common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li { + width: 130px; + float: left; + overflow: hidden; + vertical-align: top; + padding-right: 1em; + margin-top: 0; + } + .common-list-data-subitems { + display: none; + } + .common-main { + clear: both; + margin-left: 0; + padding-left: 0; + padding-right: 0; + } + .md-list-none { + padding-left: 1em; + } +} diff --git a/versions/pc8080/1.30.1/common.xsl b/versions/pc8080/1.30.1/common.xsl new file mode 100644 index 000000000..1ac312634 --- /dev/null +++ b/versions/pc8080/1.30.1/common.xsl @@ -0,0 +1,58 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +

    Powered by JavaScript and GitHub

    +
    +
    +
    + + +
    +

    + +
    +
    + +
    diff --git a/versions/pc8080/1.30.1/components.css b/versions/pc8080/1.30.1/components.css new file mode 100644 index 000000000..4a449ca97 --- /dev/null +++ b/versions/pc8080/1.30.1/components.css @@ -0,0 +1,159 @@ +@CHARSET "UTF-8"; + + +*:not(input,textarea) { + -webkit-user-select: none; +} +.pcjs-embed { +} +.pcjs-embed:after { + clear:both; +} +.pcjs-machine { +} +.pcjs-name, .pcjs-menu { + clear: both; + font-weight: bold; + padding-bottom: 4px; +} +.pcjs-menu { + float: left; +} +.pcjs-canvas { + width: 100%; + height: auto; +} +.pcjs-container { + color: #000000; + position: relative; +} +.pcjs-label { + font-size: small; + line-height: 19px; + vertical-align: middle; + float: left; + font-family: Monaco, "Lucida Console", monospace; +} +.pcjs-controls textarea { + font-family: Monaco, "Lucida Console", monospace; + font-size: x-small; +} +.pcjs-fieldset { + border: none; + margin: 0; + padding: 0; +} +.pcjs-flag { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 19px; + vertical-align: middle; +} +.pcjs-register { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 19px; + vertical-align: middle; + border: 1px solid black; +} +.pcjs-switches { + float: left; +} +.pcjs-bitBucket { + float: left; + width: 19px; + height: 38px; +} +.pcjs-bitCell { + float: left; + width: 19px; + height: 19px; + margin-right: -1px; + margin-bottom: -1px; + border: 1px solid black; + text-align: center; + line-height: 19px; +} +.pcjs-bitCellLeft { + border-left: 1px solid black; +} +.pcjs-bitLabel { + font-size: xx-small; + text-align: center; +} +.pcjs-description, .pcjs-status { + font-size: x-small; + line-height: 2em; +} +.pcjs-key { + border: 1px solid black; + font-size: x-small; + text-align: center; + position: absolute; + height: 34px; + line-height: 34px; + background-color: #ffffff; +} +.pcjs-led { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + text-align: center; + line-height: 19px; + background-color: #000000; +} +.pcjs-rled { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + border-radius: 50%; + text-align: center; + line-height: 19px; + background-color: #000000; +} +.pcjs-screen { + clear: both; + height: auto; + position: relative; + line-height: 0; +} +.pcjs-screen textarea { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + border: 0; + padding: 0; + line-height: 0; +} +.pcjs-reference { + float: left; + font-size: x-small; +} +.pcjs-reference a { + text-decoration: none; +} +.pcjs-copyright { + float: right; + font-size: x-small; +} +.pcjs-copyright a { + text-decoration: none; +} + +@media screen and (max-width: 900px) { + .pcjs-textarea { + width: 100% !important; + } + .pcjs-registers { + width: 100% !important; + } +} diff --git a/versions/pc8080/1.30.1/components.xsl b/versions/pc8080/1.30.1/components.xsl new file mode 100644 index 000000000..2be9e05c8 --- /dev/null +++ b/versions/pc8080/1.30.1/components.xsl @@ -0,0 +1,1275 @@ + + + + + + + + + + + pc + pcjs + pc8080 + PC8080 + 1.30.1 + www.pcjs.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + position:; + position:relative; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,resetAddr:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + device + ,name:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + serial + ,adapter:,binding:'',tabSize:,charBOL: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + + false + + + + + rom + ,addr:,size:,alias:,file:'',notify:'',writable: + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + true + + + + + ram + ,addr:,size:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + +
    diff --git a/versions/pc8080/1.30.1/document.css b/versions/pc8080/1.30.1/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pc8080/1.30.1/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pc8080/1.30.1/document.xsl b/versions/pc8080/1.30.1/document.xsl new file mode 100644 index 000000000..8148f4f60 --- /dev/null +++ b/versions/pc8080/1.30.1/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pc8080/1.30.1/machine.xsl b/versions/pc8080/1.30.1/machine.xsl new file mode 100644 index 000000000..5db8a3c41 --- /dev/null +++ b/versions/pc8080/1.30.1/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.1/manifest.xsl b/versions/pc8080/1.30.1/manifest.xsl new file mode 100644 index 000000000..c4451df1b --- /dev/null +++ b/versions/pc8080/1.30.1/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pc8080/1.30.1/outline.xsl b/versions/pc8080/1.30.1/outline.xsl new file mode 100644 index 000000000..c3798bc17 --- /dev/null +++ b/versions/pc8080/1.30.1/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.1/pc8080-dbg.js b/versions/pc8080/1.30.1/pc8080-dbg.js new file mode 100644 index 000000000..df08cc6a9 --- /dev/null +++ b/versions/pc8080/1.30.1/pc8080-dbg.js @@ -0,0 +1,251 @@ +(function(){var l,m={me:1,ne:3,oe:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ub:65,Hc:66,Jc:67,Xb:68,E:69,Mc:70,Nc:71,Oc:72,Pc:73,Wc:74,Xc:75,Zb:76,dd:77,ed:78,gd:79,hd:80,Q:81,od:82,rd:83,xd:84,yd:85,zd:86,Ad:87,Cd:88,Dd:89,Ed:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ve:97,We:98,Xe:99,d:100,e:101,Ye:102,Ze:103,$e:104,af:105,bf:106,k:107,cf:108, +df:109,n:110,ef:111,p:112,q:113,r:114,ff:115,t:116,hf:117,jf:118,kf:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; +function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function t(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ca(a){return t(a,2,!0)} +function u(a){return t(a,4,!0)}function ea(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function la(a){return a.replace(/[&<>"']/g,function(a){return ka[a]})} +function ma(a,b){return(a+" ").slice(0,b)}function na(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var oa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function pa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function sa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb?this.cb=this.id:(this.Bb=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,sb:!1,Kb:!1,xa:!1,error:!1};this.Eb=null;this.C.error=!1;this.N={};this.H=null;this.ta=d||0;Ta.push(this)}var Ua=void 0,Va={}; +if(window){Ua||(Ua=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Ua);)Va[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function A(a,b){b||(b=z);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),Ta=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},Ta=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function Pa(a,b,c){b||w((c?c+": ":"")+a)} +function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ia&&(this.ia=10);15>2;this.u=this.Ha-1;this.J=this.L/this.Ha|0;this.G=this.J-1;this.B=[];this.j=[];this.I=this.D=!1;this.O=[];this.P=[];a=new H;wb(a,this.H);this.X=Array(this.J);for(b=0;b>>a.ia;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.F)return h.yb+=h.F-e,h.F=e,!0;if(e>=h.F+h.yb){n=h.size-(e-k);n>f&&(n=f);h.yb=e-h.F+n;e=k+a.Ha;f-=n;g++;continue}}return yb(1,e,f)}e=new H(e,n,a.Ha,d);wb(e,a.H,h);a.X[g++]=e;e=k+a.Ha;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+zb[d]+" at "+u(b)),!0):yb(2,b,c)} +l.aa=function(a){return this.X[(a&this.w)>>>this.ia].jb(a&this.u,a)};function Ab(a,b){return a.X[(b&a.w)>>>a.ia].wb(b&a.u,b)}l.$a=function(a){var b=a&this.u,c=(a&this.w)>>>this.ia;return b!=this.u?this.X[c].Ac(b,a):this.X[c++].jb(b,a)|this.X[c&this.G].jb(0,a+1)<<8};function Bb(a,b){var c=b&a.u,d=(b&a.w)>>>a.ia;return c!=a.u?a.X[d].Pb(c,b):a.X[d++].wb(c,b)|a.X[d&a.G].wb(0,b+1)<<8}l.va=function(a,b){this.X[(a&this.w)>>>this.ia].lb(a&this.u,b&255,a)}; +function Db(a,b,c){a.X[(b&a.w)>>>a.ia].zb(b&a.u,c&255,b)}l.Ib=function(a,b){var c=a&this.u,d=(a&this.w)>>>this.ia;c!=this.u?this.X[d].Cc(c,b&65535,a):(this.X[d++].lb(c,b&255,a),this.X[d&this.G].lb(0,b>>8&255,a+1))};function Eb(a){for(var b=0,c=[],d=0;d>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,d);a.H&&a.D!=g[1]&&Vb(a.H,b,k)}else a.H&&(gb(a.H,a,b,k,d),a.D&&Vb(a.H,b,k));f+=h<<3;b+=h;e-=h}} +function yb(a,b,c){w("Memory block error ("+a+": "+t(b)+","+t(c)+")");return!1}var Wb;if(pb){var Xb=new ArrayBuffer(2);(new DataView(Xb)).setUint16(0,256,!0);Wb=256===(new Uint16Array(Xb))[0]}else Wb=!1;var Yb=Wb; +function H(a,b,c,d){this.id=Zb+=2;this.b=null;this.F=a;this.yb=b;this.size=c||0;this.type=d||$b;this.N=d==ac;wb(this);this.Na=this.xc=!1;if(c)if(pb)this.I=new ArrayBuffer(c),this.D=new DataView(this.I,0,c),this.u=new Uint8Array(this.I,0,c),this.J=new Uint16Array(this.I,0,c>>1),this.b=new Int32Array(this.I,0,c>>2),bc(this,Yb?cc:dc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},la: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.Na=!0},O:function(a,b){if(this.H&&null!=this.F){var c=this.H;ic(c,this.F+a,1,c.O)&&c.qa(!0)}return this.wb(a,b)},ca:function(a,b){if(this.H&&null!=this.F){var c=this.H;ic(c,this.F+a,2,c.O)&&c.qa(!0)}return this.Pb(a,b)},ja:function(a,b,c){if(this.H&&null!=this.F){var d=this.H;ic(d,this.F+a,1,d.D)&&d.qa(!0)}this.N?this.w(a,b,c):this.zb(a,b,c)},ma:function(a,b,c){if(this.H&& +null!=this.F){var d=this.H;ic(d,this.F+a,2,d.D)&&d.qa(!0)}this.N?this.w(a,b,c):this.Tb(a,b,c)},M:function(a){return this.u[a]},P:function(a){return this.u[a]},ba:function(a){return this.D.getUint16(a,!0)},ea:function(a){return a&1?this.u[a]|this.u[a+1]<<8:this.J[a>>1]},ha:function(a,b){this.u[a]=b;this.Na=!0},cb:function(a,b){this.u[a]=b;this.Na=!0},ra:function(a,b){this.D.setUint16(a,b,!0);this.Na=!0},wa:function(a,b){a&1?(this.u[a]=b,this.u[a+1]=b>>8):this.J[a>>1]=b;this.Na=!0}}; +function wb(a,b,c){a.H=b;a.B=a.j=0;c&&((a.B=c.B)&&hc(a,gc,!1),(a.j=c.j)&&fc(a,gc,!1))}function jc(a,b){b?--a.j||(a.lb=a.N?a.w:a.zb,a.Cc=a.N?a.G:a.Tb):--a.B||(a.jb=a.wb,a.Ac=a.Pb)}function fc(a,b,c){c&&a.j||(a.lb=!a.N&&b[1]||a.w,a.Cc=!a.N&&b[3]||a.G);if(c||void 0===c)a.zb=b[1]||a.w,a.Tb=b[3]||a.G}function hc(a,b,c){c&&a.B||(a.jb=b[0]||a.K,a.Ac=b[2]||a.L);if(c||void 0===c)a.wb=b[0]||a.K,a.Pb=b[2]||a.L}function bc(a,b){b||(b=kc);hc(a,b,void 0);fc(a,b,void 0)} +var kc=[],ec=[H.prototype.Y,H.prototype.la,H.prototype.fa,H.prototype.za],gc=[H.prototype.O,H.prototype.ja,H.prototype.ca,H.prototype.ma];if(pb)var dc=[H.prototype.M,H.prototype.ha,H.prototype.ba,H.prototype.ra],cc=[H.prototype.P,H.prototype.cb,H.prototype.ea,H.prototype.wa]; +function lc(a,b){z.call(this,"CPU",a,lc,1);var c=a.multiplier||1;this.Y=a.cycles||b;this.Ra=c;this.ha=Math.round(this.Y/1E4)/100;this.ab=this.ha*this.Ra;this.C.Aa=!1;this.C.Sb=!1;this.C.rb=a.autoStart;this.C.vc=!1;this.C.fb=!1;this.tb=this.O=0;this.ub=a.csStart;this.hb=a.csInterval;this.ib=a.csStop;this.w=[];this.Fa=this.bb.bind(this);F(this)}A(lc);var mc=["power","reset"];l=lc.prototype; +l.Pa=function(a,b,c,d){this.B=a;this.u=b;this.H=d;for(b=0;b=a.O&&(a.O+=a.hb,c=!0);0<=a.ib&&a.ib<=Fc(a)&&(a.hb=a.ib=-1,Bc(a),a.qa(),c=!0);c&&a.g(Fc(a)+" cycles: checksum="+t(a.tb))}} +l.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.N[b]=c;a=!0;break;case "run":this.N[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.xa)a=!0;else{var b=null,c,h=cb(a.id);for(c=0;ca.J/a.ab?b=1:d=!0;a.Ra=b;b=a.ha*a.Ra;if(a.ab!=b){a.ab=b;b=a.ab.toFixed(2)+"Mhz";var e=a.N.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.xb()}Hc(a,a.G);a.G=0;a.D=qa();a.K=0;Ic(a);return d}function Jc(a,b){var c=a.w.length;a.w.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.w[b][0]&&(c*=a.Y*a.Ra/1E3,a.w[b][0]=c)}function Lc(a){a.L-=a.b;a.b=0} +l.bb=function(a){if(jb(this,!0)){if(!this.C.Aa){Gc(this);this.B&&this.B.start(this.D,Fc(this));this.C.Aa=!0;this.C.Sb=!0;this.I&&this.I.start();var b=this.N.run;b&&(b.textContent="Halt");this.B&&(this.B.Ja(!0),a&&this.B.xb(!0))}this.ja>=this.Y&&Ic(this,!0);this.ba=0;this.ea=qa();this.K&&(a=this.ea-this.K,a>this.wa&&(this.D+=a,this.D>this.ea&&(this.D=this.ea)));try{do{for(var c=this.C.fb?1:this.fa,d=this.w.length-1;0<=d;d--){var e=this.w[d];0>e[0]||c>e[0]&&(c=e[0])}this.kb(c);var f=this.L-this.b;a= +f;for(var g=this.w.length-1;0<=g;g--){var h=this.w[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ba+=f;this.G+=f;Hc(this,0,!0);Ec(this,f);this.P-=f;if(0>=this.P){this.P+=this.fa;15<=++this.za&&(this.B&&this.B.Ja(),this.za=0);break}}while(this.C.Aa)}catch(k){this.qa();Dc(this);this.B&&this.B.stop(qa(),Fc(this));jb(this,!1);ob(this,k.stack||k.message);return}c=setTimeout;d=this.Fa;this.K=qa();e=this.wa;this.ba&&(e=Math.round(e*this.ba/this.fa));e-=this.K-this.ea;if(f=this.K-this.D)this.J=Math.round(this.G/ +(10*f))/100,864E5<=f&&(this.M=0,Gc(this));if(0>e||this.Je&&(this.D-=e),e=0;this.ja+=this.ba;this.K+=e;c(d,e)}else Dc(this),this.B&&this.B.stop(qa(),Fc(this))};l.kb=function(){return 0};l.qa=function(a){kb(this,!0);Lc(this);Hc(this,this.G);this.G=0;if(this.C.Aa){this.C.Aa=!1;this.I&&this.I.stop();var b=this.N.run;b&&(b.textContent="Run")}this.C.complete=a};function Dc(a,b){if(a.B){for(var c=a.B,d=0;d>8&255;a.T=b&255}function Wc(a){return a.U<<8|a.V}function Xc(a,b){a.U=b>>8&255;a.V=b&255}function K(a){return a.W<<8|a.Z} +function Yc(a,b){a.W=b>>8&255;a.Z=b&255}function I(a,b){a.R=b&65535}function Zc(a){return a.da&256?1:0}function $c(a,b){a.da=a.da&255|b}function ad(a){return qb[a.ga&255]?4:0}function bd(a){return(a.ga^a.ya)&16?16:0}function cd(a){return a.da&255?0:64}function dd(a){return a.ga&128?128:0}function Tc(a){return a.ua&-214|dd(a)|cd(a)|bd(a)|ad(a)|Zc(a)}function Rc(a,b){a.da=a.ga=a.ya=0;b&1&&(a.da|=256);b&4||(a.ga|=1);b&16&&(a.ya|=16);b&64||(a.da|=255);b&128&&(a.ga^=192);a.ua=a.ua&-726|b&512|2} +function ed(a,b){a.ya=a.i^b;return a.ga=(a.da=a.i+b)&255}function fd(a,b){a.ya=a.i^b;return a.ga=(a.da=a.i+b+(a.da&256?1:0))&255}function gd(a,b){a.da=a.ga=a.ya=a.i&b;(a.i|b)&8&&(a.ya^=16);return a.da}function hd(a,b){a.ya=b^255;b=a.ga=b+255&255;a.da=a.da&-256|b;return b}function id(a,b){a.ya=b;b=a.ga=b+1&255;a.da=a.da&-256|b;return b}function Dd(a,b){return a.ga=a.da=a.ya=a.i|b}function L(a,b){b^=255;a.ya=a.i^b;return a.ga=(a.da=a.i+b+1^256)&255} +function Ed(a,b){b^=255;a.ya=a.i^b;return a.ga=(a.da=a.i+b+(a.da&256?0:1)^256)&255}function Fd(a,b){return a.ga=a.da=a.ya=a.i^b}l.aa=function(a){return this.u.aa(a)};l.va=function(a,b){this.u.va(a,b)};function M(a){var b=a.aa(a.R);I(a,a.R+1);return b}function O(a){var b=a.u.$a(a.R);I(a,a.R+2);return b}function P(a){var b=a.u.$a(a.oa);a.oa=a.oa+2&65535;return b}function Q(a,b){a.oa=a.oa-2&65535;a.u.Ib(a.oa,b)} +function Gd(a){if(a.b&&a.j&255&&a.ua&512){for(var b=0;8>b&&!(a.j&1<b?255:1<>8;$c(this,a&256);this.b-=4},Kd,function(){var a;Yc(this,a=K(this)+Uc(this));$c(this,a>>8&256);this.b-=10},function(){this.i=this.aa(Uc(this));this.b-=7},function(){Vc(this,Uc(this)-1);this.b-= +5},function(){this.T=id(this,this.T);this.b-=5},function(){this.T=hd(this,this.T);this.b-=5},function(){this.T=M(this);this.b-=7},function(){var a=this.i<<8&256;this.i=(a|this.i)>>1;$c(this,a);this.b-=4},Kd,function(){Xc(this,O(this));this.b-=10},function(){this.va(Wc(this),this.i);this.b-=7},function(){Xc(this,Wc(this)+1);this.b-=5},function(){this.U=id(this,this.U);this.b-=5},function(){this.U=hd(this,this.U);this.b-=5},function(){this.U=M(this);this.b-=7},function(){var a=this.i<<1;this.i=a&255| +Zc(this);$c(this,a&256);this.b-=4},Kd,function(){var a;Yc(this,a=K(this)+Wc(this));$c(this,a>>8&256);this.b-=10},function(){this.i=this.aa(Wc(this));this.b-=7},function(){Xc(this,Wc(this)-1);this.b-=5},function(){this.V=id(this,this.V);this.b-=5},function(){this.V=hd(this,this.V);this.b-=5},function(){this.V=M(this);this.b-=7},function(){var a=this.i<<8;this.i=(Zc(this)<<8|this.i)>>1;$c(this,a&256);this.b-=4},Kd,function(){Yc(this,O(this));this.b-=10},function(){var a=O(this);this.u.Ib(a,K(this)); +this.b-=16},function(){Yc(this,K(this)+1);this.b-=5},function(){this.W=id(this,this.W);this.b-=5},function(){this.W=hd(this,this.W);this.b-=5},function(){this.W=M(this);this.b-=7},function(){var a=0,b=Zc(this);if(bd(this)||9<(this.i&15))a|=6;if(b||154<=this.i)a|=96,b=1;this.i=ed(this,a);$c(this,b?256:0);this.b-=4},Kd,function(){var a;Yc(this,a=K(this)+K(this));$c(this,a>>8&256);this.b-=10},function(){var a;a=O(this);a=this.u.$a(a);Yc(this,a);this.b-=16},function(){Yc(this,K(this)-1);this.b-=5},function(){this.Z= +id(this,this.Z);this.b-=5},function(){this.Z=hd(this,this.Z);this.b-=5},function(){this.Z=M(this);this.b-=7},function(){this.i=~this.i&255;this.b-=4},Kd,function(){this.oa=O(this)&65535;this.b-=10},function(){this.va(O(this),this.i);this.b-=13},function(){this.oa=this.oa+1&65535;this.b-=5},function(){var a=K(this);this.va(a,id(this,this.aa(a)));this.b-=10},function(){var a=K(this);this.va(a,hd(this,this.aa(a)));this.b-=10},function(){this.va(K(this),M(this));this.b-=10},function(){this.da|=256;this.b-= +4},Kd,function(){var a;Yc(this,a=K(this)+this.oa);$c(this,a>>8&256);this.b-=10},function(){this.i=this.aa(O(this));this.b-=13},function(){this.oa=this.oa-1&65535;this.b-=5},function(){this.i=id(this,this.i);this.b-=5},function(){this.i=hd(this,this.i);this.b-=5},function(){this.i=M(this);this.b-=7},function(){$c(this,Zc(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.S=this.T;this.b-=5},function(){this.S=this.U;this.b-=5},function(){this.S=this.V;this.b-=5},function(){this.S=this.W; +this.b-=5},function(){this.S=this.Z;this.b-=5},function(){this.S=this.aa(K(this));this.b-=7},function(){this.S=this.i;this.b-=5},function(){this.T=this.S;this.b-=5},function(){this.b-=5},function(){this.T=this.U;this.b-=5},function(){this.T=this.V;this.b-=5},function(){this.T=this.W;this.b-=5},function(){this.T=this.Z;this.b-=5},function(){this.T=this.aa(K(this));this.b-=7},function(){this.T=this.i;this.b-=5},function(){this.U=this.S;this.b-=5},function(){this.U=this.T;this.b-=5},function(){this.b-= +5},function(){this.U=this.V;this.b-=5},function(){this.U=this.W;this.b-=5},function(){this.U=this.Z;this.b-=5},function(){this.U=this.aa(K(this));this.b-=7},function(){this.U=this.i;this.b-=5},function(){this.V=this.S;this.b-=5},function(){this.V=this.T;this.b-=5},function(){this.V=this.U;this.b-=5},function(){this.b-=5},function(){this.V=this.W;this.b-=5},function(){this.V=this.Z;this.b-=5},function(){this.V=this.aa(K(this));this.b-=7},function(){this.V=this.i;this.b-=5},function(){this.W=this.S; +this.b-=5},function(){this.W=this.T;this.b-=5},function(){this.W=this.U;this.b-=5},function(){this.W=this.V;this.b-=5},function(){this.b-=5},function(){this.W=this.Z;this.b-=5},function(){this.W=this.aa(K(this));this.b-=7},function(){this.W=this.i;this.b-=5},function(){this.Z=this.S;this.b-=5},function(){this.Z=this.T;this.b-=5},function(){this.Z=this.U;this.b-=5},function(){this.Z=this.V;this.b-=5},function(){this.Z=this.W;this.b-=5},function(){this.b-=5},function(){this.Z=this.aa(K(this));this.b-= +7},function(){this.Z=this.i;this.b-=5},function(){this.va(K(this),this.S);this.b-=7},function(){this.va(K(this),this.T);this.b-=7},function(){this.va(K(this),this.U);this.b-=7},function(){this.va(K(this),this.V);this.b-=7},function(){this.va(K(this),this.W);this.b-=7},function(){this.va(K(this),this.Z);this.b-=7},function(){var a=this.R-1;if(this.ca.length)for(var b=0;b>8;this.b-=10},function(){var a=O(this);dd(this)||I(this,a);this.b-=10},function(){this.ua&=-513;this.b-=4},function(){var a=O(this);dd(this)||(Q(this,this.R),I(this,a),this.b-=6);this.b-=11},function(){Q(this,Tc(this)&255|this.i<<8);this.b-=11},function(){this.i=Dd(this,M(this));this.b-=7},function(){Q(this,this.R);I(this,48);this.b-=11},function(){dd(this)&& +(I(this,P(this)),this.b-=6);this.b-=5},function(){this.oa=K(this)&65535;this.b-=5},function(){var a=O(this);dd(this)&&I(this,a);this.b-=10},function(){this.ua|=512;this.b-=4;Gd(this)},function(){var a=O(this);dd(this)&&(Q(this,this.R),I(this,a),this.b-=6);this.b-=11},Nd,function(){L(this,M(this));this.b-=7},function(){Q(this,this.R);I(this,56);this.b-=11}]; +function S(a){z.call(this,"ChipSet",a,S,32768);var b=a.model;b&&!Od[b]&&Pa("Unrecognized ChipSet model: "+b);this.w=Od[b]||{};a.sound&&(this.fa=null,window&&(this.fa=window.AudioContext||window.webkitAudioContext),this.fa&&new this.fa);F(this)}A(S); +var U={Ba:1978.1,vd:{Ca:0,qe:1,ue:16,Be:32,Ke:64,Je:128,mb:14},Ya:{Ca:1,Kc:1,nd:2,jd:4,kd:16,ld:32,md:64,mb:8},wd:{Ca:2,pe:3,Se:4,re:8,Fe:16,Ge:32,He:64,se:128,mb:0},Oe:{Ca:3},Me:{Ca:2,Ce:7},Qe:{Ca:3,Te:1,Pe:2,Ie:4,ze:8,te:16,je:32},Ne:{Ca:4},Re:{Ca:5,ve:1,we:2,xe:4,ye:8,Ue:16}},V={Ba:100,Ka:{Ca:66,mc:1,bc:2,fd:4,Ee:8,De:16,dc:32,cc:64,Yb:128},Ic:{Ca:66,INIT:0},Ta:{Ca:194,le:0,Wb:16,pd:32,ic:48,Sc:0,Tc:32},Ab:{Ca:162,Le:0,Vc:0,Rc:0,Uc:0,Qc:0},La:{Ae:{Ca:98},Sa:{Fc:0,Ec:1,sd:2,Bd:4,Lc:5,qd:6,td:7}, +Cb:16383}},Od={SI1978:U,VT100:V};S.prototype.pa=function(){return!1};S.prototype.Pa=function(a,b,c,d){this.u=b;this.b=c;this.H=d;this.B=a;this.J=tb(a,"Keyboard");this.Fa=tb(a,"SerialPort");this.video=tb(a,"Video");Pb(b,this,this.w.Gb);Tb(b,this,this.w.Hb);if(d){var e=this;Pd(d,16384,function(){for(var a="",b=0;b>8-this.ea&255;E(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.$d=function(a,b,c){E(this,a,b,c,"SHIFT.COUNT",null,!0);this.ea=b};l.be=function(a,b,c){E(this,a,b,c,"SOUND1",null,!0);this.ra=b};l.ae=function(a,b,c){E(this,a,b,c,"SHIFT.DATA",null,!0);this.Y=b<<8|this.Y>>8}; +l.ce=function(a,b,c){E(this,a,b,c,"SOUND2",null,!0);this.ma=b};l.de=function(a,b,c){E(this,a,b,c,"WATCHDOG",null,!0)};function Qd(a){var b=0,c=0,d=~a.P;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +l.Td=function(a,b){var c=this.K,c=c&~V.Ka.cc;if((Fc(this.b)&64)<<1&&(c|=V.Ka.cc,c!=this.K)){var d,e;d=this.O&1;e=this.O>>1&7;switch(e){case V.La.Sa.td:break;case V.La.Sa.Ec:this.P=this.P<<1|d;break;case V.La.Sa.Lc:d=Qd(this);this.I[d]=V.La.Cb;hb(this,"doNVRCommand(): erase data at addr "+u(d));break;case V.La.Sa.Fc:this.j=this.j<<1|d;break;case V.La.Sa.Bd:d=Qd(this);e=this.j&V.La.Cb;this.I[d]=e;hb(this,"doNVRCommand(): write data "+u(e)+" to addr "+u(d));break;case V.La.Sa.qd:d=Qd(this);e=this.I[d]; +null==e&&(e=V.La.Cb);this.j=e;hb(this,"doNVRCommand(): read data "+u(e)+" from addr "+u(d));break;case V.La.Sa.sd:this.j<<=1;this.ca=this.j&V.La.Cb+1;break;default:hb(this,"doNVRCommand(): unrecognized command "+ca(e))}}c&=~V.Ka.dc;this.ca&&(c|=V.Ka.dc);c&=~V.Ka.Yb;if(d=this.J){d=this.J;if(e=d.D)e=d.b,e=Fc(d.b)>=d.K+e.Y*e.Ra/1E3*1.2731488;e&&(d.D=!1);d=!d.D}d&&(c|=V.Ka.Yb);c&=~V.Ka.mc;this.Fa&&this.Fa.Da&1&&(c|=V.Ka.mc);this.K=c;E(this,a,null,b,"FLAGS",c);return c}; +l.ee=function(a,b,c){E(this,a,b,c,"BRIGHTNESS");this.ha=b};l.he=function(a,b,c){E(this,a,b,c,"NVR.LATCH");this.O=b};l.ge=function(a,b,c){E(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.D=this.D&-4|a;break;case 1:this.D=this.D&-13|a<<2;this.video&&(b=this.video,a=this.D,hb(b,"updateScrollOffset("+a+")"),b.eb!==a&&((b.eb=a)?Mc(b,!0):b.ob=!0));break;case 2:switch(a){case 0:this.ba=~this.ba;break;case 2:case 3:this.la=3-a}break;case 3:this.ja=a}}; +l.fe=function(a,b,c){E(this,a,b,c,"DC011");b&V.Ta.pd?(b&=V.Ta.ic,this.M!=b&&(this.M=b,this.video&&(a=this.video,b=this.M==V.Ta.ic?50:60,hb(a,"updateRate("+b+")"),a.qc=b))):(b&=V.Ta.Wb,this.L!=b&&(this.L=b,this.video&&(a=this.L==V.Ta.Wb?132:80,b=this.video,hb(b,"updateDimensions("+a+","+(80>>0,g],q=pa(p,k,a.uc);0>q&&p.splice(-(q+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.G.push({gf:b,F:c,Vd:d,Qa:e,tc:f})}delete this.Qa}return!0};Td.prototype.Ia=function(){return!0}; +function Ud(a,b,c,d){if(d)a.ka("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Bb,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.B=f;else if(g)for(a.B=Array(4*g.length),d=c=0;c>8&255,a.B[d++]=g[c]>>16&255,a.B[d++]=g[c]>>24&255;else a.B=e;a.Qa=e.symbols;if(!a.B.length){w("Empty ROM: "+b);return}if(1==a.B.length){w(a.B[0]);return}}catch(h){a.ka("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.B=Array(b.length),e=0;e>>f.ia;0>>=f.ia;0d?a.j.push({Rb:b,Ob:Date.now(),Db:!1}):(a.j[d].Ob=Date.now(),a.j[d].Db=!1);else if(0<=d){if(!a.j[d].Db){var e=a.j[d].Ob;if(e&&100>Date.now()-e)return a.j[d].Db=!0,ge(a),!0}a.j.splice(d,1)}if(a.I){d=0;switch(b){case "1p":d=U.Ya.jd;break;case "2p":d=U.Ya.nd;break;case "coin":d=U.Ya.Kc;break;case "left":d=U.Ya.ld;break;case "right":d=U.Ya.md;break;case "fire":d=U.Ya.kd}d&&(a=a.I,b=d,a.G&=~b,c&&(a.G|=b))}return!0} +function ge(a){for(var b=0,c=-1;bc||c>e)c=e}else{ee(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){ge(a)},c)}l.Ud=function(a,b){var c=this.G;0<=this.w&&(this.w>3)*a.ba,!xb(a.u,a.Ua,a.P,3)))return!1;a.P?(a.lc=a.I.createImageData(b,c),a.oc=16/a.Va|0,me(a,a.P>>1)):me(a,(a.ca+1)*a.wa);a.L=document.createElement("canvas");a.L.width=b;a.L.height=c;a.nb=a.L.getContext("2d");a.fa={};a.ra=1<=a.fc?8:16,f=8>(7>4)*c)}return k}he.prototype.Ea=function(){return!0};he.prototype.pa=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.Jb[b]=c,!0;switch(b){case "fullScreen":return this.N[b]=c,this.j&&this.j.gb?c.onclick=function(){d.gb()}:c.parentNode.removeChild(c),!0}return!1}; +he.prototype.gb=function(){var a=!1;if(this.j){if(this.j.gb){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.Y/this.O;b>c&&(a=Math.round(c/b*100)+"%")}this.kc?(this.M.style.width=a,this.M.style.width=a,this.M.style.display="block",this.M.style.margin="auto"):(this.j.style.width=a,this.j.style.height="auto");this.j.style.backgroundColor="black";this.j.gb();a=!0}this.la&&this.la.focus()}return a}; +function ke(a,b){!b&&a.j&&(a.kc?a.M.style.width=a.M.style.height="":a.j.style.width=a.j.style.height="");hb(a,"notifyFullScreen("+b+")")}function me(a,b){a.nc=b;a.ja=!1;if(void 0===a.G||a.G.length!=a.nc)a.G=Array(a.nc)}function oe(a,b,c,d,e){d=a.w?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.ma&&(208<=c&&236>c?e=a.ra+0:28<=c&&72>c&&(e=a.ra+1));a=a.ha[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function Mc(a,b){var c=!0;if(!b){a.Wa&&(120==a.Wa?a.pc&1?(Hd(a.b,2),c=!1):Hd(a.b,1):Hd(a.b,4));if(c&&a.ja&&a.P){for(var d=a.u,e=a.P,f=!0,g=a.Ua>>>d.ia;0>=1);;){var v=Ab(a.u,p++);if(127==(v&127)){var r=Ab(a.u,p++),d=r&96,c=(r&15)<<8|Ab(a.u,p),c=c+ +(r&16?8192:16384);break}if(n>4)*v.na,C,T,da,X,ta=v.sa,Cb=v.na;y?(C=x*r.sa,T=e*r.na,da=r.sa,X=r.na):(C=x*r.gc,T=e*r.hc,da=r.gc,X=r.hc);v.sa>r.sa&&(C*=2,da*=2);v.na>r.na&&(q||(G+=r.na),Cb=r.na);y?y.drawImage(v.canvas,ga,G,ta,Cb,C,T,da,X):(C+=0,T+=0,r.I.drawImage(v.canvas, +ga,G,ta,Cb,C,T,da,X))}h++}g++}e++}}a.ja=!0;!b&&a.ob&&1==h&&(a.G[k]=-1,h=0);a.ob=!1;(h||b)&&a.nb&&a.I.drawImage(a.L,0,a.eb,a.K,a.ba-a.na,0,0,a.Dc,a.Gd)}else{e=a.Ua;f=e+a.P;k=h=g=0;b=a.K;n=0;c=a.ba;q=d=0;p=a.Va;x=(1<>8|(r&255)<<8);h>y&x,oe(a,a.lc,h++,k,ga),y+=p;h>n&&(n=h);k=d&&(d=k+1)}e+=2;g++;if(h>=a.K&&(h=0,k++,k>a.ba))break}a.ja=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=wa().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Va.aspect);f&&.3<=f&&3.33>=f&&(Ma("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Ca("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new he(d,e,g,f,c);fb(d,c)}}); +function pe(a){this.fa=+a.adapter;switch(this.fa){case 0:this.ha=0;this.la=2;break;default:w("Unrecognized serial adapter #"+this.fa);return}this.j=this.w=null;this.ja=a.tabSize;this.ea=a.charBOL;this.D=0;this.ba=!1;z.call(this,"SerialPort",a,pe,8388608);var b=a.binding;if("console"==b)this.w="";else{var c;a=qe;b&&(void 0===c&&(c="Panel"),(c=eb(c,this.id))&&(b=c.N[b])&&this.pa(null,a,b))}this.G="";this.J=this.M=null;this.exports={connect:this.zc,receiveData:this.Qb}}A(pe); +var re=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],se=[!1,0,0,133,142,39,238],qe="buffer";l=pe.prototype; +l.pa=function(a,b,c,d){var e=this;switch(b){case qe:return this.N[b]=this.j=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=na(b[0]);if(c!=this.cb)return;b=na(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.M=d.receiveData){this.status(this.Bb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};l.Ea=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +l.Ia=function(a){return a?this.save():!0};l.reset=function(){we(this)};l.save=function(){var a=new J(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Y;c[b++]=this.ca;c[b++]=this.Da;c[b++]=this.K;c[b++]=this.P;c[b]=this.O;a.set(0,c);return a.data()};l.restore=function(a){return we(this,a[0])};function we(a,b){var c=0;b||(b=se);a.L=b[c++];a.Y=b[c++];a.ca=b[c++];a.Da=b[c++];a.K=b[c++];a.P=b[c++];a.O=b[c];return!0} +function xe(a,b){var c=a.O&b;b&15||(c>>=4);b=re[c];c=((a.K&12)>>2)+6;a.K&16&&c++;c+=((a.K&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function te(a,b){hb(a,"receiveByte("+ca(b)+"), status="+ca(a.Da));return a.ba||a.Da&2?!1:(a.Y=b,a.Da|=2,Hd(a.b,a.la),!0)}l.Qb=function(a){null!=a&&(this.G="number"!=typeof a?a:this.G+String.fromCharCode(a));this.G&&(te(this,this.G.charCodeAt(0))&&(this.G=this.G.substr(1)),this.G&&this.b&&Kc(this.b,this.ra,xe(this,15)));return!0}; +l.Od=function(a,b){var c=this.Y;E(this,a,null,b,"DATA",c);this.Da&=-3;return c};l.Nd=function(a,b){var c=this.Da;E(this,a,null,b,"STATUS",c);return c}; +l.Zd=function(a,b,c){E(this,a,b,c,"DATA");this.ca=b;this.Da&=-6;hb(this,"transmitByte("+ca(b)+")");if(19==b)this.ba=!0;else if(17==b)this.ba=!1;else if(this.M&&this.M.call(this.J,b),this.j)8==b?(this.j.value=this.j.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,9==b?(b=this.ja||8,c=b-this.D%b,this.ja&&(a=ma("",c))):13==b&&(this.D=c=0,a="\n"),this.ea&&!this.D&&c&&(a=String.fromCharCode(this.ea)+a),this.j.value+=a,this.j.scrollTop=this.j.scrollHeight, +this.D+=c);else if(null!=this.w){if(10==b||1024<=this.w.length)this.g(this.w),this.w="";10!=b&&(this.w+=String.fromCharCode(b))}this.b&&Kc(this.b,this.ma,xe(this,240))};l.Yd=function(a,b,c){E(this,a,b,c,"CONTROL");this.L?(this.P=b,this.P&64&&(this.L=!1)):(this.K=b,this.L=!0)};l.Xd=function(a,b,c){E(this,a,b,c,"BAUDRATES");this.O=b};var ue={0:pe.prototype.Od,1:pe.prototype.Nd},ve={0:pe.prototype.Zd,1:pe.prototype.Yd,2:pe.prototype.Xd}; +Na(function(){for(var a=D(document,"pc8080","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ye.prototype.Mb=function(){return-1};ye.prototype.Nb=function(){}; +ye.prototype.Fb=function(a,b,c){if(b)if(a){0>this.j&&this.w.length&&(this.j=0);if(0>this.j||a!=this.w[this.j])this.w.splice(0,0,a),this.j=0;this.j--}else this.P?a="end":a=this.w[this.j+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(na(a.substring(d,f))),d=f+1}}return b}; +function Ae(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 Be(a,b,c){var d;if(b){b=Ce(a,b);for(var e=0,f=!1,g=b,h=[],k=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=t(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Ge(a,b){if(b)return Ee(a,b,a.ea[b]);var c=0;for(b in a.ea)Ee(a,b,a.ea[b]),c++;return 0>>d.u.ia;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.g("..."):(c=p.type,n=zb[c],p&&d.g(t(p.id)+" %"+t(e<>>e.ia;f!=e.u?e.X[g].Tb(f,b&65535,d):(e.X[g++].zb(f,b&255,d),e.X[g&e.G].zb(0,b>>8&255,d+1));c&&sf(a,c);Dc(this.b,!0)}};function Y(a){return{F:a,Oa:!1}}function tf(a){return[a.F,a.Oa]}function uf(a){return{F:a[0],Oa:a[1]}} +function Se(a,b,c){var d;c=(c?a.M:a.Ua).F;if(void 0!==b){d=b=Ce(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cc&&(c=sa(Pe,a.substr(b,1))));return c};function xf(a,b){var c=0;a=a.Nb(b);if(void 0!==a)switch(b){case 7:case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:c=4}return c?t(a,c):"??"} +l.Nb=function(a){var b;if(0<=a){var c=this.b;switch(a){case 7:b=c.i;break;case 0:b=c.S;break;case 1:b=c.T;break;case 8:b=Uc(c);break;case 2:b=c.U;break;case 3:b=c.V;break;case 9:b=Wc(c);break;case 4:b=c.W;break;case 5:b=c.Z;break;case 10:b=K(c);break;case 6:b=c.aa(K(c));break;case 11:b=c.oa;break;case 12:b=c.R;break;case 13:b=Tc(c);break;case 14:b=Tc(c)&255|c.i<<8}}return b}; +function yf(a,b){b=Ce(a,b);for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Mb(b,c+1),0<=e&&(b=b.substr(0,c)+xf(a,e)+b.substr(c+1+Pe[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=aa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=Se(a,e))?(d=e+' "'+wf(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=Se(a,e))?(sf(d),d=e+ +' "'+wf(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Z(Y(this.b.R).F));this.ta&1073741824?this.ra.push(a):this.la&&a==this.la||(this.la=a,this.ta&-2147483648&&(this.qa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Lc(a),a.P=0,Dc(a)))}; +function gb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ta&h)!=h||a.message(b.cb+"."+(null!=d?"outPort":"inPort")+"("+u(c)+","+(f?f:"unknown")+(null!=d?","+ca(d):"")+")"+(null!=g?": "+ca(g):"")+(null!=e?" at "+Z(e):""))} +function Ke(a){var b;if(Id(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.ia],!1)}a.O=["br"];if(a.D)for(b=1;b>>d.ia],!0);a.D=["bw"];a.Wa=0}l.Za=function(a,b,c){var d=!0;c||Df(this,a,b,!1,!0);if(a!=this.I){var e=Re(b);if(-1===e)this.g("invalid address: "+Z(b.F)),d=!1;else{var f=this.u;f.X[e>>>f.ia].Za(e&f.u,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(Ef(this,a,a.length-1,"set"),Ke(this)));return d}; +function Df(a,b,c,d,e){var f=!1;c=Re(c);for(var g=1;g>>d.ia],b==a.D));h.Oa||Ke(a);break}}return f}function Ff(a,b){for(var c=1;c>24,4);break;case 3:y=t(v.$a(y,2),4);break;default:v="imm("+u(r)+")";break a}8086==v.style&&r&64?y="["+y+"]":r&16||(y=(v.style==Ie?"$":"0x")+y);v=y}else r&16? +(v=(q&3840)>>8,r=Pe[v],8086==a.style&&q&64&&(6==v&&(r="HL"),r="["+r+"]"),v=r):r&128&&(v=(f>>3&7).toString());if(!v||!v.length){h="INVALID";break}0b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Vd;if(e>=g&&e>8&255;case "C":d.T=f&255;break;case "D":d.U=f&255;break; +case "DE":d.U=f>>8&255;case "E":d.V=f&255;break;case "H":d.W=f&255;break;case "HL":d.W=f>>8&255;case "L":d.Z=f&255;break;case "SP":d.oa=f&65535;break;case "PC":I(d,f);a.M=Y(d.R);break;case "PS":Rc(d,f);break;case "PSW":Rc(d,f&255|d.ua&-256);d.i=f>>8;break;case "CF":d.da=f?d.da|256:d.da&255;break;case "PF":f?ad(d)||(d.ga^=1):ad(d)&&(d.ga^=1);break;case "AF":d.ya=f?~d.ga&16|d.ya&-17:d.ga&16|d.ya&-17;break;case "ZF":d.da=f?d.da&-256:d.da|255;break;case "SF":f?dd(d)||(d.ga^=192):dd(d)&&(d.ga^=192);break; +case "IF":d.ua=f?d.ua|512:d.ua&-513;break;default:a.g("unknown register: "+e);return}Dc(d);a.g("updated registers:")}a.g(Kf(a));c&&(a.M=Y(d.R),Bf(a,Z(a.M.F)))}}function Rf(a,b){b=na(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.g(yf(a,c[2])):Be(a,b,!0)}function Sf(a,b,c){var d="t"!=b;c=De(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Da(c,function(){return jb(a,!0)&&a.kb(e,d,!1)},function(){Dc(a.b);jb(a,!1)})} +function Bf(a,b,c,d){if(b=Se(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Se(a,c,!0);if(!d||d.Fh[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.g(n)}h[3]&&(g=h[3],f=null);f=Hf(a,b,g,f);a.g(f);a.M=b;e-=b.F-k;c++}}} +l.Fb=function(a,b,c){if(b)if(a){0>this.j&&this.w.length&&(this.j=0);if(0>this.j||a!=this.w[this.j])this.w.splice(0,0,a),this.j=0;this.j--}else this.P?a="end":a=this.w[this.j+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(na(a.substring(d,f))),d=f+1}}return b}; +function Gf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.P&&(a.g("ended assemble at "+Z(a.ca.F)),a.M=a.ca,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.la=null;if(nb(a)&&0n||"z"Fa.length&&(a.g("note: only "+Fa.length+" available"),ia=Fa.length);ua-=ia;0>ua&&(null==Fa[Fa.length-1].F?(ia=ua+ia,ua=0):ua+=Fa.length);var ld=[];"call"==Ye&&(Gb=1E5,ld=["CALL"]);for(void 0!==Xe&&a.g(ia+" instructions earlier:");0< +Gb&&ua!=a.fa;){var af=Fa[ua++];if(null==af.F)break;var Hb=Y(af.F),kg=ia--,bf=Hf(a,Hb,"history",kg);(!ld.length||0<=bf.indexOf(ld[0]))&&a.g(bf);Hb.Lb&&(ua+=Hb.Lb,Gb-=Hb.Lb,ia-=Hb.Lb);ua>=Fa.length&&(ua=0);a.eb=ia;$e++;Gb--}}$e||(a.g("no "+Ze+"history available"),a.eb=void 0)}else{var oc=Se(a,X);if(oc){var pc=0;ta&&("l"==ta.charAt(0)&&(ta=ta.substr(1)||Cb),pc=De(a,ta)>>>0,65536>4||1;lg--&&0tc?String.fromCharCode(tc):".";rc--}Ib&&(Ib+="\n");Ib+=X+" "+nd+(Jb?"":" "+cf)}Ib&&a.g(Ib);a.Ua=oc}}}}break;case "e":if("else"==f[0])break;var uc=1,df=255,ef=a.aa,ff=a.va;"ew"==f[0]&&(uc=2,df=65535,ef=a.$a,ff=a.Ib);var gf=uc<<1,hf=f[1];if(null==hf)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a"); +else{var vc=Se(a,hf);if(vc)for(var wc=2;wcud;){for(var Wa=null,rg=256;65536>Mb.F>>>0;){kf.F=a.$a(Mb,2);if(null==Mb.F||!rg--)break;for(var sg=a,yc=kf,lf= +null,Nb=yc.F,mf=Nb,vd=1;6>=vd&&Nb;vd++){if(2\nLicense: GPL version 3 or later ");for(b=0;bWf){if(Yf(d,this.L)){this.D=new J(this,"1.30.1","failsafe");Yf(this.D)&&(cg(this,d),a=2,dg(this.D));this.D.set("timestamp",ra());eg(this.D);var e=this.B&&!this.J;if(1==a||xa("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=bg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Yf(d,g):("error"== +f&&"no machine state"!=g?(this.ka("Error: "+g),"unable to verify user"==g&&(Ba("user",""),this.j=null)):this.g(f+": "+g),dg(d),Yf(d)?(c=bg(d),e=!0):c=!1))}e&&ag(this,c?d:null)}else 2==a&&d.clear()}else ag(this);delete this.L;delete this.M}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.C.xa=!0;var d=this.N.power;d&&(d.textContent="Shutdown");this.b&&(fg(this,this.b,b,c,a),this.b.rb());this.Y&&(cg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.w=0}; +function cg(a,b){if(xa("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PC8080",ver:"1.30.1"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;va("http://www.pcjs.org/api/v1/report",d,!0)}} +function Tf(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new J(a,"1.30.1"),g=new J(a,"1.30.1","validate"),h=ra();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",wa());a.b&&a.b.Ia&&(c&&a.b.qa(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.xa=!1,!1===d&&(e=null)));for(var h=cb(a.id),k=0;kf.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>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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+"...");va(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 k=h[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,""); +a=a.replace(d[0],g);zg(a,b,c)}})}else c(a,null)} +function Ag(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=la(a))}function f(a){e("Error: "+a);k&&(--jg||Qa(!0));k=!1}var g,h,k=!0;jg++;ab[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=n:q.appendChild(document.createTextNode(n));p.appendChild(q)}c|| +(c="/versions/pc8080/1.30.1/components.xsl");n=function(d,h){h?xg(c,null,null,!1,e,function(d,k){k?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--jg||Qa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--jg||Qa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?xg(b,a,d,!0,e,n):yg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(x){f(x.message)}return k}window.embedPC8080=function(a,b,c,d){Qa(!1);return Ag(a,b,c,d)};window.enableEvents=Qa;window.sendEvent=Sa;})(); diff --git a/versions/pc8080/1.30.1/pc8080.js b/versions/pc8080/1.30.1/pc8080.js new file mode 100644 index 000000000..398bbecbd --- /dev/null +++ b/versions/pc8080/1.30.1/pc8080.js @@ -0,0 +1,166 @@ +(function(){var k,m={pd:1,qd:3,rd:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,jb:65,Mb:66,Ob:67,mb:68,E:69,Rb:70,Sb:71,Tb:72,Ub:73,ac:74,bc:75,ob:76,ic:77,jc:78,mc:79,nc:80,Q:81,tc:82,wc:83,Bc:84,Cc:85,Dc:86,Ec:87,Gc:88,Hc:89,Ic:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Zd:97,$d:98,ae:99,d:100,e:101,be:102,ce:103,de:104,ee:105,fe:106,k:107,ge:108, +he:109,n:110,ie:111,p:112,q:113,r:114,je:115,t:116,ke:117,le:118,me:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; +function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; +function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function la(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var ta={init:[],show:[],exit:[]},ua=!1,va=!1,wa=!0;function xa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ya(a){ta.init.push(a)} +function za(a){if(wa)try{for(var b=0;bb?this.Sa=this.id:(this.Ta=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Wa:!1,eb:!1,Y:!1,error:!1};this.Za=null;this.l.error=!1;this.A={};this.N=null;v.push(this)}var Da=void 0,Ea={}; +if(window){Da||(Da=window.location.search.substr(1));for(var Fa,Ga=/\+/g,Ha=/([^&=]+)=?([^&]*)/g;Fa=Ha.exec(Da);)Ea[decodeURIComponent(Fa[1].replace(Ga," "))]=decodeURIComponent(Fa[2].replace(Ga," "))}function Ia(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 w(a,b){b||(b=r);a.prototype=Ia(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ja=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Ja={},v=[];function Ka(a,b,c){Ja[a]&&b&&(Ja[a][b]=c)}function Aa(a,b,c){b||q((c?c+": ":"")+a)} +function La(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.j&&(this.j=10);15>2;this.f=this.c-1;this.i=this.u/this.c|0;this.o=this.i-1;this.m=[];this.v=[];this.B=[];this.C=[];a=new D;Ya(a,this.N);this.b=Array(this.i);for(b=0;b>>a.j;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.Ma)return h.cb+=h.Ma-e,h.Ma=e,!0;if(e>=h.Ma+h.cb){n=h.size-(e-l);n>f&&(n=f);h.cb=e-h.Ma+n;e=l+a.c;f-=n;g++;continue}}return $a(1,e,f)}e=new D(e,n,a.c,d);Ya(e,a.N,h);a.b[g++]=e;e=l+a.c;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+p(b,4,!0)),!0):$a(2,b,c)}Xa.prototype.J=function(a){return this.b[(a&this.g)>>>this.j].Pa(a&this.f,a)}; +function bb(a,b){return a.b[(b&a.g)>>>a.j].bb(b&a.f,b)}function cb(a,b){var c=b&a.f,d=(b&a.g)>>>a.j;return c!=a.f?a.b[d].kd(c,b):a.b[d++].Pa(c,b)|a.b[d&a.o].Pa(0,b+1)<<8}Xa.prototype.aa=function(a,b){this.b[(a&this.g)>>>this.j].Qa(a&this.f,b&255,a)};function db(a,b,c){a.b[(b&a.g)>>>a.j].Hb(b&a.f,c&255,b)}function fb(a,b,c){var d=b&a.f,e=(b&a.g)>>>a.j;d!=a.f?a.b[e].ld(d,c&65535,b):(a.b[e++].Qa(d,c&255,b),a.b[e&a.o].Qa(0,c>>8&255,b+1))} +function gb(a){for(var b=0,c=[],d=0;d>1),this.a=new Int32Array(this.j,0,c>>2),pb(this,lb?qb:rb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},C:function(a){return this.a[a>> +2]>>>((a&3)<<3)&255},I:function(a){var 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},S: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.na=!0},w:function(a,b){return this.bb(a,b)},K:function(a,b){return this.Eb(a,b)},O:function(a,b,c){this.c||this.Hb(a,b,c)},W:function(a, +b,c){this.c||this.X(a,b,c)},u:function(a){return this.b[a]},B:function(a){return this.b[a]},G:function(a){return this.A.getUint16(a,!0)},H:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.i[a>>1]},L:function(a,b){this.b[a]=b;this.na=!0},R:function(a,b){this.b[a]=b;this.na=!0},T:function(a,b){this.A.setUint16(a,b,!0);this.na=!0},Z:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.i[a>>1]=b;this.na=!0}};function Ya(a,b,c){a.N=b;a.f=a.g=0;c&&((a.f=c.f)&&tb(a,ub,!1),(a.g=c.g)&&vb(a,ub,!1))} +function vb(a,b,c){c&&a.g||(a.Qa=!a.c&&b[1]||a.o,a.ld=!a.c&&b[3]||a.s);if(c||void 0===c)a.Hb=b[1]||a.o,a.X=b[3]||a.s}function tb(a,b,c){c&&a.f||(a.Pa=b[0]||a.m,a.kd=b[2]||a.v);if(c||void 0===c)a.bb=b[0]||a.m,a.Eb=b[2]||a.v}function pb(a,b){b||(b=wb);tb(a,b,void 0);vb(a,b,void 0)}var wb=[],sb=[D.prototype.C,D.prototype.S,D.prototype.I,D.prototype.ea],ub=[D.prototype.w,D.prototype.O,D.prototype.K,D.prototype.W]; +if(Sa)var rb=[D.prototype.u,D.prototype.L,D.prototype.G,D.prototype.T],qb=[D.prototype.B,D.prototype.R,D.prototype.H,D.prototype.Z];function xb(a,b){r.call(this,"CPU",a,xb);var c=a.multiplier||1;this.la=a.cycles||b;this.I=c;this.Ca=Math.round(this.la/1E4)/100;this.W=this.Ca*this.I;this.l.oa=!1;this.l.Fb=!1;this.l.Na=a.autoStart;this.l.yb=!1;this.l.Xa=!1;this.ta=this.X=0;this.ua=a.csStart;this.Z=a.csInterval;this.ea=a.csStop;this.G=[];this.Va=this.hb.bind(this);B(this)}w(xb);var yb=["power","reset"]; +k=xb.prototype;k.qa=function(a,b,c,d){this.v=a;this.j=b;this.N=d;for(b=0;ba.O/a.W&&(b=1);a.I=b;b=a.Ca*a.I;if(a.W!=b){a.W=b;b=a.W.toFixed(2)+"Mhz";var d=a.A.setSpeed;d&&(d.textContent=b);a.da("target speed: "+b)}c&&a.v&&Ib(a.v)}Fb(a,a.L);a.L=0;a.H=ja();a.R=0;Gb(a)}function Jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function Lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.la*a.I/1E3,a.G[b][0]=c)}function Mb(a){a.S-=a.a;a.a=0} +k.hb=function(a){if(Qa(this,!0)){if(!this.l.oa){Eb(this);this.v&&this.v.start(this.H,Hb(this));this.l.oa=!0;this.l.Fb=!0;this.K&&this.K.start();var b=this.A.run;b&&(b.textContent="Halt");this.v&&(this.v.Aa(!0),a&&Ib(this.v,!0))}this.Da>=this.la&&Gb(this,!0);this.pa=0;this.sa=ja();this.R&&(a=this.sa-this.R,a>this.Ka&&(this.H+=a,this.H>this.sa&&(this.H=this.sa)));try{do{for(var c=this.l.Xa?1:this.xa,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}this.Gb(c);var f=this.S-this.a; +a=f;for(var g=this.G.length-1;0<=g;g--){var h=this.G[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.pa+=f;this.L+=f;Fb(this,0,!0);a=f;this.l.Xa&&(b=!1,this.ta=this.ta+this.Bb()|0,this.X-=a,0>=this.X&&(this.X+=this.Z,b=!0),0<=this.ea&&this.ea<=Hb(this)&&(this.Z=this.ea=-1,Bb(this),Db(this),b=!0),b&&this.da(Hb(this)+" cycles: checksum="+p(this.ta)));this.ja-=f;if(0>=this.ja){this.ja+=this.xa;15<=++this.La&&(this.v&&this.v.Aa(),this.La=0);break}}while(this.l.oa)}catch(l){Db(this);Cb(this);this.v&& +this.v.stop(ja(),Hb(this));Qa(this,!1);c=l.stack||l.message;this.l.error=!0;this.M(c);return}c=setTimeout;d=this.Va;this.R=ja();e=this.Ka;this.pa&&(e=Math.round(e*this.pa/this.xa));e-=this.R-this.sa;if(f=this.R-this.H)this.O=Math.round(this.L/(10*f))/100,864E5<=f&&(this.T=0,Eb(this));if(0>e||this.Oe&&(this.H-=e),e=0;this.Da+=this.pa;this.R+=e;c(d,e)}else Cb(this),this.v&&this.v.stop(ja(),Hb(this))};k.Gb=function(){return 0}; +function Db(a){a.l.Wa&&(a.l.eb=!0);Mb(a);Fb(a,a.L);a.L=0;if(a.l.oa){a.l.oa=!1;a.K&&a.K.stop();var b=a.A.run;b&&(b.textContent="Run")}a.l.complete=void 0}function Cb(a){if(a.v){for(var b=a.v,c=0;c>8&255;a.D=b&255}function Xb(a){return a.f<<8|a.F}function Yb(a,b){a.f=b>>8&255;a.F=b&255}function G(a){return a.g<<8|a.i} +function I(a,b){a.g=b>>8&255;a.i=b&255}function E(a,b){a.o=b&65535}function J(a){return a.m&256?1:0}function K(a,b){a.m=a.m&255|b}function Zb(a){return Ta[a.s&255]?4:0}function Ub(a){return a.C&-214|(a.s&128?128:0)|(a.m&255?0:64)|((a.s^a.w)&16?16:0)|Zb(a)|J(a)}function Sb(a,b){a.m=a.s=a.w=0;b&1&&(a.m|=256);b&4||(a.s|=1);b&16&&(a.w|=16);b&64||(a.m|=255);b&128&&(a.s^=192);a.C=a.C&-726|b&512|2}function L(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b)&255} +function $b(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?1:0))&255}function ac(a,b){a.m=a.s=a.w=a.b&b;(a.b|b)&8&&(a.w^=16);return a.m}function bc(a,b){a.w=b^255;b=a.s=b+255&255;a.m=a.m&-256|b;return b}function cc(a,b){a.w=b;b=a.s=b+1&255;a.m=a.m&-256|b;return b}function dc(a,b){return a.s=a.m=a.w=a.b|b}function M(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+1^256)&255}function ec(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?0:1)^256)&255}function fc(a,b){return a.s=a.m=a.w=a.b^b}k.J=function(a){return this.j.J(a)}; +k.aa=function(a,b){this.j.aa(a,b)};function N(a){var b=a.J(a.o);E(a,a.o+1);return b}function O(a){var b=cb(a.j,a.o);E(a,a.o+2);return b}function P(a){var b=cb(a.j,a.u);a.u=a.u+2&65535;return b}function R(a,b){a.u=a.u-2&65535;fb(a.j,a.u,b)}function gc(a){if(a.a&&a.B&255&&a.C&512){for(var b=0;8>b&&!(a.B&1<b?255:1<>8;K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Vb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Vb(this));this.a-=7},function(){Wb(this,Vb(this)-1);this.a-=5}, +function(){this.D=cc(this,this.D);this.a-=5},function(){this.D=bc(this,this.D);this.a-=5},function(){this.D=N(this);this.a-=7},function(){var a=this.b<<8&256;this.b=(a|this.b)>>1;K(this,a);this.a-=4},ic,function(){Yb(this,O(this));this.a-=10},function(){this.aa(Xb(this),this.b);this.a-=7},function(){Yb(this,Xb(this)+1);this.a-=5},function(){this.f=cc(this,this.f);this.a-=5},function(){this.f=bc(this,this.f);this.a-=5},function(){this.f=N(this);this.a-=7},function(){var a=this.b<<1;this.b=a&255|J(this); +K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Xb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Xb(this));this.a-=7},function(){Yb(this,Xb(this)-1);this.a-=5},function(){this.F=cc(this,this.F);this.a-=5},function(){this.F=bc(this,this.F);this.a-=5},function(){this.F=N(this);this.a-=7},function(){var a=this.b<<8;this.b=(J(this)<<8|this.b)>>1;K(this,a&256);this.a-=4},ic,function(){I(this,O(this));this.a-=10},function(){var a=O(this);fb(this.j,a,G(this));this.a-=16},function(){I(this, +G(this)+1);this.a-=5},function(){this.g=cc(this,this.g);this.a-=5},function(){this.g=bc(this,this.g);this.a-=5},function(){this.g=N(this);this.a-=7},function(){var a=0,b=J(this);if((this.s^this.w)&16||9<(this.b&15))a|=6;if(b||154<=this.b)a|=96,b=1;this.b=L(this,a);K(this,b?256:0);this.a-=4},ic,function(){var a;I(this,a=G(this)+G(this));K(this,a>>8&256);this.a-=10},function(){var a;a=O(this);a=cb(this.j,a);I(this,a);this.a-=16},function(){I(this,G(this)-1);this.a-=5},function(){this.i=cc(this,this.i); +this.a-=5},function(){this.i=bc(this,this.i);this.a-=5},function(){this.i=N(this);this.a-=7},function(){this.b=~this.b&255;this.a-=4},ic,function(){this.u=O(this)&65535;this.a-=10},function(){this.aa(O(this),this.b);this.a-=13},function(){this.u=this.u+1&65535;this.a-=5},function(){var a=G(this);this.aa(a,cc(this,this.J(a)));this.a-=10},function(){var a=G(this);this.aa(a,bc(this,this.J(a)));this.a-=10},function(){this.aa(G(this),N(this));this.a-=10},function(){this.m|=256;this.a-=4},ic,function(){var a; +I(this,a=G(this)+this.u);K(this,a>>8&256);this.a-=10},function(){this.b=this.J(O(this));this.a-=13},function(){this.u=this.u-1&65535;this.a-=5},function(){this.b=cc(this,this.b);this.a-=5},function(){this.b=bc(this,this.b);this.a-=5},function(){this.b=N(this);this.a-=7},function(){K(this,J(this)?0:256);this.a-=4},function(){this.a-=5},function(){this.c=this.D;this.a-=5},function(){this.c=this.f;this.a-=5},function(){this.c=this.F;this.a-=5},function(){this.c=this.g;this.a-=5},function(){this.c=this.i; +this.a-=5},function(){this.c=this.J(G(this));this.a-=7},function(){this.c=this.b;this.a-=5},function(){this.D=this.c;this.a-=5},function(){this.a-=5},function(){this.D=this.f;this.a-=5},function(){this.D=this.F;this.a-=5},function(){this.D=this.g;this.a-=5},function(){this.D=this.i;this.a-=5},function(){this.D=this.J(G(this));this.a-=7},function(){this.D=this.b;this.a-=5},function(){this.f=this.c;this.a-=5},function(){this.f=this.D;this.a-=5},function(){this.a-=5},function(){this.f=this.F;this.a-= +5},function(){this.f=this.g;this.a-=5},function(){this.f=this.i;this.a-=5},function(){this.f=this.J(G(this));this.a-=7},function(){this.f=this.b;this.a-=5},function(){this.F=this.c;this.a-=5},function(){this.F=this.D;this.a-=5},function(){this.F=this.f;this.a-=5},function(){this.a-=5},function(){this.F=this.g;this.a-=5},function(){this.F=this.i;this.a-=5},function(){this.F=this.J(G(this));this.a-=7},function(){this.F=this.b;this.a-=5},function(){this.g=this.c;this.a-=5},function(){this.g=this.D;this.a-= +5},function(){this.g=this.f;this.a-=5},function(){this.g=this.F;this.a-=5},function(){this.a-=5},function(){this.g=this.i;this.a-=5},function(){this.g=this.J(G(this));this.a-=7},function(){this.g=this.b;this.a-=5},function(){this.i=this.c;this.a-=5},function(){this.i=this.D;this.a-=5},function(){this.i=this.f;this.a-=5},function(){this.i=this.F;this.a-=5},function(){this.i=this.g;this.a-=5},function(){this.a-=5},function(){this.i=this.J(G(this));this.a-=7},function(){this.i=this.b;this.a-=5},function(){this.aa(G(this), +this.c);this.a-=7},function(){this.aa(G(this),this.D);this.a-=7},function(){this.aa(G(this),this.f);this.a-=7},function(){this.aa(G(this),this.F);this.a-=7},function(){this.aa(G(this),this.g);this.a-=7},function(){this.aa(G(this),this.i);this.a-=7},function(){var a=this.o-1;if(this.ra.length)for(var b=0;b>>=f)&l;if(void 0!==g&&g[0])g[0](a,l,d);f+=h<<3;a+=h;e-=h}this.a-=10},function(){var a=O(this);J(this)||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this,Xb(this));this.a-=11},function(){this.b=M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,16);this.a-=11},function(){J(this)&&(E(this,P(this)),this.a-=6);this.a-=5},kc,function(){var a=O(this);J(this)&&E(this,a);this.a-=10},function(){for(var a=N(this),b=this.j,c=this.o+-2&65535,d=1,e=0, +f=0;0>8;this.a-=10},function(){var a=O(this);this.s&128||E(this,a);this.a-=10},function(){this.C&=-513;this.a-=4},function(){var a=O(this);this.s&128||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this, +Ub(this)&255|this.b<<8);this.a-=11},function(){this.b=dc(this,N(this));this.a-=7},function(){R(this,this.o);E(this,48);this.a-=11},function(){this.s&128&&(E(this,P(this)),this.a-=6);this.a-=5},function(){this.u=G(this)&65535;this.a-=5},function(){var a=O(this);this.s&128&&E(this,a);this.a-=10},function(){this.C|=512;this.a-=4;gc(this)},function(){var a=O(this);this.s&128&&(R(this,this.o),E(this,a),this.a-=6);this.a-=11},lc,function(){M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,56); +this.a-=11}];function T(a){r.call(this,"ChipSet",a,T);var b=a.model;b&&!mc[b]&&Aa("Unrecognized ChipSet model: "+b);this.c=mc[b]||{};a.sound&&(this.I=null,window&&(this.I=window.AudioContext||window.webkitAudioContext),this.I&&new this.I);B(this)}w(T); +var V={ba:1978.1,zc:{ca:0,td:1,xd:16,Ed:32,Nd:64,Md:128,Fa:14},za:{ca:1,Pb:1,sc:2,oc:4,pc:16,qc:32,rc:64,Fa:8},Ac:{ca:2,sd:3,Wd:4,ud:8,Id:16,Jd:32,Kd:64,vd:128,Fa:0},Rd:{ca:3},Pd:{ca:2,Fd:7},Td:{ca:3,Xd:1,Sd:2,Ld:4,Cd:8,wd:16,md:32},Qd:{ca:4},Ud:{ca:5,yd:1,zd:2,Ad:4,Bd:8,Yd:16}},W={ba:100,ka:{ca:66,vb:1,kc:2,lc:4,Hd:8,Gd:16,sb:32,rb:64,nb:128},Nb:{ca:66,INIT:0},wa:{ca:194,od:0,lb:16,uc:32,tb:48,Xb:0,Yb:32},Ra:{ca:162,Od:0,$b:0,Wb:0,Zb:0,Vb:0},ma:{Dd:{ca:98},Ba:{Kb:0,Jb:1,xc:2,Fc:4,Qb:5,vc:6,Vd:7}, +Ua:16383}},mc={SI1978:V,VT100:W};T.prototype.V=function(){return!1};T.prototype.qa=function(a,b,c,d){this.j=b;this.a=c;this.N=d;this.v=a;this.m=Va(a,"Keyboard");this.Z=Va(a,"SerialPort");this.video=Va(a,"Video");hb(b,this,this.c.$a);ib(b,this,this.c.ab)};T.prototype.ga=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ia=function(a){return a?this.save():!0};V.INIT=[[V.zc.Fa,V.za.Fa,V.Ac.Fa,0,0,0,0]]; +W.INIT=[[W.Nb.INIT,W.ka.kc|W.ka.lc],[W.wa.Xb,W.wa.Yb],[W.Ra.$b,W.Ra.Wb,W.Ra.Zb,W.Ra.Vb],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11984,11888,11776,11808,11776,12E3,12E3,11901,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11808,11984,11856,11776,11808,11776,12E3,12E3,11881,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];k=T.prototype;k.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.M("reset error")}; +k.save=function(){var a=new F(this);switch(this.c.ba){case V.ba:a.set(0,[this.W,this.g,this.X,this.C,this.H,this.S,this.T]);break;case W.ba:a.set(0,[this.L,this.u]),a.set(1,[this.o,this.s]),a.set(2,[this.f,this.G,this.R,this.O]),a.set(3,[this.B,this.b,this.w,this.K,this.i])}return a.data()}; +k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.ba){case V.ba:return this.W=b[0],this.g=b[1],this.X=b[2],this.C=b[3],this.H=b[4],this.S=b[5],this.T=b[6],!0;case W.ba:return this.L=b[0],this.u=b[1],b=a[1],this.o=b[0],this.s=b[1],b=a[2],this.f=b[0],this.G=b[1],this.R=b[2],this.O=b[3],b=a[3],this.B=b[0],this.b=b[1],this.w=b[2],this.K=b[3],this.i=b[4],!0}return!1};k.start=function(){};k.stop=function(){};k.Sc=function(){return this.W};k.Tc=function(){return this.g};k.Uc=function(){return this.X}; +k.Rc=function(){return this.C>>8-this.H&255};k.$c=function(a,b){this.H=b};k.bd=function(a,b){this.S=b};k.ad=function(a,b){this.C=b<<8|this.C>>8};k.cd=function(a,b){this.T=b};k.dd=function(){};function nc(a){var b=0,c=0,d=~a.B;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +k.Vc=function(){var a=this.u,a=a&~W.ka.rb;if((Hb(this.a)&64)<<1&&(a|=W.ka.rb,a!=this.u)){var b,c;b=this.w&1;switch(this.w>>1&7){case W.ma.Ba.Jb:this.B=this.B<<1|b;break;case W.ma.Ba.Qb:b=nc(this);this.i[b]=W.ma.Ua;break;case W.ma.Ba.Kb:this.b=this.b<<1|b;break;case W.ma.Ba.Fc:b=nc(this);c=this.b&W.ma.Ua;this.i[b]=c;break;case W.ma.Ba.vc:b=nc(this);c=this.i[b];null==c&&(c=W.ma.Ua);this.b=c;break;case W.ma.Ba.xc:this.b<<=1,this.K=this.b&W.ma.Ua+1}}a&=~W.ka.sb;this.K&&(a|=W.ka.sb);a&=~W.ka.nb;if(b=this.m){b= +this.m;if(c=b.f)c=b.a,c=Hb(b.a)>=b.m+c.la*c.I/1E3*1.2731488;c&&(b.f=!1);b=!b.f}b&&(a|=W.ka.nb);a&=~W.ka.vb;this.Z&&this.Z.fa&1&&(a|=W.ka.vb);return this.u=a};k.ed=function(a,b){this.L=b};k.hd=function(a,b){this.w=b};k.gd=function(a,b){a=b&3;switch(b>>2&3){case 0:this.f=this.f&-4|a;break;case 1:this.f=this.f&-13|a<<2;this.video&&(b=this.video,a=this.f,b.pa!==a&&((b.pa=a)?Nb(b,!0):b.sa=!0));break;case 2:switch(a){case 0:this.G=~this.G;break;case 2:case 3:this.R=3-a}break;case 3:this.O=a}}; +k.fd=function(a,b){b&W.wa.uc?(b&=W.wa.tb,this.s!=b&&(this.s=b,this.video&&(this.video.Db=this.s==W.wa.tb?50:60))):(b&=W.wa.lb,this.o!=b&&(this.o=b,this.video&&(a=this.video,b=this.o==W.wa.lb?132:80,a.K=b,a.U=a.xa,80>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.i=e.symbols;if(!a.b.length){q("Empty ROM: "+b);return}if(1==a.b.length){q(a.b[0]);return}}catch(h){a.M("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.j;0>>=f.j;0d?a.j.push({ib:b,fb:Date.now(),Ya:!1}):(a.j[d].fb=Date.now(),a.j[d].Ya=!1);else if(0<=d){if(!a.j[d].Ya){var e=a.j[d].fb;if(e&&100>Date.now()-e)return a.j[d].Ya=!0,Ec(a),!0}a.j.splice(d,1)}if(a.K){d=0;switch(b){case "1p":d=V.za.oc;break;case "2p":d=V.za.sc;break;case "coin":d=V.za.Pb;break;case "left":d=V.za.qc;break;case "right":d=V.za.rc;break;case "fire":d=V.za.pc}d&&(a=a.K,b=d,a.g&=~b,c&&(a.g|=b))}return!0} +function Ec(a){for(var b=0,c=-1;bc||c>e)c=e}else{Cc(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){Ec(a)},c)}k.Wc=function(){var a=this.g;0<=this.c&&(this.c>3)*a.G,!Za(a.j,a.ea,a.B,3)))return!1;a.B?(a.Ja=a.f.createImageData(b,c),a.La=16/a.ja|0,Kc(a,a.B>>1)):Kc(a,(a.K+1)*a.W);a.s=document.createElement("canvas");a.s.width=b;a.s.height=c;a.ra=a.s.getContext("2d");a.I={};a.S=1<=a.xa?8:16,f=8>(7>4)*c)}return l}Fc.prototype.ga=function(){return!0};Fc.prototype.V=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.ua[b]=c,!0;switch(b){case "fullScreen":return this.A[b]=c,this.b&&this.b.Ea?c.onclick=function(){d.Ea()}:c.parentNode.removeChild(c),!0}return!1}; +Fc.prototype.Ea=function(){var a=!1;if(this.b){if(this.b.Ea){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.C/this.w;b>c&&(a=Math.round(c/b*100)+"%")}this.Ia?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Ea();a=!0}this.R&&this.R.focus()}return a}; +function Ic(a,b){!b&&a.b&&(a.Ia?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Kc(a,b){a.Ka=b;a.O=!1;if(void 0===a.i||a.i.length!=a.Ka)a.i=Array(a.Ka)}function Mc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.T&&(208<=c&&236>c?e=a.S+0:28<=c&&72>c&&(e=a.S+1));a=a.L[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function Nb(a,b){var c=!0;if(!b){a.la&&(120==a.la?a.Va&1?(hc(a.a,2),c=!1):hc(a.a,1):hc(a.a,4));if(c&&a.O&&a.B){for(var d=a.j,e=a.B,f=!0,g=a.ea>>>d.j;0>=1);;){var x=bb(a.j,u++);if(127==(x&127)){var t=bb(a.j,u++),d=t&96,c=(t&15)<<8|bb(a.j,u),c=c+(t&16? +8192:16384);break}if(n>4)*x.P,Z,sa,Ma,eb,yc=x.U,Kb=x.P;C?(Z=H*t.U,sa=e*t.P,Ma=t.U,eb=t.P):(Z=H*t.Ca,sa=e*t.Da,Ma=t.Ca,eb=t.Da);x.U>t.U&&(Z*=2,Ma*=2);x.P>t.P&&(y||(Q+=t.P),Kb=t.P);C?C.drawImage(x.canvas,U,Q,yc,Kb,Z,sa,Ma,eb):(Z+=0,sa+=0,t.f.drawImage(x.canvas,U,Q,yc,Kb,Z, +sa,Ma,eb))}h++}g++}e++}}a.O=!0;!b&&a.sa&&1==h&&(a.i[l]=-1,h=0);a.sa=!1;(h||b)&&a.ra&&a.f.drawImage(a.s,0,a.pa,a.o,a.G-a.P,0,0,a.Jc,a.Ib)}else{e=a.ea;f=e+a.B;l=h=g=0;b=a.o;n=0;c=a.G;y=d=0;u=a.ja;H=(1<>>t.j;t=x!=t.f?t.b[U].Eb(x,C):t.b[U++].bb(x,C)|t.b[U&t.o].bb(0,C+1)<<8;if(a.O&&t===a.i[g])h+=a.La;else{a.i[g]=t;(C=y)&&(t=t>>8|(t&255)<<8);h>C&H,Mc(a,a.Ja,h++,l,U),C+=u;h>n&&(n=h);l=d&&(d=l+1)}e+= +2;g++;if(h>=a.o&&(h=0,l++,l>a.G))break}a.O=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Ea.aspect);f&&.3<=f&&3.33>=f&&(xa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");ra("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Fc(d,e,g,f,c);Pa(d,c)}}); +function Nc(a){this.I=+a.adapter;switch(this.I){case 0:this.L=0;this.R=2;break;default:q("Unrecognized serial adapter #"+this.I);return}this.b=this.c=null;this.O=a.tabSize;this.H=a.charBOL;this.f=0;this.C=!1;r.call(this,"SerialPort",a,Nc);var b=a.binding;if("console"==b)this.c="";else{var c;a=Oc;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.A[b])&&this.V(null,a,b))}this.g="";this.i=this.s=null;this.exports={connect:this.Cb,receiveData:this.gb}}w(Nc); +var Pc=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Qc=[!1,0,0,133,142,39,238],Oc="buffer";k=Nc.prototype; +k.V=function(a,b,c,d){var e=this;switch(b){case Oc:return this.A[b]=this.b=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Sa)return;b=ha(b[1]);if(this.i=Na(b)){var d=this.i.exports;if(d){var e=d.connect;e&&e.call(this.i);if(this.s=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ga=function(a,b){if(!b)if(this.Cb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ia=function(a){return a?this.save():!0};k.reset=function(){Uc(this)};k.save=function(){var a=new F(this),b=0,c=[];c[b++]=this.o;c[b++]=this.B;c[b++]=this.G;c[b++]=this.fa;c[b++]=this.m;c[b++]=this.w;c[b]=this.u;a.set(0,c);return a.data()};k.restore=function(a){return Uc(this,a[0])};function Uc(a,b){var c=0;b||(b=Qc);a.o=b[c++];a.B=b[c++];a.G=b[c++];a.fa=b[c++];a.m=b[c++];a.w=b[c++];a.u=b[c];return!0} +function Vc(a,b){var c=a.u&b;b&15||(c>>=4);b=Pc[c];c=((a.m&12)>>2)+6;a.m&16&&c++;c+=((a.m&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function Rc(a,b){return a.C||a.fa&2?!1:(a.B=b,a.fa|=2,hc(a.a,a.R),!0)}k.gb=function(a){null!=a&&(this.g="number"!=typeof a?a:this.g+String.fromCharCode(a));this.g&&(Rc(this,this.g.charCodeAt(0))&&(this.g=this.g.substr(1)),this.g&&this.a&&Lb(this.a,this.S,Vc(this,15)));return!0};k.Qc=function(){var a=this.B;this.fa&=-3;return a};k.Pc=function(){return this.fa}; +k.Zc=function(a,b){this.G=b;this.fa&=-6;if(19==b)this.C=!0;else if(17==b)this.C=!1;else if(this.s&&this.s.call(this.i,b),this.b)if(8==b)this.b.value=this.b.value.slice(0,-1),0":String.fromCharCode(b);var c=a.length;9==b?(b=this.O||8,c=b-this.f%b,this.O&&(a=" ".slice(0,c))):13==b&&(this.f=c=0,a="\n");this.H&&!this.f&&c&&(a=String.fromCharCode(this.H)+a);this.b.value+=a;this.b.scrollTop=this.b.scrollHeight;this.f+=c}else if(null!= +this.c){if(10==b||1024<=this.c.length)this.da(this.c),this.c="";10!=b&&(this.c+=String.fromCharCode(b))}this.a&&Lb(this.a,this.T,Vc(this,240))};k.Yc=function(a,b){this.o?(this.w=b,this.w&64&&(this.o=!1)):(this.m=b,this.o=!0)};k.Xc=function(a,b){this.u=b};var Sc={0:Nc.prototype.Qc,1:Nc.prototype.Pc},Tc={0:Nc.prototype.Zc,1:Nc.prototype.Yc,2:Nc.prototype.Xc};ya(function(){for(var a=A(document,"pc8080","serial"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bYc){if($c(d,this.s)){this.i=new F(this,"1.30.1","failsafe");$c(this.i)&&(ed(this,d),a=2,fd(this.i));this.i.set("timestamp",ka());gd(this.i);var e=this.b&&!this.v;if(1==a||ma("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=dd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?$c(d,g):("error"== +f&&"no machine state"!=g?(this.M("Error: "+g),"unable to verify user"==g&&(qa("user",""),this.c=null)):this.da(f+": "+g),fd(d),$c(d)?(c=dd(d),e=!0):c=!1))}e&&cd(this,c?d:null)}else 2==a&&d.clear()}else cd(this);delete this.s;delete this.u}e=La(this.id);for(f=0;fa[1];a=a[2];this.L=!0;this.l.Y=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(hd(this,this.a,b,c,a),this.a.Na());this.C&&(ed(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; +function ed(a,b){if(ma("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PC8080",ver:"1.30.1"};d.url=a.I;d.user=c;d.type="bug";d.data=b;la("http://www.pcjs.org/api/v1/report",d,!0)}} +function id(a,b,c){var d,e="none";if(a.f)return null;a.f--;var f=new F(a,"1.30.1"),g=new F(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&Db(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.Y=!1,!1===d&&(e=null)));for(var h=La(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");la(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],n,u=/( [a-z]+=)(['"])(.*?)\2/g;n=u.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);pd(a,b,c)}})}else c(a,null)} +function qd(a,b,c,d){function e(a){if(void 0===h){var b=g&&A(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--md||Ba(!0));l=!1}var g,h,l=!0;md++;Ja[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=n:y.appendChild(document.createTextNode(n));u.appendChild(y)}c|| +(c="/versions/pc8080/1.30.1/components.xsl");n=function(d,h){h?nd(c,null,null,!1,e,function(d,l){l?(Ka(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--md||Ba(!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),--md||Ba(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?nd(b,a,d,!0,e,n):od(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return l}window.embedPC8080=function(a,b,c,d){Ba(!1);return qd(a,b,c,d)};window.enableEvents=Ba;window.sendEvent=Ca;})(); diff --git a/versions/pcx86/1.30.1/common.css b/versions/pcx86/1.30.1/common.css new file mode 100644 index 000000000..6b1c0f887 --- /dev/null +++ b/versions/pcx86/1.30.1/common.css @@ -0,0 +1,265 @@ +@CHARSET "UTF-8"; +/** + @author Jeff Parsons (@jeffpar) + @website http://www.pcjs.org/ + @created 2013-05-05 + @modified 2014-02-23 + @license http://www.gnu.org/licenses/gpl.html + */ +body { + margin: 0; + background: #202020; +} +h1, h2 { + margin-top: 0; + color: #cccccc; +} +h1, h2, h3, h4 { + word-wrap: break-word; +} + +h4 a { + color: #cccccc !important; +} +p { + line-height: 1.5em; +} +img { + max-width: 100%; +} +a img { + vertical-align: bottom; +} +pre, code { + color: #000000; + background-color: #cccccc; + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; +} +pre { + margin: 1em 2em; + padding: 1em; + border-radius: 5px; + overflow: auto; +} +code { + padding: 1px; +} +pre a, code a { + color: #006400 !important; +} +.common { + width: 100%; + margin: 0 auto; + color: #cccccc; +} +.common a { + + color: #7fc07f; + text-decoration: none; +} +.common hr { + border-color: #808080; +} +.common a:hover { + text-decoration: underline; +} +.common, .machine { + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; + font-size: 15px; +} +.machine { + margin: 15px; + overflow: hidden; +} +.c1pjs { + overflow: visible; +} +.machine-placeholder { + text-align: center; + font-weight: bold; +} +.common-top { + background: #202020; + font-size: small; +} +.common-top-left { + float: left; + width: 60%; +} +.common-top-left ul { + line-height: 1.5em; + list-style-type: none; + margin: 0; + padding: 1em 1em 1em 9px; + overflow: hidden; +} +.common-top-left ul li { + display: block; + float: left; +} +.common-top-left ul li a { + border-right: 1px solid #6f6f6f; + padding: 2px 6px 2px 6px; +} +.common-top-left ul li:last-child a { + border-right: none; +} +.common-top-right { + float: right; + width: 40%; +} +.common-top-right p { + float: right; + margin: 0; + padding: 1em; +} +.common-middle { + clear: both; + padding: 1px 1em 1px 1em; + background: #404040; +} +.common-sidebar { + float: left; + font-size: small; + width: 140px; + padding-bottom: 20px; + overflow: hidden; + white-space: nowrap; + word-wrap: break-word; +} +.common-list { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list li { + + padding-bottom: 7px; +} +.common-list-data { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list-data li { + line-height: 1.5em; +} +.common-list-data-items, .common-list-data-subitems { + font-size: x-small; + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} +.common-list-data-items li, .common-list-data-subitems li { + padding-bottom: 0; +} +.common-main { + margin-left: 150px; + +} +.common-main blockquote { + text-align: justify; +} +.common-image-gallery { + margin: 0 auto; + text-align: center; +} +.common-image-gallery:after { + content: ''; + display: block; +} +.common-image-frame { + display: inline-block; + margin: 8px; + text-align: center; +} +.common-image-link { + padding: 5px; + border: 1px solid black; + border-radius: 5px; + background-color: #FAEBD7; +} +.common-image-label { + font-size: x-small; +} +.common-bottom { + clear: both; + padding-top: 1em; +} +.common-bottom:after { + content: ''; + display: block; + clear: both; +} +.common-reference { + float: left; + font-size: x-small; +} +.common-reference a { + text-decoration: none; +} +.common-copyright { + float: right; + font-size: x-small; +} +.common-copyright a { + text-decoration: none; +} +.md-list { +} +.md-list li { + line-height: 1.5em; + margin-bottom: 1em; +} +.md-list li p { + padding-left: 2em; +} +.md-list-compact { +} +.md-list-compact li { + margin-bottom: 0; +} +.md-list-none { + list-style-type: none; + padding-left: 2em; +} +.md-list-none li { + margin-bottom: 0; +} +@media screen and (max-width: 900px) { + + .common-sidebar { + width: 100%; + white-space: normal; + } + .common-list { + padding-left: 0; + } + .common-list-data { + padding-left: 0; + } + .common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li { + width: 130px; + float: left; + overflow: hidden; + vertical-align: top; + padding-right: 1em; + margin-top: 0; + } + .common-list-data-subitems { + display: none; + } + .common-main { + clear: both; + margin-left: 0; + padding-left: 0; + padding-right: 0; + } + .md-list-none { + padding-left: 1em; + } +} diff --git a/versions/pcx86/1.30.1/common.xsl b/versions/pcx86/1.30.1/common.xsl new file mode 100644 index 000000000..cc6665530 --- /dev/null +++ b/versions/pcx86/1.30.1/common.xsl @@ -0,0 +1,58 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +

    Powered by JavaScript and GitHub

    +
    +
    +
    + + +
    +

    + +
    +
    + +
    diff --git a/versions/pcx86/1.30.1/components.css b/versions/pcx86/1.30.1/components.css new file mode 100644 index 000000000..4a449ca97 --- /dev/null +++ b/versions/pcx86/1.30.1/components.css @@ -0,0 +1,159 @@ +@CHARSET "UTF-8"; + + +*:not(input,textarea) { + -webkit-user-select: none; +} +.pcjs-embed { +} +.pcjs-embed:after { + clear:both; +} +.pcjs-machine { +} +.pcjs-name, .pcjs-menu { + clear: both; + font-weight: bold; + padding-bottom: 4px; +} +.pcjs-menu { + float: left; +} +.pcjs-canvas { + width: 100%; + height: auto; +} +.pcjs-container { + color: #000000; + position: relative; +} +.pcjs-label { + font-size: small; + line-height: 19px; + vertical-align: middle; + float: left; + font-family: Monaco, "Lucida Console", monospace; +} +.pcjs-controls textarea { + font-family: Monaco, "Lucida Console", monospace; + font-size: x-small; +} +.pcjs-fieldset { + border: none; + margin: 0; + padding: 0; +} +.pcjs-flag { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 19px; + vertical-align: middle; +} +.pcjs-register { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 19px; + vertical-align: middle; + border: 1px solid black; +} +.pcjs-switches { + float: left; +} +.pcjs-bitBucket { + float: left; + width: 19px; + height: 38px; +} +.pcjs-bitCell { + float: left; + width: 19px; + height: 19px; + margin-right: -1px; + margin-bottom: -1px; + border: 1px solid black; + text-align: center; + line-height: 19px; +} +.pcjs-bitCellLeft { + border-left: 1px solid black; +} +.pcjs-bitLabel { + font-size: xx-small; + text-align: center; +} +.pcjs-description, .pcjs-status { + font-size: x-small; + line-height: 2em; +} +.pcjs-key { + border: 1px solid black; + font-size: x-small; + text-align: center; + position: absolute; + height: 34px; + line-height: 34px; + background-color: #ffffff; +} +.pcjs-led { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + text-align: center; + line-height: 19px; + background-color: #000000; +} +.pcjs-rled { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + border-radius: 50%; + text-align: center; + line-height: 19px; + background-color: #000000; +} +.pcjs-screen { + clear: both; + height: auto; + position: relative; + line-height: 0; +} +.pcjs-screen textarea { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + border: 0; + padding: 0; + line-height: 0; +} +.pcjs-reference { + float: left; + font-size: x-small; +} +.pcjs-reference a { + text-decoration: none; +} +.pcjs-copyright { + float: right; + font-size: x-small; +} +.pcjs-copyright a { + text-decoration: none; +} + +@media screen and (max-width: 900px) { + .pcjs-textarea { + width: 100% !important; + } + .pcjs-registers { + width: 100% !important; + } +} diff --git a/versions/pcx86/1.30.1/components.xsl b/versions/pcx86/1.30.1/components.xsl new file mode 100644 index 000000000..14ba82384 --- /dev/null +++ b/versions/pcx86/1.30.1/components.xsl @@ -0,0 +1,1275 @@ + + + + + + + + + + + pc + pcjs + pcx86 + PCx86 + 1.30.1 + www.pcjs.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + position:; + position:relative; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,resetAddr:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + device + ,name:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + serial + ,adapter:,binding:'',tabSize:,charBOL: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + + false + + + + + rom + ,addr:,size:,alias:,file:'',notify:'',writable: + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + true + + + + + ram + ,addr:,size:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + +
    diff --git a/versions/pcx86/1.30.1/document.css b/versions/pcx86/1.30.1/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pcx86/1.30.1/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pcx86/1.30.1/document.xsl b/versions/pcx86/1.30.1/document.xsl new file mode 100644 index 000000000..797a04cfd --- /dev/null +++ b/versions/pcx86/1.30.1/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pcx86/1.30.1/machine.xsl b/versions/pcx86/1.30.1/machine.xsl new file mode 100644 index 000000000..b3884a744 --- /dev/null +++ b/versions/pcx86/1.30.1/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pcx86/1.30.1/manifest.xsl b/versions/pcx86/1.30.1/manifest.xsl new file mode 100644 index 000000000..5b092d12b --- /dev/null +++ b/versions/pcx86/1.30.1/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pcx86/1.30.1/outline.xsl b/versions/pcx86/1.30.1/outline.xsl new file mode 100644 index 000000000..f4ff2b973 --- /dev/null +++ b/versions/pcx86/1.30.1/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pcx86/1.30.1/pcx86-dbg.js b/versions/pcx86/1.30.1/pcx86-dbg.js new file mode 100644 index 000000000..83f97359b --- /dev/null +++ b/versions/pcx86/1.30.1/pcx86-dbg.js @@ -0,0 +1,823 @@ +(function(){var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, +Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; +da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} +function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} +function ja(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} +function pa(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function sa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var va=[31,28,31,30,31,30,31,31,30,31,30,31]; +function wa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.vh|g<>a.shift}function ya(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.yg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; +if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(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 jb(a,b){b||(b=bb);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),cb=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},cb=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b=this.x&&a=this.y&&b=c>>2);d?(b=new Hb(a.x,a.y,a.ad,a.A*b/c|0),a.y+=b.A,a.A-=b.A):(b=new Hb(a.x,a.y,a.ad*b/c|0,a.A),a.x+=b.ad,a.ad-=b.ad);return b}l=Fb.prototype;l.Pb=function(a,b,c,d){return this.X&&this.X.Pb(a,b,c,d)||this.F&&this.F.Pb(a,b,c,d)||this.B&&this.B.Pb(a,b,c,d)||this.ha&&this.ha.Pb(a,b,c,d)?!0:this.parent.Pb.call(this,a,b,c,d)}; +l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.F=c;this.ha=d;this.B=Jb(a,"Keyboard")};l.hc=function(a,b){b||Kb();return!0};l.gc=function(){return!0};l.he=function(a,b){a.button||(this.ea=b?0:-1,Mb(this,a,b))};l.Kf=function(a){Mb(this,a)}; +function Mb(a,b,c){var d=1280/null.offsetWidth,e=720/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.ea||(a.ea=Math.abs(a.L-d)>Math.abs(a.V-b)?1:2),1==a.ea?b=a.V:2==a.ea&&(d=a.L));a.L=d;a.V=b;if(0<=d&&1280>d&&0<=b&&720>b){a:{c=d;if(960>c&&a.A&&a.A.Se)for(f=0;fd&&(f=d);c=f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.Ca)){b=c;if(a.context&&a.ia&&a.ka){e=a.ia.width;a.ka.fillStyle="black";a.ka.fillRect(0,360,e,360);Ob(a,378,a.ia,a.ka);a.pa=a.Da.width/24|0;if(null==b)Pb(a,"Mouse over memory to dump");else for(Pb(a,r(b,8,!0),null,0,1),f=1;16>=f;f++){d="";for(g=1;8>=g;g++){var h;h=a.ga;var k=b++;h=h.sa[(k&h.Gb)>>>h.La].re(k&h.A,k);Pb(a,r(h,2),null,1);d+=32<=h&&128>h?String.fromCharCode(h):"."}Pb(a,d,null,0,1)}a.context.drawImage(a.ia,0,360,e,360,a.qb,a.Db,a.Pa,a.cb)}a.Ca= +c}}}l.pd=function(){};function Qb(a,b,c,d){a.A.Bf[a.A.fj++]={El:b,Td:c,type:d};return wa(Nb,b,c,0,d)}function Ob(a,b,c,d){var e,f=null.style.color,g=a.Oa=10;a.C=g;a.U=b;a.W=a.va=18;e||(e=a.ua||a.va+"px Monaco, Lucida Console, Courier New");a.fa=a.ua=e;c&&(a.Da=c);d&&(a.N=d,a.Fa=f||"white")} +function Pb(a,b,c,d,e){a.N.font=a.fa;a.N.fillStyle=a.Fa;a.N.fillText(b,a.C,a.U);a.C+=a.pa;null!=c&&(16!=a.Tb?b=c.toString():(b=8>a.Ka?"0x":"",b+=r(c,a.Ka)),a.N.fillText(b,a.C,a.U),a.C+=a.pa);d&&(a.C+=a.pa*d);e&&(a.C=a.Oa,a.U+=(a.W+2)*(e||1))}function Kb(){for(var a=!1,b=tb(document,"pcx86","panel"),c=0;c=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b>>a.La;0g&&(n=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.Ea)return k.Qe+=k.Ea-f,k.Ea=f,!0;if(f>=k.Ea+k.Qe){n=k.size-(f-m);n>g&&(n=g);k.Qe=f-k.Ea+n;f=m+a.Sb;g-=n;h++;continue}}return Wb(a,1,f,g)}f=new B(f,n,a.Sb,d,e);Sb(f,a.ha,k);a.sa[h++]=f;f=m+a.Sb;g-=n}return 0>=g?(Xb(a.F),a.F.la.Ib||a.status(Math.floor(c/1024)+"Kb "+Yb[d]+" at "+r(b)),!0):Wb(a,2,b,c)} +var Nb,$b={Hk:20,count:8,Ko:1,type:3},ac=0,bc;for(bc in $b){var cc=$b[bc];$b[bc]={vh:(1<>>this.La;0>>a.La;0>>=a.La;0>>a.La;0>>this.La].pc(a&this.A,a)}; +l.na=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].fg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La].sc(a&this.A,b&255,a)};l.jb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;c!=this.A?this.sa[d].zf(c,b&65535,a):(this.sa[d++].sc(c,b&255,a),this.sa[d&this.ga].sc(0,b>>8&255,a+1))};function nc(a,b,c){var d=b&a.A,e=(b&a.Gb)>>>a.La;d!=a.A?a.sa[e].zi(d,c&65535,b):(a.sa[e++].xf(d,c&255,b),a.sa[e&a.ga].xf(0,c>>8&255,b+1))} +l.nb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;if(c>>=8};l.xj=function(){return null}; +function oc(a,b){var c=0,d=[],e=!a.X&&a.Dg==a.Gb;e||Tb(a,!0);for(var f=0;f>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ha&&a.V!=g[1]&&Ac(a.ha,b,k)}else a.ha&&(ub(a.ha,a,b,k,e),a.V&&Ac(a.ha,b,k));f+=h<<3;b+=h;c-=h}}function Wb(a,b,c,d,e){b="Memory block error ("+b+": "+r(c)+","+r(d)+")";e?a.ha?a.ha.message(b):a.log(b):w(b);return!1}var Bc;if(Ab){var Cc=new ArrayBuffer(2);(new DataView(Cc)).setUint16(0,256,!0);Bc=256===(new Uint16Array(Cc))[0]}else Bc=!1;var ic=Bc; +function B(a,b,c,d,e,f){this.id=Dc+=2;this.da=null;this.C=0;this.Ea=a;this.Qe=b;this.size=c||0;this.type=d||Ec;this.N=d==hc;this.controller=null;this.F=f;Sb(this);this.Wa=this.tj=!1;if(c)if(e)this.controller=e,a=e.wj(a),this.da=a[0],this.C=a[1],fc(this,e.nh());else if(Ab)this.X=new ArrayBuffer(c),this.qa=new DataView(this.X,0,c),this.Za=new Uint8Array(this.X,0,c),this.de=new Uint16Array(this.X,0,c>>1),this.da=new Int32Array(this.X,0,c>>2),fc(this,ic?jc:kc);else{this.da=Array(c>>2);for(e=0;e>8&65280|a>>>24);return a} +B.prototype={constructor:B,parent:null,qh:function(a){this.Ea=a},save:function(){var a,b;if(this.controller)a=null;else if(Ab)for(a=Array(this.size>>2),b=0;b>8,c)},U:function(a,b,c){this.sc(a++, +b&255,c++);this.sc(a++,b>>8&255,c++);this.sc(a++,b>>16&255,c++);this.sc(a,b>>>24,c)},Fa:function(a){return this.da[a>>2]>>>((a&3)<<3)&255},sb:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b]>>a;return 24>a?c&65535:c&255|(this.da[b+1]&255)<<8},Ya:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b];a&&(c=c>>>a|this.da[b+1]<<32-a);return c},tc:function(a,b){var c=a>>2;a=(a&3)<<3;this.da[c]=this.da[c]&~(255<>2;a=(a&3)<<3;24>a?this.da[c]=this.da[c]&~(65535<< +a)|b<>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Ea&&Kc(this.ha,this.Ea+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Ea&&Kc(this.ha,this.Ea+a,2)||this.F&&Lc(this.F,b,2,!1);return this.fg(a,b)},Pa:function(a,b){this.ha&&null!= +this.Ea&&Kc(this.ha,this.Ea+a,4)||this.F&&Lc(this.F,b,4,!1);return this.si(a,b)},bc:function(a,b,c){this.ha&&null!=this.Ea&&Mc(this.ha,this.Ea+a)||this.F&&Lc(this.F,c,1,!0);this.N?this.L(a,b,c):this.xf(a,b,c)},sd:function(a,b,c){this.ha&&null!=this.Ea&&Mc(this.ha,this.Ea+a,2)||this.F&&Lc(this.F,c,2,!0);this.N?this.L(a,b,c):this.zi(a,b,c)},Vc:function(a,b,c){this.ha&&null!=this.Ea&&Mc(this.ha,this.Ea+a,4)||this.F&&Lc(this.F,c,4,!0);this.N?this.L(a,b,c):this.ua(a,b,c)},Ja:function(a,b){this.yb.da[this.A]|= +this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.pc(a,b)},Jb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.sf(a,b)},fb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.Md(a,b)},Cc:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.sc(a,b,c)},Gd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.zf(a,b,c)},hd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|= +this.V;this.Bd.yf(a,b,c)},Ka:function(a,b){return Nc(this.F,b,!1).pc(a,b)},xd:function(a,b){return Nc(this.F,b,!1).sf(a,b)},gb:function(a,b){return Nc(this.F,b,!1).Md(a,b)},Uc:function(a,b,c){Nc(this.F,c,!0).sc(a,b,c)},Hd:function(a,b,c){Nc(this.F,c,!0).zf(a,b,c)},jd:function(a,b,c){Nc(this.F,c,!0).yf(a,b,c)},Ca:function(a){return this.Za[a]},aa:function(a){return this.Za[a]},Ga:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.pc=this.aa;return this.Za[a]},Tb:function(a){return this.qa.getUint16(a, +!0)},pa:function(a){return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Db:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.sf=this.pa;return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Oa:function(a){return this.qa.getInt32(a,!0)},fa:function(a){return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>>2]},cb:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.Md=this.fa;return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>> +2]},Ub:function(a,b){this.Za[a]=b;this.Wa=!0},ra:function(a,b){this.Za[a]=b;this.Wa=!0},uc:function(a,b){this.Za[a]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.sc=this.ra;this.Bd.Wa=!0},qd:function(a,b){this.qa.setUint16(a,b,!0);this.Wa=!0},ya:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.Wa=!0},Fd:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.zf=this.ya;this.Bd.Wa=!0},ce:function(a,b){this.qa.setInt32(a, +b,!0);this.Wa=!0},va:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.Wa=!0},Xc:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.yf=this.va;this.Bd.Wa=!0}};function Sb(a,b,c){a.ha=b;a.ze=a.Ae=0;c&&(c.F&&(a.F=c.F),(a.ze=c.ze)&&Hc(a,Ic,!1),(a.Ae=c.Ae)&&Jc(a,Ic,!1))} +function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.fg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.fg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} +var Tc=[],lc=[B.prototype.Fa,B.prototype.tc,B.prototype.sb,B.prototype.Cd,B.prototype.Ya,B.prototype.Wc],Ic=[B.prototype.Da,B.prototype.bc,B.prototype.qb,B.prototype.sd,B.prototype.Pa,B.prototype.Vc],Sc=[B.prototype.Ja,B.prototype.Cc,B.prototype.Jb,B.prototype.Gd,B.prototype.fb,B.prototype.hd],Qc=[B.prototype.Ka,B.prototype.Uc,B.prototype.xd,B.prototype.Hd,B.prototype.gb,B.prototype.jd]; +if(Ab)var kc=[B.prototype.Ca,B.prototype.Ub,B.prototype.Tb,B.prototype.qd,B.prototype.Oa,B.prototype.ce],jc=[B.prototype.aa,B.prototype.ra,B.prototype.pa,B.prototype.ya,B.prototype.fa,B.prototype.va],Vc=[B.prototype.Ga,B.prototype.uc,B.prototype.Db,B.prototype.Fd,B.prototype.cb,B.prototype.Xc]; +function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Ag=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Ag*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Mf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; +l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.ha=d;for(b=0;b=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} +l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;cc&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Ag&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} +function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Ag*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} +l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Pf=0;this.Y.Bg=ta();this.Y.Ie&&(a=this.Y.Bg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Bg&&(this.Y.oe=this.Y.Bg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= +(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Pf+=n;fd(this,0,!0);bd(this,n);this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Fj,this.X&&jd(this.X));this.Y.Nf-=n;0>=this.Y.Nf&&(this.Y.Nf+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; +break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Pf&&(e=Math.round(e*this.Y.Pf/this.Y.Ah));e-=this.Y.Ie-this.Y.Bg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Pf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), +cd(this))};l.wf=function(){return 0};l.Wb=function(a){wb(this,!0);this.fb-=this.A;this.A=0;fd(this,this.Ub);this.Ub=0;if(this.la.Ib){this.la.Ib=!1;this.N&&this.N.stop();var b=this.qa.run;b&&(b.textContent="Run")}this.la.complete=a};function ad(a,b){a.X&&(jd(a.X,b),a.X.pd(b))} +function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.$f=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; +l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.zg=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; +l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.$f),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.tg()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.tg()};l.tg=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()}; +l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} +function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.$f-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& +b=a.Lb&&(F>a.Lb&&(A=H(e),ud(e,H(e),!0),I(e,A),a.df=!0),A=0);else{if(256==h||2304==h)return vd(a,c,q)?a.Aa:-1;if(1024==h)A=2,L=0,Fh||2048==(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,11,c&65532),-1}break;case 3:if(!n||4096>h||512!=(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,12,c&65532),-1;break; +case 4:q=h&-513;if(!n||256!=q&&2304!=q)return E.call(e,13,c&65532),-1;2304==q&&(a.Zi=k+e.na(k+102)|0,a.ml=k+a.Ta|0);break;case 6:if(!(h&4096)&&768>>0)+1,a.wb=g,a.type=h,a.ext=m,a.Xb=b,ld(a,!0,!0,!1));return k} +function vd(a,b,c){var d=a.F,e=a.Lb,f=d.Sa.Z,g=d.Sa.Aa;if(!c){if(!(d.Sa.type&512))return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb&=-513)}if(-1===d.Sa.load(b))return!1;var h=d.Sa.Aa;if(!1!==c){if(d.Sa.type&512)return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb|=512)}d.Sa.type=d.Sa.type&-513|d.Sa.wb&512;256==d.Sa.type||768==d.Sa.type?(d.jb(g+14,M(d)),d.jb(g+16,Cd(d)),d.jb(g+18,d.G),d.jb(g+20,d.I),d.jb(g+22,d.M),d.jb(g+24,d.H),d.jb(g+26,J(d)),d.jb(g+28,d.P),d.jb(g+30,d.K),d.jb(g+32,d.J),d.jb(g+ +34,d.Xa.Z),d.jb(g+36,d.wa.Z),d.jb(g+38,d.ta.Z),d.jb(g+40,d.vb.Z),d.Bc.load(d.na(h+42)),Dd(d,d.na(h+16)|(c?16384:0)),d.G=d.na(h+18),d.I=d.na(h+20),d.M=d.na(h+22),d.H=d.na(h+24),d.P=d.na(h+28),d.K=d.na(h+30),d.J=d.na(h+32),d.Xa.load(d.na(h+34)),d.vb.load(d.na(h+40)),Ed(d,d.na(h+14),d.na(h+36)),b=38,g=26,a.Lb>>0)+1)}; +function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.zg,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.tg,a.nc=a.ug;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.tg);if(a.type&2048||!(a.type&512))a.nc=a.ug;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= +a.Xb+5,d=a.F.Qa(c),d&1||a.F.qc(c,d|1))}b&&(a.Lb=a.Z&3,a.Gc=(a.wb&24576)>>13,80386>a.F.ja||!(a.ext&64)?(a.ba=2,a.R=65535):(a.ba=4,a.R=-1),a.Tc=a.ba,a.Ba=a.R)}else a.load=a.uh,a.Cj=a.Xm,a.mc=a.ij,a.nc=a.kj,a.Lb=a.Gc=0,a.Xb=-1,a.df=!1} +function Gd(a){this.ja=+a.model||8088;var b=a.stepping;this.Uc=this.ja+(b?ea(b,16):0);switch(this.ja){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}Wc.call(this,a,b);this.ag=61442;this.Cc=1792;this.Zf=28672;this.Cd=4;this.ra=255;this.B=80286<=this.ja?Cb:Bb;this.W=Hd;this.eg=Id;this.kg=Jd;this.lg=Kd;if(80186<=this.ja&&(this.W=Hd.slice(),this.eg=Id.slice(),this.kg=Jd.slice(),this.ra=31,this.W[15]=Ld,this.W[96]=Md,this.W[97]=Nd,this.W[98]=Od,this.W[99]=Ld,this.W[100]=Ld,this.W[101]= +Ld,this.W[102]=Ld,this.W[103]=Ld,this.W[104]=Pd,this.W[105]=Qd,this.W[106]=Rd,this.W[107]=Sd,this.W[108]=Td,this.W[109]=Xd,this.W[110]=Yd,this.W[111]=Zd,this.W[192]=ee,this.W[193]=fe,this.W[200]=ge,this.W[201]=he,this.W[241]=ie,this.eg[7]=je,this.kg[7]=je,80286<=this.ja)){this.ag=2;this.Cc|=28672;this.Cd=0;this.W[15]=ke;this.tc=le.slice();for(a=0;a=this.Uc&&(this.tc[166]=te,this.tc[167]=ue)}}this.Hd=[];this.je=[];this.le=0;Zc(this);this.la.complete=this.la.nj=!1;this.Wg=0;this.kd=this.sa=[];this.La=this.Sb=this.Fa=this.Fd=this.hd=this.Gb=this.Db=0;ve(this)}jb(Gd,Wc);function we(a,b,c,d){b=(d?a.kd:a.sa)[b>>>a.La];c?--b.Ae||Oc(b):--b.ze||Pc(b);d&&Xb(a)} +function xe(a){var b;if(a.sa===a.kd){a.sa=Array(a.Fd);a.ke=new B(null,0,0,5,null,a);Sb(a.ke,a.ha);for(b=0;ba.me&&(a.dg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} +function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0>2;b.zb=g;b.B=h>>2;Ab&&ic&&c.da&&!c.controller&&!c.ze&&!c.Ae?(b.Za=c.Za,b.de=c.de,b.da=c.da,fc(b,Vc)):(b.ga=c?Gc(32):0,b.V=c?Gc(96):0,fc(b,Sc));Sb(b,a.ha,k);a.sa[d]=b;a.Gd.push(d);return b}function ze(a){a.sa!==a.kd&&(a.sa=a.kd,a.ke=null,a.Gd=null,a.jd=null)}l=Gd.prototype;l.reset=function(){this.la.Ib&&this.Wb();ve(this);Zc(this);this.la.error=!1}; +function Ae(a,b){var c;switch(b){case 0:c=a.G;break;case 1:c=a.I;break;case 2:c=a.M;break;case 3:c=a.H;break;case 4:c=J(a);break;case 5:c=a.P;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Be(a,b,c){switch(b){case 0:a.G=c;break;case 1:a.I=c;break;case 2:a.M=c;break;case 3:a.H=c;break;case 4:I(a,c);break;case 5:a.P=c;break;case 6:a.K=c;break;case 7:a.J=c}} +function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.mg=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, +0];a.Ee=[null,null,null,null,null,null,0,0];a.Nb=new kd(a,2,"FS");a.Ob=new kd(a,2,"GS");ze(a)}a.rf=new kd(a,0,"NULL");a.ka=a.vb;a.Ka=a.ta;a.S=a.Ia=0;a.D=a.C=-1;a.$b=a.rf;a.ua=0;if(80286>a.ja)Ed(a,0,65535);else{a.Ec=0;a.zd=65535;a.Bc=new kd(a,5,"LDT",!0);a.Sa=new kd(a,4,"TSS",!0);a.Da=new kd(a,6,"VER",!0);Ed(a,65520,61440);var b,c=M(a);b=a.wa;var d=-65536;80386>b.F.ja&&(d&=16777215);b=b.Aa=d;a.Ha=b+c|0;a.hf=(b>>>0)+(a.wa.Ta>>>0)+1}Dd(a,0);wd(a)} +function Ce(a){2==a.Tc?(a.cc=a.na,a.Oa=De,a.Ya=Ee,a.Jb=Fe,2==a.ba?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=Le,a.ea=Me,a.ya=Ne)):(a.cc=a.oa,a.Oa=Oe,a.Ya=Pe,a.Jb=Qe,2==a.ba?(a.V=cf,a.ea=df,a.ya=ef):(a.V=ff,a.ea=gf,a.ya=hf))}function xd(a,b){a.ba!=b&&(a.Ia|=1024,a.ba=b,a.R=2==b?65535:-1,jf(a))}function jf(a){2==a.ba?(a.Ga=32768,a.tb=a.na,a.rc=a.jb,2==a.Tc?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=cf,a.ea=df,a.ya=ef)):(a.Ga=-2147483648,a.tb=a.oa,a.rc=a.nb,2==a.Tc?(a.V=Le,a.ea=Me,a.ya=Ne):(a.V=ff,a.ea=gf,a.ya=hf))} +function kf(a){a.Tc=a.wa.Tc;a.Ba=a.wa.Ba;Ce(a);a.ba=a.wa.ba;a.R=a.wa.R;jf(a);a.Ia&=-3073}l.vj=function(){var a=this.G+this.H+this.I+this.M+J(this)+this.P+this.K+this.J|0;return a=a+M(this)+this.wa.Z+this.vb.Z+this.ta.Z+this.Xa.Z+Cd(this)|0};function lf(a,b,c){void 0===a.Hd[b]&&(a.Hd[b]=[]);a.Hd[b].push(c)}function mf(a,b,c){c&&(null==a.je[b]&&a.le++,a.je[b]=c)}function nf(a,b){var c=a.je[b];null!=c&&(c(--a.le),delete a.je[b])} +function of(a,b){for(var c=a.Ja[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Ja[e],g=g&~(d>>2&3);b?a.sa[g>>>a.La].Rd(g&a.Fa,f,a):(g=a.sa[g>>>a.La],f?--g.Ae||Oc(g):--g.ze||Pc(g))}c>>=2;d>>=4}}function Lc(a,b,c,d){if(!(a.S&8192)&&a.Ja[7]&255){c--;var e=a.Ja[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Ja[g]&&b<=a.Ja[g]+h){a.Ja[6]|=1<>=2;f>>=4}}} +function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.lg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} +l.save=function(){var a=new qf(this);a.set(0,[this.G,this.H,this.I,this.M,J(this),this.P,this.K,this.J]);var b=M(this),c=this.wa.save(),d=this.vb.save(),e=this.ta.save(),f=this.Xa.save(),g;null!=this.Ec?(g=[this.$a,this.Ec,this.zd,this.Mc,this.Sd,this.Bc.save(),this.Sa.save(),this.Pa],80386<=this.ja&&(g.push(this.ti),g.push(this.se),g.push(this.Od),g.push(this.Ja),g.push(this.Ee))):g=null;b=[b,c,d,e,f,g,Cd(this)];80386<=this.ja&&(b.push(this.Nb.save()),b.push(this.Ob.save()));a.set(1,b);a.set(2,[this.ka.kc, +this.Ka.kc,this.S,this.Ia,this.ua,this.D,this.C]);a.set(3,[0,this.uc,this.Y.Wd]);a.set(4,oc(this.ga,!!(this.$a&-2147483648)));return a.data()}; +l.restore=function(a){var b=a[0];this.G=b[0];this.H=b[1];this.I=b[2];this.M=b[3];var c=b[4];this.P=b[5];this.K=b[6];this.J=b[7];b=a[1];this.wa.restore(b[1]);this.vb.restore(b[2]);this.ta.restore(b[3]);this.Xa.restore(b[4]);var d=b[5];d&&d.length&&(this.$a=d[0],this.Ec=d[1],this.zd=d[2],this.Mc=d[3],this.Sd=d[4],this.Bc.restore(d[5]),this.Sa.restore(d[6]),this.Pa=d[7],80386<=this.ja&&(this.ti=d[8],this.se=d[9],this.Od=d[10],this.Ja=d[11],this.Ee=d[12]),wd(this));Dd(this,b[6]);var d=!1,e;a:{e=this.ga; +var f=a[4],g;for(g=0;g>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.$f=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.$f&a.wa.R)),a.wa.df):null} +function uf(a,b){b=(a.Ha>>>0)+b;b>a.hf&&(8088>=a.ja||a.wa.Ta==a.wa.Ba?b=a.wa.Aa+(b-a.hf&a.R):E.call(a,13,0));return b|0}function vf(a){a.Ha=a.qe}function J(a){return a.gb&~a.ta.Ba|a.fa-a.ta.Aa}function I(a,b){a.gb=b;a.fa=a.ta.Aa+(b&a.ta.Ba)|0}function wf(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&xf(a),g&2&&yf(a),g&4&&zf(a),g&8&&Af(a),g&16&&Bf(a),g&32&&Cf(a))}f?(a.Wc=d,a.Vc=b):(a.Wc=b,a.Vc=d);a.sd=c;a.Xc=d;a.resultType=e} +function Df(a,b,c,d,e){a.resultType=c|26;a.Xc=b;d?Ef(a):Ff(a);e?Gf(a):Hf(a);return b}function If(a,b,c,d){c&d?Ef(a):Ff(a);(b^c)&d?Gf(a):Hf(a)}function Jf(a){return xf(a)?1:0}function xf(a){a.resultType&1&&(a.ca&=-2,(a.Wc^(a.Wc^a.sd)&(a.sd^a.Vc))&a.resultType&-2147450752&&(a.ca|=1),a.resultType&=-2);return a.ca&1}function yf(a){a.resultType&2&&(a.ca&=-5,38505>>((a.Xc^a.Xc>>4)&15)&1&&(a.ca|=4),a.resultType&=-3);return a.ca&4} +function zf(a){a.resultType&4&&(a.ca&=-17,(a.Vc^a.Wc^a.sd)&16&&(a.ca|=16),a.resultType&=-5);return a.ca&16}function Af(a){a.resultType&8&&(a.ca&=-65,a.Xc&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.ca|=64),a.resultType&=-9);return a.ca&64}function Bf(a){a.resultType&16&&(a.ca&=-129,a.Xc&a.resultType&-2147450752&&(a.ca|=128),a.resultType&=-17);return a.ca&128} +function Cf(a){a.resultType&32&&(a.ca&=-2049,(a.Wc^a.Vc)&(a.sd^a.Vc)&a.resultType&-2147450752&&(a.ca|=2048),a.resultType&=-33);return a.ca&2048}function Ff(a){a.resultType&=-2;a.ca&=-2}function Kf(a){a.resultType&=-5;a.ca&=-17}function Lf(a){a.resultType&=-9;a.ca&=-65}function Hf(a){a.resultType&=-33;a.ca&=-2049}function Ef(a){a.resultType&=-2;a.ca|=1}function Mf(a){a.resultType&=-5;a.ca|=16}function Nf(a){a.resultType&=-9;a.ca|=64}function Gf(a){a.resultType&=-33;a.ca|=2048} +function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.Zf);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.ag;a.ca&256&&(a.ua|=2,a.S|=4)} +function Pf(a,b,c,d){var e=0;if(a.$a&1&&(a.pa>a.Pa||a.ca&131072)&&a.Sa.Zi)for(var f=a.Sa.Zi+(b>>>3),e=(1<>>=8,f++;return e?(z(a,256)&&y(a,"checkIOPM("+v(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),E.call(a,13,0),!1):!0} +l.Pb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.qa[b]=c;this.Wg++;a=!0;break;default:a=this.parent.Pb.call(this,a,b,c)}return a}; +function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Fa;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Fa,a)}; +l.na=function(a){var b=a&this.Fa,c=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(b>>this.La;if(b>>this.La].sc(a&this.Fa,b&255,a)}; +l.jb=function(a,b){var c=a&this.Fa,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;c>8&255,a+1))};l.nb=function(a,b){var c=a&this.Fa,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(c>>=8}}; +function Rf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,1);return a.S&1?0:a.Qa(a.D)}function P(a,b){return Rf(a,a.ka,b)}function Sf(a,b){return Rf(a,a.Ka,b)}function Tf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,a.ba);return a.S&1?0:a.tb(a.D)}function Q(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function Uf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function R(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)} +function Vf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)}function Wf(a,b){a.S&2||a.qc(a.$b.nc(a.Ca,1),b)}function Xf(a,b){a.S&2||a.jb(a.$b.nc(a.Ca,2),b)}function Yf(a,b){a.S&2||a.nb(a.$b.nc(a.Ca,4),b)}function yd(a,b,c){return a.tb(b.mc(c,a.ba))}l.xa=function(){var a=uf(this,1),b=this.Qa(this.Ha);this.Ha=a;return b};function Zf(a){var b=uf(a,2),c=a.na(a.Ha);a.Ha=b;return c}function T(a){var b=uf(a,a.Tc),c=a.cc(a.Ha);a.Ha=b;return c} +l.Ma=function(){var a=uf(this,this.ba),b=this.tb(this.Ha);this.Ha=a;return b};l.T=function(){var a=uf(this,1),b=this.Qa(this.Ha)<<24>>24;this.Ha=a;return b};function H(a){var b=a.tb(a.fa);a.fa=a.fa+a.ba|0;var c=a.Sg-a.fa|0;0>c&&0<=(a.Sg^a.fa)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?I(a,a.fa-a.ta.Aa&a.ta.Ba):-1>c&&E.call(a,12,0));return b} +function zd(a,b,c,d){c=a.fa-c|0;0>(c-a.qd|0)&&0<=(a.qd^c)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?(I(a,c-a.ta.Aa&a.ta.Ba),c=a.fa):E.call(a,12,0));switch(d){case 1:a.qc(c,b);break;case 2:a.jb(c,b);break;case 4:a.nb(c,b)}a.fa=c}function K(a,b){var c=a.fa-a.ba|0;0>(c-a.qd|0)&&0<=(a.qd^c)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?(I(a,c-a.ta.Aa&a.ta.Ba),c=a.fa):E.call(a,12,0));a.rc(c,b);a.fa=c} +function $f(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ja)2this.ja?0:1,e=0;2>e;e++){switch(d){case 0:if(this.ua&1&&this.ca&512){var f=bg(this.N);if(-1<=f&&(this.ua&=-2,0<=f)){this.ua&=-5; +cg.call(this,f);d=!0;break a}}break;case 1:if(this.ua&2){this.ua&=-3;80386<=this.ja&&(this.Ja[6]|=16384);cg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.O("interrupt dispatched");this.S=0;break}if(this.ua&4){this.S=this.A=0;break}}if(b){if(dg(this.ha,this.Ha,c)){this.Wb();break}c=1}this.S=0;this.W[this.xa()].call(this)}while(0>11;ig(this);jg(this,a[b++]);for(c=0;c=kg&&lg(a,13))}function ig(a){a.ma&=-129;a.ma&~a.jc&63&&(a.ma|=128);if(a.ma&128&&!(a.jc&128))return a=a.N,a.ja>=kg?mg(a,13):a.ya&0||cg.call(a.F,2),!0;a=a.N;a.ja>=kg&&lg(a,13);return!1}function xg(a,b){80387<=a.ja||(b&=-65);a.ma|=b;return ig(a)} +function gg(a){return a.ma|a.B<<11}function yg(a,b){return isFinite(b)?!0:!xg(a,Infinity===b?8:16)}function zg(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,yg(a,d)||(d=null));return d}function Ag(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,yg(a,d)||(d=null));return d}function Bg(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,yg(a,d)||(d=null));return d}function Cg(a,b,c){var d=null;null==b||null==c||!c&&xg(a,2)||(d=b/c,yg(a,d)||(d=null));return d} +function Dg(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:b||(d=16384));a.ma=a.ma&-18177|d;return!0}return!1}function Eg(a,b,c){if(null==b)return null;var d=a.jc&3072;d?d=1024==d||3072==d&&0=c){if(xg(a,1))return null;d=-c}else if(d<-c){if(xg(a,1))return null;d=-c}a.L[0]=d|0;2147483648d&&(a.L[1]=-1))}return d} +function Fg(a,b){var c=3;a.C&1<=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Gg(a){var b=a.B+0&7;return a.C&1<>16}function Lg(a){return a.F.oa(a.F.D)}function Mg(a){a.ua[0]=a.F.oa(a.F.D);return a.pa[0]}function Ng(a){a.L[0]=a.F.oa(a.F.D);a.L[1]=a.F.oa(a.F.D+4);return a.W[0]} +function Og(a){a.ga[0]=a.F.oa(a.F.D);a.ga[1]=a.F.oa(a.F.D+4);a.ga[2]=a.F.na(a.F.D+8);return a.ga}l.xi=function(){this.F.nb(this.F.D,this.L[0])};l.Wk=function(){this.F.nb(this.F.D,this.L[0]);this.F.nb(this.F.D+4,this.L[1])};l.Yk=eg.prototype.xi;l.Xk=eg.prototype.Wk;function Pg(a){a.F.nb(a.F.D,a.ga[0]);a.F.nb(a.F.D+4,a.ga[1]);a.F.jb(a.F.D+8,a.ga[2])} +function Qg(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.L[0]=b;a.L[1]=c|(d|e)<<20;return a.W[0]}function Jg(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?d=32767:d?d+=15360:e&=2147483647;a.ga[0]=b<<11;a.ga[1]=e;a.ga[2]=c>>16&32768|d;return a.ga}function Rg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function Sg(a,b){for(var c=0,d=0;b--;)c|=a%10<>11;ig(a);jg(a,d.tb(b+=d.ba));!(d.$a&1)||d.ca&131072?(a.V=d.tb(b+=d.ba),c=d.tb(b+=d.ba),a.ia=c&2047,a.V|=(c&-4096)<<4,a.ea=-1,a.U=d.tb(b+=d.ba),a.U|=(d.tb(b+=d.ba)&-4096)<<4,a.fa=-1):(a.V=d.tb(b+=d.ba),c=d.tb(b+=d.ba),a.ea=c&65535,a.ia=c>>16&2047,a.U=d.tb(b+=d.ba),a.fa=d.tb(b+=d.ba)&65535);return b+d.ba} +function Wg(a,b){var c=a.F;c.rc(b,a.jc);c.rc(b+=c.ba,gg(a));c.rc(b+=c.ba,hg(a));if(!(c.$a&1)||c.ca&131072){var d=(a.ea<<4)+a.V;c.rc(b+=c.ba,d);c.rc(b+=c.ba,d>>4&-4096|a.ia);d=(a.fa<<4)+a.U;c.rc(b+=c.ba,d);c.rc(b+=c.ba,d>>4&-4096)}else c.rc(b+=c.ba,a.V),c.rc(b+=c.ba,a.ea|a.ia<<16),c.rc(b+=c.ba,a.U),c.rc(b+=c.ba,a.fa);return b+c.ba}var Xg=Math.log(10)/Math.LN2,Yg=Math.LOG2E,Zg=Math.PI,$g=Math.log(2)/Math.LN10,ah=Math.LN2,bh=Math.pow(2,63);function ch(){this.ma&=-32896;ig(this)} +function dh(){Dg(this,U(this,0),U(this,this.A))}function eh(){Dg(this,U(this,0),U(this,this.A))&&Tg(this)}function fh(){eh.call(this)}function gh(){V(this,0,Cg(this,U(this,0),Mg(this)))}function hh(){this.C&=~(1<>20&2047)-1023),this.L[1]=(this.L[1]|1072693248)&-1073741825,Ug(this,this.W[0]))},102:function(){this.B=this.B-1&7;this.ma&=-513},103:function(){this.B=this.B+1&7;this.ma&=-513},112:function(){V(this,0,U(this,0)%U(this,1))},113:function(){V(this,1,U(this, +1)*Math.log(U(this,0)+1)/Math.LN2)&&Tg(this)},114:function(){var a=U(this,0),b=null;if(0<=a||!xg(this,1))b=Math.sqrt(a),yg(this,b)||(b=null);V(this,0,b)},116:function(){V(this,0,Eg(this,U(this,0),bh))},117:function(){var a=U(this,0),b=U(this,1);null!=a&&null!=b&&V(this,0,a*Math.pow(2,0>>0);Ug(this,a)},6:function(){var a=Eg(this,Tg(this));null!=a&&(this.ga[0]= +Sg(a,8),this.ga[1]=Sg(a/1E8,8),this.ga[2]=Sg(a/1E16,2),0>a&&(this.ga[2]|=32768),Pg(this))},7:function(){null!=Eg(this,U(this,0),bh)&&(this.Wk(),Tg(this))},48:function(){hh.call(this);Tg(this)},49:uh,50:ph,51:ph,52:sh}},wh=[ch,ih,jh,kh,lh,mh,qh,nh,rh,sh];Xa(function(){for(var a=tb(document,"pcx86","fpu"),b=0;b>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ij;(bd)&&E.call(this,5);this.S|=2;return a}function Fh(a,b){var c=0;if(b){Lf(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Nf(this);this.A-=11+3*c;return a}function Gh(a,b){var c=0;if(b){Lf(this);for(var d=2==this.ba?15:31,e=1<>>=1;c++;d--}}else Nf(this);this.A-=11+3*c;return a} +function Hh(a,b){a&1<<(b&(2==this.ba?15:31))?Ef(this):Ff(this);this.A-=-1===this.D?3:6;this.S|=2;return a}function Ih(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a^b}function Jh(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a&~b}function Kh(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a|b} +function Lh(a,b){if(-1===this.D)return Hh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=6;this.S|=2;return a}function Mh(a,b){if(-1===this.D)return Ih.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a^b} +function Nh(a,b){if(-1===this.D)return Jh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a&~b}function Oh(a,b){if(-1===this.D)return Kh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a|b} +function Ph(a,b){wf(this,a,b,a-b|0,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a}function Qh(a,b){wf(this,a,b,a-b|0,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a} +function Rh(a){if(this.Tb){var b=this.Tb,c=this.mg,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} +function W(a){me.call(this);return a}function Th(a,b){a=Uh.call(this,this.T(),b);80386>this.ja&&(this.A-=12);return a}function Vh(a,b){a=this.Ma();a=2==this.ba?Uh.call(this,a,b):Wh.call(this,a,b);80386>this.ja&&(this.A-=12);return a}function Xh(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Yh.call(this,a,b);c&&(this.ia=~this.ia+1|0,this.va=~this.va+(this.ia?0:1)|0)} +function Uh(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return a&65535}function Wh(a,b){Xh.call(this,a,b);this.va!=this.ia>>31?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return this.ia}function Zh(a,b){this.A-=14+(-1===this.D?0:2);Lf(this);-1!==this.Da.load(b)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(b&3)&&(Nf(this),a=this.Da.wb&-256,2=this.pa)&&this.Da.Gc>=(b&3))return Nf(this),this.Da.Ta;Lf(this);return a}function fi(a,b){if(-1===this.D)return me.call(this),a;ud(this,this.na(this.D+this.ba));this.A-=this.B.pf;return b} +function gi(a,b){this.A-=-1===this.C?-1===this.D?this.B.sk:this.B.rk:this.B.pk;return b}function yi(a,b){switch(this.L>>3&7){case 4:this.aa=this.G;break;case 5:this.aa=this.I;break;case 6:this.aa=this.M;break;case 7:this.aa=this.H}return b}function zi(a,b){return b} +function Ai(a,b){a=this.L>>3&7;switch(a){case 0:this.aa=this.G;break;case 2:this.aa=this.M;break;case 3:this.aa=this.H;break;default:if(80286==this.ja||80386==this.ja&&4!=a&&5!=a)E.call(this,6);else switch(a){case 1:this.aa=this.I;break;case 4:this.aa=J(this);break;case 5:this.aa=this.P;break;case 6:this.aa=this.K;break;case 7:this.aa=this.J}}return gi.call(this,0,b)} +function Bi(a,b){switch(this.L>>3&7){case 0:b=this.Xa.Z;break;case 1:b=this.wa.Z;break;case 2:b=this.ta.Z;break;case 3:b=this.vb.Z;break;case 4:if(80386<=this.ja){b=this.Nb.Z;break}E.call(this,6);b=a;break;case 5:if(80386<=this.ja){b=this.Ob.Z;break}default:E.call(this,6),b=a}-1!==this.C&&xd(this,2);return gi.call(this,0,b)} +function Yh(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.ia=d<<16|e&65535;this.va=f+((d>>>16)+b*a)|0}else this.ia=a*b|0,this.va=0}function Ci(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a|b,128)}function Di(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a|b,this.Ga)&this.R} +function Ei(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255}function Fi(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function Gi(){return Cf(this)?1:0}function Hi(){return xf(this)?1:0}function Ii(){return xf(this)?0:1}function Ji(){return Af(this)?1:0}function Ki(){return Af(this)?0:1}function Li(){return xf(this)||Af(this)?1:0} +function Mi(){return xf(this)||Af(this)?0:1}function Ni(){return Bf(this)?1:0}function Oi(){return Bf(this)?0:1}function Pi(){return yf(this)?1:0}function Qi(){return yf(this)?0:1}function Ri(){return!Bf(this)!=!Cf(this)?1:0}function Si(){return!Bf(this)!=!Cf(this)?0:1}function Ti(){return Af(this)||!Bf(this)!=!Cf(this)?1:0}function Ui(){return Af(this)||!Bf(this)!=!Cf(this)?0:1}function Vi(a,b){return Wi.call(this,a,b,this.xa())}function Xi(a,b){return Yi.call(this,a,b,this.xa())} +function Zi(a,b){return Wi.call(this,a,b,this.I&31)}function $i(a,b){return Yi.call(this,a,b,this.I&31)}function aj(a,b){return bj.call(this,a,b,this.xa())}function cj(a,b){return dj.call(this,a,b,this.xa())}function ej(a,b){return bj.call(this,a,b,this.I&31)}function fj(a,b){return dj.call(this,a,b,this.I&31)}function gj(a,b){var c=a-b|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255} +function hj(a,b){var c=a-b|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function ij(a,b){Df(this,a&b,128);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function jj(a,b){Df(this,a&b,this.Ga);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function kj(a,b){var c=this.G&this.R,d=(1<<(this.I&31))-1;return a&~(d<>(this.G&this.R)&(1<<(this.I&31))-1&this.R}function mj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.li}else this.C=this.D,Wf(this,a),this.A-=this.B.ki;return b} +function nj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.M=this.M&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:I(this,J(this)&~this.R|a);break;case 5:this.P=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.li}else this.C=this.D,this.S&2||this.rc(this.$b.nc(this.Ca,this.ba),a),this.A-=this.B.ki;return b} +function oj(a,b){a^=b;Df(this,a,128);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return a}function pj(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a^b,this.Ga)&this.R}function qj(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function rj(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=2;return a&~this.R|b&this.R} +function sj(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1;c=[c>>>0,0];for(a=[a>>>0,b>>>0];0>>=0,b[1]++);e+=e}do 0<=qj(a,c)&&(b=a,f=c,b[0]-=f[0],b[1]-=f[1],0>b[0]&&(b[0]>>>=0,b[1]--),d+=e),b=c,b[0]>>>=1,b[1]&1&&(b[0]=(b[0]|2147483648)>>>0),b[1]>>>=1,e/=2;while(1<=e);this.ia=d;this.va=a[0];return!0}function tj(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=2;return a&~this.R|b&this.R} +function uj(a){this.$a=a;wd(this);this.$a&-2147483648?xe(this):ze(this)}function Fd(a){this.Od=a;Xb(this)}function vj(a){this.S|=1;this.Ya.call(this,a);this.A-=-1===this.D?4:5}function Wi(a,b,c){if(c){16>>16-c)&65535;Df(this,a,32768,d&32768)}return a}function Yi(a,b,c){if(c){var d=a<>>32-c;Df(this,a,-2147483648,d&-2147483648)}return a} +function bj(a,b,c){if(c){16>>c-1;a=(d>>>1|b<<16-c)&65535;Df(this,a,32768,d&1)}return a}function dj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;Df(this,a,-2147483648,d&1)}return a}function wj(){this.A-=-1===this.D?2:this.B.Fk;return 1}function xj(){var a=this.I&255;this.A-=(-1===this.D?this.B.ci:this.B.bi)+(a<this.qb?(-1!=this.bc&&(this.bc!==this.wa.Z&&(this.wa.Lb=this.bc&3,sf(this,this.bc)),this.bc=-1),this.qe!==this.Ha&&tf(this,this.qe),-1!=this.sb&&(this.sb!==this.ta.Z&&ud(this,this.sb),this.sb=-1),-1!==this.U&&(this.U!==this.fa&&I(this,this.gb&~this.ta.Ba|this.U-this.ta.Aa),this.U=-1)):8!=this.qb?(b=0,a=8):(b=0,a=-1,ve(this),e=d=!1)):tf(this,this.qe);var f=a,g=b,h=32,k=Qf(this,this.Ha);204!=k||this.Sd||(d=!1);this.ca&131072&&(6== +f&&99==k||13==f&&205==k)&&(d=!1);!1===d&&(h|=1);983040<=this.Ha&&1048575>=this.Ha&&(d=!1);z(this,h|-2147483648)&&(d=!0);if(z(this,h)||d){var m=this.la.Ib,f="Fault "+u(f)+(null!=g?" ("+v(g)+")":"")+" on opcode "+u(k);d&&m&&(f+=" (blocked)");this.ha?(y(this,f,d||h,!0),d&&(d=m,this.ha.Wb())):(this.Na(f),this.Wb())}if(d&&e)throw-1;if(e)throw this.qb=a,Cj.call(this,a,b,c),this.qe=this.Ha,this.S=1==a?this.S|8192:this.S|4096,a;} +function ye(a,b,c){this.se=a;a=0;b&&(a|=1);c&&(a|=2);3==this.pa&&(a|=4);E.call(this,14,a)}function Ej(a){var b=a.wb&7680;a.Z&65528&&(6144==b||7168==b||7168>b&&a.Gc>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&255;break;case 1:b=this.I&255;break;case 2:b=this.M&255;break;case 3:b=this.H&255;break;case 4:b=this.G>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.H>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=this.G& +-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}} +function Ee(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=P(this,this.H+this.K);this.C=this.D;break;case 1:b=P(this,this.H+this.J);this.C=this.D;break;case 2:b=Sf(this,this.P+this.K);this.C=this.D;break;case 3:b=Sf(this,this.P+this.J);this.C=this.D;break;case 4:b=P(this,this.K);this.C=this.D;break;case 5:b=P(this,this.J);this.C=this.D;break;case 6:b=P(this,T(this));this.C=this.D;break;case 7:b=P(this,this.H);this.C=this.D;break;case 64:b=P(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=P(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Sf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Sf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=P(this,this.K+this.T());this.C=this.D;break;case 69:b=P(this,this.J+this.T());this.C=this.D;break;case 70:b=Sf(this,this.P+this.T());this.C=this.D;break;case 71:b=P(this,this.H+this.T());this.C=this.D;break;case 128:b=P(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=P(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Sf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Sf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=P(this,this.K+T(this));this.C=this.D;break;case 133:b=P(this,this.J+T(this));this.C=this.D;break;case 134:b=Sf(this,this.P+T(this));this.C=this.D;break;case 135:b=P(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G&255;break;case 193:b=this.I&255;break;case 194:b=this.M&255;break;case 195:b=this.H&255;break;case 196:b=this.G>>8&255;break; +case 197:b=this.I>>8&255;break;case 198:b=this.M>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&255;break;case 1:c=this.I&255;break;case 2:c=this.M&255;break;case 3:c=this.H&255;break;case 4:c=this.G>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Wf(this,a);this.A-=this.B.dd;break;case 1:case 2:Wf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Wf(this, +a);this.A-=this.B.Jc;break;case 6:Wf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Wf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Wf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Wf(this,a);this.A-=this.B.ib;break;case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I= +this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}} +function Fe(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=P(this,this.H+this.K);this.C=this.D;break;case 1:c=P(this,this.H+this.J);this.C=this.D;break;case 2:c=Sf(this,this.P+this.K);this.C=this.D;break;case 3:c=Sf(this,this.P+this.J);this.C=this.D;break;case 4:c=P(this,this.K);this.C=this.D;break;case 5:c=P(this,this.J);this.C=this.D;break;case 6:c=P(this,T(this));this.C=this.D;break;case 7:c=P(this,this.H);this.C=this.D;break;case 64:c=P(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=P(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Sf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Sf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=P(this,this.K+this.T());this.C=this.D;break;case 69:c=P(this,this.J+this.T());this.C=this.D;break;case 70:c=Sf(this,this.P+this.T());this.C=this.D;break;case 71:c=P(this,this.H+this.T());this.C=this.D;break;case 128:c=P(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=P(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Sf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Sf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=P(this,this.K+T(this));this.C=this.D;break;case 133:c=P(this,this.J+T(this));this.C=this.D;break;case 134:c=Sf(this,this.P+T(this));this.C=this.D;break;case 135:c=P(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G&255;break;case 193:c=this.I&255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break; +case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Wf(this,a);this.A-=this.B.dd;break;case 1:case 2:Wf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Wf(this,a);this.A-=this.B.Jc;break;case 6:Wf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Wf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Wf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Wf(this, +a);this.A-=this.B.ib;break;case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}} +function Ie(a){var b,c;switch((this.L=this.xa())&199){case 0:c=Q(this,this.H+this.K);this.A-=this.B.dd;break;case 1:c=Q(this,this.H+this.J);this.A-=this.B.ed;break;case 2:c=Uf(this,this.P+this.K);this.A-=this.B.ed;break;case 3:c=Uf(this,this.P+this.J);this.A-=this.B.dd;break;case 4:c=Q(this,this.K);this.A-=this.B.Jc;break;case 5:c=Q(this,this.J);this.A-=this.B.Jc;break;case 6:c=Q(this,T(this));this.A-=this.B.Jd;break;case 7:c=Q(this,this.H);this.A-=this.B.Jc;break;case 64:c=Q(this,this.H+this.K+this.T()); +this.A-=this.B.dc;break;case 65:c=Q(this,this.H+this.J+this.T());this.A-=this.B.ec;break;case 66:c=Uf(this,this.P+this.K+this.T());this.A-=this.B.ec;break;case 67:c=Uf(this,this.P+this.J+this.T());this.A-=this.B.dc;break;case 68:c=Q(this,this.K+this.T());this.A-=this.B.ib;break;case 69:c=Q(this,this.J+this.T());this.A-=this.B.ib;break;case 70:c=Uf(this,this.P+this.T());this.A-=this.B.ib;break;case 71:c=Q(this,this.H+this.T());this.A-=this.B.ib;break;case 128:c=Q(this,this.H+this.K+T(this));this.A-= +this.B.dc;break;case 129:c=Q(this,this.H+this.J+T(this));this.A-=this.B.ec;break;case 130:c=Uf(this,this.P+this.K+T(this));this.A-=this.B.ec;break;case 131:c=Uf(this,this.P+this.J+T(this));this.A-=this.B.dc;break;case 132:c=Q(this,this.K+T(this));this.A-=this.B.ib;break;case 133:c=Q(this,this.J+T(this));this.A-=this.B.ib;break;case 134:c=Uf(this,this.P+T(this));this.A-=this.B.ib;break;case 135:c=Q(this,this.H+T(this));this.A-=this.B.ib;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break; +case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&65535;break;case 1:b=this.I&65535;break;case 2:b=this.M&65535;break;case 3:b=this.H&65535;break;case 4:b=J(this)&65535;break;case 5:b=this.P&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:I(this,J(this)&-65536|a);break;case 5:this.P=this.P&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}} +function Je(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=Q(this,this.H+this.K);this.C=this.D;break;case 1:b=Q(this,this.H+this.J);this.C=this.D;break;case 2:b=Uf(this,this.P+this.K);this.C=this.D;break;case 3:b=Uf(this,this.P+this.J);this.C=this.D;break;case 4:b=Q(this,this.K);this.C=this.D;break;case 5:b=Q(this,this.J);this.C=this.D;break;case 6:b=Q(this,T(this));this.C=this.D;break;case 7:b=Q(this,this.H);this.C=this.D;break;case 64:b=Q(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=Q(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Uf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Uf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=Q(this,this.K+this.T());this.C=this.D;break;case 69:b=Q(this,this.J+this.T());this.C=this.D;break;case 70:b=Uf(this,this.P+this.T());this.C=this.D;break;case 71:b=Q(this,this.H+this.T());this.C=this.D;break;case 128:b=Q(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=Q(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Uf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Uf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=Q(this,this.K+T(this));this.C=this.D;break;case 133:b=Q(this,this.J+T(this));this.C=this.D;break;case 134:b=Uf(this,this.P+T(this));this.C=this.D;break;case 135:b=Q(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G&65535;break;case 193:b=this.I&65535;break;case 194:b=this.M&65535;break;case 195:b=this.H&65535;break;case 196:b=J(this)&65535; +break;case 197:b=this.P&65535;break;case 198:b=this.K&65535;break;case 199:b=this.J&65535;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&65535;break;case 1:c=this.I&65535;break;case 2:c=this.M&65535;break;case 3:c=this.H&65535;break;case 4:c=J(this)&65535;break;case 5:c=this.P&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Xf(this,a);this.A-=this.B.dd;break;case 1:case 2:Xf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Xf(this, +a);this.A-=this.B.Jc;break;case 6:Xf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Xf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Xf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Xf(this,a);this.A-=this.B.ib;break;case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break; +case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}} +function Ke(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=Q(this,this.H+this.K);this.C=this.D;break;case 1:c=Q(this,this.H+this.J);this.C=this.D;break;case 2:c=Uf(this,this.P+this.K);this.C=this.D;break;case 3:c=Uf(this,this.P+this.J);this.C=this.D;break;case 4:c=Q(this,this.K);this.C=this.D;break;case 5:c=Q(this,this.J);this.C=this.D;break;case 6:c=Q(this,T(this));this.C=this.D;break;case 7:c=Q(this,this.H);this.C=this.D;break;case 64:c=Q(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=Q(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Uf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Uf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=Q(this,this.K+this.T());this.C=this.D;break;case 69:c=Q(this,this.J+this.T());this.C=this.D;break;case 70:c=Uf(this,this.P+this.T());this.C=this.D;break;case 71:c=Q(this,this.H+this.T());this.C=this.D;break;case 128:c=Q(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=Q(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Uf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Uf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=Q(this,this.K+T(this));this.C=this.D;break;case 133:c=Q(this,this.J+T(this));this.C=this.D;break;case 134:c=Uf(this,this.P+T(this));this.C=this.D;break;case 135:c=Q(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535; +break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Xf(this,a);this.A-=this.B.dd;break;case 1:case 2:Xf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Xf(this,a);this.A-=this.B.Jc;break;case 6:Xf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Xf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Xf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Xf(this, +a);this.A-=this.B.ib;break;case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}} +function Le(a){var b,c;switch((this.L=this.xa())&199){case 0:c=R(this,this.H+this.K);this.A-=this.B.dd;break;case 1:c=R(this,this.H+this.J);this.A-=this.B.ed;break;case 2:c=Vf(this,this.P+this.K);this.A-=this.B.ed;break;case 3:c=Vf(this,this.P+this.J);this.A-=this.B.dd;break;case 4:c=R(this,this.K);this.A-=this.B.Jc;break;case 5:c=R(this,this.J);this.A-=this.B.Jc;break;case 6:c=R(this,T(this));this.A-=this.B.Jd;break;case 7:c=R(this,this.H);this.A-=this.B.Jc;break;case 64:c=R(this,this.H+this.K+this.T()); +this.A-=this.B.dc;break;case 65:c=R(this,this.H+this.J+this.T());this.A-=this.B.ec;break;case 66:c=Vf(this,this.P+this.K+this.T());this.A-=this.B.ec;break;case 67:c=Vf(this,this.P+this.J+this.T());this.A-=this.B.dc;break;case 68:c=R(this,this.K+this.T());this.A-=this.B.ib;break;case 69:c=R(this,this.J+this.T());this.A-=this.B.ib;break;case 70:c=Vf(this,this.P+this.T());this.A-=this.B.ib;break;case 71:c=R(this,this.H+this.T());this.A-=this.B.ib;break;case 128:c=R(this,this.H+this.K+T(this));this.A-= +this.B.dc;break;case 129:c=R(this,this.H+this.J+T(this));this.A-=this.B.ec;break;case 130:c=Vf(this,this.P+this.K+T(this));this.A-=this.B.ec;break;case 131:c=Vf(this,this.P+this.J+T(this));this.A-=this.B.dc;break;case 132:c=R(this,this.K+T(this));this.A-=this.B.ib;break;case 133:c=R(this,this.J+T(this));this.A-=this.B.ib;break;case 134:c=Vf(this,this.P+T(this));this.A-=this.B.ib;break;case 135:c=R(this,this.H+T(this));this.A-=this.B.ib;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c= +this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G;break;case 1:b=this.I;break;case 2:b=this.M;break;case 3:b=this.H;break;case 4:b=J(this);break;case 5:b=this.P;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.M=a;break;case 3:this.H=a;break;case 4:I(this,a);break; +case 5:this.P=a;break;case 6:this.K=a;break;case 7:this.J=a}} +function Me(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=R(this,this.H+this.K);this.C=this.D;break;case 1:b=R(this,this.H+this.J);this.C=this.D;break;case 2:b=Vf(this,this.P+this.K);this.C=this.D;break;case 3:b=Vf(this,this.P+this.J);this.C=this.D;break;case 4:b=R(this,this.K);this.C=this.D;break;case 5:b=R(this,this.J);this.C=this.D;break;case 6:b=R(this,T(this));this.C=this.D;break;case 7:b=R(this,this.H);this.C=this.D;break;case 64:b=R(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=R(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Vf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Vf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=R(this,this.K+this.T());this.C=this.D;break;case 69:b=R(this,this.J+this.T());this.C=this.D;break;case 70:b=Vf(this,this.P+this.T());this.C=this.D;break;case 71:b=R(this,this.H+this.T());this.C=this.D;break;case 128:b=R(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=R(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Vf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Vf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=R(this,this.K+T(this));this.C=this.D;break;case 133:b=R(this,this.J+T(this));this.C=this.D;break;case 134:b=Vf(this,this.P+T(this));this.C=this.D;break;case 135:b=R(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G;break;case 193:b=this.I;break;case 194:b=this.M;break;case 195:b=this.H;break;case 196:b=J(this);break;case 197:b=this.P;break; +case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G;break;case 1:c=this.I;break;case 2:c=this.M;break;case 3:c=this.H;break;case 4:c=J(this);break;case 5:c=this.P;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Yf(this,a);this.A-=this.B.dd;break;case 1:case 2:Yf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Yf(this,a);this.A-=this.B.Jc;break;case 6:Yf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Yf(this, +a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Yf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Yf(this,a);this.A-=this.B.ib;break;case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a}} +function Ne(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=R(this,this.H+this.K);this.C=this.D;break;case 1:c=R(this,this.H+this.J);this.C=this.D;break;case 2:c=Vf(this,this.P+this.K);this.C=this.D;break;case 3:c=Vf(this,this.P+this.J);this.C=this.D;break;case 4:c=R(this,this.K);this.C=this.D;break;case 5:c=R(this,this.J);this.C=this.D;break;case 6:c=R(this,T(this));this.C=this.D;break;case 7:c=R(this,this.H);this.C=this.D;break;case 64:c=R(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=R(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Vf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Vf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=R(this,this.K+this.T());this.C=this.D;break;case 69:c=R(this,this.J+this.T());this.C=this.D;break;case 70:c=Vf(this,this.P+this.T());this.C=this.D;break;case 71:c=R(this,this.H+this.T());this.C=this.D;break;case 128:c=R(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=R(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Vf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Vf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=R(this,this.K+T(this));this.C=this.D;break;case 133:c=R(this,this.J+T(this));this.C=this.D;break;case 134:c=Vf(this,this.P+T(this));this.C=this.D;break;case 135:c=R(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break; +case 198:c=this.K;break;case 199:c=this.J}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Yf(this,a);this.A-=this.B.dd;break;case 1:case 2:Yf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Yf(this,a);this.A-=this.B.Jc;break;case 6:Yf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Yf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Yf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Yf(this, +a);this.A-=this.B.ib;break;case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a}} +function Oe(a){var b,c;switch((this.L=this.xa())&199){case 0:c=P(this,this.G);break;case 1:c=P(this,this.I);break;case 2:c=P(this,this.M);break;case 3:c=P(this,this.H);break;case 4:c=P(this,Gj.call(this,0));break;case 5:c=P(this,T(this));break;case 6:c=P(this,this.K);break;case 7:c=P(this,this.J);break;case 64:c=P(this,this.G+this.T());break;case 65:c=P(this,this.I+this.T());break;case 66:c=P(this,this.M+this.T());break;case 67:c=P(this,this.H+this.T());break;case 68:c=P(this,Gj.call(this,1)+this.T()); +break;case 69:c=Sf(this,this.P+this.T());break;case 70:c=P(this,this.K+this.T());break;case 71:c=P(this,this.J+this.T());break;case 128:c=P(this,this.G+T(this));break;case 129:c=P(this,this.I+T(this));break;case 130:c=P(this,this.M+T(this));break;case 131:c=P(this,this.H+T(this));break;case 132:c=P(this,Gj.call(this,2)+T(this));break;case 133:c=Sf(this,this.P+T(this));break;case 134:c=P(this,this.K+T(this));break;case 135:c=P(this,this.J+T(this));break;case 192:c=this.G&255;break;case 193:c=this.I& +255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&255;break;case 1:b=this.I&255;break;case 2:b=this.M&255;break;case 3:b=this.H&255;break;case 4:b=this.G>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.H>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}} +function Pe(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=P(this,this.G);this.C=this.D;break;case 1:b=P(this,this.I);this.C=this.D;break;case 2:b=P(this,this.M);this.C=this.D;break;case 3:b=P(this,this.H);this.C=this.D;break;case 4:b=P(this,Gj.call(this,0));this.C=this.D;break;case 5:b=P(this,T(this));this.C=this.D;break;case 6:b=P(this,this.K);this.C=this.D;break;case 7:b=P(this,this.J);this.C=this.D;break;case 64:b=P(this,this.G+this.T());this.C=this.D;break;case 65:b=P(this,this.I+this.T()); +this.C=this.D;break;case 66:b=P(this,this.M+this.T());this.C=this.D;break;case 67:b=P(this,this.H+this.T());this.C=this.D;break;case 68:b=P(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Sf(this,this.P+this.T());this.C=this.D;break;case 70:b=P(this,this.K+this.T());this.C=this.D;break;case 71:b=P(this,this.J+this.T());this.C=this.D;break;case 128:b=P(this,this.G+T(this));this.C=this.D;break;case 129:b=P(this,this.I+T(this));this.C=this.D;break;case 130:b=P(this,this.M+T(this));this.C= +this.D;break;case 131:b=P(this,this.H+T(this));this.C=this.D;break;case 132:b=P(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Sf(this,this.P+T(this));this.C=this.D;break;case 134:b=P(this,this.K+T(this));this.C=this.D;break;case 135:b=P(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G&255;break;case 193:b=this.I&255;break;case 194:b=this.M&255;break;case 195:b=this.H&255;break;case 196:b=this.G>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.M>>8&255;break;case 199:b= +this.H>>8&255;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&255;break;case 1:c=this.I&255;break;case 2:c=this.M&255;break;case 3:c=this.H&255;break;case 4:c=this.G>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I= +this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Wf(this,a)}} +function Qe(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=P(this,this.G);this.C=this.D;break;case 1:c=P(this,this.I);this.C=this.D;break;case 2:c=P(this,this.M);this.C=this.D;break;case 3:c=P(this,this.H);this.C=this.D;break;case 4:c=P(this,Gj.call(this,0));this.C=this.D;break;case 5:c=P(this,T(this));this.C=this.D;break;case 6:c=P(this,this.K);this.C=this.D;break;case 7:c=P(this,this.J);this.C=this.D;break;case 64:c=P(this,this.G+this.T());this.C=this.D;break;case 65:c=P(this,this.I+this.T()); +this.C=this.D;break;case 66:c=P(this,this.M+this.T());this.C=this.D;break;case 67:c=P(this,this.H+this.T());this.C=this.D;break;case 68:c=P(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Sf(this,this.P+this.T());this.C=this.D;break;case 70:c=P(this,this.K+this.T());this.C=this.D;break;case 71:c=P(this,this.J+this.T());this.C=this.D;break;case 128:c=P(this,this.G+T(this));this.C=this.D;break;case 129:c=P(this,this.I+T(this));this.C=this.D;break;case 130:c=P(this,this.M+T(this));this.C= +this.D;break;case 131:c=P(this,this.H+T(this));this.C=this.D;break;case 132:c=P(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Sf(this,this.P+T(this));this.C=this.D;break;case 134:c=P(this,this.K+T(this));this.C=this.D;break;case 135:c=P(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G&255;break;case 193:c=this.I&255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c= +this.H>>8&255;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Wf(this,a)}} +function cf(a){var b,c;switch((this.L=this.xa())&199){case 0:c=Q(this,this.G);break;case 1:c=Q(this,this.I);break;case 2:c=Q(this,this.M);break;case 3:c=Q(this,this.H);break;case 4:c=Q(this,Gj.call(this,0));break;case 5:c=Q(this,T(this));break;case 6:c=Q(this,this.K);break;case 7:c=Q(this,this.J);break;case 64:c=Q(this,this.G+this.T());break;case 65:c=Q(this,this.I+this.T());break;case 66:c=Q(this,this.M+this.T());break;case 67:c=Q(this,this.H+this.T());break;case 68:c=Q(this,Gj.call(this,1)+this.T()); +break;case 69:c=Uf(this,this.P+this.T());break;case 70:c=Q(this,this.K+this.T());break;case 71:c=Q(this,this.J+this.T());break;case 128:c=Q(this,this.G+T(this));break;case 129:c=Q(this,this.I+T(this));break;case 130:c=Q(this,this.M+T(this));break;case 131:c=Q(this,this.H+T(this));break;case 132:c=Q(this,Gj.call(this,2)+T(this));break;case 133:c=Uf(this,this.P+T(this));break;case 134:c=Q(this,this.K+T(this));break;case 135:c=Q(this,this.J+T(this));break;case 192:c=this.G&65535;break;case 193:c=this.I& +65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&65535;break;case 1:b=this.I&65535;break;case 2:b=this.M&65535;break;case 3:b=this.H&65535;break;case 4:b=J(this)&65535;break;case 5:b=this.P&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:I(this,J(this)&-65536|a);break;case 5:this.P=this.P&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}} +function df(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=Q(this,this.G);this.C=this.D;break;case 1:b=Q(this,this.I);this.C=this.D;break;case 2:b=Q(this,this.M);this.C=this.D;break;case 3:b=Q(this,this.H);this.C=this.D;break;case 4:b=Q(this,Gj.call(this,0));this.C=this.D;break;case 5:b=Q(this,T(this));this.C=this.D;break;case 6:b=Q(this,this.K);this.C=this.D;break;case 7:b=Q(this,this.J);this.C=this.D;break;case 64:b=Q(this,this.G+this.T());this.C=this.D;break;case 65:b=Q(this,this.I+this.T()); +this.C=this.D;break;case 66:b=Q(this,this.M+this.T());this.C=this.D;break;case 67:b=Q(this,this.H+this.T());this.C=this.D;break;case 68:b=Q(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Uf(this,this.P+this.T());this.C=this.D;break;case 70:b=Q(this,this.K+this.T());this.C=this.D;break;case 71:b=Q(this,this.J+this.T());this.C=this.D;break;case 128:b=Q(this,this.G+T(this));this.C=this.D;break;case 129:b=Q(this,this.I+T(this));this.C=this.D;break;case 130:b=Q(this,this.M+T(this));this.C= +this.D;break;case 131:b=Q(this,this.H+T(this));this.C=this.D;break;case 132:b=Q(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Uf(this,this.P+T(this));this.C=this.D;break;case 134:b=Q(this,this.K+T(this));this.C=this.D;break;case 135:b=Q(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G&65535;break;case 193:b=this.I&65535;break;case 194:b=this.M&65535;break;case 195:b=this.H&65535;break;case 196:b=J(this)&65535;break;case 197:b=this.P&65535;break;case 198:b=this.K&65535;break; +case 199:b=this.J&65535;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&65535;break;case 1:c=this.I&65535;break;case 2:c=this.M&65535;break;case 3:c=this.H&65535;break;case 4:c=J(this)&65535;break;case 5:c=this.P&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)& +-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Xf(this,a)}} +function ef(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=Q(this,this.G);this.C=this.D;break;case 1:c=Q(this,this.I);this.C=this.D;break;case 2:c=Q(this,this.M);this.C=this.D;break;case 3:c=Q(this,this.H);this.C=this.D;break;case 4:c=Q(this,Gj.call(this,0));this.C=this.D;break;case 5:c=Q(this,T(this));this.C=this.D;break;case 6:c=Q(this,this.K);this.C=this.D;break;case 7:c=Q(this,this.J);this.C=this.D;break;case 64:c=Q(this,this.G+this.T());this.C=this.D;break;case 65:c=Q(this,this.I+this.T()); +this.C=this.D;break;case 66:c=Q(this,this.M+this.T());this.C=this.D;break;case 67:c=Q(this,this.H+this.T());this.C=this.D;break;case 68:c=Q(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Uf(this,this.P+this.T());this.C=this.D;break;case 70:c=Q(this,this.K+this.T());this.C=this.D;break;case 71:c=Q(this,this.J+this.T());this.C=this.D;break;case 128:c=Q(this,this.G+T(this));this.C=this.D;break;case 129:c=Q(this,this.I+T(this));this.C=this.D;break;case 130:c=Q(this,this.M+T(this));this.C= +this.D;break;case 131:c=Q(this,this.H+T(this));this.C=this.D;break;case 132:c=Q(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Uf(this,this.P+T(this));this.C=this.D;break;case 134:c=Q(this,this.K+T(this));this.C=this.D;break;case 135:c=Q(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break; +case 199:c=this.J&65535;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Xf(this,a)}} +function ff(a){var b,c;switch((this.L=this.xa())&199){case 0:c=R(this,this.G);break;case 1:c=R(this,this.I);break;case 2:c=R(this,this.M);break;case 3:c=R(this,this.H);break;case 4:c=R(this,Gj.call(this,0));break;case 5:c=R(this,T(this));break;case 6:c=R(this,this.K);break;case 7:c=R(this,this.J);break;case 64:c=R(this,this.G+this.T());break;case 65:c=R(this,this.I+this.T());break;case 66:c=R(this,this.M+this.T());break;case 67:c=R(this,this.H+this.T());break;case 68:c=R(this,Gj.call(this,1)+this.T()); +break;case 69:c=Vf(this,this.P+this.T());break;case 70:c=R(this,this.K+this.T());break;case 71:c=R(this,this.J+this.T());break;case 128:c=R(this,this.G+T(this));break;case 129:c=R(this,this.I+T(this));break;case 130:c=R(this,this.M+T(this));break;case 131:c=R(this,this.H+T(this));break;case 132:c=R(this,Gj.call(this,2)+T(this));break;case 133:c=Vf(this,this.P+T(this));break;case 134:c=R(this,this.K+T(this));break;case 135:c=R(this,this.J+T(this));break;case 192:c=this.G;break;case 193:c=this.I;break; +case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G;break;case 1:b=this.I;break;case 2:b=this.M;break;case 3:b=this.H;break;case 4:b=J(this);break;case 5:b=this.P;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.M=a;break;case 3:this.H=a;break;case 4:I(this, +a);break;case 5:this.P=a;break;case 6:this.K=a;break;case 7:this.J=a}} +function gf(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=R(this,this.G);this.C=this.D;break;case 1:b=R(this,this.I);this.C=this.D;break;case 2:b=R(this,this.M);this.C=this.D;break;case 3:b=R(this,this.H);this.C=this.D;break;case 4:b=R(this,Gj.call(this,0));this.C=this.D;break;case 5:b=R(this,T(this));this.C=this.D;break;case 6:b=R(this,this.K);this.C=this.D;break;case 7:b=R(this,this.J);this.C=this.D;break;case 64:b=R(this,this.G+this.T());this.C=this.D;break;case 65:b=R(this,this.I+this.T()); +this.C=this.D;break;case 66:b=R(this,this.M+this.T());this.C=this.D;break;case 67:b=R(this,this.H+this.T());this.C=this.D;break;case 68:b=R(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Vf(this,this.P+this.T());this.C=this.D;break;case 70:b=R(this,this.K+this.T());this.C=this.D;break;case 71:b=R(this,this.J+this.T());this.C=this.D;break;case 128:b=R(this,this.G+T(this));this.C=this.D;break;case 129:b=R(this,this.I+T(this));this.C=this.D;break;case 130:b=R(this,this.M+T(this));this.C= +this.D;break;case 131:b=R(this,this.H+T(this));this.C=this.D;break;case 132:b=R(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Vf(this,this.P+T(this));this.C=this.D;break;case 134:b=R(this,this.K+T(this));this.C=this.D;break;case 135:b=R(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G;break;case 193:b=this.I;break;case 194:b=this.M;break;case 195:b=this.H;break;case 196:b=J(this);break;case 197:b=this.P;break;case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.L>> +3&7){case 0:c=this.G;break;case 1:c=this.I;break;case 2:c=this.M;break;case 3:c=this.H;break;case 4:c=J(this);break;case 5:c=this.P;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Yf(this,a)}} +function hf(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=R(this,this.G);this.C=this.D;break;case 1:c=R(this,this.I);this.C=this.D;break;case 2:c=R(this,this.M);this.C=this.D;break;case 3:c=R(this,this.H);this.C=this.D;break;case 4:c=R(this,Gj.call(this,0));this.C=this.D;break;case 5:c=R(this,T(this));this.C=this.D;break;case 6:c=R(this,this.K);this.C=this.D;break;case 7:c=R(this,this.J);this.C=this.D;break;case 64:c=R(this,this.G+this.T());this.C=this.D;break;case 65:c=R(this,this.I+this.T()); +this.C=this.D;break;case 66:c=R(this,this.M+this.T());this.C=this.D;break;case 67:c=R(this,this.H+this.T());this.C=this.D;break;case 68:c=R(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Vf(this,this.P+this.T());this.C=this.D;break;case 70:c=R(this,this.K+this.T());this.C=this.D;break;case 71:c=R(this,this.J+this.T());this.C=this.D;break;case 128:c=R(this,this.G+T(this));this.C=this.D;break;case 129:c=R(this,this.I+T(this));this.C=this.D;break;case 130:c=R(this,this.M+T(this));this.C= +this.D;break;case 131:c=R(this,this.H+T(this));this.C=this.D;break;case 132:c=R(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Vf(this,this.P+T(this));this.C=this.D;break;case 134:c=R(this,this.K+T(this));this.C=this.D;break;case 135:c=R(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}a=a[this.L>> +3&7].call(this,c,b.call(this));switch(d){case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Yf(this,a)}} +function Gj(a){var b=this.xa(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.G;break;case 1:d=this.I;break;case 2:d=this.M;break;case 3:d=this.H;break;case 4:d=0;break;case 5:d=this.P;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:e=this.G;break;case 1:e=this.I;break;case 2:e=this.M;break;case 3:e=this.H;break;case 4:e=J(this);this.ka=this.Ka;break;case 5:a?(e=this.P,this.ka=this.Ka):e=T(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<>8&255;9<(c&15)||zf(this)?(c+=6,80286<=this.ja&&255>8&255;9<(c&15)||zf(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.G=this.G&-65536|d<<8|c;a?Ef(this):Ff(this);b?Mf(this):Kf(this);this.A-=this.B.Je},function(){this.G=tj.call(this,this.G)},function(){this.I=tj.call(this,this.I)},function(){this.M=tj.call(this,this.M)},function(){this.H=tj.call(this,this.H)},function(){I(this,tj.call(this, +J(this)))},function(){this.P=tj.call(this,this.P)},function(){this.K=tj.call(this,this.K)},function(){this.J=tj.call(this,this.J)},function(){this.G=rj.call(this,this.G)},function(){this.I=rj.call(this,this.I)},function(){this.M=rj.call(this,this.M)},function(){this.H=rj.call(this,this.H)},function(){I(this,rj.call(this,J(this)))},function(){this.P=rj.call(this,this.P)},function(){this.K=rj.call(this,this.K)},function(){this.J=rj.call(this,this.J)},function(){K(this,this.G&this.R);this.A-=this.B.Rc}, +function(){K(this,this.I&this.R);this.A-=this.B.Rc},function(){K(this,this.M&this.R);this.A-=this.B.Rc},function(){K(this,this.H&this.R);this.A-=this.B.Rc},function(){K(this,J(this)-2&65535);this.A-=this.B.Rc},function(){K(this,this.P&this.R);this.A-=this.B.Rc},function(){K(this,this.K&this.R);this.A-=this.B.Rc},function(){K(this,this.J&this.R);this.A-=this.B.Rc},function(){this.G=this.G&~this.R|H(this);this.A-=this.B.zc},function(){this.I=this.I&~this.R|H(this);this.A-=this.B.zc},function(){this.M= +this.M&~this.R|H(this);this.A-=this.B.zc},function(){this.H=this.H&~this.R|H(this);this.A-=this.B.zc},function(){I(this,J(this)&~this.R|H(this));this.A-=this.B.zc},function(){this.P=this.P&~this.R|H(this);this.A-=this.B.zc},function(){this.K=this.K&~this.R|H(this);this.A-=this.B.zc},function(){this.J=this.J&~this.R|H(this);this.A-=this.B.zc},Hj,Ij,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Uj,Vj,Wj,Hj,Ij,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Uj,Vj,Wj,Xj,function(){this.ya.call(this,mk,this.Ma);this.A-=-1===this.C? +1:this.B.Jg},Xj,function(){this.ya.call(this,mk,this.T);this.A-=-1===this.C?1:this.B.Jg},function(){this.Ya.call(this,ij)},function(){this.ea.call(this,jj)},function(){this.Oa.call(this,mj)},function(){this.V.call(this,nj)},Zj,ak,bk,ck,function(){this.S|=1;this.ea.call(this,Bi)},function(){this.S|=1;this.ka=this.Ka=this.rf;this.V.call(this,ai)},function(){var a;this.V.call(this,Ai);switch(this.L>>3&7){case 0:a=this.G;this.G=this.aa;Bd(this,a);break;case 1:a=this.I;this.I=this.aa;sf(this,a);break; +case 2:a=this.M;this.M=this.aa;ud(this,a);break;case 3:a=this.H;this.H=this.aa;Ad(this,a);break;case 4:a=J(this);I(this,this.aa);80386<=this.ja?this.Nb.load(a):Bd(this,a);break;case 5:a=this.P;this.P=this.aa;80386<=this.ja?this.Ob.load(a):sf(this,a);break;case 6:a=this.K;this.K=this.aa;ud(this,a);break;case 7:a=this.J,this.J=this.aa,Ad(this,a)}},function(){this.S|=1;this.U=this.fa;this.aa=H(this);this.ya.call(this,nk,Aj);this.U=-1},function(){this.A-=3},function(){var a=this.G;this.G=this.G&~this.R| +this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.H&this.R;this.H=this.H&~this.R|a&this.R;this.A-=3},function(){var a=this.G,b=J(this);this.G=this.G&~this.R|b&this.R;I(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.P&this.R;this.P=this.P&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G& +~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.G=2==this.ba?this.G&-65536|this.G<<24>>24&65535:this.G<<16>>16;this.A-=2},function(){this.M=2==this.ba?this.M&-65536|(this.G&32768?65535:0):this.G&-2147483648?-1:0;this.A-=this.B.Kj},function(){Bj.call(this,this.Ma(),Zf(this));this.A-=this.B.Nj},function(){this.A-=3},function(){var a=Cd(this);a&131072&&3>this.Pa?E.call(this, +13,0):(K(this,a&-196609),this.A-=this.B.Rc)},function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var a=H(this),a=a&65535|this.ca&-65536;Dd(this,a);this.A-=this.B.zc}},function(){var a=this.G>>8&255;a&1?Ef(this):Ff(this);a&4?(this.resultType&=-3,this.ca|=4):(this.resultType&=-3,this.ca&=-5);a&16?Mf(this):Kf(this);a&64?Nf(this):Lf(this);a&128?(this.resultType&=-17,this.ca|=128):(this.resultType&=-17,this.ca&=-129);this.A-=this.B.fc},function(){this.G=this.G&-65281|(Cd(this)&213)<<8;this.A-= +this.B.fc},function(){var a=this.G&-256,b;b=T(this);b=this.Qa(this.ka.mc(b,1));this.G=a|b;this.A-=this.B.Sh},function(){this.G=this.G&~this.R|yd(this,this.ka,T(this));this.A-=this.B.Sh},function(){var a=T(this),b=this.G;this.qc(this.ka.nc(a,1),b);this.A-=this.B.Th},function(){var a=T(this),b=this.G;this.rc(this.ka.nc(a,this.ba),b);this.A-=this.B.Th},function(){var a=1,b=0,c=this.Ba,d=this.B.Uh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Wh,this.Ia&256||(this.A-=this.B.Vh));if(a--){var e=this.Qa(this.ka.mc(this.K& +c,1));this.qc(this.Xa.nc(this.J&c,1),e);e=this.ca&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Uh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Wh,this.Ia&256||(this.A-=this.B.Vh));if(a--){var e=yd(this,this.ka,this.K&c);this.rc(this.Xa.nc(this.J&c,this.ba),e);e=this.ca&1024?-this.ba:this.ba;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I- +b&c;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Fh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Hh,this.Ia&256||(this.A-=this.B.Gh));if(a--){var e=Rf(this,this.ka,this.K),f=Rf(this,this.Xa,this.J);this.C=this.D;Ph.call(this,e,f);e=this.ca&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Fh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Hh, +this.Ia&256||(this.A-=this.B.Gh));if(a--){var e=Tf(this,this.ka,this.K&c),f=Tf(this,this.Xa,this.J&c);this.C=this.D;Qh.call(this,e,f);e=this.ca&1024?-this.ba:this.ba;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){Df(this,this.G&this.xa(),128);this.A-=this.B.Je},function(){Df(this,this.G&this.Ma(),this.Ga);this.A-=this.B.Je},function(){var a=1,b=0,c=this.Ba,d=this.B.ei;this.Ia&192&& +(a=this.I&c,b=1,d=this.B.gi,this.Ia&256||(this.A-=this.B.fi));if(a--){var e=this.G;this.qc(this.Xa.nc(this.J&c,1),e);this.I=this.I&~c|this.I-b&c;80546<=this.Uc&&80564>=this.Uc&&!(this.Ia&2048)!=(103!=this.Qa(this.Ha))&&(c^=-65536);this.J=this.J&~c|this.J+(this.ca&1024?-1:1)&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.ei;this.Ia&192&&(a=this.I&c,b=1,d=this.B.gi,this.Ia&256||(this.A-=this.B.fi));if(a--){var e=this.G;this.rc(this.Xa.nc(this.J&c,this.ba),e);this.J= +this.J&~c|this.J+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Mh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Oh,this.Ia&256||(this.A-=this.B.Nh));if(a--){var e=this.Qa(this.ka.mc(this.K&c,1));this.G=this.G&-256|e;this.K=this.K&~c|this.K+(this.ca&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Mh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Oh, +this.Ia&256||(this.A-=this.B.Nh));if(a--){var e=yd(this,this.ka,this.K&c);this.G=this.G&~this.R|e;this.K=this.K&~c|this.K+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Zh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.ai,this.Ia&256||(this.A-=this.B.$h));if(a--){var e=this.G&255,f=Rf(this,this.Xa,this.J);this.C=this.D;Ph.call(this,e,f);this.J=this.J&~c|this.J+(this.ca&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-= +d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Zh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.ai,this.Ia&256||(this.A-=this.B.$h));if(a--){var e=this.G&this.R,f=Tf(this,this.Xa,this.J&c);this.C=this.D;Qh.call(this,e,f);this.J=this.J&~c|this.J+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){this.G=this.G&-256|this.xa();this.A-=this.B.fc},function(){this.I= +this.I&-256|this.xa();this.A-=this.B.fc},function(){this.M=this.M&-256|this.xa();this.A-=this.B.fc},function(){this.H=this.H&-256|this.xa();this.A-=this.B.fc},function(){this.G=this.G&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.I=this.I&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.M=this.M&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.H=this.H&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.G=this.G&~this.R|this.Ma();this.A-=this.B.fc},function(){this.I=this.I& +~this.R|this.Ma();this.A-=this.B.fc},function(){this.M=this.M&~this.R|this.Ma();this.A-=this.B.fc},function(){this.H=this.H&~this.R|this.Ma();this.A-=this.B.fc},function(){I(this,J(this)&~this.R|this.Ma());this.A-=this.B.fc},function(){this.P=this.P&~this.R|this.Ma();this.A-=this.B.fc},function(){this.K=this.K&~this.R|this.Ma();this.A-=this.B.fc},function(){this.J=this.J&~this.R|this.Ma();this.A-=this.B.fc},gk,hk,gk,hk,function(){this.V.call(this,bi)},function(){this.V.call(this,$h)},function(){this.S|= +1;this.Jb.call(this,ok,this.xa)},function(){this.S|=1;this.ya.call(this,ok,this.Ma)},ik,jk,ik,jk,function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var a=this.B.dk;this.qb=-1;Cj.call(this,3,null,a)}},function(){var a=this.xa();if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var b;a:{b=this.Hd[a];if(void 0!==b)for(var c=0;cthis.Pa)E.call(this,13,0);else{var a=this.B.ek;this.qb=-1;Cj.call(this,4,null,a)}else this.A-=this.B.fk},function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{this.sb=this.ta.Z;this.U=this.fa;this.A-=this.B.bk;if(this.$a&1&&this.ca&16384){var a=this.na(this.Sa.Aa+0);vd(this.wa,a,!1)}else{var a=this.pa,b=H(this),c=H(this),d=H(this);if(this.ca&131072)d=d&131071|this.ca&-131072;else if(d&131072){var e=H(this),f=H(this),g=H(this),h=H(this),k=H(this),m=H(this);wd(this,!0,!0);ud(this, +f);I(this,e);Bd(this,g);Ad(this,h);this.Nb.load(k);this.Ob.load(m)}null!=Ed(this,b,c,!1)&&(Dd(this,d,a),this.le&&nf(this,this.Ha))}this.sb=this.U=-1}},function(){this.Jb.call(this,dk,wj)},function(){this.ya.call(this,2==this.ba?ek:fk,wj)},function(){this.Jb.call(this,dk,xj)},function(){this.ya.call(this,2==this.ba?ek:fk,xj)},function(){var a=this.xa();if(a){var b=this.G&255;this.G=this.G&-65536|b/a<<8|b%a;Df(this,this.G,128);this.A-=this.B.Hj}else Fj.call(this)},function(){var a=this.G&255,b=(this.G>> +8&255)*this.xa()|0,c=a+b|0;this.G=this.G&-65536|c&255;wf(this,a,b,c,191);this.A-=this.B.Gj},function(){this.G=this.G&-256|(xf(this)?255:0);this.A-=2},function(){this.G=this.G&-256|Rf(this,this.ka,this.H+(this.G&255));this.A-=this.B.Gk},function(){kk.call(this,216)},function(){kk.call(this,217)},function(){kk.call(this,218)},function(){kk.call(this,219)},function(){kk.call(this,220)},function(){kk.call(this,221)},function(){kk.call(this,222)},function(){kk.call(this,223)},function(){var a=this.T(), +b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b&&!Af(this)?(O(this,M(this)+a),this.A-=this.B.mk):this.A-=this.B.Ph},function(){var a=this.T(),b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b&&Af(this)?(O(this,M(this)+a),this.A-=this.B.Qh):this.A-=this.B.Rh},function(){var a=this.T(),b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b?(O(this,M(this)+a),this.A-=this.B.lk):this.A-=this.B.Ph},function(){var a=this.T();this.I&this.Ba?this.A-=this.B.Rh:(O(this,M(this)+a),this.A-=this.B.Qh)},function(){var a=this.xa(); +Pf(this,a,1,!0)&&(this.G=this.G&-256|rc(this.ga,a,1,this.Ha-2)&255,this.A-=this.B.Kh)},function(){var a=this.xa();Pf(this,a,this.ba,!0)&&(this.G=this.G&~this.R|rc(this.ga,a,this.ba,this.Ha-2)&this.R,this.A-=this.B.Kh)},function(){var a=this.xa();Pf(this,a,1,!1)&&(zc(this.ga,a,1,this.G&255,this.Ha-2),this.A-=this.B.Yh)},function(){var a=this.xa();Pf(this,a,this.ba,!1)&&(zc(this.ga,a,this.ba,this.G&this.R,this.Ha-2),this.A-=this.B.Yh)},function(){var a=this.Ma(),b=M(this),a=b+a;K(this,b);O(this,a); +this.A-=this.B.Lj},function(){var a=this.Ma();O(this,M(this)+a);this.A-=this.B.Lh},function(){Ed(this,this.Ma(),Zf(this));this.A-=this.B.hk},function(){var a=this.T();O(this,M(this)+a);this.A-=this.B.Lh},function(){var a=this.M&65535;Pf(this,a,1,!0)&&(this.G=this.G&-256|rc(this.ga,a,1,this.Ha-1)&255,this.A-=this.B.Jh)},function(){var a=this.M&65535;Pf(this,a,this.ba,!0)&&(this.G=this.G&~this.R|rc(this.ga,a,this.ba,this.Ha-1)&this.R,this.A-=this.B.Jh)},function(){var a=this.M&65535;Pf(this,a,1,!1)&& +(zc(this.ga,a,1,this.G&255,this.Ha-1),this.A-=this.B.Xh)},function(){var a=this.M&65535;Pf(this,a,2,!1)&&(zc(this.ga,a,this.ba,this.G&this.R,this.Ha-1),this.A-=this.B.Xh)},lk,lk,function(){this.S|=132;this.A-=this.B.nd},function(){this.S|=68;this.A-=this.B.nd},function(){this.ca&131072?E.call(this,13,0):(this.ua|=4,this.A-=2,this.ha&&z(this,-2147483648)?(vf(this),this.ha.Wb()):this.ca&512||(this.ha&&vf(this),this.Wb()))},function(){xf(this)?Ff(this):Ef(this);this.A-=2},function(){this.cb=!1;this.Jb.call(this, +qk,zj);this.cb&&(this.G=this.G&~this.R|this.ia&this.R)},function(){this.cb=!1;this.ya.call(this,rk,zj);this.cb&&(this.G=this.G&~this.R|this.ia&this.R,this.M=this.M&~this.R|this.va&this.R)},function(){Ff(this);this.A-=2},function(){Ef(this);this.A-=2},function(){this.pa>this.Pa?E.call(this,13,0):(this.ca&=-513,this.A-=this.B.Jj)},function(){this.pa>this.Pa?E.call(this,13,0):(this.ca|=512,this.S|=4,this.A-=2)},function(){this.ca&=-1025;this.A-=2},function(){this.ca|=1024;this.A-=2},function(){this.Jb.call(this, +Id,zj)},function(){this.ya.call(this,Jd,zj)}],Yj=[zh,Ci,xh,Ei,Bh,gj,oj,Ph],mk=[Ah,Di,yh,Fi,Ch,hj,pj,Qh],nk=[function(a,b){this.A-=-1===this.C?this.B.zc:this.B.yk;return b},Sh,Sh,Sh,Sh,Sh,Sh,Sh],ok=[function(a,b){this.A-=-1===this.C?this.B.qk:this.B.nk;return b},W,W,W,W,W,W,W],dk=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=7)?(d=a<>8-b)&255):d=a<<7;If(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=7)?(d=a<<8-b,c=(a>>>b|d)&255):d=a;If(this,c,d,128)}return c}, +function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=9)?(c=(a<>9-b)&255,d=a<>b|d<<8-b|a<<9-b)&255,d=a<<8-b):d<<=7;If(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;8>>b-1,a=b>>>1&255,Df(this,a,128,b&1,a&128);return a},W,function(a,b){if(b&=this.ra)9>24>>b-1,a=b>>1&255,Df(this,a,128,b&1);return a}],ek=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<>16-b)&65535):d=a<<15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=17)?(c=(a<>17-b)&65535,d=a<>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;16>>b-1,a=b>>>1&65535,Df(this,a,32768,b&1,a&32768);return a},W,function(a,b){if(b&=this.ra)17>16>>b-1,a=b>>1&65535,Df(this,a,32768,b&1);return a}],fk=[function(a,b){var c=a;if(b&=this.ra)c=a<>>32-b,If(this,c,a<>>b|d;If(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.ra)c=Jf(this),c=a<>>32-b>>>1,If(this,c,a<>>b|c<<32-b|a<<32-b<<1,If(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.ra)a<<=b-1,c=a<<1,Df(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.ra)b=a>>>b-1,a=b>>>1,Df(this,a,-2147483648, +b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= +-1===this.D?this.B.uk:this.B.tk;this.S|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24)|0;this.ia=b&65535;127b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.Zj:this.B.Yj;this.S|=2;return a},function(a,b){if(!a)return Fj.call(this),a;var c=(b=this.G&65535)/a;if(255>24,d= +(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&this.R},function(a,b){2==this.ba? +(b=this.G&65535,b=b*a|0,this.ia=b&65535,this.va=b>>16&65535):(Yh.call(this,a,this.G),80563==this.Uc&&68657152==this.G&&129==a&&(this.va=0));this.va?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.wk:this.B.vk;this.S|=2;return a},function(a,b){2==this.ba?(b=this.G&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.ia=b&65535,this.va=b>>16&65535,b=32767b):(Xh.call(this,a,this.G),b=this.va!=this.ia>>31);b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D? +this.B.ak:this.B.$j;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;b=65536*(this.M&65535)+(this.G&65535);var c=b/a;if(65536<=c)return Fj.call(this),a;this.ia=c&65535;this.va=b%a&65535}else{if(!sj.call(this,this.G,this.M,a))return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Tj:this.B.Sj;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;var c=a<<16>>16,d=(b=this.M<<16|this.G&65535)/c|0;if(d!=d<<16>>16||8086== +this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Tf:this.B.Sf; +return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= +this.fa;Bj.call(this,a,this.na(this.D+this.ba));this.A-=this.B.Mj;this.S|=2;this.U=-1;return a},function(a){O(this,a);this.A-=-1===this.D?this.B.jk:this.B.ik;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);Ed(this,a,this.na(this.D+this.ba));this.A-=this.B.gk;this.S|=2;return a},function(a){var b=a;this.S&512&&(a=a-2&65535,80286>this.ja&&(b=a));K(this,b);this.A-=-1===this.D?this.B.Rc:this.B.Ak;this.S|=2;return a},W];function te(){this.V.call(this,lj);this.A-=-1===this.D?6:13} +function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.lg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; +le[5]=function(){this.pa?E.call(this,13,0,0,!0):(Of(this,this.na(2054)),this.J=this.na(2086),this.K=this.na(2088),this.P=this.na(2090),this.H=this.na(2094),this.M=this.na(2096),this.I=this.na(2098),this.G=this.na(2100),td(this.Xa,2102,this.na(2084)),td(this.wa,2108,this.na(2082)),td(this.ta,2114,this.na(2080)),td(this.vb,2120,this.na(2078)),Dd(this,this.na(2072)),O(this,this.na(2074)),I(this,this.na(2092)),this.Ec=this.na(2126)|this.Qa(2128)<<16,this.zd=this.Ec+this.na(2130),this.Mc=this.na(2138)| +this.Qa(2140)<<16,this.Sd=this.Mc+this.na(2142),td(this.Bc,2132,this.na(2076)),td(this.Sa,2144,this.na(2070)),this.A-=195)};le[6]=function(){this.pa?E.call(this,13,0):(this.$a&=-9,this.A-=2)};le[11]=Ld;le[166]=Ld;le[255]=Ld;var N=[];N[5]=Ld; +N[7]=function(){if(this.pa)E.call(this,13,0,0,!0);else{var a=this.Xa.mc(this.J&this.Ba,204);if(-1!==a){uj.call(this,this.oa(a));var b=this.oa(a+168),c=(b&24576)>>13;Dd(this,this.oa(a+4),c);this.Ec=this.oa(a+112);this.zd=this.Ec+this.oa(a+116);this.Mc=this.oa(a+100);this.Sd=this.Mc+this.oa(a+104);sd(this.Bc,this.oa(a+56),this.oa(a+120),this.oa(a+124),this.oa(a+128));sd(this.Sa,this.oa(a+52),this.oa(a+84),this.oa(a+88),this.oa(a+92));this.J=this.oa(a+12);this.K=this.oa(a+16);this.P=this.oa(a+20);this.H= +this.oa(a+28);this.M=this.oa(a+32);this.I=this.oa(a+36);this.G=this.oa(a+40);sd(this.Ob,this.oa(a+60),this.oa(a+132),this.oa(a+136),this.oa(a+140));sd(this.Nb,this.oa(a+64),this.oa(a+144),this.oa(a+148),this.oa(a+152));sd(this.vb,this.oa(a+68),this.oa(a+156),this.oa(a+160),this.oa(a+164));sd(this.ta,this.oa(a+72),b,this.oa(a+172),this.oa(a+176));sd(this.wa,this.oa(a+76),this.oa(a+180),this.oa(a+184),this.oa(a+188));sd(this.Xa,this.oa(a+80),this.oa(a+192),this.oa(a+196),this.oa(a+200));O(this,this.oa(a+ +8));I(this,this.oa(a+24))}this.A-=122<<(a&3?1:0)}};N[16]=Zj;N[17]=ak;N[18]=bk;N[19]=ck;N[32]=function(){if(this.pa)E.call(this,13,0);else{var a,b=this.xa();switch((b&56)>>3){case 0:a=this.$a;break;case 2:a=this.se;break;case 3:a=this.Od;break;default:me.call(this);return}Be(this,b&7,a);this.A-=6}};N[33]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;4==b||5==b?me.call(this):(Be(this,a&7,this.Ja[b]),this.A-=22)}}; +N[34]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=Ae(this,a&7);switch((a&56)>>3){case 0:uj.call(this,b);this.A-=10;break;case 2:this.se=b;this.A-=4;break;case 3:Fd.call(this,b);this.A-=5;break;default:me.call(this)}}};N[35]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;4==b||5==b?me.call(this):(a=Ae(this,a&7),a!=this.Ja[b]&&(of(this,!1),this.Ja[b]=a,of(this,!0)),this.A-=4>b?22:14)}}; +N[36]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;6>b?me.call(this):(Be(this,a&7,this.Ee[b]),this.A-=12)}};N[38]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;6>b?me.call(this):(this.Ee[b]=Ae(this,a&7),this.A-=12)}};N[128]=function(){var a=this.Ma();Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[129]=function(){var a=this.Ma();Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}; +N[130]=function(){var a=this.Ma();xf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[131]=function(){var a=this.Ma();xf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[132]=function(){var a=this.Ma();Af(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[133]=function(){var a=this.Ma();Af(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[134]=function(){var a=this.Ma();xf(this)||Af(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}; +N[135]=function(){var a=this.Ma();xf(this)||Af(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[136]=function(){var a=this.Ma();Bf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[137]=function(){var a=this.Ma();Bf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[138]=function(){var a=this.Ma();yf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[139]=function(){var a=this.Ma();yf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}; +N[140]=function(){var a=this.Ma();!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[141]=function(){var a=this.Ma();!Bf(this)==!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[142]=function(){var a=this.Ma();Af(this)||!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[143]=function(){var a=this.Ma();Af(this)||!Bf(this)!=!Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[144]=function(){vj.call(this,Gi)}; +N[145]=function(){vj.call(this,Gi)};N[146]=function(){vj.call(this,Hi)};N[147]=function(){vj.call(this,Ii)};N[148]=function(){vj.call(this,Ji)};N[149]=function(){vj.call(this,Ki)};N[150]=function(){vj.call(this,Li)};N[151]=function(){vj.call(this,Mi)};N[152]=function(){vj.call(this,Ni)};N[153]=function(){vj.call(this,Oi)};N[154]=function(){vj.call(this,Pi)};N[155]=function(){vj.call(this,Qi)};N[156]=function(){vj.call(this,Ri)};N[157]=function(){vj.call(this,Si)};N[158]=function(){vj.call(this,Ti)}; +N[159]=function(){vj.call(this,Ui)};N[160]=function(){zd(this,this.Nb.Z,this.ba,2);this.A-=this.B.Ke};N[161]=function(){this.U=this.fa;var a=H(this);this.Nb.load(a);this.A-=this.B.zc;this.U=-1};N[163]=function(){this.ea.call(this,Lh);-1!==this.D&&(this.A-=6)};N[164]=function(){this.ea.call(this,2==this.ba?Vi:Xi);this.A-=-1===this.D?3:7};N[165]=function(){this.ea.call(this,2==this.ba?Zi:$i);this.A-=-1===this.D?3:7};N[168]=function(){zd(this,this.Ob.Z,this.ba,2);this.A-=this.B.Ke}; +N[169]=function(){this.U=this.fa;var a=H(this);this.Ob.load(a);this.A-=this.B.zc;this.U=-1};N[171]=function(){this.ea.call(this,Oh);-1!==this.D&&(this.A-=5)};N[172]=function(){this.ea.call(this,2==this.ba?aj:cj);this.A-=-1===this.D?3:7};N[173]=function(){this.ea.call(this,2==this.ba?ej:fj);this.A-=-1===this.D?3:7};N[175]=function(){this.V.call(this,2==this.ba?Uh:Wh)};N[178]=function(){this.V.call(this,fi)};N[179]=function(){this.ea.call(this,Nh);-1!==this.D&&(this.A-=5)}; +N[180]=function(){this.V.call(this,ci)};N[181]=function(){this.V.call(this,di)}; +N[182]=function(){this.Oa.call(this,yi);switch(this.L>>3&7){case 0:this.G=this.G&~this.R|this.G&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.M=this.M&~this.R|this.M&255;break;case 3:this.H=this.H&~this.R|this.H&255;break;case 4:this.gb=this.gb&~this.R|this.G>>8&255;this.G=this.aa;break;case 5:this.P=this.P&~this.R|this.I>>8&255;this.I=this.aa;break;case 6:this.K=this.K&~this.R|this.M>>8&255;this.M=this.aa;break;case 7:this.J=this.J&~this.R|this.H>>8&255,this.H=this.aa}this.A-= +-1===this.D?3:6};N[183]=function(){xd(this,2);this.V.call(this,zi);switch(this.L>>3&7){case 0:this.G=this.G&65535;break;case 1:this.I=this.I&65535;break;case 2:this.M=this.M&65535;break;case 3:this.H=this.H&65535;break;case 4:this.gb=this.gb&65535;break;case 5:this.P=this.P&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.D?3:6};N[186]=function(){this.ya.call(this,tk,this.xa)};N[187]=function(){this.ea.call(this,Mh);-1!==this.D&&(this.A-=5)}; +N[188]=function(){this.V.call(this,Fh)};N[189]=function(){this.V.call(this,Gh)}; +N[190]=function(){this.Oa.call(this,yi);switch(this.L>>3&7){case 0:this.G=this.G&~this.R|(this.G&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.M=this.M&~this.R|(this.M&255)<<24>>24&this.R;break;case 3:this.H=this.H&~this.R|(this.H&255)<<24>>24&this.R;break;case 4:this.gb=this.gb&~this.R|this.G<<16>>24&this.R;this.G=this.aa;break;case 5:this.P=this.P&~this.R|this.I<<16>>24&this.R;this.I=this.aa;break;case 6:this.K=this.K&~this.R|this.M<<16>>24& +this.R;this.M=this.aa;break;case 7:this.J=this.J&~this.R|this.H<<16>>24&this.R,this.H=this.aa}this.A-=-1===this.D?3:6};N[191]=function(){xd(this,2);this.V.call(this,zi);switch(this.L>>3&7){case 0:this.G=this.G<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.M=this.M<<16>>16;break;case 3:this.H=this.H<<16>>16;break;case 4:this.gb=this.gb<<16>>16;break;case 5:this.P=this.P<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.D?3:6}; +var pf=[function(){this.A-=2+(-1===this.D?0:1);return this.Bc.Z},function(){this.A-=2+(-1===this.D?0:1);return this.Sa.Z},function(a){this.S|=2;this.Bc.load(a);this.A-=17+(-1===this.D?0:2);return a},function(a){this.S|=2;-1!==this.Sa.load(a)&&(this.jb(this.Sa.Xb+4,this.Sa.wb|=512),this.Sa.type|=512);this.A-=17+(-1===this.D?0:2);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!==this.Da.load(a)&&2048!=(this.Da.wb&2560)&&(this.Da.Gc>=this.pa&&this.Da.Gc>=(a&3)||7168==(this.Da.wb&7168)))return Nf(this), +a;Lf(this);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!==this.Da.load(a)&&512==(this.Da.wb&2560)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(a&3))return Nf(this),a;Lf(this);return a},W,W],Kd=[je,je,je,je,je,je,W,W],sk=[function(a){if(-1===this.D)E.call(this,6);else{a=this.zd-this.Ec;var b=this.Ec;80286==this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=11}return a},function(a){if(-1===this.D)E.call(this,6);else{a=this.Sd-this.Mc;var b=this.Mc;80286== +this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=12}return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Ec=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.zd=this.Ec+a,this.S|=2,this.A-=11);return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Mc=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.Sd=this.Mc+a,this.S|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.D?0:1);return this.$a},W,function(a){this.ca&131072? +E.call(this,6):(Of(this,a),this.A-=-1===this.D?3:6,this.S|=2);return a},W],tk=[W,W,W,W,Hh,Kh,Jh,Ih]; +function X(a){bb.call(this,"ChipSet",a,X,32768);var b=a.model;b&&!uk[b]&&w("Unrecognized ChipSet model: "+b);this.ja=uk[b]||vk;this.C=[];b=wk(a[xk]);this.C[0]=[b,b];null==b&&(this.ia=[360,360],(b=a.floppies)&&b.length&&(this.ia=b),yk(this,zk,this.ia.length),yk(this,Ak,a.monitor||(this.ja=kg&&(this.cb=this.Da=2);this.ka=a.scaleTimers||!1;this.Ub=a.rtcDate;this.Db=!1;a.sound&&(this.sb=this.Fa=null,window&&(this.sb=window.AudioContext|| +window.webkitAudioContext),this.sb&&(this.Fa=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"Coprocessor"}; +Ek[5150][0][Ak]={Lc:48,gd:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Pd:"Monitor Type"};Ek[5150][0][5]={Lc:12,gd:{16:0,32:4,48:8,64:12},Pd:"Base Memory (16Kb Increments)"};Ek[5150][1][6]={Lc:31,gd:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Pd:"Expansion Memory (32Kb Increments)"};Ek[5160]=[{},{}];Ek[5160][0][zk]=Ek[5150][0][zk];Ek[5160][0][3]=Ek[5150][0][3];Ek[5160][0][Ak]=Ek[5150][0][Ak]; +Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"Coprocessor"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; +l.Pb=function(a,b,c){switch(b){case xk:return this.qa[b]=c,Fk(this,0,b),!0;case Bk:if(5150==(this.ja|0)||5160.101==this.ja)return this.qa[b]=c,Fk(this,1,b),!0;break;case "swdesc":return this.qa[b]=c,!0}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.Tb=Jb(a,"FPU");yk(this,3,this.Tb?1:0,!0);this.B=Jb(a,"Keyboard");this.gb=c.Y.Id/1193181;qc(b,this,Gk);yc(b,this,Hk);this.jab;b++){var c=13>=b?Sk(e,b):e.A[b];a&&(a+="\n");a+="CMOS["+u(b)+"]: "+u(c)}e.ha.O(a)})}lf(c,26,this.Pm.bind(this))}; +l.hc=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; +l.reset=function(a){var b;Tk(this);this.L=Array(this.cb);for(b=0;b=kg){this.N=16;this.ea=0;this.aa=16;this.Ja=0;this.fa=160;512<=Xk(this)&&(this.fa|=16);3==+Yk(this,Ak,void 0)&&(this.fa|=64);5180==(this.ja|0)&&(this.fa|=12);this.Ka= +3;this.ra=Array(8);this.pa=0;a&&(this.A=Array(64));Zk(this,this.Ub);for(a=21;24>=a;a++)this.A[a]=0;for(a=14;46>a;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+Yk(this,Ak,void 0)<b){var d=!1;4!=b&&5!=b||a.A[11]&2||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[11]&4||(d&&128c;c++)b+=a.A[c];a.A[47]=b&255;a.A[46]=b>>8} +l.save=function(){var a=new qf(this);a.set(0,[this.C]);for(var b=[],c=0;c=kg&&(a.set(5,[this.N,this.ea,this.aa,this.Ja,this.fa,this.Ka]),a.set(6,[this.ra[7],this.ra,this.pa,this.A,this.Ga,this.ua]));return a.data()}; +l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Tk(this);b=a[1];for(c=0;c=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='
    '+f+"
    \n"}e.innerHTML=d;jl(a,b,c,!0)}function kl(a,b,c){if(b=(a=Ek[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} +function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.vg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} +function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.wg=!1);for(var d=!1;0<=b.count&&(c=b.qg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.vg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.vg,b.Lg,c)&&(b.wg=!0)):0!=b.type&&(b.wg=!0)),!d&&!El(b););} +function El(a){if(!a.wg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>3];b=1<<(b&7);d.lc&b||(d.lc|=b,d.nf=c||0,Hl(a))}function lg(a,b){var c=a.vc[b>>3];b=1<<(b&7);c.lc&b&&(c.lc&=~b,Hl(a))}function Hl(a,b){var c,d=-1;1>=1),ed(a.F,e))),b||2!=c||cl(a))}function Ol(a,b,c,d){x(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.Pa:a.Oa} +function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.ig=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= +b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.ig?1:0;a.md=48==a.ig?2:1} +function Rk(a,b,c){var d=a.V[b];if(d.De&&(2!=b||a.W&1)){var e=cd(a.F,a.ka),f=(e-d.vd)/a.gb|0;0>f&&(d.vd=e,f=0);var g=Nl(a,b),h=id(a,b)-f;0==d.mode?(0>=h&&(h=0),h||(d.td=!0,d.De=!1,b||mg(a,0))):4==d.mode?(d.td=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0))):6==d.mode&&(h-=f,0>=h&&(d.td=!d.td,h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0)));d.Ab[0]=h&255;d.Ab[1]=h>>8&255;c&&(a.vd=0)}return d} +function hd(a,b){for(var c=0;c=kg){b=a.F.Y.Id;c=cd(a.F,a.ka);null==a.fb&&(a.Ga=cd(a.F,a.ka),a.Jb=1024,a.fb=Math.floor(a.F.Y.Id/a.Jb),bl(a));c>=a.ua&&(a.A[12]|=64,a.A[11]&64&&(a.A[12]|=128,mg(a,8)),a.ua=c+a.fb);a.A[0]==a.A[1]&&a.A[2]==a.A[3]&&a.A[4]==a.A[5]&&(a.A[12]|=32,a.A[11]&32&&(a.A[12]|=128,mg(a,8)));var d=c-a.Ga,e=Math.floor(d/b);if(e&&!(a.A[11]&128)){for(;e--;)if(60<=++a.A[0]&&(a.A[0]=0,60<=++a.A[2]&&(a.A[2]=0,24<=++a.A[4]))){a.A[4]=0;a.A[6]=a.A[6]%7+1;var f; +f=a.A[9];var g=va[a.A[8]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[7]>f&&(a.A[7]=1,12<++a.A[8]&&(a.A[8]=1,a.A[9]=(a.A[9]+1)%100))}a.A[12]|=16;a.A[11]&16&&(a.A[12]|=128,mg(a,8))}a.Ga=c-d%b}}l=X.prototype;l.ym=function(a,b){var c=this.Ya;this.Ca&16&&(this.W&128?c=this.C[0][1]:this.B&&(c=Rl(this.B)));x(this,a,null,b,"PPI_A",c);return c};l.Yn=function(a,b,c){x(this,a,b,c,"PPI_A");this.Ya=b};l.zm=function(a,b){var c=this.W;x(this,a,null,b,"PPI_B",c);return c}; +l.Zn=function(a,b,c){x(this,a,b,c,"PPI_B");Sl(this,b)};function Sl(a,b){var c=!!(b&2),d=!!(a.W&2);a.W=b;a.B&&Tl(a.B,!(b&128),!!(b&64));c!=d&&cl(a,c)}l.Am=function(a,b){var c=0,c=5150==(this.ja|0)?this.W&4?c|this.C[1][1]&15:c|this.C[1][1]>>4&1:this.W&8?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.W&1&&Rk(this,2).td&&(c=this.W&2?c|32:c|16);x(this,a,null,b,"PPI_C",c,32896);return c};l.$n=function(a,b,c){x(this,a,b,c,"PPI_C");this.qb=b};l.Bm=function(a,b){var c=this.Ca;x(this,a,null,b,"PPI_CTRL",c);return c}; +l.ao=function(a,b,c){x(this,a,b,c,"PPI_CTRL");this.Ca=b};l.Kl=function(a,b){var c=this.B?Rl(this.B):0;x(this,a,null,b,"8041_KBD",c);this.va&=-2;return c};l.hn=function(a,b,c){x(this,a,b,c,"8041_KBD")};l.Jl=function(a,b){var c=this.W;x(this,a,null,b,"8041_CTRL",c);return c};l.gn=function(a,b,c){x(this,a,b,c,"8041_CTRL");Sl(this,b)};l.Ll=function(a,b){var c=this.va;x(this,a,null,b,"8041_STATUS",c);return c}; +l.Ml=function(a,b){var c=this.Ja;x(this,a,null,b,"8042_OUTBUFF",c,16384);this.N&=-258;this.B&&Ul(this.B);return c}; +l.kn=function(a,b,c){x(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.N&8)switch(this.ea){case 96:Vl(this,b);break;case 209:Wl(this,b);break;default:if(Vl(this,this.aa&-17),this.B){a=this.B;c=b;var d=-1;z(a)&&y(a,"sendCmd("+u(c)+")");switch(a.V||c){case 255:d=250;Xl(a);break;case 243:a.V&&(c=0);Yl(a,250);a.V=c;break;case 237:a.V&&(c=0);Yl(a,250);a.V=c;break;default:y(a,"sendCmd(): unrecognized command")}Zl(this,d)}}this.ea=b;this.N&=-9}; +l.Nl=function(a,b){var c=this.W&-209|(cd(this.F)&64?16:0);x(this,a,null,b,"8042_RWREG",c,16384);return c};l.mn=function(a,b,c){x(this,a,b,c,"8042_RWREG",null,16384);Sl(this,b)};l.Ol=function(a,b){x(this,a,null,b,"8042_STATUS",this.N,16384);a=this.N&255;this.N&256&&(this.N|=1,this.N&=-257);return a}; +l.jn=function(a,b,c){x(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.ea=b;this.N|=8;a=0;240<=this.ea&&(a=this.ea^15,this.ea=240);switch(this.ea){case 32:Zl(this,this.aa);break;case 173:Vl(this,this.aa|16);break;case 174:Vl(this,this.aa&-17);this.B&&Ul(this.B);break;case 170:this.B&&(a=this.B,a.A=[],z(a)&&y(a,"scan codes flushed"));Vl(this,this.aa|16);Zl(this,85);Wl(this,3);break;case 171:Zl(this,0);break;case 192:Zl(this,this.fa);break;case 208:Zl(this,this.Ka);break;case 224:Zl(this,this.aa&16?0: +1);break;case 240:a&1&&ve(this.F)}};function Vl(a,b){a.aa=b;a.N=a.N&-5|b&4;a.B&&Tl(a.B,!!(b&8),!(b&16))}function Zl(a,b,c){0<=b&&(a.Ja=b,c?a.N|=1:(a.N&=-2,a.N|=256))}function Wl(a,b){a.Ka=b;Tb(a.ga,!!(b&2));b&1||ve(a.F)}function $l(a,b){a.ja=c?Sk(this,c):this.A[c];z(this,4352)&&x(this,a,null,b,"CMOS.DATA["+u(c)+"]",d,!0);null!=b&&12==c&&(this.A[c]&=15,d&128&&lg(this,8),d&64&&this.A[11]&64&&bl(this));return d}; +l.Bn=function(a,b,c){var d=this.pa&63;z(this,4352)&&x(this,a,b,c,"CMOS.DATA["+u(d)+"]",null,!0);a=b^this.A[d];if(13>=d){if(c=b,10>d){var e=!1;this.A[11]&4||(c=10*(c>>4)+(c&15),e=!0);if(4==d||5==d)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;11==d&&a&64&&b&64&&bl(this)};l.Nk=function(a,b,c){x(this,a,b,c,"NMI");this.ya=b};l.Ln=function(a,b,c){x(this,a,b,c,"FPU.CLEAR")};l.Mn=function(a,b,c){x(this,a,b,c,"FPU.RESET");this.Tb&&fg(this.Tb)}; +l.Pm=function(a){if(z(this,16)&&pk(this.ha,26,a)){var b=this.F.G>>8;mf(this.F,a,function(a,d){return function(c){d=cd(a.F)-d;var e,g=a.F.M&255,h=a.F.M>>8,k=a.F.M&255,m=a.F.M>>8;if(2==b||3==b)e=" CH(hour)="+v(h)+" CL(min)="+u(g)+" DH(sec)="+u(m);else if(4==b||5==b)e=" CX(year)="+v(a.F.I)+" DH(month)="+u(m)+" DL(day)="+u(k);g=a.ha;h=d;g.message("INT "+u(26)+": C="+(xf(g.F)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,cd(this.F)))}return!0}; +function cl(a,b){if(a.Fa)try{void 0!==b?a.Db=b:b=a.Db&&a.F&&a.F.la.Ib;var c=Math.round(1193181/Nl(a,2));if(20>c||2E4>>4,0,this.X,this.C,this.Qd),delete this.Qd);return!0};cm.prototype.gc=function(){return!0}; +function dm(a,b,c,d){if(d)a.Na("Unable to load system ROM (error "+d+": "+b+")");else{mb(a.ce,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.Qd=e.symbols;if(!a.A.length){w("Empty ROM: "+b);return}if(1==a.A.length){w(a.A[0]);return}}catch(h){a.Na("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e>>d.La].xf(e&d.A,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.N?b.push(a.N):null!=a.N&&a.N.length&&(b=a.N);for(c=0;cthis.B?21:23,c=a.A[b]|a.A[b+1]<<8,c=c+(this.A>>10);a.A[b]=c&255;a.A[b+1]=c>>8;al(a)}}else w("No RAM allocated")}; +l.save=function(){var a=new qf(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function jm(a){this.N=a;this.C=lm;this.ha=mm;this.B=nm;this.A=null}var km=-2134900736,lm=65535,mm=2575,nm=2,om=[null,0],pm=[function(a){return this.controller.Qa(a)},null,null,function(a,b){this.controller.qc(a,b)},null,null];l=jm.prototype;l.save=function(){return[this.C,this.B]}; +l.restore=function(a){this.qc(0,a[0]&255);this.qc(2,a[1]&255);return!0};l.Qa=function(a){var b=255;2>a?b=a&1?this.ha>>8:this.ha&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};l.qc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.N.ga;if(b&1)this.A&&(dc(a,917504,131072,this.A),this.A=null);else{this.A||(this.A=ec(a,917504,131072));var c=ec(a,16646144,131072);dc(a,917504,131072,c,b&2?1:hc)}this.C=this.C&-256|b}};l.wj=function(){return om};l.nh=function(){return pm}; +Xa(function(){for(var a=tb(document,"pcx86","ram"),b=0;b"]]=10804;Y[p["/"]]=53;Y[p["?"]]=10805;Y[3016]=54;Y[1044]=55;Y[1018]=56;Y[1032]=57;Y[1020]=58;Y[1112]=59;Y[1113]=60;Y[1114]=61;Y[1115]=62;Y[1116]=63;Y[1117]=64;Y[1118]=65;Y[1119]=66;Y[1120]=67;Y[1121]=68;Y[1144]=69;Y[1145]=70;Y[1036]=71;Y[1038]=72;Y[1033]=73;Y[1109]=74;Y[1037]=75;Y[1101]=76;Y[1039]=77;Y[1107]=78;Y[1035]=79;Y[1040]=80;Y[1034]=81;Y[1045]=82;Y[1046]=83;Y[4027]=84;Y[1122]=87;Y[1123]=88;Y[1091]=91;Y[1093]=93;Y[1224]=91;Y[tm]=7470;Y[4008]=7494;Y[4046]=3677523; +Y[4045]=3677522;Y[4013]=3677468;l=qm.prototype; +l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]= +c,c.onclick=function(){e.X&&e.X.wd();zm(e,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==vm[g]&&"button"==a)return this.qa[f]=c,c.onclick=function(a,b,c){return function(){a.X&&a.X.wd();Am(a,c,!0);zm(a,c,!0)}}(this,g,vm[g]),!0;if(void 0!==wm[b])return this.fa++,this.qa[f]=c,a=function(a,b,c){return function(){zm(a,c)}}(this,b,wm[b]),b=function(a,b,c){return function(){Bm(a,c)}}(this,b,wm[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup= +c.onmouseout=b),!0;if(d)return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();d&&!e.L&&(e.L=d,Cm(e,300))},!0}return!1};function Dm(a,b,c){if(a.fa){for(var d in da)if(b==da[d]){b=+d;(d=ca[d])&&(b=d);break}for(var e in wm)if((d=wm[e]==b)||(d=b,d>=p.ve&&d<=p.z&&(d-=p.ve-p.ue),d=wm[e]==d),d){(a=a.qa["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet")}; +function rm(a,b){var c=0;a.ja=null;"string"==typeof b&&(a.ja=b.toUpperCase(),c=sm.indexOf(a.ja),0>c&&(c=0));if(b=sm[c])a.ra=parseInt(b.substr(2),10)}function Xl(a){y(a,"keyboard reset",65792);a.A=[];Yl(a,170)}function Tl(a,b,c){a.aa!==c&&(a.aa=a.ea=c)&&(a.U=!0);a.W!==b&&(a.W=b)&&!a.ea&&am(a,!0);a.W&&a.ea&&(Xl(a),a.ea=!1)}function Yl(a,b){a.N&&(a.A.unshift(b),a.U=!0,$l(a.N,b))} +function Ul(a){var b=0;a.A.length&&a.U&&(b=a.A[0],a.N&&$l(a.N,b));z(a)&&y(a,b?"scan code "+u(b)+" available":"no scan codes available")}function Rl(a){var b=0;a.A.length&&(b=a.A[0]);z(a)&&y(a,"scan code "+u(b)+" delivered");return b}function am(a,b){0>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.xc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in xm)d="led-"+g,e=xm[g],c&&c!=e||!(f=a.qa[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.xc&=~b,d&&(a.xc|=b);return!0}}return!1} +function zm(a,b,c){if(Y[b]&&a.F&&a.F.la.Ib){um[b]&&a.B.length&&0e||(e==a.B.length&&(d={},d.Pe=b,d.xc=a.xc,Dm(a,b,!0),e++),0b.Kd){if(!b.Hf){Bm(a,b.Pe);return}b.Hf=!1;c=a.ua}else c=1==b.Kd++?500:100;b.Zk=setTimeout(function(a){return function(){Fm(a,b)}}(a),c)}} +function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.ng)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; +function ym(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Hm(a,g,!0);a.kh&&h==p["`"]&&(g=h=27);if(Y[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Am(a,h,!1,c)){if(20==g||144==g||145==g)a.pa||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k=p.ue&&b<=p.ng||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), +1==e.A.length&&e.N&&$l(e.N,f)):(20==e.A.length&&e.A.push(255),y(e,"scan code buffer overflow")));d=!0}return d}Xa(function(){for(var a=tb(document,"pcx86","keyboard"),b=0;bc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.pg=an;if(5<=b){this.wh=$m;this.pg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? +0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.hg=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.length>this.controller.mi&255};gn[17408]=function(a){return(this.controller.Fb=this.da[(a&-4)+this.C])>>((a&3)<<3)&255};gn[5120]=function(a){a+=this.C;var b=this.controller.Fb=this.da[a&-2];return(a&1?b>>8:b)&255};gn[1280]=function(a){a+=this.C;a=this.controller.Fb=this.da[a];for(var b=this.controller.yh,c=this.controller.xh&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d}; +gn[0]=function(a,b){a+=this.C;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[32]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[96]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b&=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[160]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b|=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[224]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b^=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[4]=function(a,b){var c=(a&-4)+this.C;a=(a&3)<<3;b=b<>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Xf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.hg;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>3;for(c=0;c=d&&(A=d,g=!0);break; +case "p":0<=d&&3>=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.pg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, +b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.hg),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Cg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0c&&(a=Math.round(c/b*100)+"%")}this.rf?(this.ka.style.width=a,this.ka.style.width=a,this.ka.style.display="block",this.ka.style.margin="auto"):(this.ia.style.width=a,this.ia.style.height="auto");this.ia.style.backgroundColor="black";this.ia.Ye();a=!0}this.X&&this.X.focus()}return a}; +function Lm(a,b){!b&&a.ia&&(a.rf?a.ka.style.width=a.ka.style.height="":a.ia.style.width=a.ia.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.kh=b)}l.Fe=function(a){var b=!1;this.X&&(a?this.X.Fe&&(this.X.Fe(),this.V&&this.V.Yf(!0),b=!0):this.X.$k&&(this.X.$k(),this.V&&this.V.Yf(!1),b=!0),this.X&&this.X.focus());return b};l.Yf=function(a){this.V&&(this.V.Yf(a),this.B&&(this.B.kh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.bl)}; +function tn(a,b){var c=a.X;c&&!a.ke&&(c.addEventListener("touchstart",function(b){vn(a,b,!0)},!1),c.addEventListener("touchmove",function(b){vn(a,b)},!0),c.addEventListener("touchend",function(b){vn(a,b,!1)},!1),a.ke=b,a.uc=a.Cc=a.lg=-1,a.Hd=!1,a.Xc=null,a.Gd=!1,a.so=function(){a.Gd=!0;a.V.he(wn,!0)})}l.Mg=function(a){this.B&&this.B.Mg(a)}; +function vn(a,b,c){var d,e,f=0,g=0;e=a.ka;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.ra/a.ka.offsetWidth,k=a.Da/a.ka.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.ke)d=d/(a.ra/3)|0,e=e/(a.Da/3)|0,1!=e?e?zm(a.B,1040,!0):zm(a.B,1038,!0):1!=d&&(d?zm(a.B,1039,!0):zm(a.B,1037,!0));else if(a.V){g=a.Hd;f=b.timeStamp-a.lg;!0===c?(a.Hd=500f){a.V.he(wn,!0);a.V.he(wn,!1);return}}if(c||0>a.uc||0>a.Cc)a.uc=d,a.Cc=e;c=Math.round(d-a.uc);b=Math.round(e-a.Cc);a.uc=d;a.Cc=e;a.V.Kf(c,b,a.uc,a.Cc)}}l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; +l.reset=function(){var a=!0,b=0;this.N&&(b=+Yk(this.N,Ak,void 0));this.ja||(this.Ua=3==b?1:3);this.va=3;switch(this.Ua){case hm:b=7;break;case 5:var c=Om[this.Vc];c&&(b=c[0]);b||(b=4);break;case 1:b=3;this.va=7;break;default:b=2}this.ya!==b&&(this.ya=b,a=!0);this.C=null;this.pa=this.qd=new Xm(this,1);this.aa=this.Wc=new Xm(this,3);5>this.Ua?this.A=new Xm:(this.A=new Xm(this,this.Ua,null,this.Dd),xn(this));Xn(this);this.Ga=null;this.cb=this.ua=-1;this.Pa=0;Yn(this,this.va);if(this.C.ob&&a){a=this.C.ob+ +this.Ub;for(b=this.C.ob;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);nc(this.ga,b,c|d<<8)}un(this,!0)}};function xn(a){a.A.vf&1?(a.pa=a.qd,a.aa=a.A):(a.pa=a.A,a.aa=a.Wc)}l.save=function(){var a=new qf(this);a.set(0,hn(this.qd));a.set(1,hn(this.Wc));a.set(2,[this.ya,this.va,this.Ga]);a.set(3,hn(this.A));return a.data()}; +l.restore=function(a){var b=a[2];this.ya=b[0];this.va=b[1];this.Ga=b[2];this.C=null;this.pa=this.qd=new Xm(this,1,a[0]);this.aa=this.Wc=new Xm(this,3,a[1]);this.A=new Xm(this,this.Ua,a[3],this.Dd);this.A.Hc&&xn(this);Xn(this);if(!Zn(this))return!1;$n(this);return!0}; +function Mm(a,b,c,d){if(d)a.Na("Unable to load font ROM (error "+d+": "+b+")");else{mb(a.ce,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){w("Empty font ROM: "+b);return}if(1==f.length){w(f[0]);return}if(8192==f.length)gm(a,f,[6144,0]);else if(2048==f.length)gm(a,f,[0]);else{a.Na("Unrecognized font data length ("+f.length+")");return}}catch(g){a.Na("Font ROM data error: "+g.message);return}(a.ea||a.ha)&&xb(a)}} +function ao(a,b){if(1==b)return a.Ca[0]=Rm[0],a.Ca[1]=Rm[7],a.Ca;if(2==b){var c=a.C.tf;if(a.C===a.A){var d=a.A.Sc[0],c=d&7;d&16&&(c|=8);18!=a.A.Sc[1]&&(c|=32)}a.Ca[0]=Rm[c&15];c=c&32?Tm:Sm;for(d=0;de;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.Ca[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.Sc[15]?c.Sc:Um;for(e=0;16>e;e++)f=b[e]&63,k?(f|= +(c.Sc[20]&12)<<4,c.Sc[16]&128&&(f&=-49,f|=(c.Sc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.Ca[e]=[g,h,f,255]}a.qb=!0}return a.Ca}function gm(a,b,c,d){a.Uc=b;a.Jb=c;a.Tb=d} +function Xn(a,b){var c=!1;if(window&&a.Uc&&(!b||a.U)){b=0;var d=a.Tb?a.Tb:8,e=ao(a);null!=a.Jb[0]&&bo(a,3,a.Jb[0],b,d,8,a.Uc,e)&&(c=!0);b=a.Tb?0:2048;d=a.Tb?a.Tb:9;null!=a.Jb[1]&&(bo(a,1,a.Jb[1],b,d,14,a.Uc,Pm,Qm)&&(c=!0),a.Tb&&bo(a,a.Ua,a.Jb[1],0,a.Tb,14,a.Uc,e)&&(c=!0))}return c}function bo(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(co(a,b,c,d,e,f,g,h,k)&&(m=!0),a.ro&&co(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} +function co(a,b,c,d,e,f,g,h,k){var m=!1,n=b&1?0:1,t=a.Oa[b],q=16>h.length?h.length:16;t||(t={Pc:e<ga||!L?ga:8,Pa=Ja.createImageData(m.Pc,m.Qc);for(Da=0;256>Da;Da++){for(Ka=0;Ka=ga-2,Rc=S[Ka>(8<=Wa&&192<=Da&&223>=Da?7:Wa)?A:ab;eo(Pa,Ge,Wd,He);C&&eo(Pa,Ge+1,Wd,He)}Ja.putImageData(Pa,(Da&15)*m.Pc,(Da>>4)*m.Qc)}m.Re[F]="#"+r(A[0],2)+r(A[1],2)+r(A[2],2);m.Yi[F]=A;m.Zg[F]=la;m=!0}}a.Oa[b]=t;return m}function fo(a){0a.cb&&(a.cb=0):a.cb=-1} +function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.mg!=b||a.Ee!=d)a.mg=b,a.Ee=d;a.Ya=e+1;fo(a)}}} +function go(a){if(0<=a.ua){if(void 0!==a.fa){var b=a.fa[a.ua];if(b&131072){var b=b&-131073,c=a.ua%a.L,d=a.ua/a.L|0;a.U&&a.Oa[a.U]&&(a.gb&&ho(a,c,d,b,a.gb),ho(a,c,d,b));a.fa[a.ua]=b}}a.ua=-1}} +function io(a){var b,c=a.C;a.hf=!1;var d=c.Zd[5];if(null!=d){b=1024;var e=0,f=c.Zd[3]&31;switch(d&3){case 0:if(f){e=32;switch(f&24){case 8:e=96;break;case 16:e=160;break;case 24:e=224}c.cd=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ua==hm&&(e=3,c.cd=f&7)}d&8&&(b=1280);c=c.Me[4];null!=c&&(c&4||(b|=4096,e|=16),d&64&&(c&8&&(b|=16384,e|=4),a.hf=!0));b|=e}return b} +function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Cg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} +function Zn(a,b){var c,d=a.Ga,e=a.C;if(e)if(1==e.Ua)d=7;else if(5<=e.Ua){var d=null,f=e.Dd>>2,g=32768=e.mb[18]?19:20:21:g&128||350>f?d= +m?13:14:480<=f&&(d=3==a.ya?17:18):d=m?7-d:6:d-=m?2:0);c=io(a)}}else e.fd&8&&(e.fd&2?(d=e.fd&16?6:5,e.fd&4||--d):(d=e.fd&1?3:1,e.fd&4&&--d));else a.Ga=null,null==d&&(d=a.va);if(!Yn(a,d,b))return!1;jo(a,c);return!0} +function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.dg=a.L*a.W|0;a.ag=a.dg/ +a.hd|0;a.Ub=a.ag;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.Zf&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.Zf||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= +0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Fa=!1;var b=a.ag;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} +function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.mg,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], +e.fillRect(b,c+f,h.Pc,g)):(a.Ya&&a.Ya!==a.Ka&&(f=f*a.Ka/a.Ya|0,g=g*a.Ka/a.Ya|0),a.ea.fillStyle=h.Re[d],a.ea.fillRect(b,c+f,a.Ja,g)))} +function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.dg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= +1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.Fa){b=a.ga;for(var n=!0,t=c>>>b.La;0f)return;g=f+1}}if(a.U){if(a.Oa[a.U]){d=f;f=0;e=a.Pa=0;h=1048575;m=a.C.fd&32;5<=a.Ua&&(m=a.C.Sc[16]&8);b=a.ua-a.C.Ld;m&&(e=32768,h&=~e,a.cb&2||(h&=-65537));for(c+=d<<1;c>8|(q&255)<<8;var D=e,L=16;m>=h))>>(L-=h);eo(a.sb,m++,n,b[ga])}m>A&&(A=m);n=C&&(C=n+1)}k+=2;d++;if(m>=a.L){m=0;n+=2;if(n>a.W)break;n==a.W&&(n=1,k=c+a.sd)}}a.Fa= +!0;ta.L?a.Db-a.L-q>>3:0;c>=8;b>t&&(t=b);m=F&&(F=m+1)}c+=C;if(b>=a.L){b=0;if(++m>a.W)break;c+=D}}q||(a.Fa=!0);na.L?a.Db-a.L-F>>3:0;cD&&(L=D)):(q<<=F,L-=F,a.Fa=!1):(a.Fa&&q===a.fa[d]?(h+=L,L=0):a.fa[d]=q,d++);if(L){hn&&(n=h);b=A&&(A=b+1)}if(h>=a.L){h=0;if(++b>a.W)break;c+=C}}F||(a.Fa=!0);ma&&(b.Eh=a,a=-a|0);a%b.zh>b.an&&(c|=1);a%b.Ch>b.cn&&(c|=9);b.ni=a/b.Ch|0;return c}l.um=function(a,b){return no(this,this.pa,a,b)};l.Vn=function(a,b,c){var d=this.pa;d.Qg=d.Ac;d.Ac=b&31;x(this,a,b,c,"CRTC.INDX")};l.tm=function(a,b){return oo(this,this.pa,a,b)};l.Un=function(a,b,c){po(this,this.pa,a,b,c)};l.vm=function(a,b){return qo(this,this.pa,b)};l.Wn=function(a,b,c){a=this.pa;x(this,a.port+4,b,c,"MODE");a.fd=b;Zn(this,!1)}; +l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.hg=this.A.hg&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; +l.Lk=function(a,b,c){var d=this.A,e=d.Nd&32;if(d.Ze){d.Ze=!1;var f=d.Nd&31;if(16<=f||!e)c&&!z(this)||x(this,a,b,c,"ATC."+d.$g[f]),d.Sc[f]=b,ko(this,!1)}else d.Nd=b,x(this,a,b,c,"ATC.INDX"),d.Ze=!0,b&32&&!e&&Xn(this,!0)&&un(this,!0),a=(d.mb[12]<<8)+d.mb[13]|0,d.Ld!=a&&(d.Ld=a,ko(this)),d.qf=0}; +l.Gm=function(a,b){a=0;if(5==this.Ua)a=3-((this.A.vf&12)>>2),a=(this.Vc&1<>this.A.Kc&63;b&&!z(this)||x(this,969,null,b,"DAC.DATA["+u(this.A.od)+"]["+u(this.A.Kc)+"]",a);this.A.Kc+=6;12Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ca().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||eb.aspect);f&&.3<=f&&3.33>=f&&(Va("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Z(d,e,g,f,c);sb(d,c)}}); +function so(a){this.V=a.adapter;switch(this.V){case 1:this.X=956;this.C=7;break;case 2:this.X=888;this.C=7;break;case 3:this.X=632;this.C=5;break;default:w("Unrecognized parallel adapter #"+this.V);return}this.A=this.B=null;bb.call(this,"ParallelPort",a,so,4194304);a=a.binding;"console"==a?this.B="":rb(this,a,to)}jb(so);var to="buffer";l=so.prototype;l.Pb=function(a,b,c){switch(b){case to:return this.qa[b]=this.A=c,!0}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet");qc(b,this,uo,this.X);yc(b,this,vo,this.X);xb(this)};l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){wo(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Yb;c[b]=this.Df;a.set(0,c);return a.data()};l.restore=function(a){return wo(this,a[0])}; +function wo(a,b){var c=0;b||(b=[0,0,0]);a.L=b[c++];a.Yb=b[c++];a.Df=b[c];return!0}l.hm=function(a,b){var c=this.L;x(this,a,null,b,"DATA",c);return c};l.Fm=function(a,b){var c=this.Yb;x(this,a,null,b,"STAT",c);return c};l.dm=function(a,b){var c=this.Df;x(this,a,null,b,"CTRL",c);return c}; +l.Hn=function(a,b,c){x(this,a,b,c,"DATA");this.L=b;this.Yb|=64;a=!1;y(this,"transmitByte("+u(b)+")");this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Yb&=-65);xo(this)};l.Cn=function(a,b,c){x(this,a,b,c,"CTRL");this.Df=b;xo(this)}; +function xo(a){a.N&&a.C&&(a.Df&16&&!(a.Yb&64)?mg(a.N,a.C):lg(a.N,a.C))}var uo={0:so.prototype.hm,1:so.prototype.Fm,2:so.prototype.dm},vo={0:so.prototype.Hn,2:so.prototype.Cn};Xa(function(){for(var a=tb(document,"pcx86","parallel"),b=0;b=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.xd)return;b=qa(b[1]);if(this.ia=ob(b)){var d=this.ia.exports;if(d){var e=d.connect;e&&e.call(this.ia);if(this.ra=d.receiveData){this.status(this.ce+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}}; +l.hc=function(a,b){if(!b)if(this.zj(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){Co(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.va;c[b++]=this.Da;c[b++]=this.fa;c[b++]=this.pa;c[b++]=this.U;c[b++]=this.B;c[b++]=this.C;c[b++]=this.A;c[b++]=this.Ca;c[b]=this.aa;a.set(0,c);return a.data()};l.restore=function(a){return Co(this,a[0])}; +function Co(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,48,[]]);a.va=b[c++];a.Da=b[c++];a.fa=b[c++];a.pa=b[c++];a.U=b[c++];a.B=b[c++];a.C=b[c++];a.A=b[c++];a.Ca=b[c++];a.aa=b[c];return!0}l.gg=function(a){if("number"==typeof a)this.aa.push(a);else if("string"==typeof a)for(var b=0;b>8:this.pa;x(this,a,null,b,this.B&128?"DLM":"IER",c);return c};l.pm=function(a,b){var c=this.U;x(this,a,null,b,"IIR",c);return c}; +l.qm=function(a,b){var c=this.B;x(this,a,null,b,"LCR",c);return c};l.sm=function(a,b){var c=this.C;x(this,a,null,b,"MCR",c);return c};l.rm=function(a,b){var c=this.A;x(this,a,null,b,"LSR",c);return c};l.xm=function(a,b){var c=this.Ca;x(this,a,null,b,"MSR",c);return c}; +l.eo=function(a,b,c){x(this,a,b,c,this.B&128?"DLL":"THR");if(this.B&128)this.fa=this.fa&-256|b;else{this.Da=b;this.A&=-97;a=!1;y(this,"transmitByte("+u(b)+")");this.ra&&this.ra.call(this.ia,b)&&(a=!0);if(this.L)13==b?this.ea=0:8==b?(this.L.value=this.L.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,32>b&&1==c&&(c=0),9==b&&(b=this.Ga||8,c=b-this.ea%b,this.Ga&&(a=pa("",c))),this.Fa&&!this.ea&&c&&(a=String.fromCharCode(this.Fa)+a),this.L.value+=a,this.L.scrollTop= +this.L.scrollHeight,this.ea+=c),a=!0;else if(null!=this.W){if(10==b||1024<=this.W.length)this.O(this.W),this.W="";10!=b&&(this.W+=String.fromCharCode(b));a=!0}a&&(this.A|=96)}};l.Rn=function(a,b,c){x(this,a,b,c,this.B&128?"DLM":"IER");this.B&128?this.fa=this.fa&255|b<<8:this.pa=b};l.Sn=function(a,b,c){x(this,a,b,c,"LCR");this.B=b}; +l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.gg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; +var Ao={0:yo.prototype.Cm,1:yo.prototype.om,2:yo.prototype.pm,3:yo.prototype.qm,4:yo.prototype.sm,5:yo.prototype.rm,6:yo.prototype.xm},Bo={0:yo.prototype.eo,1:yo.prototype.Rn,3:yo.prototype.Sn,4:yo.prototype.Tn};Xa(function(){for(var a=tb(document,"pcx86","serial"),b=0;ba.L||0>a.V)a.L=b.clientX,a.V=b.clientY;a.fa?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.L,d=b.clientY-a.V);a.L=b.clientX;a.V=b.clientY;a.Kf(c,d,a.L,a.V)}} +l.he=function(a,b){if(this.Hc&&this.F&&this.F.la.Ib){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case wn:if(this.aa!=b){this.aa=b;Ko(this,c);return}break;case 2:if(this.ea!=b){this.ea=b;Ko(this,c);return}}y(this,c+": ignored")}};l.Kf=function(a,b,c,d){this.Hc&&this.F&&this.F.la.Ib&&(a||b)&&(this.U=a,this.W=b,Ko(this,null,c,d))}; +function Ko(a,b,c,d){var e=64|(a.aa?32:0)|(a.ea?16:0)|(a.W&192)>>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.gg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.jg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b,"/")&& +(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; +function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.xg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= +m<<2,F=q.length;Fb;b++){if(128==cp(a,e,c+0,1)){d.bg=cp(a,e,c+8,4);(e=bp(a,d.bg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Eg=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Eg|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} +function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Eg,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} +function bp(a,b){var c=a.ub*a.lb,d=b/c|0;return dg)break;e|=g<=f)break;e+=String.fromCharCode(f)}return e}function gp(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Hl=b;a.Il=c;a.ud=a.Zc=0;a.Wa=!1;return a} +function hp(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;b+="&machine="+a.controller.gf();b+="&user="+a.controller.ie();return Ba()+"/api/v1/disk?"+b} +function op(a,b,c,d,e,f,g){if(a.N){var h;h="action=read&volume="+a.V;h+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.controller.gf());h+="&user="+a.controller.ie();Aa(Ba()+"/api/v1/disk?"+h,null,f,function(h,m,n){h=[b,c,d,e,f,g];var k=!1,q=h[0],A=h[1],F=h[2],C=h[3];if(!n){m=JSON.parse(m);for(k=0;C--;){var D=a.seek(q,A,F,!0);if(!D)break;kp(D,m,k);k+=D.length;F++}k=h[4]}(h=h[5])&&h(n,k)})}else g&&g(-1,!1)} +function pp(a,b,c,d,e,f,g){if(a.N){var h={};a.fa=!0;h.action="write";h.volume=a.V;h.chs=a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h.addr=b+":"+c+":"+d+":"+e;h.machine=a.controller.gf();h.user=a.controller.ie();h.data=JSON.stringify(f);Aa(Ba()+"/api/v1/disk",h,g,function(f,h,n){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],A=k[3],k=k[4];a.fa=!1;if(0<=f&&fb&&(b=0);2E3>2,e=Array(d),f=0;f>2,e=a.data;a=a.pattern;for(var f=0;f>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b>2,c=(d>((b&3)<<3)&255;return c}; +l.write=function(a,b,c){if(this.ff)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Zc?f=a.ud+a.Zc&&(a.Zc+=f-(a.ud+a.Zc)+1):(a.ud=f,a.Zc=1);d[f]=d[f]&~(255<=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.ff){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;kb?-2!=b&&this.controller.Na("Unable to restore disk '"+this.ga+": "+c):jp(this);return b}; +l.toJSON=function(){var a;a=0;for(var b;b=bp(this,a++);)up(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 up(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 vp(a){bb.call(this,"FDC",a,vp,524288);this.dmaRead=this.el;this.dmaWrite=this.fl;this.dmaFormat=this.vl;this.U=a.autoMount||null;this.fa=a.sortBy||"name";"none"==this.fa&&(this.fa=null);this.B=[];this.ia=!La("Mobi")&&window&&"FileReader"in window}jb(vp);aa={}; +var wp={3:{Ud:3,ge:0,name:aa.Fo},4:{Ud:2,ge:1,name:aa.Do},5:{Ud:9,ge:7,name:aa.Jo},6:{Ud:9,ge:7,name:aa.zo},7:{Ud:2,ge:0,name:aa.Bo},8:{Ud:1,ge:2,name:aa.Eo},10:{Ud:2,ge:7,name:aa.Ao},13:{Ud:6,ge:7,name:aa.wo},15:{Ud:3,ge:0,name:aa.Co}};l=vp.prototype; +l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)])? +(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[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;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; +l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;ag.za.restore(A)&&(h=!1);h&&g.za&&void 0!==g.eb&&(g.pb=g.za.seek(g.Qb,g.kb,g.xb));h||(e=!1)}a.W=b[c++]||0;a.jc=b[c]||0;return e} +function Fp(a){var b=0,c=[];c[b++]=a.hb;c[b++]=0;c[b++]=a.ma;c[b++]=a.V;c[b++]=a.L;c[b++]=a.C;c[b++]=a.aa;for(var d=b++,e=0,f=[],g=0;gGp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){var f=a,g=c,h;for(h=0;ha.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Qf=f[1],a.Rf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; +function Cp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e=this.C&&(this.ma&=-81,this.L=this.C=0);return c}; +l.Jn=function(a,b,c){z(this)&&x(this,a,b,c,"DATA["+this.C+"]");this.C=wp[a].Ud){b=!1;this.L=0;a=Jp(this);var d,e,f,g,h=a&31;switch(h){case 3:Jp(this);Jp(this);Kp(this);break;case 4:c=Jp(this);this.hb=c&3;d=this.A[this.hb];Kp(this);Lp(this,(d.Cb&-16777216)>>>24);break;case 5:case 6:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];d.kb=b;c=d.Qb=Jp(this);e=Jp(this);f=d.xb=Jp(this);g=Jp(this);d.Hb=128<>2&1;this.hb=c&3;d= +this.A[this.hb];c=d.Qb;e=d.kb=b;f=d.xb=1;g=0;d.Cb=0;d.za&&(d.pb=d.za.seek(d.Qb,d.kb,d.xb))?g=d.pb.length>>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>2&1,c=Jp(this),d.Qb+=c-d.ee,0>d.Qb&&(d.Qb=0),d.Qb>=d.Bb&&(d.Qb=d.Bb-1),d.ee=c,d.Cb=32,d.Qb||(d.Cb|=268435456),Kp(this),b=!0}0>>8);Lp(a,(b.Cb&16711680)>>>16);var k=0;if(e!=b.Qb||f!=b.kb)k=g=1;c&128&&(f^=k,d||(k=0));Lp(a,e+k);Lp(a,f);Lp(a,g);Lp(a,h)}function Jp(a){var b=a.V[a.L];a.L++;return b}function Kp(a){a.L=a.C=0}function Lp(a,b){a.V[a.C++]=b}l.el=function(a,b,c){void 0===b||0>b?this.Le(a,c):c(-1,!1)};l.fl=function(a,b){return void 0!==b&&0<=b?Np(a,b):-1}; +l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; +function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Rf+1&&(a.xb=1,a.kb++,a.kb>=a.Qf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; +Xa(function(){for(var a=tb(document,"pcx86","fdc"),b=0;bk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.rg)));A||(e=!1);null!=a.pa&& +1>=d&&(a.pa|=(f.type&3)<<(1-d<<1))}0<=a.hb&&(a.B=a.A[a.hb]);return e} +function Yp(a){var b=0,c=[];a.ia?(c[b++]=a.W,c[b++]=a.Pa,c[b++]=a.aa,c[b++]=a.Ca,c[b++]=a.ya,c[b++]=a.va,c[b++]=a.ra,c[b++]=a.ma,c[b++]=a.Da,c[b++]=[a.fa,a.hb]):(c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.V,c[b++]=a.L,c[b++]=a.C,c[b++]=a.Oa,c[b++]=a.Ka,c[b++]=a.Ja,c[b++]=a.ka);for(var d=0,e=[],f=0;f=this.C&&(this.L=this.C=0,this.ma&=-15);return c};l.ho=function(a,b,c){x(this,a,b,c,"DATA["+this.C+"]");this.C=a&&(this.ma|=2,this.ma&=-2,$p(this))};l.Mm=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.L=a.B.Va?(a.ma=128,a.Le(a.B,function(b){0<=b?(bq(a),a.N&&5180==a.N.ja&&(a.ma=0),a.ma|=88):(a.ma=1,a.W=16)},!1)):a.ma=80));return d}l.il=function(a,b){return aq(this,a,b)|aq(this,a,b)<<8}; +function cq(a,b,c,d){if(a.B&&a.B.Hb>=a.B.Va)if(0>dq(a.B,c))a.ma=1,a.W=16;else if(1==a.B.eb||a.B.eb==a.B.Va)z(a,1048832)&&x(a,b,c,d,"DATA["+a.B.eb+"]"),1=a.B.Va&&(a.ma|=8))}l.qn=function(a,b,c){cq(this,a,b&255,c);cq(this,a,b>>8&255,c)};l.Sl=function(a,b){var c=this.W;x(this,a,null,b,"ERROR",c);return c};l.vn=function(a,b,c){x(this,a,b,c,"WPREC");this.Pa=b};l.Ul=function(a,b){var c=this.aa;x(this,a,null,b,"SECCNT",c);return c}; +l.tn=function(a,b,c){x(this,a,b,c,"SECCNT");this.aa=b};l.Vl=function(a,b){var c=this.Ca;x(this,a,null,b,"SECNUM",c);return c};l.un=function(a,b,c){x(this,a,b,c,"SECNUM");this.Ca=b};l.Ql=function(a,b){var c=this.ya;x(this,a,null,b,"CYLLO",c);return c};l.pn=function(a,b,c){x(this,a,b,c,"CYLLO");this.ya=b};l.Pl=function(a,b){var c=this.va;x(this,a,null,b,"CYLHI",c);return c};l.on=function(a,b,c){x(this,a,b,c,"CYLHI");this.va=b};l.Rl=function(a,b){var c=this.ra;x(this,a,null,b,"DRVHD",c);return c}; +l.rn=function(a,b,c){x(this,a,b,c,"DRVHD");this.ra=b;this.ma=this.A[this.ra&16?1:0]?this.ma|80:this.ma&-65};l.Wl=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.ma&64&&(this.ma&=-129);return c};l.nn=function(a,b,c){x(this,a,b,c,"COMMAND");this.Da=b;this.N&&lg(this.N,14);eq(this)};l.sn=function(a,b,c){x(this,a,b,c,"FDR");this.fa&4&&!(b&4)&&(this.W=1);this.fa=b}; +function eq(a){var b=!1,c=a.Da,d=a.ra&16?1:0,e=a.ra&15,f=a.ya|(a.va&3)<<8,g=a.Ca,h=a.aa||256;a.hb=-1;a.B=null;a.W=0;a.ma=80;var k=a.A[d];k?(k.be=f,k.kb=e,k.xb=g,k.Hb=h*k.Va,c=144<=c?c:c&240,k.pb=null,k.eb=0,k.errorCode=0,a.hb=d,a.B=k):c=-1;switch(c&240){case 16:b=!0;break;case 32:a.ma=128;a.Le(k,function(b){0<=b&&a.N?(bq(a),a.ma=88):(a.ma=1,a.W=16)},!1);break;case 48:a.ma=8;break;case 64:b=!0;break;case 112:b=!0;break;case 144:a.W=1;b=!0;break;case 145:k.ub=e+1,k.lb=h,b=!0}b&&bq(a)} +function bq(a){!a.N||a.fa&2||mg(a.N,14,120)} +function $p(a){a.L=0;var b=fq(a),c=fq(a),d=c&32,e=d>>5,f=c&31,g=fq(a),h=fq(a),k=g<<2&768|h,m=g&63,n=fq(a),t=fq(a),q=a.A[e];q&&(q.be=k,q.kb=f,q.xb=m,q.Hb=n*q.Va);switch(b){case 3:gq(a,q?q.errorCode:4);hq(a,c);hq(a,g);hq(a,h);hq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=fq(a));)q&&cb?this.Le(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?dq(a,b):-1}; +l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a}; +function iq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaRead",b);ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function jq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaWrite",b);ul(a.N,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)} +function kq(a,b,c){b.errorCode=4;b.Ue&&b.Ue.length==b.Hb||(b.Ue=Array(b.Hb));b.eb=0;a.N?(b.errorCode=0,Cl(a.N,3,a,"dmaWriteBuffer",b),ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)} +l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.rg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; +function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.rg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.rg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; +var Tp={800:Pp.prototype.Lm,801:Pp.prototype.Mm,802:Pp.prototype.Km},Sp={496:Pp.prototype.il,497:Pp.prototype.Sl,498:Pp.prototype.Ul,499:Pp.prototype.Vl,500:Pp.prototype.Ql,501:Pp.prototype.Pl,502:Pp.prototype.Rl,503:Pp.prototype.Wl},Vp={800:Pp.prototype.ho,801:Pp.prototype.ko,802:Pp.prototype.jo,803:Pp.prototype.io,807:Pp.prototype.pi,811:Pp.prototype.pi,815:Pp.prototype.pi},Up={496:Pp.prototype.qn,497:Pp.prototype.vn,498:Pp.prototype.tn,499:Pp.prototype.un,500:Pp.prototype.pn,501:Pp.prototype.on, +502:Pp.prototype.rn,503:Pp.prototype.nn,1014:Pp.prototype.sn};Xa(function(){for(var a=tb(document,"pcx86","hdc"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};mq.prototype.oh=function(){return-1};mq.prototype.ph=function(){}; +mq.prototype.Pk=function(a,b){return a.replace("["+b+"]","unimplemented")};mq.prototype.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.va?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; +function oq(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 pq(a,b,c){var d;if(b){b=qq(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0>2;this.Ba=b.Dg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, +b,2),d.O("dumpSel("+v(a?a.Z:b)+"): %"+r(a?a.Xb:null,d.Da)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Sq[a.type];e&&(c=e[0],b=e[1])}!c||a.wb&32768||(c+=",not present");d.O((b?"seg="+v(a.Aa&65535)+" off="+v(a.Ta):"base="+r(a.Aa,d.Da)+" limit="+Tq(a.Ta))+" type="+u(a.type>>8)+" ("+c+") ext="+v(a.ext&-65296)+ +" dpl="+u(a.Gc))}}else d.O("no selector")});Qk(this,134217728,function(a){var b;(a=a[0])&&(b=rq(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+v(b)+")");b;){a=wq(d,0,b);var c=d.Qa(a,1),e=d.na(a,2),k=d.na(a,5);if(77!=c&&90!=c)break;d.O(Uq(0,b)+": '"+String.fromCharCode(c)+"' PID="+v(e)+" LEN="+v(k)+' "'+Vq(d,a,8)+'"');b+=1+k}});Qk(this,128,function(a){Qq(d,d.F.sa,a[0],d.F.sa!==d.F.kd)});Qk(this,8,function(a){a:{if(a=a[0]){var b=rq(d,a);if(void 0===b){d.O("invalid task selector: "+a); +break a}a=Rq(d,b,2)}else a=d.F.Sa;d.O("dumpTSS("+v(a?a.Z:b)+"): %"+r(a?a.Aa:null,d.Da));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Wq:Xq,m,n,t,q;for(q in k)m=k[q],n=a.Aa+m,t=Qf(d.F,n,2),2304==c&&(t|=Qf(d.F,n+2,2)<<16),b&&(b+="\n"),b+=v(m)+" "+pa(q+":",11)+r(t,e);if(2304==c)for(q=0,m=t>>>16;mq;)n=a.Aa+m,t=Qf(d.F,n,2),b+="\n"+v(m)+" ports "+v(q)+"-"+v(q+15)+": "+ha(t,2),q+=16,m+=2;d.O(b)}}});this.L=null;this.sb=0;this.fb=!1;lf(this.F,48,this.Qm.bind(this));lf(this.F,65,this.Rm.bind(this)); +this.ka=null;lf(this.F,104,this.Sm.bind(this));xb(this)};function Yq(a,b,c,d,e,f){b=Vq(a,b);var g=Rq(a,d),g=g?g.Ta+1:0,h=(e?"_CODE":"_DATA")+r(c,2);f&&z(a,128)&&a.message(b+" "+(e?"code":"data")+"("+r(c,4)+")=#"+r(d,4)+" len "+r(g));e=Zq(a,b,c);e[b+h]=0;fm(a,b,c,d,0,null,g,e)} +function $q(a,b,c,d){var e=a.na(b,2),f=a.na(b,2),g=a.oa(b,4),h=a.oa(b,4),k=wq(a,a.oa(b,4),a.na(b,2));b=wq(a,a.oa(b,4),a.na(b,2));b=Vq(a,b).toUpperCase();var k=Vq(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+r(e,2);d&&z(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+r(e,4)+")="+r(f,4)+":"+r(g)+" len "+r(h));c=Zq(a,k,e);c[k+m]=g;fm(a,k,e,f,g,null,h,c)}function ar(a,b,c){c=Vq(a,c).toUpperCase();br(a,c,b)} +l.Qm=function(){var a=this.F;if(null!=this.L&&2752554==a.G){var b=a.M&65535,c=a.K&65535,d=wq(this,J(a)+12,a.ta.Z);switch(this.oa(d)){case 336:$q(this,wq(this,a.H,b),!c,!!this.L)}}return!0}; +l.Rm=function(a){var b=this.F,c=b.G&65535,d=b.H&65535,e=b.I&65535,f=b.M&65535,g=b.K&65535,h=b.J&65535,k=b.Xa.Z;if(null==this.L)return 79==c&&mf(b,a,function(a){return function(){62342!=(b.G&65535)?(b.G=b.G&-65536|62342,y(a,"INT 0x41 handling enabled",128),a.L=!0):(y(a,"INT 0x41 monitoring enabled",128),a.L=!1)}}(this)),!0;switch(c){case 79:this.L&&(b.G=b.G&-65536|62342,y(this,"INT 0x41 handling enabled",128));break;case 80:Yq(this,wq(this,h,k),d+1,e,!(g&1),!!this.L);break;case 82:br(this,null,d); +break;case 127:this.L&&(b.G=b.G&-65536|(this.fb?0:1));break;case 131:this.L&&(a=wq(this,b.M,e),this.sb++?(this.O("TRAPFAULT failed"),cr(this,this.B,a,!0,!0),this.sb=0,this.Wb()):(this.O("INT 0x41 TRAPFAULT: fault="+v(d)+" error="+r(b.K,8,!0)+" addr="+dr(a)),this.Rd(this.B,a,!0),yq(this,!0)));break;case 141:this.L&&(b.G=b.G&-65536|1);break;case 336:$q(this,wq(this,b.H,f),!g,!!this.L);break;case 338:ar(this,d,wq(this,b.J,f))}this.fb=!1;return!this.L}; +l.Sm=function(a){var b=this.F,c=b.G&255,d=b.G>>8&255,e=b.H&65535,f=b.I&65535,g=b.M&65535,h=b.J&65535,k=b.Xa.Z;if(null==this.ka){if(67==d){if(609437257==b.oa((b.wa.Z<<4)+10)||1111835735==b.oa((b.wa.Z<<4)+95))return!0;mf(b,a,function(a){return function(){62342!=(b.G&65535)?(b.G=b.G&-65536|62342,y(a,"INT 0x68 handling enabled",128),a.L=a.ka=!0):(y(a,"INT 0x68 monitoring enabled",128),a.ka=!1)}}(this))}return!0}switch(d){case 67:this.ka&&(b.G=b.G&-65536|62342);break;case 68:this.ka&&(a=md(b.wa,this.rl.bind(this)))&& +(b.J=a[0],Bd(b,a[1]));break;case 72:br(this,null,e);break;case 80:32==c?Yq(this,wq(this,h,k),0,f,!0,!!this.ka):128>c?Yq(this,wq(this,h,k),e+1,c&64?g:f,!(c&1),!!this.ka):$q(this,wq(this,h,k),!(c&1),!!this.ka),this.ka&&(b.G=b.G&-256|1)}return!this.ka};l.rl=function(){var a=this.F;5==(a.G&255)&&(a.I=a.K=0,a.G=a.G&-256|1);return!1}; +l.Pb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Ka=this.qa[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Aq(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A>>0)+1;a.wb=f;a.type=g;a.ext=k;a.Xb=d;ld(a,!0,!0,!1)}}return a}l.cc=function(a,b,c){var d=a&&a.Ea;if(null==d&&(d=-1,a)){var e=Rq(this,a.Z,a.type);e&&(b=a.Ra||0,c=c||1,d=e=-1===e.Xb||e.bd&&(b>>>0)+c>e.Zb||!e.bd&&(b>>>0)+c<=e.Zb?e.Aa+b|0:-1,a.Ea=d)}return d};l.Qa=function(a,b){var c=255,d=this.cc(a,!1,1);-1!==d&&(c=Qf(this.F,d,1,5==a.type)|0,b&&fr(this,a,b));return c}; +l.tb=function(a,b){return a.Rb?this.oa(a,b?4:0):this.na(a,b?2:0)};l.na=function(a,b){var c=65535,d=this.cc(a,!1,2);-1!==d&&(c=Qf(this.F,d,2,5==a.type),b&&fr(this,a,b));return c};l.oa=function(a,b){var c=-1,d=this.cc(a,!1,4);-1!==d&&(c=Qf(this.F,d,4,5==a.type),b&&fr(this,a,b));return c};l.qc=function(a,b,c,d){var e=this.cc(a,!0,1);if(-1!==e){if(5!=a.type)this.F.qc(e,b);else{var f=this.ga;f.sa[(e&f.Gb)>>>f.La].xf(e&f.A,b&255,e)}c&&fr(this,a,c);d||ad(this.F,!0)}}; +l.jb=function(a,b,c){var d=this.cc(a,!0,2);-1!==d&&(5!=a.type?this.F.jb(d,b):nc(this.ga,d,b),c&&fr(this,a,c),ad(this.F,!0))};function wq(a,b,c,d,e,f,g){return gr(a,{},b,c,d,e,f,g)}function gr(a,b,c,d,e,f,g,h){b.Ra=c||0;b.Z=d;b.Ea=e;b.type=f||(er(a)?2:1);b.Rb=null!=g?g:a.F&&4==a.F.wa.ba;b.oc=null!=h?h:a.F&&4==a.F.wa.Tc;b.Vd=!1;return b}function hr(a){return[a.Ra,a.Z,a.Ea,a.Vd,a.Rb,a.oc,a.Ve,a.jh]}function ir(a){return{Ra:a[0],Z:a[1],Ea:a[2],Vd:a[3],Rb:a[4],oc:a[5],Ve:a[6],jh:a[7]}} +function jr(a,b,c){if(null!=b.Z&&(a=Rq(a,b.Z,b.type))){var d=b.Ra&a.Ba;if(!a.bd){if(d>>>0>=a.Zb)return!1}else if(d>>>0f?null!=h?(g=pq(a,b,void 0),f=null):(f=pq(a,b,void 0),null==f&&(g=null)):(h=pq(a,b.substring(0,f),void 0),g=pq(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=wq(a,g,h,f,c),d||jr(a,e,!0)||(a.O("invalid offset: "+dr(e)),e=null));return e}function lr(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.ll=a.Ng(b.Sk=c[2]))}l.Pk=function(a,b){var c=kr(this,b);return a.replace("["+b+"]",c?r(this.tb(c),c.Rb?8:4):"undefined")}; +function fr(a,b,c){c=c||1;null!=b.Ea&&(b.Ea+=c);null!=b.Z&&(b.Ra+=c,jr(a,b)||(b.Ra=0,b.Ea=null))}function Uq(a,b,c){return null!=b?r(b,4)+":"+r(a,a&-65536||c?8:4):r(a)}function dr(a){var b;switch(a.type){case 1:case 3:b="&";break;case 2:b="#";break;case 4:b="%";break;case 5:b="%%";break;default:b=a.Z?"":"%"}return 4<=a.type||null==a.Z?b+r(a.Ea):b+Uq(a.Ra,a.Z,a.oc)} +function Vq(a,b,c){var d="";for(c=c||256;d.length>>a.F.La;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&5==d.type&&(d=Nc(a.F,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=Yb[c],6==c&&(d=d.Bd,h+=" -> "+Yb[d.type]),d&&a.O(r(d.id,8)+" %"+r(f<c&&(c=ya(Iq,a.substr(b,2))));return c}; +function nr(a,b){var c=0,d=a.ph(b);if(null!=d)switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 22:case 16:case 17:case 18:case 19:case 20:case 21:c=4;break;case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 56:c=8;break;case 23:c=a.Ja}return c?r(d,c):"??"} +l.ph=function(a){var b;if(0<=a){var c=this.F;switch(a){case 0:b=c.G&255;break;case 1:b=c.I&255;break;case 2:b=c.M&255;break;case 3:b=c.H&255;break;case 4:b=c.G>>8&255;break;case 5:b=c.I>>8&255;break;case 6:b=c.M>>8&255;break;case 7:b=c.H>>8&255;break;case 8:b=c.G&65535;break;case 9:b=c.I&65535;break;case 10:b=c.M&65535;break;case 11:b=c.H&65535;break;case 12:b=J(c)&65535;break;case 13:b=c.P&65535;break;case 14:b=c.K&65535;break;case 15:b=c.J&65535;break;case 22:b=M(c)&65535;break;case 23:b=Cd(c); +break;case 16:b=c.Xa.Z;break;case 17:b=c.wa.Z;break;case 18:b=c.ta.Z;break;case 19:b=c.vb.Z;break;default:if(80286==this.F.ja)32==a&&(b=c.$a);else if(80386<=this.F.ja)switch(a){case 24:b=c.G;break;case 25:b=c.I;break;case 26:b=c.M;break;case 27:b=c.H;break;case 28:b=J(c);break;case 29:b=c.P;break;case 30:b=c.K;break;case 31:b=c.J;break;case 32:b=c.$a;break;case 33:b=c.ti;break;case 34:b=c.se;break;case 35:b=c.Od;break;case 20:b=c.Nb.Z;break;case 21:b=c.Ob.Z;break;case 56:b=M(c)}}}return b}; +function or(a,b){b=qq(a,b);for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.oh(b,c+1),0<=e&&(b=b.substr(0,c)+nr(a,e)+b.substr(c+1+Iq[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ea(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=kr(a,e))?(d=e+' "'+Vq(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=kr(a,e))?(fr(a,d),d= +e+' "'+Vq(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+dr(wq(this,M(this.F),this.F.wa.Z))+" (%"+r(this.F.Ha)+")");this.Pa&&a==this.Pa||(this.Pa=a,this.wc&-2147483648&&(this.Wb(),a+=" (cpu halted)"),this.O(a),this.F&&(a=this.F,a.fb-=a.A,a.A=0,a.Y.mf=0,ad(a)))}; +function pk(a,b,c,d){var e,f;if(!d&&(d=z(a,1)&&0>Cq.indexOf(b),!d)){var g=Bq[b];g&&(d=z(a,g)?!0:524288==g&&z(a,g=1048576))}d&&(e=a.F.G>>8&255,f=a.F.M&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Db[b])&&g[e]||"")&&(g=" "+or(a,g)),a.message("INT "+u(b)+": AH="+u(e)+" at "+Uq(c-2-a.F.wa.Aa,a.F.wa.Z)+g));return d} +function ub(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.wc&h)==h)h=null,null!=e&&(h=a.F.wa.Z,e-=a.F.wa.Aa),a.message(b.xd+"."+(null!=d?"outPort":"inPort")+"("+v(c)+","+(f?f:"unknown")+(null!=d?","+u(d):"")+")"+(null!=g?": "+u(g):"")+(null!=e?" at "+Uq(e,h):""))}l.qh=function(){this.O("Type ? for help with PCx86 Debugger commands");this.pd();if(this.qb){var a=this.qb;this.qb=null;Aq(this,a)}}; +function yq(a,b){var c;if(ag(a)){if(!a.ia||!a.ia.length){a.ia=Array(1E3);for(c=0;c>>f.La].Rd(e&f.Fa,a==this.fa);g&&Xb(f)}}d&&(a.push(b),c?(null!=b.Ea&&(b.Z=null),b.Vd=!0):(ur(this,a,a.length-1,"set"),yq(this)));return d}; +function cr(a,b,c,d,e){for(var f=!1,g=vr(a,a.cc(c)),h=1;h>3&7,A=(3>(g>>6&3)?0:48)+q;(217==f||219==f)&&52<=A&&(A=q<<4|g&7);(q=Oq[f])&&(t=q[A]);t&&(n=Fq,k=t,m=k[0])}m>=n.length&&(g=a.Qa(b,1),k=Pq[m-n.length][g>>3&7],m=k[0]);n=n[m];q=k.length-1;t="";b.Rb&&(18==m? +n="CWDE":28==m?n="CDQ":104<=m&&107>=m&&(n+="D"));if(164<=f&&167>=f||170<=f&&175>=f)q=0,b.Rb&&"W"==n.slice(-1)&&(n=n.slice(0,-1)+"D");for(var f=-1,A=!0,F=1;F<=q;F++){var C,D;C="";D=k[F];if(void 0!==D){0>f&&(f=D>>14);80==m&&(2==f?t="[%800]":3==f&&(t="ES:["+(b.oc?"E":"")+"DI]"));var L=D&15;if(L)if(8==L)A=!1;else{var G=D&240;if(128<=G)if(0>g&&(g=a.Qa(b,1)),160>G){G=a;C=D;var ga=q;D=b;var S="",ab=g>>6,la=g&7;if(3>ab){L=!n.indexOf("FI");if(!ab&&(!D.oc&&6==la||D.oc&&5==la))ab=2;else{if(D.oc)if(4!=la)la+= +8;else{var S=G,Ja=ab,Da=D,Wa=S.Qa(Da,1),Ka=Wa>>6,Vb=Wa>>3&7,Wa=Wa&7,Pa="";if(Ja||5!=Wa)Pa=Jq[Wa+8];4!=Vb&&(Pa&&(Pa+="+"),Pa+=Jq[Vb+8],Ka&&(Pa+="*"+(1<>24),2)):S+("+"+r(G,2))):2==ab&&(S&&(S+="+"),D.oc?(G=G.oa(D,4),S+=r(G)):(G=G.na(D,2),S+=r(G,4)));S="["+S+"]";if(1==ga){G="";C&=15;4==C&&(C=D.Rb?5:3);switch(C){case 7:G="FAR";break;case 1:G="BYTE";break;case 3:if(L){G="INT16";break}G="WORD"; +break;case 5:G="DWORD";break;case 11:if(L){G="INT32";break}case 11:G="REAL32";break;case 12:if(L){G="INT64";break}case 12:G="REAL64";break;case 13:G="REAL80";break;case 14:G="BCD80"}G&&(S=G+" "+S)}}else S=zr(G,la,C,D);C=S}else C=160==G?zr(a,g&7,D,b):zr(a,g>>3&7,D,b);else if(16==G)C="1";else if(G)32==G?(b.oc?(C=8,D=a.oa(b,4)):(C=4,D=a.na(b,2)),C="["+r(D,C)+"]"):48==G?(C=1==L?a.Qa(b,1)<<24>>24:a.tb(b,!0),D=b.Ra+C&(b.Rb?-1:65535),C=r(D,b.Rb?8:4),D=Ar(a,wq(a,D,b.Z)),D[0]&&(C+=" ("+D[0]+")")):96==G?C= +9==L?"ST":10==L?"ST("+(g&7)+")":zr(a,(D&3840)>>8,D,b):112==G?C=zr(a,(D&3840)>>8,192,b):64==G?C="DS:[SI]":80==G&&(C="ES:[DI]");else{C=a;L=D;G=b;D=" ";switch(L&15){case 1:L&12288&&(D=r(C.Qa(G,1),2));break;case 2:D=r(C.Qa(G,1)<<24>>24,G.Rb?8:4);break;case 4:if(G.Rb){D=r(C.oa(G,4));break}case 3:D=r(C.na(G,2),4);break;case 7:G=wq(C,C.tb(G,!0),C.na(G,2),null,G.type,G.Rb,G.oc);D=dr(G);C=Ar(C,G);C[0]&&(D+=" ("+C[0]+")");break;default:D="imm("+v(L)+")"}C=D}if(!C||!C.length){t="INVALID";break}0a.F.ja)return"??";b+=16}else if(208==e)b+=32;else if(224==e)b+=40;else if(240==e)b+=48;else if(a=c&15,3<=a&&(8>b&&(b+=8),5==a||4==a&&d.Rb))b+=16;return Iq[b]} +function Cr(a,b){switch(b){case "V":a=Cf(a.F);break;case "D":a=a.F.ca&1024;break;case "I":a=a.F.ca&512;break;case "T":a=a.F.ca&256;break;case "S":a=Bf(a.F);break;case "Z":a=Af(a.F);break;case "A":a=zf(a.F);break;case "P":a=yf(a.F);break;case "C":a=xf(a.F);break;default:a=0}return b+(a?"1":"0")+" "}function Tq(a){return r(a,a&-65536?8:4)}function Dr(a,b){8<=b&&15>=b&&4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", +null,a.F.Mc,a.F.Sd)+" ";c=c+(d+" "+e)+Dr(a,32);80386<=a.F.ja&&(c+=Dr(a,34)+Dr(a,35))}else 80386<=a.F.ja&&(c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+" ");return c+=Dr(a,23)+Cr(a,"V")+Cr(a,"D")+Cr(a,"I")+Cr(a,"T")+Cr(a,"S")+Cr(a,"Z")+Cr(a,"A")+Cr(a,"P")+Cr(a,"C")}l.lj=function(a,b){return a[0]>b[0]?1:a[0]>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({jg:b,dn:c,Z:d,Ra:e,Ea:f,Vm:g,Qd:h,Xi:m})} +function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Ea;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&fc?(a.O("out of data at address "+dr(b)),n=!0):(a.qc(b,c,1,!0),m++)})})(a,g);ad(a.F, +!0);a.O(m+" bytes read at "+b)}else a.O("sector "+e+" request out of range");else a.O("drive "+d+" not loaded");else a.O("invalid drive: "+d)}else a.O("disk controller not present")}}else a.O("load commands:"),a.O("\tl [address] [drive #] [sector #] [# sectors]")} +function qr(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Tb&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1f;f++){var g=c,e=null;if(f=a.Ja&&(h=null);switch(h){case "AL":a.F.G=a.F.G& +-256|g&255;break;case "AH":a.F.G=a.F.G&-65281|g<<8&255;break;case "AX":a.F.G=a.F.G&-65536|g&65535;break;case "BL":a.F.H=a.F.H&-256|g&255;break;case "BH":a.F.H=a.F.H&-65281|g<<8&255;break;case "BX":a.F.H=a.F.H&-65536|g&65535;break;case "CL":a.F.I=a.F.I&-256|g&255;break;case "CH":a.F.I=a.F.I&-65281|g<<8&255;break;case "CX":a.F.I=a.F.I&-65536|g&65535;break;case "DL":a.F.M=a.F.M&-256|g&255;break;case "DH":a.F.M=a.F.M&-65281|g<<8&255;break;case "DX":a.F.M=a.F.M&-65536|g&65535;break;case "SP":I(a.F,J(a.F)& +-65536|g&65535);break;case "BP":a.F.P=a.F.P&-65536|g&65535;break;case "SI":a.F.K=a.F.K&-65536|g&65535;break;case "DI":a.F.J=a.F.J&-65536|g&65535;break;case "DS":Ad(a.F,g);break;case "ES":Bd(a.F,g);break;case "SS":ud(a.F,g);break;case "CS":sf(a.F,g);a.aa=wq(a,M(a.F),a.F.wa.Z);break;case "IP":case "EIP":O(a.F,g);a.aa=wq(a,M(a.F),a.F.wa.Z);break;case "PC":case "PS":Dd(a.F,g);break;case "C":g?Ef(a.F):Ff(a.F);break;case "P":g?(e=a.F,e.resultType&=-3,e.ca|=4):(e=a.F,e.resultType&=-3,e.ca&=-5);break;case "A":g? +Mf(a.F):Kf(a.F);break;case "Z":g?Nf(a.F):Lf(a.F);break;case "S":g?(e=a.F,e.resultType&=-17,e.ca|=128):(e=a.F,e.resultType&=-17,e.ca&=-129);break;case "I":g?(e=a.F,e.ca|=512):(e=a.F,e.ca&=-513);break;case "D":g?(e=a.F,e.ca|=1024):(e=a.F,e.ca&=-1025);break;case "V":g?Gf(a.F):Hf(a.F);break;default:var k=!0;if(80286<=a.F.ja)switch(k=!1,h){case "MS":Of(a.F,g);break;case "TR":-1===a.F.Sa.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.F.ja)switch(k=!1,h){case "EAX":a.F.G=g;break;case "EBX":a.F.H=g;break; +case "ECX":a.F.I=g;break;case "EDX":a.F.M=g;break;case "ESP":I(a.F,g);break;case "EBP":a.F.P=g;break;case "ESI":a.F.K=g;break;case "EDI":a.F.J=g;break;case "FS":a.F.Nb.load(g);break;case "GS":a.F.Ob.load(g);break;case "CR0":a.F.$a=g;uj.call(a.F,g);break;case "CR2":a.F.se=g;break;case "CR3":a.F.Od=g;Fd.call(a.F,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}ad(a.F);a.O("updated registers:")}}a.O(Gr(a,d));c&&(a.aa=wq(a,M(a.F),a.F.wa.Z),rr(a,dr(a.aa)))}} +function Nr(a,b){b=qa(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(or(a,c[2])):pq(a,b,!0)}function Or(a,b,c){for(var d=null,e=b.Ra,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.O(m)}h[3]&&(g=h[3],f=null);f=yr(a,b,g,f);b.jh||d||d++;a.O(f);a.aa=b;e-=b.Ea-k;c++}}} +l.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; +function xr(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.va&&(a.O("ended assemble at "+dr(a.ua)),a.aa=a.ua,a.va=!1),b="";else if(!c){var e=">> ";a.F.$a&1&&(e=a.F.ca&131072?"-- ":"## ");a.O(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.Pa=null;if(yb(a)&&0n||"z">>20;za.$i=a.F.Od+za.Jk;za.yb=ae.sa[(za.$i&ae.Gb)>>>ae.La];za.Aj=za.yb.Md(za.Jk);za.Kk=(Re&4190208)>>>10;za.aj=(za.Aj&-4096)+za.Kk;za.zb=ae.sa[(za.aj&ae.Gb)>>>ae.La];za.Bj=za.zb.Md(za.Kk);za.nl=(za.Bj&-4096)+(Re&4095)}if($d=za){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var od="%"+r(Re),od=od+(" %%"+mr($d.$i,$d.Aj)),od=od+(" %%"+mr($d.aj,$d.Bj,!0)), +od=od+(" %%"+r($d.nl));a.O(od)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==la){if("disk"==Ja){S[0]="l";S[1]="json";Mr(a,S);break a}for(ab in Eb)if(S[1]==ab){var yn=a.cb[ab];yn?(S.shift(),S.shift(),yn(S)):a.O("no dump registered for "+Ja);break a}Ja||(la=a.Cc||"db")}else a.Cc=la;if("dh"==la){var zn=Ja,An=Da,Bn="",Cn=0,Zb=a.Fa,sc=a.ia;if(sc.length){var Lb=+zn||a.Ub,Se=+An||10;isNaN(Lb)?Lb=Se:Bn="more ";Lb>sc.length&&(a.O("note: only "+sc.length+" available"),Lb=sc.length); +Zb-=Lb;0>Zb&&(null==sc[sc.length-1].Z?(Lb=Zb+Lb,Zb=0):Zb+=sc.length);var ii=[];"call"==An&&(Se=1E5,ii=["CALL"]);for(void 0!==zn&&a.O(Lb+" instructions earlier:");0=sc.length&&(Zb=0);a.Ub=Lb;Cn++;Se--}}Cn||(a.O("no "+Bn+"history available"),a.Ub=void 0)}else if("di"==la){S.shift(); +var ji=S[0];if(ji){var Ue=rq(a,ji);if(void 0===Ue||0>Ue||255>> +0,65536>4||1;ks--&&0qg?String.fromCharCode(qg):".";pg--}Ve&&(Ve+="\n");Ve+=Ja+" "+li+(0==Xe?" "+In:"")}Ve&&a.O(Ve);a.Db=be}}}}}break;case "e":if("else"==g[0])break;var rg=1,Jn=255,Kn=a.Qa,Ln=a.qc;"ew"== +g[0]&&(rg=2,Jn=65535,Kn=a.na,Ln=a.jb);var Mn=rg<<1,Nn=g[1];if(null==Nn)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var sg=kr(a,Nn);if(sg)for(var tg=2;tgri;){for(var tc=null,ps=256;Uc.Ra>>>0>>0;){$e.Ra=a.tb(Uc,!0);if(null==Uc.Ea||!ps--)break;$e.Z=Pn;if(tc=Or(a,$e))break;$e.Z=a.tb(Uc);if(tc=Or(a,$e,!0)){Pn=a.tb(Uc,!0);0\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.1","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; +function Zr(a,b){if(Ea("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.ie();b=b.toString();var d={app:"PCx86",ver:"1.30.1"};d.url=a.ua;d.user=c;d.type="bug";d.data=b;Aa("http://www.pcjs.org/api/v1/report",d,!0)}} +function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.1"),g=new qf(a,"1.30.1","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad>1,b.U+=(b.W>>1)-2,Pb(b,e),b.ra&&(b.N.restore(),b.ra=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.aa,0,0,a.aa.width,a.aa.height,a.sb,a.Jb,a.Ya,a.fb);a.Ja=!1}} +Xa(function(){for(var a=tb(document,"pcx86-machine"),b=0;bf.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>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$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+"...");Aa(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 k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);ts(a,b,c)}})}else c(a,null)} +function us(a,b,c,d){function e(a){if(void 0===h){var b=g&&tb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);k&&(--fs||Za(!0));k=!1}var g,h,k=!0;fs++;lb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=m:t.appendChild(document.createTextNode(m));n.appendChild(t)}c|| +(c="/versions/pcx86/1.30.1/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--fs||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gs(b,a,d,!0,e,m):hs(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return k}function vs(a,b,c,d){Za(!1);return us(a,b,c,d)}window.embedPC=vs;window.embedPCx86=vs;window.enableEvents=Za;window.sendEvent=$a; +function ws(a,b,c,d){if(!c&&b){d.push(b);a=lb[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Aa(b,null,!0,function(a,b){xs(b,d)}):xs(null,d)}else w("Error ("+c+") requesting "+a)} +function xs(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=lb[f],k={},m;for(m in h){var n=h[m],t=ka(m);if("xml"==t){for(t=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=t.exec(h[m]);){var q=d[2];q&&(h[q]||(n=n.replace(d[0],"")))}d=m=ja(m)}else"xsl"==t&&(e=m=ja(m));k[m]=n}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, +"©"),a=Na(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('
    \n')+"...\n",a=a+(' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + position:; + position:relative; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,resetAddr:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + device + ,name:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + serial + ,adapter:,binding:'',tabSize:,charBOL: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + + false + + + + + rom + ,addr:,size:,alias:,file:'',notify:'',writable: + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + true + + + + + ram + ,addr:,size:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + + diff --git a/versions/pdpjs/1.30.1/document.css b/versions/pdpjs/1.30.1/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pdpjs/1.30.1/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pdpjs/1.30.1/document.xsl b/versions/pdpjs/1.30.1/document.xsl new file mode 100644 index 000000000..9f15d0490 --- /dev/null +++ b/versions/pdpjs/1.30.1/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pdpjs/1.30.1/machine.xsl b/versions/pdpjs/1.30.1/machine.xsl new file mode 100644 index 000000000..06543edeb --- /dev/null +++ b/versions/pdpjs/1.30.1/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pdpjs/1.30.1/manifest.xsl b/versions/pdpjs/1.30.1/manifest.xsl new file mode 100644 index 000000000..f317ee493 --- /dev/null +++ b/versions/pdpjs/1.30.1/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pdpjs/1.30.1/outline.xsl b/versions/pdpjs/1.30.1/outline.xsl new file mode 100644 index 000000000..e42147bb2 --- /dev/null +++ b/versions/pdpjs/1.30.1/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js new file mode 100644 index 000000000..6b2032106 --- /dev/null +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -0,0 +1,230 @@ +(function(){var k; +function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} +function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function t(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.pb=this.id:(this.dc=this.id.substr(0,b),this.pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Hb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=w);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},x=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.B/this.Ca|0;this.C=this.w-1;this.Ra=[];this.F=null;this.Jb=this.Jc;a=new I;Bb(a,this.j);this.O=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ra[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} +function Db(a,b,c){var d=!1,e=this.controller,f=e.Ra[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ra[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} +function Eb(a,b){var c=-1,d=this.controller;(a=d.Ra[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} +function Fb(a,b,c){var d=!1,e=this.controller;if(a=e.Ra[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=Ab.prototype;k.reset=function(){this.F&&this.F()}; +k.Jc=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; +function Gb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ub+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ub){n=l.size-(f-m);n>g&&(n=g);l.Ub=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Ib(1,f,g)}f=new I(f,n,a.Ca,d,e);Bb(f,a.j,l);a.O[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Jb[d]+" at "+p(b,8,!0)),!0):Ib(2,b,c)} +k.jb=function(a){return this.O[(a&this.g)>>>this.ca].ub(a&this.f,a)};k.Ha=function(a){var b=a&this.f,c=(a&this.g)>>>this.ca;return b!=this.f?this.O[c].Bc(b,a):this.O[c++].ub(b,a)|this.O[c&this.C].ub(0,a+1)<<8};function Kb(a,b){var c=b&a.f,d=(b&a.g)>>>a.ca;return c!=a.f?a.O[d].kc(c,b):a.O[d++].Nb(c,b)|a.O[d&a.C].Nb(0,b+1)<<8}k.Rb=function(a,b){this.O[(a&this.g)>>>this.ca].Ab(a&this.f,b&255,a)}; +k.nb=function(a,b){var c=a&this.f,d=(a&this.g)>>>this.ca;c!=this.f?this.O[d].Ic(c,b&65535,a):(this.O[d++].Ab(c,b&255,a),this.O[d&this.C].Ab(0,b>>8&255,a+1))};function Lb(a){for(var b=0,c=[],d=0;d>5&3;c.xa=a>>1&15;c.Yb=a&257?a&1?6:4:0;Sb(c);a=c.F;a&1|256&&(b=this.b.lb&16?1:2);this.g.rb=this.g.rb&-8|b};k.Zc=function(){return Tb(this.b)};k.rd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.D|=128}; +function Vb(a){var b=a.C,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:256,mapped:0,maxblock:b.cb[f]*b.da[f],url:"rk"+f+".dsk"});b.R&=-129;switch(b.R>>1&7){case 0:b.Pb=2496;b.oa=0;b.R=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.cb[f]){b.oa|=32832;b.R|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.R|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;Wb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.cb[f])b.oa|= +32832,b.R|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.R|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;a.$b(b.ra[f],c,d,e);return}}b.Pb=f<<13|b.Pb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.R=b.R&65534|128;return!!(b.R&64)})}k.dd=function(a,b,c,d,e){var f=this.C;f.Ob=d&65535;f.R=f.R&-49|d>>12&48;f.Qb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.R|=49152;break;case 2:f.oa|=33792,f.R|=49152}L(this.b,20,5,144,function(){f.R=f.R&65534|128;return!!(f.R&64)})}; +function Xb(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.ed,drive:f,blocksize:128,mapped:1,maxblock:b.cb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Lc[f]|b.ab&64;break;case 3:1==(b.fa&3)&&(b.ab=b.fa&4?b.ab+(b.fa&65408)&65408|b.fa<<2&64:b.ab-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.ab);break;case 4:b.Wa=b.ab;break;case 5:if(b.fa>>6>=b.cb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* +b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;Wb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.cb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;a.$b(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +k.ed=function(a,b,c,d,e){var f=this.w;f.Gb=d&65535;f.M=f.M&-49|d>>12&48;f.Sa=d>>16&63;f.fa=~~(c/f.da[b.Ma])<<6|c%f.da[b.Ma];f.ab=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Yb(a){a=a.B;a.T=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.$a=a.nc=0} +function gc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.fd,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.bb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Qa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))* +c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;Wb(a,c.ra[b],d,e,f);return;case 57:if(c.Qa[b]>=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;a.$b(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} +k.fd=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.bb[0]);f.Ea[b.Ma]=e%f.bb[0]<<8|c%f.da[0];f.bc[b.Ma]=f.Qa[b.Ma]=d;f.mb|=1<=b.Vc-1&&(f.ta[b.Ma]|=1024);switch(a){case 1:f.Da|=512;f.T|=49152;break;case 2:f.Da|=2048,f.T|=49152}L(this.b,20,5,172,function(){f.ta[b.Ma]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; +function hc(a,b,c,d,e,f){var g=~~((f+c.Ta-1)/c.Ta),h=new XMLHttpRequest;2048>g&&d+2048g){b.jc(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.jc(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Va=0;this.C.R=128;this.w.M=128;Yb(this)}; +k.Kc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.D|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=M(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.P>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.P&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Pa[e]= +b),d=f.Pa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.P&2048?(0<=b&&(f.Pa[e]=b),d=f.Pa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.Ya;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.od&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.C;switch(a&-2){case 4194048:d=M(this,e.Pb,a,b,c);0<=d&&(e.Pb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.R,a,b,c);0<=b&&0<=d&&(e.R=d&-36993|e.R&36992,e.R&1&&Vb(this));break;case 4194054:d=M(this,e.Qb,a,b,c);0<=d&&(e.Qb=d);break;case 4194056:d=M(this,e.Ob,a,b,c);0<=d&&(e.Ob=d); +break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Cc,a,b,c);0<=d&&(e.Cc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?gc(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=M(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= +M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Yb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.ld[e];break;case 4193746:d=M(this,g.Dc,a,b,c);0<=d&&(g.Dc=d);break;case 4193748:d=M(this,g.Ec[e],a,b,c);0<=d&&(g.Ec[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.md[e];break;case 4193754:d=M(this,g.Fc[e],a,b,c);0<=d&& +(g.Fc[e]=d);break;case 4193756:d=M(this,g.Qa[e],a,b,c);0<=d&&(g.Qa[e]=d&511);break;case 4193758:g.bc[e]=g.Qa[e];d=g.bc[e];break;case 4193760:d=g.jd[e];break;case 4193762:d=g.kd[e];break;case 4193764:d=g.gd[e];break;case 4193766:d=g.hd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Sa= +e.Sa&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Xb(this));break;case 4192514:d=M(this,e.Gb,a,b,c);0<=d&&(e.Gb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Sa,a,b,c);0<=d&&(e.Sa=d&63,e.M=e.M&-49|(e.Sa&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Zb[0]=d&4?15:7,f.Zb[1]=d&2?15:7,f.Zb[3]= +d&1?15:7,f.Yb&&(e=2,f.lb&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.J|=16,f.L(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.na[0][e],a,b,c);0<=d&&(f.na[0][e]=d,f.na[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.na[1][e],a,b,c);0<=d&&(f.na[1][e]=d,f.na[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.ib)return f.L(4,234);e=a>>2&31;d=f.Sb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Sb[e]=a&2?d<<16|f.Sb[e]&65535:f.Sb[e]&4294901760|d&65534));break; +case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Ob[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,K.prototype.Xc,K.prototype.pd,"LKS"],kc[65402]=[null,null,K.prototype.Yc,K.prototype.qd,"MMR0"],kc[65534]=[null,null,K.prototype.Zc,K.prototype.rd,"PSW"],kc); +La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},$:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ma:function(a){var 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},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< +a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},Y:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.U)&&c.ja(!0)}return this.Nb(a,b)},ha:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.U)&&c.ja(!0)}return this.kc(a,b)},ua:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.F)&&d.ja(!0)}this.g?this.w(a, +b,c):this.Bb(a,b,c)},Aa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.F)&&d.ja(!0)}this.g?this.w(a,b,c):this.qc(a,b,c)},U:function(a){return this.f[a]},Z:function(a,b){a=this.f[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ea:function(a){return this.F.getUint16(a,!0)},la:function(a,b){a=a&1?this.f[a]|this.f[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a}, +qa:function(a,b){this.f[a]=b;this.Ua=!0},wa:function(a,b,c){this.f[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},za:function(a,b){this.F.setUint16(a,b,!0);this.Ua=!0},Ba:function(a,b,c){a&1?(this.f[a]=b,this.f[a+1]=b>>8):this.I[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Bb(a,b,c){a.j=b;a.K=a.C=0;c&&((a.K=c.K)&&xc(a,wc,!1),(a.C=c.C)&&vc(a,wc,!1))} +function zc(a,b){b?--a.C||(a.Ab=a.g?a.w:a.Bb,a.Ic=a.g?a.G:a.qc):--a.K||(a.ub=a.Nb,a.Bc=a.kc)}function vc(a,b,c){c&&a.C||(a.Ab=!a.g&&b[1]||a.w,a.Ic=!a.g&&b[3]||a.G);if(c||void 0===c)a.Bb=b[1]||a.w,a.qc=b[3]||a.G}function xc(a,b,c){c&&a.K||(a.ub=b[0]||a.N,a.Bc=b[2]||a.S);if(c||void 0===c)a.Nb=b[0]||a.N,a.kc=b[2]||a.S}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.$,I.prototype.xa,I.prototype.ma,I.prototype.pb],wc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa]; +if(xb)var tc=[I.prototype.U,I.prototype.qa,I.prototype.ea,I.prototype.za],sc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.fb=Math.round(this.Aa/1E4)/100;this.kb=this.fb*this.Xa;this.v.ga=!1;this.v.oc=!1;this.v.Eb=a.autoStart;this.v.uc=!1;this.v.qb=!1;this.Kb=this.ha=0;this.Lb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Wb=this.nd.bind(this);G(this)}y(Bc); +var Cc=["power","reset"];k=Bc.prototype;k.Oa=function(a,b,c,d){this.C=a;this.H=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ja(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Kb))}} +function Jc(a,b,c,d){if(a.K[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.ea||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} +k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ia)a=!0;else{var b=null,c,h=cb(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.fb*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.Tb()}Lc(a,a.U);a.U=0;a.S=ra();a.Z=0;Mc(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function hd(a){a.$-=a.b;a.b=0} +k.nd=function(){if(this.v.ga){this.ob>=this.Aa&&Mc(this,!0);this.ua=0;this.za=ra();if(this.Z){var a=this.za-this.Z;a>this.Ib&&(this.S+=a,this.S>this.za&&(this.S=this.za))}try{do{var b=fd(this,this.v.qb?1:this.Ba);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;gd(this,c);this.ua+=c;this.U+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Vb&&(this.C&&this.C.Fa(),this.Vb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.C&&this.C.stop(ra(), +Ic(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Wb;this.Z=ra();c=this.Ib;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.S;d&&(this.Y=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ea=0,Kc(this)));if(0>c||this.Yc&&(this.S-=c),c=0;this.ob+=this.ua;this.Z+=c;a(b,c)}}}; +k.yb=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.ga=!0;this.v.oc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.Tb(!0),this.C.start(this.S,Ic(this)));N(this,!0);setTimeout(this.Wb,0);return!0};k.zb=function(){return 0}; +k.ja=function(a){if(this.v.ga){hd(this);Lc(this,this.U);this.U=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Ic(this));N(this)}this.v.complete=a};function N(a,b){a.C&&a.C.Fa(b)} +function id(a){this.Wc=+a.model||1170;this.ic=a.resetAddr||0;Bc.call(this,a,6666667);this.Fb=0;this.decode=jd.bind(this);this.V=65536;this.W=32768;this.aa=65535;this.X=32768;this.P=15;this.u=[0,0,0,0,0,0,0,this.ic];this.Pa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, +0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.eb=this.G=this.I=this.D=0;this.ib=70;this.ma=-1;kd(this);this.v.complete=this.v.Oc=!1}y(id,Bc);k=id.prototype;k.reset=function(){this.v.ga&&this.ja();kd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +function kd(a){a.Za=255;a.J=0;a.mc=0;a.F=0;a.Ya=0;a.ac=0;a.lb=0;a.Yb=0;a.wa=0;a.Zb=[7,7,7,7];a.w=[];a.D|=2;Sb(a)}function Sb(a){a.Yb?(a.Cb=65536,a.ba=a.Sc):(a.Cb=0,a.ba=a.Rc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Lb(this.H));return a.data()}; +k.restore=function(a){var b=a[1];this.ea=b[1];Kc(this,b[3]);a:{b=this.H;a=a[2];var c;for(c=0;cb){a.w[f].La-=b;break}b-=a.w[f].La}a.w.splice(f+1,0,{La:b,Ac:c<<5&224,Hc:d,gc:e})}a.D|=2}function Tb(a){return a.P=a.P&63728|a.Na()|nd(a)|md(a)|ld(a)} +function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.Pa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Pa[c];a.Pa[c]=d}a.B=b>>14&3;c=a.P>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.D|=2;a.P=b}function P(a,b){a.D&128||(a.X=a.aa=b,a.W=0)}function rd(a,b,c){a.D&128||(a.X=a.aa=a.V=b,a.W=c||0)}function sd(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^b)&(d^b))}function td(a,b){a.D&128||(a.X=a.aa=a.V=b,a.W=a.X^a.V>>1)} +function ud(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Tb(this):this.B||(a=4,b=!0);this.F&57344||(this.Ya=63222,this.ac=a);this.B=0;var c=pd(this,a|65536),d=pd(this,a+2&65535|65536);Ub(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,c);this.D&=-113;this.ma=-1;throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);qd(a,b);Ub(a,c);a.D&=-17} +function ic(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Sb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function yd(a,b,c){var d,e,f,g=0;if(c&a.Yb){d=b>>13&a.Zb[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=ic(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.J|=32,a.L(4,12)),f&1&&!(c&1)&&(a.J|=64,a.L(4,14)));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.na[a.B][d]=e;if(4194170!==f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.L(168,16)),a.F&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=pd(a,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=pd(a,e)|g; +a.b-=8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=pd(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.D|=64));return e}k.Rc=function(a,b,c){return zd(this,a,b,c)};k.Sc=function(a,b,c){return yd(this,zd(this,a,b,c),c)}; +function Ad(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.B=a.P>>12&3,c=pd(a,d|c&65536),a.B=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.ya[a.P>>12&3];return c}function Bd(a,b,c,d){a.F&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.B=a.P>>12&3,e=yd(a,e|c&65536,4),a.B=a.P>>14&3,a.H.nb(e,d&65535)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.ya[a.P>>12&3]=d} +function Cd(a,b){b>>=6;var c=a.I=b&7;(b=a.G=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.G=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c}function Ed(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Gd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.eb=a.ba(b,e,7),c=d.call(a,c,a.H.jb(e)),e&1&&a.b--,a.H.Rb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),c=d.call(a,c,jc(a,e)),a.H.nb(e,c&65535)):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.H.Rb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function Id(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,d,4),a.H.nb(d,c&65535)):a.u[d]=c&65535;return c}function T(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.zb=function(a){this.v.complete=!0;var b=this.v.Oc=this.j&&Jd(this.j),c=a?this.v.oc?0:1:-1;this.v.oc=!1;this.$=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.ja();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.L(168,28):this.D&64?this.L(4,30):this.D&16&&this.L(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Ac,a=this.w[e],this.w.splice(e,1))}d>(this.P&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.L(a.Hc,26):this.L(160,26))}else this.D&1&&this.D++;this.F&57344||(this.Ya=0,this.ac=this.u[7]);this.D=this.D&7|this.P&16;this.decode(od(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a} +function Ud(a,b){a|=b;P(this,a<<8);return a}function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.D&128||(this.X=this.aa=a,this.W=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.X=this.aa=c,this.W=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.X=this.aa=a,this.W=a&(b^a));return a&65535} +function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.X=this.aa=c,this.W=c&(b<<8^c));return a&255}function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.V>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.V>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.V&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255} +function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535}function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.D&128||(this.X=this.aa=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} +function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.W=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.W=32768,this.V=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.g]} +var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.g]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.X=b>>16,this.aa=this.X|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Pe(a){R(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)}function Qe(a){R(this,a,Dd(this,a),je);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function jd(a){Re[a>>12].call(this,a)} +var Re=[function(a){Se[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? +2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.g? +4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},W],Se= +[function(a){Ve[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!nd(this))},function(a){T(this,a,nd(this))},function(a){T(this,a,!this.Na()==!md(this))},function(a){T(this,a,!this.Na()!=!md(this))},function(a){T(this,a,!nd(this)&&!this.Na()==!md(this))},function(a){T(this,a,nd(this)||!this.Na()!=!md(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){rd(this, +Id(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.g?11:6},function(a){R(this,a,ld(this)?1:0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=pd(this,a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, +0,b);P(this,b);this.b=c-se[this.g]},function(a){P(this,Id(this,a,this.Na?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.L(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.L(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},Pe,Pe,Pe,Pe],$e=[function(){this.P&49152?(this.J|=128,this.L(4, +3)):hd(this);this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.P&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.P&49152||(kd(this),this.H.reset());this.b-=667},function(){wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],bf=[ue,function(){this.V= +65536;this.b-=5},function(){this.W=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.X=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,Qe,Qe,W,W,W,W,ve,ve],Ue=[function(a){T(this,a,!this.Na())},function(a){T(this,a,this.Na())},function(a){T(this,a,!ld(this)&&!nd(this))},function(a){T(this,a,ld(this)||nd(this))},function(a){T(this,a,!md(this))},function(a){T(this,a,md(this))},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(){this.L(24,2); +this.b-=25},function(){this.L(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= +this.g?11:6},function(a){Q(this,a,ld(this)?1:0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.g?9:3+(7== +this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.g]},W];function gf(a){w.call(this,"ROM",a,gf);this.f=null;this.B=a.addr;this.g=a.size;this.F=a.writable;this.C=a.alias;this.w=a.file;this.G=da(this.w);if(this.w){a=this.w;var b=ea(this.G);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Oa=function(a,b,c,d){this.H=b;this.b=c;this.j=d;jf(this)};gf.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.G.push({xd:b,A:c,Tc:d,Ka:e,rc:f})}delete this.Ka}return!0};gf.prototype.Ia=function(){return!0}; +function hf(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){t("Empty ROM: "+ +b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].Bb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.C?b.push(a.C):null!=a.C&&a.C.length&&(b=a.C);for(c=0;c>> +e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.pb)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ia=function(a){return a?this.save():!0};k.reset=function(){of(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return of(this)};function of(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.G%a,this.Z&&(b=na("",c)));this.S&&!this.G&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.G+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.i(this.F), +this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.U)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.ad,Y.prototype.td,"RCSR"],pf[65394]=[null,null,Y.prototype.$c,Y.prototype.sd,"RBUF"],pf[65396]=[null,null,Y.prototype.cd,Y.prototype.vd,"XCSR"],pf[65398]=[null,null,Y.prototype.bd,Y.prototype.ud,"XBUF"],pf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.xc=function(){return-1};qf.prototype.yc=function(){}; +function sf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +function tf(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.la[b]);var c=0;for(b in a.la)xf(a,b,a.la[b]),c++;return 0>>d.H.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Jb[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].Nb(d&c.f,d),this.g--,b&&If(a,b));return c}; +k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Kb(this.H,d),this.g--,b&&If(a,b));return c};k.Rb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.H;e.O[(d&e.g)>>>e.ca].Bb(d&e.f,b&255,d);this.g--;c&&If(a,c);N(this.b,!0)}};k.nb=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.H,f=d&e.f,g=(d&e.g)>>>e.ca;f!=e.f?e.O[g].qc(f,b&65535,d):(e.O[g++].Bb(f,b&255,d),e.O[g&e.C].Bb(0,b>>8&255,d+1));this.g--;c&&If(a,c);N(this.b,!0)}}; +function Z(a){return{A:a,Ga:!1}}function Jf(a){return[a.A,a.Ga]}function Kf(a){return{A:a[0],Ga:a[1]}}function Hf(a,b,c){var d;c=(c?a.S:a.ob).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Pa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; +k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,hd(a),a.la=0,N(a))))}; +function Bf(a){var b;if(Jd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.U=["br"];if(a.F)for(b=1;b>>d.ca],!0);a.F=["bw"];a.Cb=0} +k.gb=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.H;f.O[e>>>f.ca].gb(e&f.f,a==this.F)}}d&&(a.push(b),c?b.Ga=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.F));h.Ga||Bf(a);break}}return f} +function Tf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Mf(z);break;case 8:v="@"+Mf(z);break;case 16:7>z?v="("+Mf(z)+ +")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Mf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Mf(z)+")";break;case 40:v="@-("+Mf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Mf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Mf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Pa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Yf(a));c&&(a.S=Z(d.u[7]),Pf(a,J(a,a.S.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Vf(a,b,g,f);a.i(f);a.S=b;e-=b.A-l;c++}}} +function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.S=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(ib(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Qc=[];"call"==Be&&(lb=1E5,Qc=["CALL"]);for(void 0!==Ae&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Fb=X;De++;lb--}}De||(a.i("no "+Ce+"history available"),a.Fb=void 0)}else{var Zb=Hf(a,ia);if(Zb){var $b=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),$b=wf(a,za)>>>0,65536<$b&&($b=65536));for(var nb="",Ra="dd"==Oa?4:"dw"==Oa?2:1,ac=Ra*$b||128,yg=ac+15>>4||1;yg--&&0bc?String.fromCharCode(bc):".";ac--}nb&&(nb+="\n");nb+=ia+" "+Sc+(0==pb?" "+Ge:"")}nb&&a.i(nb);a.ob=Zb}}}}break;case "e":if("else"==g[0])break;var Sa,Tc,Uc,Vc,Wc=g[0],Xc=g[1];"eb"==Wc?(Sa=1,Tc=255,Uc=a.jb,Vc=a.Rb):"e"==Wc||"ew"==Wc?(Sa=2,Tc=65535,Uc=a.Ha,Vc=a.nb):Xc=null;if(null==Xc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=Hf(a,Xc);if(cc)for(var dc=2;dc$c;){for(var Aa=null,Cg=256;65536>sb.A>>>0;){ad.A=a.Ha(sb,2);if(null==sb.A||!Cg--)break;if(!(ad.A&1)){for(var Dg=a,ec=ad,Ie=null,tb=ec.A, +Je=tb,bd=1;6>=bd&&tb;bd++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.I)){this.B=new O(this,"1.30.1","failsafe");jg(this.B)&&(og(this,d),a=2,pg(this.B));this.B.set("timestamp",sa());qg(this.B);var e=this.f&&!this.F;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.Eb());this.Y&&(og(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; +function og(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function eg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=cb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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);Jg(a,b,c)}})}else c(a,null)} +function Kg(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=ma(a))}function f(a){e("Error: "+a);l&&(--vg||Ta(!0));l=!1}var g,h,l=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Hg(c,null,null,!1,e,function(d,l){l?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--vg||Ta(!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),--vg||Ta(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,m):Ig(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Ta(!1);return Kg(a,b,c,d)};window.enableEvents=Ta;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js new file mode 100644 index 000000000..5453be8f6 --- /dev/null +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -0,0 +1,160 @@ +(function(){var k; +function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; +function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function p(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} +function va(a){if(ta)try{for(var b=0;bb?this.fb=this.id:(this.wb=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.nb=null;this.i.error=!1;this.w={};this.K=null;x.push(this)}var ya=void 0,za={}; +if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.m=this.o/this.g|0;this.H=this.m-1;this.qa=[];this.A=null;this.Xa=this.I;a=new G;Ma(a,this.K);this.b=Array(this.m);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Xa(b|4186112,-1,1)} +function Oa(a,b,c){var d=!1,e=this.controller,f=e.qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Xa(c|4186112,b,1)}function Pa(a,b){var c=-1,d=this.controller;(a=d.qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Xa(b|4186112,-1,0)} +function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.qa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.Xa(c|4186112,b,0)}La.prototype.reset=function(){this.A&&this.A()};La.prototype.I=function(){return 0};La.prototype.la=function(a,b){b||this.reset();return!0}; +function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Ta)return l.tb+=l.Ta-f,l.Ta=f,!0;if(f>=l.Ta+l.tb){q=l.size-(f-m);q>g&&(q=g);l.tb=f-l.Ta+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.j)>>>a.c].Za(b&a.h,b)} +function Wa(a,b,c){var d=b&a.h,e=(b&a.j)>>>a.c;d!=a.h?a.b[e].Hc(d,c&65535,b):(a.b[e++].Sa(d,c&255,b),a.b[e&a.H].Sa(0,c>>8&255,b+1))}function Xa(a){for(var b=0,c=[],d=0;d>5&3;c.hb=a>>1&15;c.ob=a&257?a&1?6:4:0;db(c);a=c.G;a&1|256&&(b=this.a.Ka&16?1:2);this.c.Na=this.c.Na&-8|b};k.lc=function(){return eb(this.a)};k.Ec=function(a){fb(this.a,a&-1809|eb(this.a)&1808);this.a.l|=128}; +function gb(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.ab=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ia[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;hb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ia[f])b.S|=32832, +b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;a.qb(b.T[f],c,d,e);return}}b.ab=f<<13|b.ab&8176|b.X%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.rc=function(a,b,c,d,e){var f=this.g;f.$a=d&65535;f.D=f.D&-49|d>>12&48;f.bb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function ib(a){var b=a.h,c,d,e,f=b.u>>8&3;b.u&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.sc,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.u>>1&7){case 2:b.xa&8&&(b.u&=63);b.xa=b.ac[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ia[f]){b.u|=37888;break}if((b.L&63)>=b.J[f]){b.u|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); +d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;hb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.u|=37888;else if((b.L&63)>=b.J[f])b.u|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;a.qb(b.T[f],c,d,e);return}}I(a.a,20,5,112,function(){b.u|=129;return!!(b.u&64)})} +k.sc=function(a,b,c,d,e){var f=this.h;f.Wa=d&65535;f.u=f.u&-49|d>>12&48;f.ra=d>>16&63;f.L=~~(c/f.J[b.ja])<<6|c%f.J[b.ja];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.u|=33792;break;case 2:f.u|=40960}I(this.a,20,5,112,function(){f.u|=129;return!!(f.u&64)})};function jb(a){a=a.j;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.Ma=a.Qa=a.Oa=a.Aa=a.Fb=0} +function kb(a,b){var c=a.j,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.tc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.sb[b]=c.ma[b];c.F|=32896;c.V[b]|=32896;c.Ma|=1<=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ +(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;hb(a,c.T[b],d,e,f);return;case 57:if(c.ma[b]>=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;a.qb(c.T[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} +k.tc=function(a,b,c,d,e){var f=this.j;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.ja]=e%f.Ha[0]<<8|c%f.J[0];f.sb[b.ja]=f.ma[b.ja]=d;f.Ma|=1<=b.ic-1&&(f.V[b.ja]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.V[b.ja]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function lb(a,b,c,d,e,f){var g=~~((f+c.sa-1)/c.sa),h=new XMLHttpRequest;2048>g&&d+2048g){b.Cb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Cb(0,b,c,d,e)}k.reset=function(){this.c.Na=this.c.Na&-120|20;this.b.wa=0;this.g.D=128;this.h.u=128;jb(this)}; +k.$b=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Eb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Eb=d;f.l|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.La[e]=b),d=f.La[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.La[e]=b),d=f.La[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.rb,a,b,c);0<=d&&(f.rb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Bc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.ab,a,b,c);0<=d&&(e.ab=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&gb(this));break;case 4194054:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194056:d=J(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194058:d=J(this,e.X,a,b,c);0<=d&&(e.X= +d);break;case 4194060:break;case 4194062:d=J(this,e.Sb,a,b,c);0<=d&&(e.Sb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.j;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?kb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= +J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&jb(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.Ma,a,b,c);0<=d&&(g.Ma=d&255);break;case 4193744:d=g.yc[e];break;case 4193746:d=J(this,g.Tb,a,b,c);0<=d&&(g.Tb=d);break;case 4193748:d=J(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.zc[e];break;case 4193754:d=J(this,g.Vb[e],a,b,c);0<=d&&(g.Vb[e]=d);break;case 4193756:d=J(this,g.ma[e],a,b,c);0<=d&&(g.ma[e]= +d&511);break;case 4193758:g.sb[e]=g.ma[e];d=g.sb[e];break;case 4193760:d=g.wc[e];break;case 4193762:d=g.xc[e];break;case 4193764:d=g.uc[e];break;case 4193766:d=g.vc[e];break;case 4193768:d=J(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Fb,a,b,c);0<=d&&(g.Fb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.u,a,b,c);0<=b&&0<=d&&(e.ra=e.ra&60|d>>4&3,e.u=e.u&-1023|d&1022,e.u&128||ib(this));break;case 4192514:d= +J(this,e.Wa,a,b,c);0<=d&&(e.Wa=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=J(this,e.ra,a,b,c);0<=d&&(e.ra=d&63,e.u=e.u&-49|(e.ra&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ka:(d=J(this,f.Ka,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ka=d,f.pb[0]=d&4?15:7,f.pb[1]=d&2?15:7,f.pb[3]=d&1?15:7,f.ob&&(e=2,f.Ka&16&&(e=1),this.c.Na=this.c.Na&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.cb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.cb[e]=a&2?d<<16|f.cb[e]&65535:f.cb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var ob={},cb=(ob[65382]=[null,null,H.prototype.jc,H.prototype.Cc,"LKS"],ob[65402]=[null,null,H.prototype.kc,H.prototype.Dc,"MMR0"],ob[65534]=[null,null,H.prototype.lc,H.prototype.Ec,"PSW"],ob);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.c,0,c>>2),vb(this,rb?wb:xb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ga:function(a){var 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},pa: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},I:function(a,b){return this.M(a,b)},ca:function(a,b){return this.ea(a, +b)},na:function(a,b,c){this.w||this.Zb(a,b,c)},Da:function(a,b,c){this.w||this.Ea(a,b,c)},H:function(a){return this.b[a]},N:function(a){return this.b[a]},Z:function(a){return this.g.getUint16(a,!0)},fa:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.m[a>>1]},ha:function(a,b){this.b[a]=b;this.ta=!0},oa:function(a,b){this.b[a]=b;this.ta=!0},Ca:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Fa:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.m[a>>1]=b;this.ta=!0}}; +function Ma(a,b,c){a.K=b;a.h=a.j=0;c&&((a.h=c.h)&&zb(a,Ab,!1),(a.j=c.j)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.j||(a.Sa=!a.w&&b[1]||a.v,a.Hc=!a.w&&b[3]||a.G);if(c||void 0===c)a.Zb=b[1]||a.v,a.Ea=b[3]||a.G}function zb(a,b,c){c&&a.h||(a.Za=b[0]||a.o,a.oc=b[2]||a.A);if(c||void 0===c)a.M=b[0]||a.o,a.ea=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.W,G.prototype.pa,G.prototype.ga,G.prototype.Ga],Ab=[G.prototype.I,G.prototype.na,G.prototype.ca,G.prototype.Da]; +if(Ia)var xb=[G.prototype.H,G.prototype.ha,G.prototype.Z,G.prototype.Ca],wb=[G.prototype.N,G.prototype.oa,G.prototype.fa,G.prototype.Fa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.lb=a.cycles||b;this.ga=c;this.xb=Math.round(this.lb/1E4)/100;this.na=this.xb*this.ga;this.i.$=!1;this.i.Wb=!1;this.i.Va=a.autoStart;this.i.Hb=!1;this.i.mb=!1;this.jb=this.oa=0;this.kb=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.Ac.bind(this);F(this)}y(Db); +var Eb=["power","reset"];k=Db.prototype;k.va=function(a,b,c,d){this.A=a;this.B=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} +k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.ea/a.na&&(b=1),a.ga=b,b=a.xb*a.ga,a.na!=b)){a.na=b;b=a.na.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Nb(a,a.ca);a.ca=0;a.Z=ja();a.fa=0;Ob(a)}function ab(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.lb*a.ga/1E3,a.M[b][0]=c)} +k.Ac=function(){if(this.i.$){this.Bb>=this.lb&&Ob(this,!0);this.Ga=0;this.ib=ja();if(this.fa){var a=this.ib-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.ib&&(this.Z=this.ib))}try{do{for(var b,c=this.i.mb?1:this.eb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Xb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ga+=f;this.ca+=f;Nb(this,0,!0);a=f;if(this.i.mb){var l= +!1;this.jb=this.jb+this.Mb()|0;this.oa-=a;0>=this.oa&&(this.oa+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Pb(this)&&(this.Da=this.Ea=-1,Hb(this),Lb(this),l=!0);l&&this.U(Pb(this)+" cycles: checksum="+n(this.jb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.eb;15<=++this.Ob&&(this.A&&this.A.Ra(),this.Ob=0);break}}while(this.i.$)}catch(m){Lb(this);Ib(this);this.A&&this.A.stop(ja(),Pb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ja();d=this.Nb;this.Ga&& +(d=Math.round(d*this.Ga/this.eb));d-=this.fa-this.ib;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Mb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Bb+=this.Ga;this.fa+=d;b(c,d)}}};function Jb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Mb(a);a.i.$=!0;a.i.Wb=!0;a.Ca&&a.Ca.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.Z,Pb(a));Ib(a,!0);setTimeout(a.Qb,0)}}k.Xb=function(){return 0}; +function Lb(a){if(a.i.$){a.W-=a.a;a.a=0;Nb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ja(),Pb(a));Ib(a)}a.i.complete=void 0}function Ib(a,b){a.A&&a.A.Ra(b)} +function Qb(a){this.gc=a.resetAddr||0;Db.call(this,a,6666667);this.Kb=0;this.decode=Rb.bind(this);this.j=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.gc];this.La=[0,0,0,0,0,0];this.da=[0,0,0,0];this.hb=this.v=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.l=0;this.Ja=70;this.pa=-1;Sb(this);this.i.complete=this.i.bc=!1}y(Qb,Db);k=Qb.prototype;k.reset=function(){this.i.$&&Lb(this);Sb(this);Gb(this);this.i.error=!1;this.parent.reset.call(this)}; +function Sb(a){a.za=255;a.s=0;a.Eb=0;a.G=0;a.ya=0;a.rb=0;a.Ka=0;a.ob=0;a.gb=0;a.pb=[7,7,7,7];a.o=[];a.l|=2;db(a)}function db(a){a.ob?(a.Jb=65536,a.N=a.ec):(a.Jb=0,a.N=a.dc)}k.Mb=function(){return 0};k.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Xa(this.B));return a.data()}; +k.restore=function(a){var b=a[1];this.ha=b[1];Mb(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.o[f].ia-=b;break}b-=a.o[f].ia}a.o.splice(f+1,0,{ia:b,Rb:c<<5&224,Yb:d,yb:e})}a.l|=2}function eb(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|M(a)} +function fb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.j=b<<16;if((b^a.C)&2048)for(var c=a.La.length;0<=--c;){var d=a.f[c];a.f[c]=a.La[c];a.La[c]=d}a.v=b>>14&3;c=a.C>>14&3;a.v!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.v]);a.l|=2;a.C=b}function O(a,b){a.l&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.m=a.h=a.j=b,a.g=c||0)}function Ub(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.m=a.h=a.j=b,a.g=a.m^a.j>>1)}function Vb(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.pa?a.pa=eb(a):a.v||(b=4,c=!0);a.G&57344||(a.ya=63222,a.rb=b);a.v=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);fb(a,e&-12289|a.pa>>2&12288);c&&(a.s|=4,a.f[6]=4);Wb(a,a.pa);Wb(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.pa=-1;throw b;}function Xb(a){var b=Yb(a),c=Yb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;fb(a,c);a.l&=-17} +function mb(a,b){var c=b>>13&31;31>c?a.Ka&32&&(b=a.cb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Zb(a,b,c){var d,e,f,g=0;if(c&a.ob){d=b>>13&a.pb[a.v];e=a.R[a.v][d];f=(a.R[a.v][d+16]<<6)+(b&8191)&4194303;a.Ka&16?3932160<=f&&4186112>f&&(f=mb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.s|=32,K(a,4)),f&1&&!(c&1)&&(a.s|=64,K(a,4)));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.R[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;g&&(g&57344&&(0<=a.pa&&(g|=128),a.G&57344||(a.G=a.G|g|a.gb<<5|a.hb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239>>a.c;return c!=a.h?a.b[d].oc(c,b):a.b[d++].Za(c,b)|a.b[d&a.H].Za(0,b+1)<<8}function N(a,b){return nb(a,Zb(a,b,2))} +function Yb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b}function Wb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.v&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; +case 6:return e=Tb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Tb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.l|=64));return e}k.dc=function(a,b,c){return $b(this,a,b,c)};k.ec=function(a,b,c){return Zb(this,$b(this,a,b,c),c)}; +function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=N(a,d|c&65536),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function bc(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Zb(a,e|c&65536,4),a.v=a.C>>14&3,Wa(a.B,e,d&65535)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} +function cc(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)}function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Va(a.B,e)),e&1&&a.a--,a=a.B,a.b[(e&a.j)>>>a.c].Sa(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),c=d.call(a,c,nb(a,e)),Wa(a.B,e,c&65535)):a.f[e]=d.call(a,c,a.f[e])} +function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.B,a.b[(d&a.j)>>>a.c].Sa(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,d,4),Wa(a.B,d,c&65535)):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +k.Xb=function(a){this.i.complete=!0;this.i.bc=!1;this.i.Wb=!1;this.W=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?K(this,168):this.l&64?K(this,4):this.l&16&&K(this,12),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;a=null;for(var b=this.Eb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Rb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.l&4&&(this.f[7]= +this.f[7]+2&65535,this.l&=-5),a?K(this,a.Yb):K(this,160))}else this.l&1&&this.l++;this.G&57344||(this.ya=0,this.rb=this.f[7]);this.l=this.l&7|this.C&16;this.decode(Tb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function nc(a,b){a=b&~a;O(this,a);return a}function oc(a,b){a=b&~a;O(this,a<<8);return a}function pc(a,b){a|=b;O(this,a);return a}function qc(a,b){a|=b;O(this,a<<8);return a}function rc(a,b){a=~b|65536;P(this,a);return a&65535} +function sc(a,b){a=~b|256;P(this,a<<8);return a&255}function tc(a,b){a=b-a;this.l&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.l&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.l&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function yc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function zc(a,b){a=b<<1|this.j>>16&1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1|this.j>>16&1;Q(this,a<<8);return a&255}function Bc(a,b){a=(this.j&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Vb(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Vb(this,c<<8,a<<8,b<<8);return c&255} +function Fc(a,b){this.l&128||(this.m=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535}function Gc(a,b){a^=b;O(this,a);return a&65535}function Hc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Ic(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.j=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Jc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.j=65536,this.a-=7}var Kc=[0,7,7,10,7,11,9,13];function Lc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Kc[this.c]} +var Mc=[0,14,14,17,14,18,16,20];function Nc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Wb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Mc[this.c]}var Oc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Pc=[7,13,13,17,14,18,17,21];function Qc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.j=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Tc(a){U(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Uc(a){U(this,a,R(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Rb(a){Vc[a>>12].call(this,a)} +var Vc=[function(a){Wc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,gc(this,a,b));this.a=c-Oc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Vb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? +2:0)},function(a){U(this,a,R(this,a),pc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Xc[a>>8&15].call(this,a)},function(a){Yc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);O(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Vb(this,b-a,a,b);this.a-=this.c?4+ +(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),oc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),qc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Dc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Wc=[function(a){Zc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ua()==!(this.g&32768))},function(a){V(this,a,!this.ua()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))},Nc,Nc,function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>> +6&3].call(this,a)},Y,Y],$c=[function(a){P(this,gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){U(this,a,0,xc);this.a-=this.c?11:6},function(a){U(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, +a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],bd=[function(a){U(this,a,0,Bc);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)},function(a){U(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],cd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=N(this,a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Wb(this,a);O(this,a);this.a-=11}, +function(a){var b=Yb(this),c=this.a;bc(this,a,0,b);O(this,b);this.a=c-Pc[this.c]},function(a){O(this,gc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){dd[a&15].call(this,a)},Y,Y,Y,Lc,Lc,Lc,Lc,function(a){if(a&8)K(this,8);else{var b=Yb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.l|=1),this.a-=5):K(this,8)},function(a){ed[a&15].call(this,a)},function(a){fd[a&15].call(this,a)},Tc,Tc,Tc,Tc], +dd=[function(){this.C&49152?(this.s|=128,K(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Xb(this);this.l|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Sb(this),this.B.reset());this.a-=667},function(){Xb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ed=[Rc,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= +0;this.a-=5},W,W,W,W,W,W,W],fd=[Rc,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Xc=[Qc,Qc,Jc,Jc,Hc,Hc,Ic,Ic,Uc,Uc,Y,Y,Y,Y,Sc,Sc],Yc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!M(this)&&!!(this.h&65535))},function(a){V(this,a,M(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +a,!M(this))},function(a){V(this,a,M(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},Y,Y],gd=[function(a){P(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,uc);this.a-=this.c? +9:3+(7==this.b?2:0)}],hd=[function(a){T(this,a,0,yc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],id=[function(a){T(this,a,0,Cc);this.a-=this.c?9+(this.vb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,mc);this.a-=this.c?9+(this.vb&1):3+(7==this.b? +2:0)},function(a){T(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],jd=[Y,function(a){a=ac(this,a,65536);Wb(this,a);O(this,a);this.a-=11},function(a){var b=Yb(this),c=this.a;bc(this,a,65536,b);O(this,b);this.a=c-Pc[this.c]},Y]; +function kd(a){v.call(this,"ROM",a,kd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.A=ba(this.h);if(this.h){a=this.h;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){ld(c,a,b,f)})}}y(kd);kd.prototype.va=function(a,b,c,d){this.B=b;this.a=c;this.K=d;md(this)};kd.prototype.la=function(){this.j&&(this.K&&this.K.a(this.id,this.m,this.c,this.j),delete this.j);return!0}; +kd.prototype.ka=function(){return!0}; +function ld(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.j=h.symbols;if(!a.b.length){r("Empty ROM: "+b); +return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].Zb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.fb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.v=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.la=function(a,b){if(!b)if(this.Pb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ka=function(a){return a?this.save():!0};k.reset=function(){rd(this)};k.save=function(){var a=new L(this);a.set(0,[]);return a.data()};k.restore=function(){return rd(this)};function rd(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Db=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.U(this.j), +this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.nc,Z.prototype.Gc,"RCSR"],sd[65394]=[null,null,Z.prototype.mc,Z.prototype.Fc,"RBUF"],sd[65396]=[null,null,Z.prototype.qc,Z.prototype.Jc,"XCSR"],sd[65398]=[null,null,Z.prototype.pc,Z.prototype.Ic,"XBUF"],sd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.A)){this.j=new L(this,"1.30.1","failsafe");xd(this.j)&&(Cd(this,d),a=2,Dd(this.j));this.j.set("timestamp",ka());Ed(this.j);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xd(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.A;delete this.v}e=z(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Va());this.I&&(Cd(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; +function Cd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} +function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),g=new L(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&Lb(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.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);Nd(a,b,c)}})}else c(a,null)} +function Od(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=ga(a))}function f(a){e("Error: "+a);l&&(--Kd||wa(!0));l=!1}var g,h,l=!0;Kd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Ld(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Kd||wa(!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),--Kd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,m):Md(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Od(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); From 1a1614a648a6674ac7b9f7879cd3e246e2dcf801 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 6 Oct 2016 14:17:29 -0700 Subject: [PATCH 02/36] Simplify the Bus and Memory interfaces slightly, by enabling WORDBUS, which treats all word accesses as aligned; the CPU is has sole responsibility for detecting unaligned word addresses and trapping appropriatelu --- gulpfile.js | 22 +- modules/c1pjs/lib/computer.js | 4 +- modules/pc8080/lib/computer.js | 4 +- modules/pcx86/lib/computer.js | 4 +- modules/pdp11/lib/bus.js | 52 ++-- modules/pdp11/lib/computer.js | 2 +- modules/pdp11/lib/cpustate.js | 69 +++-- modules/pdp11/lib/debugger.js | 21 +- modules/pdp11/lib/defines.js | 16 ++ modules/pdp11/lib/memory.js | 21 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 424 ++++++++++++++--------------- versions/pdpjs/1.30.1/pdp11.js | 213 ++++++++------- 12 files changed, 449 insertions(+), 403 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1e59db60b..511b91142 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -34,12 +34,12 @@ * so for normal development, you should continue using Grunt. * * To learn Gulp, I started with a simple concatenation task ("mktmp") that combines all the files - * required to compile a single emulation module (PCx86), and then I added a compilation task ("compile") + * required to compile a single emulation module (PDPjs), and then I added a compilation task ("compile") * that runs the new JavaScript version of Google's Closure Compiler. * * Unfortunately, the JavaScript version of the Closure Compiler appears to be MUCH slower than the * Java version. But, it did uncover a few new type-related bugs in my code, which are now fixed, - * and the PCx86 emulation module now compiles successfully (although I haven't tested it yet). + * and the PDPjs emulation module now compiles successfully (although I haven't tested it yet). * * Additional work is required to make Gulp skip tasks when the output file(s) are still newer * than the input file(s). By default, every time you run Gulp, EVERYTHING is built again. Apparently, @@ -60,9 +60,9 @@ var pkg = require("./package.json"); pkg.version = pkg.version.slice(0, -1) + 'x'; // TODO: Remove this hack when we're done testing -var pcX86TmpDir = "./tmp/pcx86/" + pkg.version; -var pcX86ReleaseDir = "./versions/pcx86/" + pkg.version; -var pcX86ReleaseFile = "pcx86.js"; +var pdp11TmpDir = "./tmp/pdp11/" + pkg.version; +var pdp11ReleaseDir = "./versions/pdpjs/" + pkg.version; +var pdp11ReleaseFile = "pdp11.js"; var sExterns = ""; var sSiteHost = "www.pcjs.org"; @@ -86,7 +86,7 @@ if (pkg.homepage) { } gulp.task('mktmp', function() { - return gulp.src(pkg.pcX86Files) + return gulp.src(pkg.pdp11Files) .pipe(foreach(function(stream, file){ return stream .pipe(header('/* ' + file.path + ' */\n\n')) @@ -95,13 +95,13 @@ gulp.task('mktmp', function() { .pipe(replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, "")) .pipe(replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, "")) })) - .pipe(concat(pcX86ReleaseFile)) + .pipe(concat(pdp11ReleaseFile)) .pipe(header('"use strict";\n\n')) - .pipe(gulp.dest(pcX86TmpDir)); + .pipe(gulp.dest(pdp11TmpDir)); }); gulp.task('compile', function() { - return gulp.src(path.join(pcX86TmpDir, pcX86ReleaseFile) /*, {base: './'} */) + return gulp.src(path.join(pdp11TmpDir, pdp11ReleaseFile) /*, {base: './'} */) .pipe(compiler({ assumeFunctionWrapper: true, compilationLevel: 'ADVANCED', @@ -117,10 +117,10 @@ gulp.task('compile', function() { languageIn: "ES6", // this is now the default, just documenting our requirements languageOut: "ES5", // this is also the default outputWrapper: '(function(){%output%})()', - jsOutputFile: pcX86ReleaseFile, // TODO: This must vary according to debugger/non-debugger releases + jsOutputFile: pdp11ReleaseFile, // TODO: This must vary according to debugger/non-debugger releases createSourceMap: false })) - .pipe(gulp.dest(pcX86ReleaseDir)); + .pipe(gulp.dest(pdp11ReleaseDir)); }); gulp.task('default', function() { diff --git a/modules/c1pjs/lib/computer.js b/modules/c1pjs/lib/computer.js index b02023816..e440c94a5 100644 --- a/modules/c1pjs/lib/computer.js +++ b/modules/c1pjs/lib/computer.js @@ -253,7 +253,7 @@ C1PComputer.power = function(computer) /* * C1PComputer.init() * - * This function operates on every HTML element of class "computer", extracting the + * This function operates on every HTML element of class "c1pjs-computer", extracting the * JSON-encoded parameters for the C1PComputer constructor from the element's "data-value" * attribute, invoking the constructor to create a C1PComputer component, and then binding * any associated HTML controls to the new component. @@ -263,7 +263,7 @@ C1PComputer.init = function() /* * In non-COMPILED builds, embedMachine() may have set XMLVERSION. */ - if (!COMPILED && C1PJS.XMLVERSION) C1PJS.APPVERSION = C1PJS.XMLVERSION; + if (!COMPILED && XMLVERSION) C1PJS.APPVERSION = XMLVERSION; var aeComputers = Component.getElementsByClass(document, C1PJS.APPCLASS, "computer"); diff --git a/modules/pc8080/lib/computer.js b/modules/pc8080/lib/computer.js index 7ea97ce6e..1912af22c 100644 --- a/modules/pc8080/lib/computer.js +++ b/modules/pc8080/lib/computer.js @@ -1488,7 +1488,7 @@ Computer8080.prototype.updateVideo = function(fForced) /** * Computer8080.init() * - * For every machine represented by an HTML element of class "pcjs-machine", this function + * For every machine represented by an HTML element of class "pc8080-machine", this function * locates the HTML element of class "computer", extracting the JSON-encoded parameters for the * Computer constructor from the element's "data-value" attribute, invoking the constructor to * create a Computer component, and then binding any associated HTML controls to the new component. @@ -1498,7 +1498,7 @@ Computer8080.init = function() /* * In non-COMPILED builds, embedMachine() may have set XMLVERSION. */ - if (!COMPILED && PC8080.XMLVERSION) PC8080.APPVERSION = PC8080.XMLVERSION; + if (!COMPILED && XMLVERSION) PC8080.APPVERSION = XMLVERSION; var aeMachines = Component.getElementsByClass(document, PC8080.APPCLASS + "-machine"); diff --git a/modules/pcx86/lib/computer.js b/modules/pcx86/lib/computer.js index 262d32c61..c9d3501a2 100644 --- a/modules/pcx86/lib/computer.js +++ b/modules/pcx86/lib/computer.js @@ -1518,7 +1518,7 @@ Computer.prototype.updateVideo = function(fForce) /** * Computer.init() * - * For every machine represented by an HTML element of class "pcjs-machine", this function + * For every machine represented by an HTML element of class "pcx86-machine", this function * locates the HTML element of class "computer", extracting the JSON-encoded parameters for the * Computer constructor from the element's "data-value" attribute, invoking the constructor to * create a Computer component, and then binding any associated HTML controls to the new component. @@ -1528,7 +1528,7 @@ Computer.init = function() /* * In non-COMPILED builds, embedMachine() may have set XMLVERSION. */ - if (!COMPILED && PCX86.XMLVERSION) PCX86.APPVERSION = PCX86.XMLVERSION; + if (!COMPILED && XMLVERSION) PCX86.APPVERSION = XMLVERSION; var aeMachines = Component.getElementsByClass(document, PCX86.APPCLASS + "-machine"); diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 9bad104f1..1f3dbe00e 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -133,7 +133,7 @@ function BusPDP11(parmsBus, cpu, dbg) this.fIOBreakAll = false; this.fnReset = null; - this.fnAccess = this.access; + this.fnIOAccess = this.unknownIO; /* * Allocate empty Memory blocks to span the entire physical address space. @@ -214,7 +214,7 @@ BusPDP11.IOController = { } return b; } - b = bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1); + b = bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b)); } @@ -279,7 +279,7 @@ BusPDP11.IOController = { } return; } - bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1); + bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b)); } @@ -312,7 +312,7 @@ BusPDP11.IOController = { } return w; } - w = bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0); + w = bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w)); } @@ -349,7 +349,7 @@ BusPDP11.IOController = { } return; } - bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0); + bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w)); } @@ -426,7 +426,7 @@ BusPDP11.prototype.reset = function() }; /** - * access(addr, data, byteFlag) + * unknownIO(addr, data, byteFlag) * * This is our default I/O handler, called whenever there's an IOPAGE access without a corresponding entry * in aIOHandlers; in the interim, our Device component will override this default handler with its own function @@ -438,10 +438,10 @@ BusPDP11.prototype.reset = function() * @param {number} data (-1 if read, otherwise write) * @param {number} byteFlag (true if byte I/O, otherwise word) */ -BusPDP11.prototype.access = function(addr, data, byteFlag) +BusPDP11.prototype.unknownIO = function(addr, data, byteFlag) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unrecognized access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")"); + this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")"); } return 0; }; @@ -808,10 +808,10 @@ BusPDP11.prototype.getWord = function(addr) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; - if (off != this.nBlockLimit) { - return this.aMemBlocks[iBlock].readWord(off, addr); + if (!PDP11.WORDBUS && off == this.nBlockLimit) { + return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8); } - return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8); + return this.aMemBlocks[iBlock].readWord(off, addr); }; /** @@ -827,10 +827,10 @@ BusPDP11.prototype.getWordDirect = function(addr) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; - if (off != this.nBlockLimit) { - return this.aMemBlocks[iBlock].readWordDirect(off, addr); + if (!PDP11.WORDBUS && off == this.nBlockLimit) { + return this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); } - return this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); + return this.aMemBlocks[iBlock].readWordDirect(off, addr); }; /** @@ -871,12 +871,12 @@ BusPDP11.prototype.setWord = function(addr, w) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; - if (off != this.nBlockLimit) { - this.aMemBlocks[iBlock].writeWord(off, w & 0xffff, addr); + if (!PDP11.WORDBUS && off == this.nBlockLimit) { + this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr); + this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1); return; } - this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr); - this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1); + this.aMemBlocks[iBlock].writeWord(off, w & 0xffff, addr); }; /** @@ -893,12 +893,12 @@ BusPDP11.prototype.setWordDirect = function(addr, w) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; - if (off != this.nBlockLimit) { - this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr); + if (!PDP11.WORDBUS && off == this.nBlockLimit) { + this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr); + this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1); return; } - this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr); - this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1); + this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr); }; /** @@ -1072,18 +1072,18 @@ BusPDP11.prototype.addIOTable = function(component, table) }; /** - * addIODefaultHandlers(fnReset, fnAccess) + * addIODefaultHandlers(fnReset, fnIOAccess) * * Add default I/O notification handlers. * * @this {BusPDP11} * @param {function()} fnReset - * @param {function(number,number,number)} fnAccess + * @param {function(number,number,number)} fnIOAccess */ -BusPDP11.prototype.addIODefaultHandlers = function(fnReset, fnAccess) +BusPDP11.prototype.addIODefaultHandlers = function(fnReset, fnIOAccess) { this.fnReset = fnReset; - this.fnAccess = fnAccess; + this.fnIOAccess = fnIOAccess; }; /** diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index b62519a07..57dd720ff 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -1448,7 +1448,7 @@ ComputerPDP11.prototype.updateStatus = function(fForce) /** * ComputerPDP11.init() * - * For every machine represented by an HTML element of class "pcjs-machine", this function + * For every machine represented by an HTML element of class "pdp11-machine", this function * locates the HTML element of class "computer", extracting the JSON-encoded parameters for the * Computer constructor from the element's "data-value" attribute, invoking the constructor to * create a Computer component, and then binding any associated HTML controls to the new component. diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 5e0ffd2c0..7e37f91b3 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -1094,12 +1094,18 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl this.mmuLastVirtual = physicalAddress; if (physicalAddress >= BusPDP11.IOPAGE_VIRT) { physicalAddress |= BusPDP11.IOPAGE_22BIT; - } else { // no max_memory check in 16 bit mode + } + /* + * I'm moving this alignment test to the CPU->Bus interfaces that read/write physical words; + * hopefully there are no order dependencies on this test. + * + else { // no max_memory check in 16 bit mode if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { this.regErr |= PDP11.CPUERR.ODDADDR; this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); } } + */ } else { this.mmuLastVirtual = virtualAddress; page = (virtualAddress >> 13) & this.mmuMask[this.mmuMode]; @@ -1118,10 +1124,15 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl this.regErr |= PDP11.CPUERR.NOMEMORY; this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOMEMORY); // KB11-EM does this after ABORT handling - KB11-CM before } + /* + * I'm moving this alignment test to the CPU->Bus interfaces that read/write physical words; + * hopefully there are no order dependencies on this test. + * if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { this.regErr |= PDP11.CPUERR.ODDADDR; this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMMUADDR); } + */ } switch (pdr & 0x7) { case 1: // read-only with trap @@ -1190,6 +1201,18 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl return physicalAddress; }; +/** + * readByteFromPhysical(physicalAddress) [formerly readByteByAddr] + * + * @this {CPUStatePDP11} + * @param {number} physicalAddress + * @return {number} + */ +CPUStatePDP11.prototype.readByteFromPhysical = function(physicalAddress) +{ + return this.bus.getByte(physicalAddress); +}; + /** * readWordFromPhysical(physicalAddress) [formerly readWordByAddr] * @@ -1199,6 +1222,10 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl */ CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) { + if (physicalAddress & 0x1) { + this.regErr |= PDP11.CPUERR.ODDADDR; + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); + } return this.bus.getWord(physicalAddress); }; @@ -1213,30 +1240,6 @@ CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) return this.readWordFromPhysical(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD)); }; -/** - * writeWordToPhysical(physicalAddress, data) [formerly writeWordByAddr] - * - * @this {CPUStatePDP11} - * @param {number} physicalAddress - * @param {number} data - */ -CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) -{ - this.bus.setWord(physicalAddress, data & 0xffff); -}; - -/** - * readByteFromPhysical(physicalAddress) [formerly readByteByAddr] - * - * @this {CPUStatePDP11} - * @param {number} physicalAddress - * @return {number} - */ -CPUStatePDP11.prototype.readByteFromPhysical = function(physicalAddress) -{ - return this.bus.getByte(physicalAddress); -}; - /** * writeByteToPhysical(physicalAddress, data) [formerly writeByteByAddr] * @@ -1250,6 +1253,22 @@ CPUStatePDP11.prototype.writeByteToPhysical = function(physicalAddress, data) this.bus.setByte(physicalAddress, data & 0xff); }; +/** + * writeWordToPhysical(physicalAddress, data) [formerly writeWordByAddr] + * + * @this {CPUStatePDP11} + * @param {number} physicalAddress + * @param {number} data + */ +CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) +{ + if (physicalAddress & 0x1) { + this.regErr |= PDP11.CPUERR.ODDADDR; + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); + } + this.bus.setWord(physicalAddress, data & 0xffff); +}; + /** * popWord() * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 32b95bfea..4a584ad66 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -590,7 +590,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap() + * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). */ b = this.bus.getByteDirect(addr); this.nDisableMessages--; @@ -614,7 +614,11 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap() + * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * + * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what + * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are + * performed by the CPU, not the Bus. */ w = this.bus.getWordDirect(addr); this.nDisableMessages--; @@ -637,7 +641,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap() + * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). */ this.bus.setByteDirect(addr, b); this.nDisableMessages--; @@ -660,7 +664,11 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap() + * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * + * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what + * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are + * performed by the CPU, not the Bus. */ this.bus.setWordDirect(addr, w); this.nDisableMessages--; @@ -2841,15 +2849,14 @@ if (DEBUGGER) { var sData = "", sChars = ""; sAddr = this.toStrAddr(dbgAddr); /* - * It's just coincidence that we want to dump 8 bytes per line when using base 8 and 16 bytes - * per line when using base 16, because octal requires more digits. + * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords) */ var nBytes = (size == 4? 16 : this.nBase); for (i = nBytes; i > 0 && cb > 0; i--) { var b = this.getByte(dbgAddr, 1); data |= (b << (iByte++ << 3)); if (iByte == size) { - sData += (this.nBase == 8? str.toOct(data, size * 3) : str.toHex(data, size * 2)); + sData += this.toStrBase(data, size); sData += (size == 1? (i == 9? '-' : ' ') : " "); data = iByte = 0; } diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 2a8d34385..95a4983f7 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -79,6 +79,21 @@ var BYTEARRAYS = false; */ var TYPEDARRAYS = (typeof ArrayBuffer !== 'undefined'); +/** + * WORDBUS forces the Bus and Memory interfaces to assume even addresses when accessing words. Since PDPjs inherited + * its Bus component from PCx86, it originally supported both aligned and unaligned word accesses by default, but since + * the PDP-11 requires aligned (even) word addresses, we can turn off support for unaligned accesses and get some + * performance gains. + * + * When WORDBUS is true, the Bus and Memory components simply ignore the low bit of word addresses, because it is the + * CPU, not the Bus, that's responsible for validating addresses and generating the appropriate traps. + * + * Don't worry that the source code looks MORE complicated rather than LESS with the additional WORDBUS checks, because + * the Closure Compiler eliminates those checks and throws away the (unreachable) code blocks that deal with unaligned + * accesses. + */ +var WORDBUS = true; + /* * Combine all the shared globals and machine-specific globals into one machine-specific global object, * which all machine components should start using; eg: "if (PDP11.DEBUG) ..." instead of "if (DEBUG) ...". @@ -95,6 +110,7 @@ var PDP11 = { MAXDEBUG: MAXDEBUG, // shared PRIVATE: PRIVATE, // shared TYPEDARRAYS:TYPEDARRAYS, + WORDBUS: WORDBUS, SITEHOST: SITEHOST, // shared XMLVERSION: XMLVERSION, // shared diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 6f7f841fc..ba4c0080a 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -782,10 +782,15 @@ MemoryPDP11.prototype = { */ readWordLE: function readWordLE(off, addr) { /* - * TODO: It remains to be seen if there's any advantage to checking the offset for an aligned read - * vs. always reading the bytes separately. + * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset + * for an aligned read vs. always reading the bytes separately. */ - var w = (off & 0x1)? (this.ab[off] | (this.ab[off+1] << 8)) : this.aw[off >> 1]; + var w; + if (PDP11.WORDBUS || !(off & 0x1)) { + w = this.aw[off >> 1]; + } else { + w = this.ab[off] | (this.ab[off+1] << 8); + } if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { this.dbg.printMessage("Memory.readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true); } @@ -840,14 +845,14 @@ MemoryPDP11.prototype = { */ writeWordLE: function writeWordLE(off, w, addr) { /* - * TODO: It remains to be seen if there's any advantage to checking the offset for an aligned write - * vs. always writing the bytes separately. + * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset + * for an aligned write vs. always writing the bytes separately. */ - if (off & 0x1) { + if (PDP11.WORDBUS || !(off & 0x1)) { + this.aw[off >> 1] = w; + } else { this.ab[off] = w; this.ab[off+1] = w >> 8; - } else { - this.aw[off >> 1] = w; } this.fDirty = true; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 6b2032106..3cce30f1b 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -9,222 +9,222 @@ typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encod function t(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.pb=this.id:(this.dc=this.id.substr(0,b),this.pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Hb:!1,ec:!1,ia:!1,error:!1};this.Xb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Va=void 0,Wa={}; -if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=w);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},x=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Pb=this.id:(this.cc=this.id.substr(0,b),this.Pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Bb:!1,dc:!1,ia:!1,error:!1};this.Rb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Ua=void 0,Va={}; +if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=w);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},x=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.B/this.Ca|0;this.C=this.w-1;this.Ra=[];this.F=null;this.Jb=this.Jc;a=new I;Bb(a,this.j);this.O=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ra[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} -function Db(a,b,c){var d=!1,e=this.controller,f=e.Ra[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ra[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} -function Eb(a,b){var c=-1,d=this.controller;(a=d.Ra[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Jb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} -function Fb(a,b,c){var d=!1,e=this.controller;if(a=e.Ra[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Jb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=Ab.prototype;k.reset=function(){this.F&&this.F()}; -k.Jc=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; -function Gb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ub+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ub){n=l.size-(f-m);n>g&&(n=g);l.Ub=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Ib(1,f,g)}f=new I(f,n,a.Ca,d,e);Bb(f,a.j,l);a.O[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Jb[d]+" at "+p(b,8,!0)),!0):Ib(2,b,c)} -k.jb=function(a){return this.O[(a&this.g)>>>this.ca].ub(a&this.f,a)};k.Ha=function(a){var b=a&this.f,c=(a&this.g)>>>this.ca;return b!=this.f?this.O[c].Bc(b,a):this.O[c++].ub(b,a)|this.O[c&this.C].ub(0,a+1)<<8};function Kb(a,b){var c=b&a.f,d=(b&a.g)>>>a.ca;return c!=a.f?a.O[d].kc(c,b):a.O[d++].Nb(c,b)|a.O[d&a.C].Nb(0,b+1)<<8}k.Rb=function(a,b){this.O[(a&this.g)>>>this.ca].Ab(a&this.f,b&255,a)}; -k.nb=function(a,b){var c=a&this.f,d=(a&this.g)>>>this.ca;c!=this.f?this.O[d].Ic(c,b&65535,a):(this.O[d++].Ab(c,b&255,a),this.O[d&this.C].Ab(0,b>>8&255,a+1))};function Lb(a){for(var b=0,c=[],d=0;d>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.F/this.Ca|0;this.Ra=[];this.D=null;this.Eb=this.od;a=new I;Ab(a,this.j);this.X=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ra[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Eb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} +function Cb(a,b,c){var d=!1,e=this.controller,f=e.Ra[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ra[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Eb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} +function Db(a,b){var c=-1,d=this.controller;(a=d.Ra[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Eb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} +function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Ra[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Eb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; +k.od=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; +function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ob+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ob){n=l.size-(f-m);n>g&&(n=g);l.Ob=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ca,d,e);Ab(f,a.j,l);a.X[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} +k.jb=function(a){return this.X[(a&this.g)>>>this.ca].Wb(a&this.f,a)};k.Ha=function(a){return this.X[(a&this.g)>>>this.ca].Bc(a&this.f,a)};function Jb(a,b){return a.X[(b&a.g)>>>a.ca].jc(b&a.f,b)}k.Lb=function(a,b){this.X[(a&this.g)>>>this.ca].$b(a&this.f,b&255,a)};k.nc=function(a,b){this.X[(a&this.g)>>>this.ca].Ic(a&this.f,b&65535,a)}; +function Kb(a){for(var b=0,c=[],d=0;d>5&3;c.xa=a>>1&15;c.Yb=a&257?a&1?6:4:0;Sb(c);a=c.F;a&1|256&&(b=this.b.lb&16?1:2);this.g.rb=this.g.rb&-8|b};k.Zc=function(){return Tb(this.b)};k.rd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.D|=128}; -function Vb(a){var b=a.C,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:256,mapped:0,maxblock:b.cb[f]*b.da[f],url:"rk"+f+".dsk"});b.R&=-129;switch(b.R>>1&7){case 0:b.Pb=2496;b.oa=0;b.R=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.cb[f]){b.oa|=32832;b.R|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.R|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;Wb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.cb[f])b.oa|= -32832,b.R|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.R|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.R&48)<<12|b.Ob;e=65536-b.Qb&65535;a.$b(b.ra[f],c,d,e);return}}b.Pb=f<<13|b.Pb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.R=b.R&65534|128;return!!(b.R&64)})}k.dd=function(a,b,c,d,e){var f=this.C;f.Ob=d&65535;f.R=f.R&-49|d>>12&48;f.Qb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.R|=49152;break;case 2:f.oa|=33792,f.R|=49152}L(this.b,20,5,144,function(){f.R=f.R&65534|128;return!!(f.R&64)})}; -function Xb(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.ed,drive:f,blocksize:128,mapped:1,maxblock:b.cb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Lc[f]|b.ab&64;break;case 3:1==(b.fa&3)&&(b.ab=b.fa&4?b.ab+(b.fa&65408)&65408|b.fa<<2&64:b.ab-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.ab);break;case 4:b.Wa=b.ab;break;case 5:if(b.fa>>6>=b.cb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* -b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;Wb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.cb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Gb;e=65536-b.Wa&65535;a.$b(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -k.ed=function(a,b,c,d,e){var f=this.w;f.Gb=d&65535;f.M=f.M&-49|d>>12&48;f.Sa=d>>16&63;f.fa=~~(c/f.da[b.Ma])<<6|c%f.da[b.Ma];f.ab=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Yb(a){a=a.B;a.T=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.$a=a.nc=0} -function gc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.fd,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.bb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Qa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))* -c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;Wb(a,c.ra[b],d,e,f);return;case 57:if(c.Qa[b]>=c.cc[0]||c.Ea[b]>>8>=c.bb[0]||(c.Ea[b]&255)>=c.da[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Qa[b]*c.bb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.vb;f=65536-c.xb&65535;a.$b(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} -k.fd=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.bb[0]);f.Ea[b.Ma]=e%f.bb[0]<<8|c%f.da[0];f.bc[b.Ma]=f.Qa[b.Ma]=d;f.mb|=1<=b.Vc-1&&(f.ta[b.Ma]|=1024);switch(a){case 1:f.Da|=512;f.T|=49152;break;case 2:f.Da|=2048,f.T|=49152}L(this.b,20,5,172,function(){f.ta[b.Ma]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; -function hc(a,b,c,d,e,f){var g=~~((f+c.Ta-1)/c.Ta),h=new XMLHttpRequest;2048>g&&d+2048g){b.jc(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.jc(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Va=0;this.C.R=128;this.w.M=128;Yb(this)}; -k.Kc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.D|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=M(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.P>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.P&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Pa[e]= -b),d=f.Pa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.P>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.P&2048?(0<=b&&(f.Pa[e]=b),d=f.Pa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.Ya;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.od&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.C;switch(a&-2){case 4194048:d=M(this,e.Pb,a,b,c);0<=d&&(e.Pb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.R,a,b,c);0<=b&&0<=d&&(e.R=d&-36993|e.R&36992,e.R&1&&Vb(this));break;case 4194054:d=M(this,e.Qb,a,b,c);0<=d&&(e.Qb=d);break;case 4194056:d=M(this,e.Ob,a,b,c);0<=d&&(e.Ob=d); -break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Cc,a,b,c);0<=d&&(e.Cc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?gc(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=M(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= -M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Yb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.ld[e];break;case 4193746:d=M(this,g.Dc,a,b,c);0<=d&&(g.Dc=d);break;case 4193748:d=M(this,g.Ec[e],a,b,c);0<=d&&(g.Ec[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.md[e];break;case 4193754:d=M(this,g.Fc[e],a,b,c);0<=d&& -(g.Fc[e]=d);break;case 4193756:d=M(this,g.Qa[e],a,b,c);0<=d&&(g.Qa[e]=d&511);break;case 4193758:g.bc[e]=g.Qa[e];d=g.bc[e];break;case 4193760:d=g.jd[e];break;case 4193762:d=g.kd[e];break;case 4193764:d=g.gd[e];break;case 4193766:d=g.hd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Sa= -e.Sa&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Xb(this));break;case 4192514:d=M(this,e.Gb,a,b,c);0<=d&&(e.Gb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Sa,a,b,c);0<=d&&(e.Sa=d&63,e.M=e.M&-49|(e.Sa&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Zb[0]=d&4?15:7,f.Zb[1]=d&2?15:7,f.Zb[3]= -d&1?15:7,f.Yb&&(e=2,f.lb&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.J|=16,f.L(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.na[0][e],a,b,c);0<=d&&(f.na[0][e]=d,f.na[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.na[1][e],a,b,c);0<=d&&(f.na[1][e]=d,f.na[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.ib)return f.L(4,234);e=a>>2&31;d=f.Sb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Sb[e]=a&2?d<<16|f.Sb[e]&65535:f.Sb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Ob[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,K.prototype.Xc,K.prototype.pd,"LKS"],kc[65402]=[null,null,K.prototype.Yc,K.prototype.qd,"MMR0"],kc[65534]=[null,null,K.prototype.Zc,K.prototype.rd,"PSW"],kc); -La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},$:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ma:function(a){var 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},xa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},Y:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.U)&&c.ja(!0)}return this.Nb(a,b)},ha:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.U)&&c.ja(!0)}return this.kc(a,b)},ua:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.F)&&d.ja(!0)}this.g?this.w(a, -b,c):this.Bb(a,b,c)},Aa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.F)&&d.ja(!0)}this.g?this.w(a,b,c):this.qc(a,b,c)},U:function(a){return this.f[a]},Z:function(a,b){a=this.f[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ea:function(a){return this.F.getUint16(a,!0)},la:function(a,b){a=a&1?this.f[a]|this.f[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a}, -qa:function(a,b){this.f[a]=b;this.Ua=!0},wa:function(a,b,c){this.f[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},za:function(a,b){this.F.setUint16(a,b,!0);this.Ua=!0},Ba:function(a,b,c){a&1?(this.f[a]=b,this.f[a+1]=b>>8):this.I[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Bb(a,b,c){a.j=b;a.K=a.C=0;c&&((a.K=c.K)&&xc(a,wc,!1),(a.C=c.C)&&vc(a,wc,!1))} -function zc(a,b){b?--a.C||(a.Ab=a.g?a.w:a.Bb,a.Ic=a.g?a.G:a.qc):--a.K||(a.ub=a.Nb,a.Bc=a.kc)}function vc(a,b,c){c&&a.C||(a.Ab=!a.g&&b[1]||a.w,a.Ic=!a.g&&b[3]||a.G);if(c||void 0===c)a.Bb=b[1]||a.w,a.qc=b[3]||a.G}function xc(a,b,c){c&&a.K||(a.ub=b[0]||a.N,a.Bc=b[2]||a.S);if(c||void 0===c)a.Nb=b[0]||a.N,a.kc=b[2]||a.S}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.$,I.prototype.xa,I.prototype.ma,I.prototype.pb],wc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa]; -if(xb)var tc=[I.prototype.U,I.prototype.qa,I.prototype.ea,I.prototype.za],sc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.fb=Math.round(this.Aa/1E4)/100;this.kb=this.fb*this.Xa;this.v.ga=!1;this.v.oc=!1;this.v.Eb=a.autoStart;this.v.uc=!1;this.v.qb=!1;this.Kb=this.ha=0;this.Lb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Wb=this.nd.bind(this);G(this)}y(Bc); -var Cc=["power","reset"];k=Bc.prototype;k.Oa=function(a,b,c,d){this.C=a;this.H=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ja(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Kb))}} -function Jc(a,b,c,d){if(a.K[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.ea||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} -k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ia)a=!0;else{var b=null,c,h=cb(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.fb*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.C&&a.C.Tb()}Lc(a,a.U);a.U=0;a.S=ra();a.Z=0;Mc(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function hd(a){a.$-=a.b;a.b=0} -k.nd=function(){if(this.v.ga){this.ob>=this.Aa&&Mc(this,!0);this.ua=0;this.za=ra();if(this.Z){var a=this.za-this.Z;a>this.Ib&&(this.S+=a,this.S>this.za&&(this.S=this.za))}try{do{var b=fd(this,this.v.qb?1:this.Ba);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;gd(this,c);this.ua+=c;this.U+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Vb&&(this.C&&this.C.Fa(),this.Vb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.C&&this.C.stop(ra(), -Ic(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Wb;this.Z=ra();c=this.Ib;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.S;d&&(this.Y=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ea=0,Kc(this)));if(0>c||this.Yc&&(this.S-=c),c=0;this.ob+=this.ua;this.Z+=c;a(b,c)}}}; -k.yb=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.ga=!0;this.v.oc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.Tb(!0),this.C.start(this.S,Ic(this)));N(this,!0);setTimeout(this.Wb,0);return!0};k.zb=function(){return 0}; -k.ja=function(a){if(this.v.ga){hd(this);Lc(this,this.U);this.U=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Ic(this));N(this)}this.v.complete=a};function N(a,b){a.C&&a.C.Fa(b)} -function id(a){this.Wc=+a.model||1170;this.ic=a.resetAddr||0;Bc.call(this,a,6666667);this.Fb=0;this.decode=jd.bind(this);this.V=65536;this.W=32768;this.aa=65535;this.X=32768;this.P=15;this.u=[0,0,0,0,0,0,0,this.ic];this.Pa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, -0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Sb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.eb=this.G=this.I=this.D=0;this.ib=70;this.ma=-1;kd(this);this.v.complete=this.v.Oc=!1}y(id,Bc);k=id.prototype;k.reset=function(){this.v.ga&&this.ja();kd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function kd(a){a.Za=255;a.J=0;a.mc=0;a.F=0;a.Ya=0;a.ac=0;a.lb=0;a.Yb=0;a.wa=0;a.Zb=[7,7,7,7];a.w=[];a.D|=2;Sb(a)}function Sb(a){a.Yb?(a.Cb=65536,a.ba=a.Sc):(a.Cb=0,a.ba=a.Rc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Lb(this.H));return a.data()}; -k.restore=function(a){var b=a[1];this.ea=b[1];Kc(this,b[3]);a:{b=this.H;a=a[2];var c;for(c=0;cb){a.w[f].La-=b;break}b-=a.w[f].La}a.w.splice(f+1,0,{La:b,Ac:c<<5&224,Hc:d,gc:e})}a.D|=2}function Tb(a){return a.P=a.P&63728|a.Na()|nd(a)|md(a)|ld(a)} -function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.Pa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Pa[c];a.Pa[c]=d}a.B=b>>14&3;c=a.P>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.D|=2;a.P=b}function P(a,b){a.D&128||(a.X=a.aa=b,a.W=0)}function rd(a,b,c){a.D&128||(a.X=a.aa=a.V=b,a.W=c||0)}function sd(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^b)&(d^b))}function td(a,b){a.D&128||(a.X=a.aa=a.V=b,a.W=a.X^a.V>>1)} -function ud(a,b,c,d){a.D&128||(a.X=a.aa=a.V=b,a.W=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Tb(this):this.B||(a=4,b=!0);this.F&57344||(this.Ya=63222,this.ac=a);this.B=0;var c=pd(this,a|65536),d=pd(this,a+2&65535|65536);Ub(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,c);this.D&=-113;this.ma=-1;throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);qd(a,b);Ub(a,c);a.D&=-17} -function ic(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Sb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function yd(a,b,c){var d,e,f,g=0;if(c&a.Yb){d=b>>13&a.Zb[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=ic(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.J|=32,a.L(4,12)),f&1&&!(c&1)&&(a.J|=64,a.L(4,14)));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.na[a.B][d]=e;if(4194170!==f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.wa<<5|a.xa<<1),a.L(168,16)),a.F&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=pd(a,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=pd(a,e)|g; -a.b-=8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=pd(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.D|=64));return e}k.Rc=function(a,b,c){return zd(this,a,b,c)};k.Sc=function(a,b,c){return yd(this,zd(this,a,b,c),c)}; -function Ad(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.B=a.P>>12&3,c=pd(a,d|c&65536),a.B=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.ya[a.P>>12&3];return c}function Bd(a,b,c,d){a.F&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.B=a.P>>12&3,e=yd(a,e|c&65536,4),a.B=a.P>>14&3,a.H.nb(e,d&65535)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.ya[a.P>>12&3]=d} -function Cd(a,b){b>>=6;var c=a.I=b&7;(b=a.G=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.G=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c}function Ed(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.H.jb(c)):a=a.u[c]&255;return a}function Gd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=jc(a,a.ba(b,d,2)):c=a.u[d];return c} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.eb=a.ba(b,e,7),c=d.call(a,c,a.H.jb(e)),e&1&&a.b--,a.H.Rb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),c=d.call(a,c,jc(a,e)),a.H.nb(e,c&65535)):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.H.Rb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function Id(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,d,4),a.H.nb(d,c&65535)):a.u[d]=c&65535;return c}function T(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.zb=function(a){this.v.complete=!0;var b=this.v.Oc=this.j&&Jd(this.j),c=a?this.v.oc?0:1:-1;this.v.oc=!1;this.$=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.ja();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.L(168,28):this.D&64?this.L(4,30):this.D&16&&this.L(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Ac,a=this.w[e],this.w.splice(e,1))}d>(this.P&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.L(a.Hc,26):this.L(160,26))}else this.D&1&&this.D++;this.F&57344||(this.Ya=0,this.ac=this.u[7]);this.D=this.D&7|this.P&16;this.decode(od(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a} -function Ud(a,b){a|=b;P(this,a<<8);return a}function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.D&128||(this.X=this.aa=a,this.W=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.X=this.aa=c,this.W=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.X=this.aa=a,this.W=a&(b^a));return a&65535} -function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.X=this.aa=c,this.W=c&(b<<8^c));return a&255}function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.V>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.V>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.V&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255} -function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535}function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.D&128||(this.X=this.aa=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} -function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.W=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.W=32768,this.V=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.g]} -var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.g]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.X=b>>16,this.aa=this.X|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Pe(a){R(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)}function Qe(a){R(this,a,Dd(this,a),je);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function jd(a){Re[a>>12].call(this,a)} -var Re=[function(a){Se[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? -2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.g? -4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},W],Se= -[function(a){Ve[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!nd(this))},function(a){T(this,a,nd(this))},function(a){T(this,a,!this.Na()==!md(this))},function(a){T(this,a,!this.Na()!=!md(this))},function(a){T(this,a,!nd(this)&&!this.Na()==!md(this))},function(a){T(this,a,nd(this)||!this.Na()!=!md(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){rd(this, -Id(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.g?11:6},function(a){R(this,a,ld(this)?1:0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=pd(this,a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, -0,b);P(this,b);this.b=c-se[this.g]},function(a){P(this,Id(this,a,this.Na?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.L(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.L(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},Pe,Pe,Pe,Pe],$e=[function(){this.P&49152?(this.J|=128,this.L(4, -3)):hd(this);this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.P&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.P&49152||(kd(this),this.H.reset());this.b-=667},function(){wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],bf=[ue,function(){this.V= -65536;this.b-=5},function(){this.W=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.X=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,Qe,Qe,W,W,W,W,ve,ve],Ue=[function(a){T(this,a,!this.Na())},function(a){T(this,a,this.Na())},function(a){T(this,a,!ld(this)&&!nd(this))},function(a){T(this,a,ld(this)||nd(this))},function(a){T(this,a,!md(this))},function(a){T(this,a,md(this))},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(){this.L(24,2); -this.b-=25},function(){this.L(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= -this.g?11:6},function(a){Q(this,a,ld(this)?1:0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.g?9+(this.eb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.g?9:3+(7== -this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);vd(this,a);P(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.g]},W];function gf(a){w.call(this,"ROM",a,gf);this.f=null;this.B=a.addr;this.g=a.size;this.F=a.writable;this.C=a.alias;this.w=a.file;this.G=da(this.w);if(this.w){a=this.w;var b=ea(this.G);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Oa=function(a,b,c,d){this.H=b;this.b=c;this.j=d;jf(this)};gf.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.G.push({xd:b,A:c,Tc:d,Ka:e,rc:f})}delete this.Ka}return!0};gf.prototype.Ia=function(){return!0}; -function hf(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){t("Empty ROM: "+ -b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].Bb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.C?b.push(a.C):null!=a.C&&a.C.length&&(b=a.C);for(c=0;c>> -e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.pb)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ia=function(a){return a?this.save():!0};k.reset=function(){of(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return of(this)};function of(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.G%a,this.Z&&(b=na("",c)));this.S&&!this.G&&c&&(b=String.fromCharCode(this.S)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.G+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.i(this.F), -this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.U)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.ad,Y.prototype.td,"RCSR"],pf[65394]=[null,null,Y.prototype.$c,Y.prototype.sd,"RBUF"],pf[65396]=[null,null,Y.prototype.cd,Y.prototype.vd,"XCSR"],pf[65398]=[null,null,Y.prototype.bd,Y.prototype.ud,"XBUF"],pf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.xc=function(){return-1};qf.prototype.yc=function(){}; -function sf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} -function tf(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; +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];k=K.prototype;k.Oa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;var e=this;this.f.pc=Ob(this.b,function(){e.f.Va|=128;e.f.Va&64&&(L(e.b,0,6,64),Pb(e.b,e.f.pc,1E3/60))});Lb(b,this,Qb);Mb(b,this.reset.bind(this),this.Lc.bind(this));G(this)};k.Wc=function(){var a=this.f.Va;this.f.Va&=-129;return a}; +k.pd=function(a){this.f.Va=a;a&64&&Pb(this.b,this.f.pc,1E3/60);this.f.Va=a&-129};k.Xc=function(){var a=this.b;return a.G&62337|a.wa<<5|a.xa<<1};k.qd=function(a){var b=4,c=this.b;c.G=a&=62337;c.wa=a>>5&3;c.xa=a>>1&15;c.Tb=a&257?a&1?6:4:0;Rb(c);a=c.G;a&1|256&&(b=this.b.lb&16?1:2);this.g.pb=this.g.pb&-8|b};k.Yc=function(){return Sb(this.b)};k.rd=function(a){Tb(this.b,a&-1809|Sb(this.b)&1808);this.b.C|=128}; +function Ub(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.cd,drive:f,blocksize:256,mapped:0,maxblock:b.eb[f]*b.da[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Jb=2496;b.oa=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.eb[f]){b.oa|=32832;b.P|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.P&48)<<12|b.Ib;e=65536-b.Kb&65535;Vb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.eb[f])b.oa|= +32832,b.P|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.P&48)<<12|b.Ib;e=65536-b.Kb&65535;a.Xb(b.ra[f],c,d,e);return}}b.Jb=f<<13|b.Jb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.cd=function(a,b,c,d,e){var f=this.D;f.Ib=d&65535;f.P=f.P&-49|d>>12&48;f.Kb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.P|=49152;break;case 2:f.oa|=33792,f.P|=49152}L(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; +function Wb(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:128,mapped:1,maxblock:b.eb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Jc[f]|b.bb&64;break;case 3:1==(b.fa&3)&&(b.bb=b.fa&4?b.bb+(b.fa&65408)&65408|b.fa<<2&64:b.bb-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.bb);break;case 4:b.Wa=b.bb;break;case 5:if(b.fa>>6>=b.eb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* +b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Ab;e=65536-b.Wa&65535;Vb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.eb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Ab;e=65536-b.Wa&65535;a.Xb(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +k.dd=function(a,b,c,d,e){var f=this.w;f.Ab=d&65535;f.M=f.M&-49|d>>12&48;f.Sa=d>>16&63;f.fa=~~(c/f.da[b.Ma])<<6|c%f.da[b.Ma];f.bb=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Xb(a){a=a.B;a.S=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.tb=[0,0,0,0,0,0,0,0];a.mb=a.ub=a.sb=a.$a=a.mc=0} +function gc(a,b){var c=a.B,d,e,f;c.S&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.ed,drive:b,blocksize:256,mapped:0,maxblock:c.bc[0]*c.cb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.S&63){case 5:c.Zb[b]=c.Qa[b];c.S|=32896;c.ta[b]|=32896;c.mb|=1<=c.bc[0]||c.Ea[b]>>8>=c.cb[0]||(c.Ea[b]&255)>=c.da[0]){c.tb[b]|=1024;c.S|=49152;break}d=(c.Qa[b]*c.cb[0]+(c.Ea[b]>>8))* +c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.sb;f=65536-c.ub&65535;Vb(a,c.ra[b],d,e,f);return;case 57:if(c.Qa[b]>=c.bc[0]||c.Ea[b]>>8>=c.cb[0]||(c.Ea[b]&255)>=c.da[0])c.tb[b]|=1024,c.S|=49152;else{d=(c.Qa[b]*c.cb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.sb;f=65536-c.ub&65535;a.Xb(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.S=c.S&65534|128;c.ta[b]|=128;return!!(c.S&64)})} +k.ed=function(a,b,c,d,e){var f=this.B;f.ub=65536-e&65535;f.sb=d&65535;f.S=f.S&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.cb[0]);f.Ea[b.Ma]=e%f.cb[0]<<8|c%f.da[0];f.Zb[b.Ma]=f.Qa[b.Ma]=d;f.mb|=1<=b.Uc-1&&(f.ta[b.Ma]|=1024);switch(a){case 1:f.Da|=512;f.S|=49152;break;case 2:f.Da|=2048,f.S|=49152}L(this.b,20,5,172,function(){f.ta[b.Ma]|=128;f.S=f.S&65534|128;return!!(f.S&64)})}; +function hc(a,b,c,d,e,f){var g=~~((f+c.Ta-1)/c.Ta),h=new XMLHttpRequest;2048>g&&d+2048ic(this.b,a.Tc?jc(this.b,c):c,a.cache[b][e])){a.Vb(2,a,b,c,d);return}c+=2;--d}b++}a.Vb(0,a,b,c,d)}; +function Vb(a,b,c,d,e){for(var f,g;0g){b.Vb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Vb(0,b,c,d,e)}k.reset=function(){this.g.pb=this.g.pb&-120|20;this.f.Va=0;this.D.P=128;this.w.M=128;Xb(this)}; +k.Lc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.lc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.lc=d;f.C|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.gc[e]:(d=M(this,f.gc[e],a,b,c),0<=d&&(f.gc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Pa[e]= +b),d=f.Pa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Pa[e]=b),d=f.Pa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.Yb,a,b,c);0<=d&&(f.Yb=d);break;case 4194172:d=f.Ya;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.nd&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=M(this,e.Jb,a,b,c);0<=d&&(e.Jb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Ub(this));break;case 4194054:d=M(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194056:d=M(this,e.Ib,a,b,c);0<=d&&(e.Ib=d); +break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Cc,a,b,c);0<=d&&(e.Cc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.S,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.S=d&17279|g.S&34944|2048,d&1&&g.S&128?gc(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.ub,a,b,c);0<=d&&(g.ub=d);break;case 4193732:d=M(this,g.sb,a,b,c);0<=d&&(g.sb=d&65534);break;case 4193734:d= +M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Xb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.tb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.kd[e];break;case 4193746:d=M(this,g.Dc,a,b,c);0<=d&&(g.Dc=d);break;case 4193748:d=M(this,g.Ec[e],a,b,c);0<=d&&(g.Ec[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ld[e];break;case 4193754:d=M(this,g.Fc[e],a,b,c);0<=d&& +(g.Fc[e]=d);break;case 4193756:d=M(this,g.Qa[e],a,b,c);0<=d&&(g.Qa[e]=d&511);break;case 4193758:g.Zb[e]=g.Qa[e];d=g.Zb[e];break;case 4193760:d=g.hd[e];break;case 4193762:d=g.jd[e];break;case 4193764:d=g.fd[e];break;case 4193766:d=g.gd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.S=g.S&-769|(d&3)<<8);break;case 4193770:d=M(this,g.mc,a,b,c);0<=d&&(g.mc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Sa= +e.Sa&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Wb(this));break;case 4192514:d=M(this,e.Ab,a,b,c);0<=d&&(e.Ab=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Sa,a,b,c);0<=d&&(e.Sa=d&63,e.M=e.M&-49|(e.Sa&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Ub[0]=d&4?15:7,f.Ub[1]=d&2?15:7,f.Ub[3]= +d&1?15:7,f.Tb&&(e=2,f.lb&16&&(e=1),this.g.pb=this.g.pb&-8|e)));break;default:return f.J|=16,f.L(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.na[0][e],a,b,c);0<=d&&(f.na[0][e]=d,f.na[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.na[1][e],a,b,c);0<=d&&(f.na[1][e]=d,f.na[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.ib)return f.L(4,234);e=a>>2&31;d=f.Mb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Mb[e]=a&2?d<<16|f.Mb[e]&65535:f.Mb[e]&4294901760|d&65534));break; +case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Nb[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var lc={},Qb=(lc[65382]=[null,null,K.prototype.Wc,K.prototype.pd,"LKS"],lc[65402]=[null,null,K.prototype.Xc,K.prototype.qd,"MMR0"],lc[65534]=[null,null,K.prototype.Yc,K.prototype.rd,"PSW"],lc); +La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),sc(this,oc?tc:uc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Z:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},la:function(a){var 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<< +a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.T)&&c.ja(!0)}return this.ic(a,b)},ea:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.T)&&c.ja(!0)}return this.jc(a,b)},qa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,1,d.G)&&d.ja(!0)}this.f?this.K(a, +b,c):this.ac(a,b,c)},za:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.G)&&d.ja(!0)}this.f?this.K(a,b,c):this.qc(a,b,c)},R:function(a){return this.w[a]},Y:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},$:function(a){return this.B.getUint16(a,!0)},ha:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ma:function(a,b){this.w[a]=b; +this.Ua=!0},ua:function(a,b,c){this.w[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},xa:function(a,b){this.B.setUint16(a,b,!0);this.Ua=!0},Aa:function(a,b,c){this.H[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&yc(a,xc,!1),(a.F=c.F)&&wc(a,xc,!1))} +function Ac(a,b){b?--a.F||(a.$b=a.f?a.K:a.ac,a.Ic=a.f?a.G:a.qc):--a.g||(a.Wb=a.ic,a.Bc=a.jc)}function wc(a,b,c){c&&a.F||(a.$b=!a.f&&b[1]||a.K,a.Ic=!a.f&&b[3]||a.G);if(c||void 0===c)a.ac=b[1]||a.K,a.qc=b[3]||a.G}function yc(a,b,c){c&&a.g||(a.Wb=b[0]||a.I,a.Bc=b[2]||a.N);if(c||void 0===c)a.ic=b[0]||a.I,a.jc=b[2]||a.N}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)}var Bc=[],vc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba],xc=[I.prototype.T,I.prototype.qa,I.prototype.ea,I.prototype.za]; +if(kb)var uc=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.xa],tc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa];function Cc(a,b){w.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.ab=Math.round(this.Aa/1E4)/100;this.kb=this.ab*this.Xa;this.v.ga=!1;this.v.oc=!1;this.v.yb=a.autoStart;this.v.uc=!1;this.v.ob=!1;this.Fb=this.ha=0;this.Gb=a.csStart;this.qb=a.csInterval;this.rb=a.csStop;this.N=[];this.Sb=this.md.bind(this);G(this)}y(Cc); +var Dc=["power","reset"];k=Cc.prototype;k.Oa=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.qb,c=!0);0<=a.rb&&a.rb<=Jc(a)&&(a.qb=a.rb=-1,Gc(a),a.ja(),c=!0);c&&a.i(Jc(a)+" cycles: checksum="+p(a.Fb))}} +function Kc(a,b,c,d){if(a.K[b]){void 0===c&&(jb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.qa||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} +k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.ab*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Nb()}Mc(a,a.T);a.T=0;a.R=ra();a.Z=0;Nc(a);return d}function Ob(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Pb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function hd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function id(a){a.$-=a.b;a.b=0} +k.md=function(){if(this.v.ga){this.nb>=this.Aa&&Nc(this,!0);this.ua=0;this.za=ra();if(this.Z){var a=this.za-this.Z;a>this.Db&&(this.R+=a,this.R>this.za&&(this.R=this.za))}try{do{var b=gd(this,this.v.ob?1:this.Ba);try{this.wb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;hd(this,c);this.ua+=c;this.T+=c;Mc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Qb&&(this.D&&this.D.Fa(),this.Qb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.D&&this.D.stop(ra(), +Jc(this));jb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Sb;this.Z=ra();c=this.Db;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.R;d&&(this.Y=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ea=0,Lc(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.nb+=this.ua;this.Z+=c;a(b,c)}}}; +k.vb=function(a){if(ib(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Lc(this);this.v.ga=!0;this.v.oc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Nb(!0),this.D.start(this.R,Jc(this)));N(this,!0);setTimeout(this.Sb,0);return!0};k.wb=function(){return 0}; +k.ja=function(a){if(this.v.ga){id(this);Mc(this,this.T);this.T=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Jc(this));N(this)}this.v.complete=a};function N(a,b){a.D&&a.D.Fa(b)} +function jd(a){this.Vc=+a.model||1170;this.hc=a.resetAddr||0;Cc.call(this,a,6666667);this.Cb=0;this.decode=kd.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.W=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.hc];this.Pa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, +0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Mb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.gc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.fb=this.H=this.I=this.C=0;this.ib=70;this.ma=-1;ld(this);this.v.complete=this.v.Nc=!1}y(jd,Cc);k=jd.prototype;k.reset=function(){this.v.ga&&this.ja();ld(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; +function ld(a){a.Za=255;a.J=0;a.lc=0;a.G=0;a.Ya=0;a.Yb=0;a.lb=0;a.Tb=0;a.wa=0;a.Ub=[7,7,7,7];a.w=[];a.C|=2;Rb(a)}function Rb(a){a.Tb?(a.zb=65536,a.ba=a.Qc):(a.zb=0,a.ba=a.Pc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Kb(this.F));return a.data()}; +k.restore=function(a){var b=a[1];this.ea=b[1];Lc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].La-=b;break}b-=a.w[f].La}a.w.splice(f+1,0,{La:b,Ac:c<<5&224,Hc:d,fc:e})}a.C|=2}function Sb(a){return a.O=a.O&63728|a.Na()|od(a)|nd(a)|md(a)} +function Tb(a,b){a.W=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Pa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Pa[c];a.Pa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function P(a,b){a.C&128||(a.W=a.aa=b,a.V=0)}function sd(a,b,c){a.C&128||(a.W=a.aa=a.U=b,a.V=c||0)}function td(a,b,c,d){a.C&128||(a.W=a.aa=a.U=b,a.V=(c^b)&(d^b))}function ud(a,b){a.C&128||(a.W=a.aa=a.U=b,a.V=a.W^a.U>>1)} +function vd(a,b,c,d){a.C&128||(a.W=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Sb(this):this.B||(a=4,b=!0);this.G&57344||(this.Ya=63222,this.Yb=a);this.B=0;var c=qd(this,a|65536),d=qd(this,a+2&65535|65536);Tb(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);wd(this,this.ma);wd(this,this.u[7]);rd(this,c);this.C&=-113;this.ma=-1;throw a;};function xd(a){var b=yd(a),c=yd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);rd(a,b);Tb(a,c);a.C&=-17} +function jc(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Mb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function zd(a,b,c){var d,e,f,g=0;if(c&a.Tb){d=b>>13&a.Ub[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=jc(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&3915776<=f&&(a.J|=32,a.L(4,12));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.na[a.B][d]=e;if(4194170!== +f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.L(168,16)),a.G&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=qd(a,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=qd(a,e)|g; +a.b-=8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=qd(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.C|=64));return e}k.Pc=function(a,b,c){return Ad(this,a,b,c)};k.Qc=function(a,b,c){return zd(this,Ad(this,a,b,c),c)}; +function Bd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Ad(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=qd(a,d|c&65536),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c}function Cd(a,b,c,d){a.G&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Ad(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=zd(a,e|c&65536,4),a.B=a.O>>14&3,ic(a,e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d} +function Dd(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.ba(b,c,3),a=a.F.jb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=kc(a,a.ba(b,d,2)):c=a.u[d];return c}function Fd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Ad(a,b,c,8)}function Gd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.F.jb(c)):a=a.u[c]&255;return a}function Hd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=kc(a,a.ba(b,d,2)):c=a.u[d];return c} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.fb=a.ba(b,e,7),c=d.call(a,c,a.F.jb(e)),e&1&&a.b--,a.F.Lb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),ic(a,e,d.call(a,c,kc(a,e)))):a.u[e]=d.call(a,c,a.u[e])}function Id(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.F.Lb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function Jd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?ic(a,a.ba(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(rd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.wb=function(a){this.v.complete=!0;var b=this.v.Nc=this.j&&Kd(this.j),c=a?this.v.oc?0:1:-1;this.v.oc=!1;this.$=this.b=a;do{if(b){if(Ld(this.j,this.u[7],c)){this.ja();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.L(168,28):this.C&64?this.L(4,30):this.C&16&&this.L(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.lc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Ac,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.L(a.Hc,26):this.L(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Ya=0,this.Yb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(pd(this))}while(0>1|b<<16;ud(this,a);return a&65535}function Rd(a,b){a=b&2048|b>>1|b<<8;ud(this,a<<8);return a&255}function Sd(a,b){a=b&~a;P(this,a);return a}function Td(a,b){a=b&~a;P(this,a<<8);return a}function Ud(a,b){a|=b;P(this,a);return a} +function Vd(a,b){a|=b;P(this,a<<8);return a}function Wd(a,b){a=~b|65536;sd(this,a);return a&65535}function Xd(a,b){a=~b|256;sd(this,a<<8);return a&255}function Yd(a,b){a=b-a;this.C&128||(this.W=this.aa=a,this.V=b&(b^a));return a&65535}function Zd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.W=this.aa=c,this.V=b&(b^c));return a&255}function $d(a,b){a=b+a;this.C&128||(this.W=this.aa=a,this.V=a&(b^a));return a&65535} +function ae(a,b){a=b+a;var c=a<<8;this.C&128||(this.W=this.aa=c,this.V=c&(b<<8^c));return a&255}function be(a,b){a=-b;sd(this,a,a&b&32768);return a&65535}function ce(a,b){a=-b;sd(this,a<<8,(a&b&128)<<8);return a&255}function de(a,b){a=b<<1|this.U>>16&1;ud(this,a);return a&65535}function ee(a,b){a=b<<1|this.U>>16&1;ud(this,a<<8);return a&255}function fe(a,b){a=(this.U&65536|b)>>1|b<<16;ud(this,a);return a&65535}function ge(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;ud(this,a<<8);return a&255} +function he(a,b){var c=b-a;vd(this,c,a,b);return c&65535}function ie(a,b){var c=b-a;vd(this,c<<8,a<<8,b<<8);return c&255}function je(a,b){this.C&128||(this.W=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function ke(a,b){a^=b;P(this,a);return a&65535} +function le(a){var b=Hd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.W=this.aa=c;this.b-=(this.g?6:7)+b} +function me(a){var b=Hd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.W=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.W=0);this.b-=5} +function ne(a){var b=Hd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.W=d>>16):(this.V=32768,this.aa=d>>15|d,this.W=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.W=0,this.V=32768,this.U=65536,this.b-=7}var oe=[0,7,7,10,7,11,9,13];function pe(a){var b=this.b;rd(this,Fd(this,a));this.b=b-oe[this.g]} +var qe=[0,14,14,17,14,18,16,20];function re(a){var b=this.b,c=Fd(this,a);a=a>>6&7;wd(this,this.u[a]);this.u[a]=this.u[7];rd(this,c);this.b=b-qe[this.g]}var se=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],te=[7,13,13,17,14,18,17,21];function ue(a){var b=Hd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.W=b>>16,this.aa=this.W|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)rd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Qe(a){R(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)}function Re(a){R(this,a,Ed(this,a),ke);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function kd(a){Se[a>>12].call(this,a)} +var Se=[function(a){Te[a>>8&15].call(this,a)},function(a){var b=Ed(this,a),c=this.b;P(this,Jd(this,a,b));this.b=c-se[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ed(this,a);a=Hd(this,a);vd(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Ed(this,a)&Hd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),Sd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){R(this,a,Ed(this,a),Ud);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),Md);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Ue[a>>8&15].call(this,a)},function(a){Ve[a>>8&15].call(this,a)},function(a){var b=Dd(this,a);P(this,Id(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Dd(this,a)<<8;a=Gd(this,a)<<8;vd(this,b-a,a,b);this.b-=this.g? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Dd(this,a)&Gd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Vd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),he);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],Te= +[function(a){We[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!od(this))},function(a){T(this,a,od(this))},function(a){T(this,a,!this.Na()==!nd(this))},function(a){T(this,a,!this.Na()!=!nd(this))},function(a){T(this,a,!od(this)&&!this.Na()==!nd(this))},function(a){T(this,a,od(this)||!this.Na()!=!nd(this))},re,re,function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},function(a){$e[a>>6&3].call(this,a)},W,W],Xe=[function(a){sd(this, +Jd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ye=[function(a){R(this,a,0,be);this.b-=this.g?11:6},function(a){R(this,a,md(this)?1:0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,md(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Hd(this,a);sd(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],Ze=[function(a){R(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Qd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Od);this.b-=this.g?9:3+(7==this.f?2:0)}],$e=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=qd(this,a|65536);rd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Bd(this,a,0);wd(this,a);P(this,a);this.b-=11},function(a){var b=yd(this),c=this.b;Cd(this,a, +0,b);P(this,b);this.b=c-te[this.g]},function(a){P(this,Jd(this,a,this.Na?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],We=[function(a){af[a&15].call(this,a)},W,W,W,pe,pe,pe,pe,function(a){if(a&8)this.L(8,6);else{var b=yd(this);a&=7;rd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.L(8,6)},function(a){bf[a&15].call(this,a)},function(a){cf[a&15].call(this,a)},Qe,Qe,Qe,Qe],af=[function(){this.O&49152?(this.J|=128,this.L(4, +3)):id(this);this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){xd(this);this.C|=this.O&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.O&49152||(ld(this),this.F.reset());this.b-=667},function(){xd(this);this.b-=13},W,W,W,W,W,W,W,W,W],bf=[ve,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.W=0;this.b-=5},U,U,U,U,U,U,U],cf=[ve,function(){this.U= +65536;this.b-=5},function(){this.V=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.W=32768;this.b-=5},V,V,V,V,V,V,V],Ue=[ue,ue,ne,ne,le,le,me,me,Re,Re,W,W,W,W,we,we],Ve=[function(a){T(this,a,!this.Na())},function(a){T(this,a,this.Na())},function(a){T(this,a,!md(this)&&!od(this))},function(a){T(this,a,md(this)||od(this))},function(a){T(this,a,!nd(this))},function(a){T(this,a,nd(this))},function(a){T(this,a,!md(this))},function(a){T(this,a,md(this))},function(){this.L(24,2); +this.b-=25},function(){this.L(28,5);this.b-=5},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},function(a){gf[a>>6&3].call(this,a)},W,W],df=[function(a){sd(this,Id(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.g?9:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,ce);this.b-= +this.g?11:6},function(a){Q(this,a,md(this)?1:0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);sd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],ff=[function(a){Q(this,a,0,ge);this.b-=this.g?9+(this.fb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Rd);this.b-=this.g?9+(this.fb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.g?9:3+(7== +this.f?2:0)}],gf=[W,function(a){a=Bd(this,a,65536);wd(this,a);P(this,a);this.b-=11},function(a){var b=yd(this),c=this.b;Cd(this,a,65536,b);P(this,b);this.b=c-te[this.g]},W];function hf(a){w.call(this,"ROM",a,hf);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){jf(c,a,b,f)})}}y(hf); +hf.prototype.Oa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;kf(this)};hf.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.sc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({xd:b,A:c,Sc:d,Ka:e,rc:f})}delete this.Ka}return!0};hf.prototype.Ia=function(){return!0}; +function jf(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.cc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){t("Empty ROM: "+ +b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].ac(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> +e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Pb)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.cc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ia=function(a){return a?this.save():!0};k.reset=function(){pf(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return pf(this)};function pf(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.kc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.H%a,this.Z&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.T)}};var qf={},of=(qf[65392]=[null,null,Y.prototype.$c,Y.prototype.td,"RCSR"],qf[65394]=[null,null,Y.prototype.Zc,Y.prototype.sd,"RBUF"],qf[65396]=[null,null,Y.prototype.bd,Y.prototype.vd,"XCSR"],qf[65398]=[null,null,Y.prototype.ad,Y.prototype.ud,"XBUF"],qf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};rf.prototype.xc=function(){return-1};rf.prototype.yc=function(){}; +function tf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +function uf(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.la[b]);var c=0;for(b in a.la)xf(a,b,a.la[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function zf(a,b){if(b)return yf(a,b,a.ha[b]);var c=0;for(b in a.ha)yf(a,b,a.ha[b]),c++;return 0>>d.H.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Jb[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].Nb(d&c.f,d),this.g--,b&&If(a,b));return c}; -k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Kb(this.H,d),this.g--,b&&If(a,b));return c};k.Rb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.H;e.O[(d&e.g)>>>e.ca].Bb(d&e.f,b&255,d);this.g--;c&&If(a,c);N(this.b,!0)}};k.nb=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.H,f=d&e.f,g=(d&e.g)>>>e.ca;f!=e.f?e.O[g].qc(f,b&65535,d):(e.O[g++].Bb(f,b&255,d),e.O[g&e.C].Bb(0,b>>8&255,d+1));this.g--;c&&If(a,c);N(this.b,!0)}}; -function Z(a){return{A:a,Ga:!1}}function Jf(a){return[a.A,a.Ga]}function Kf(a){return{A:a[0],Ga:a[1]}}function Hf(a,b,c){var d;c=(c?a.S:a.ob).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Pa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; -k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,hd(a),a.la=0,N(a))))}; -function Bf(a){var b;if(Jd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.U=["br"];if(a.F)for(b=1;b>>d.ca],!0);a.F=["bw"];a.Cb=0} -k.gb=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.H;f.O[e>>>f.ca].gb(e&f.f,a==this.F)}}d&&(a.push(b),c?b.Ga=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.F));h.Ga||Bf(a);break}}return f} -function Tf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Mf(z);break;case 8:v="@"+Mf(z);break;case 16:7>z?v="("+Mf(z)+ -")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Mf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Mf(z)+")";break;case 40:v="@-("+Mf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Mf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Mf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Pa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Yf(a));c&&(a.S=Z(d.u[7]),Pf(a,J(a,a.S.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Vf(a,b,g,f);a.i(f);a.S=b;e-=b.A-l;c++}}} -function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.S=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(ib(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Qc=[];"call"==Be&&(lb=1E5,Qc=["CALL"]);for(void 0!==Ae&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Fb=X;De++;lb--}}De||(a.i("no "+Ce+"history available"),a.Fb=void 0)}else{var Zb=Hf(a,ia);if(Zb){var $b=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),$b=wf(a,za)>>>0,65536<$b&&($b=65536));for(var nb="",Ra="dd"==Oa?4:"dw"==Oa?2:1,ac=Ra*$b||128,yg=ac+15>>4||1;yg--&&0bc?String.fromCharCode(bc):".";ac--}nb&&(nb+="\n");nb+=ia+" "+Sc+(0==pb?" "+Ge:"")}nb&&a.i(nb);a.ob=Zb}}}}break;case "e":if("else"==g[0])break;var Sa,Tc,Uc,Vc,Wc=g[0],Xc=g[1];"eb"==Wc?(Sa=1,Tc=255,Uc=a.jb,Vc=a.Rb):"e"==Wc||"ew"==Wc?(Sa=2,Tc=65535,Uc=a.Ha,Vc=a.nb):Xc=null;if(null==Xc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=Hf(a,Xc);if(cc)for(var dc=2;dc$c;){for(var Aa=null,Cg=256;65536>sb.A>>>0;){ad.A=a.Ha(sb,2);if(null==sb.A||!Cg--)break;if(!(ad.A&1)){for(var Dg=a,ec=ad,Ie=null,tb=ec.A, -Je=tb,bd=1;6>=bd&&tb;bd++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.I)){this.B=new O(this,"1.30.1","failsafe");jg(this.B)&&(og(this,d),a=2,pg(this.B));this.B.set("timestamp",sa());qg(this.B);var e=this.f&&!this.F;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.Eb());this.Y&&(og(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.C=0}; -function og(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function eg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=cb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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);Jg(a,b,c)}})}else c(a,null)} -function Kg(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=ma(a))}function f(a){e("Error: "+a);l&&(--vg||Ta(!0));l=!1}var g,h,l=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Hg(c,null,null,!1,e,function(d,l){l?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--vg||Ta(!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),--vg||Ta(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,m):Ig(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Ta(!1);return Kg(a,b,c,d)};window.enableEvents=Ta;window.sendEvent=Ua;})(); +63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};k=Af.prototype; +k.Oa=function(a,b,c,d){this.F=b;this.b=c;this.D=a;(a=Ec(a,"messages"))&&Df(this,a);this.Db=Gf;Hf(this,function(a){a:{var b=d.F.X,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(If(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.F.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].ic(d&c.f,d),this.g--,b&&Jf(a,b));return c}; +k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Jf(a,b));return c};k.Lb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.F;e.X[(d&e.g)>>>e.ca].ac(d&e.f,b&255,d);this.g--;c&&Jf(a,c);N(this.b,!0)}};k.nc=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.F;e.X[(d&e.g)>>>e.ca].qc(d&e.f,b&65535,d);this.g--;c&&Jf(a,c);N(this.b,!0)}};function Z(a){return{A:a,Ga:!1}}function Kf(a){return[a.A,a.Ga]} +function Lf(a){return{A:a[0],Ga:a[1]}}function If(a,b,c){var d;c=(c?a.R:a.nb).A;if(void 0!==b){d=b=wf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Pa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Sb(this.b)));return b}; +k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,id(a),a.la=0,N(a))))}; +function Cf(a){var b;if(Kd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.T=["br"];if(a.G)for(b=1;b>>d.ca],!0);a.G=["bw"];a.zb=0} +k.gb=function(a,b,c){var d=!0;c||Sf(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.X[e>>>f.ca].gb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Ga=!0:(Tf(this,a,a.length-1,"set"),Cf(this)));return d};function Sf(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.G));h.Ga||Cf(a);break}}return f} +function Uf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Nf(z);break;case 8:v="@"+Nf(z);break;case 16:7>z?v="("+Nf(z)+ +")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Nf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Nf(z)+")";break;case 40:v="@-("+Nf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Nf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Nf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Nf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Pa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Sb(d)));c&&(c+=" ");return c}function Zf(a){var b,c="";for(b=0;6>b;b++)c+=Yf(a,b);c=c+"\n"+(Yf(a,6)+Yf(a,7)+Yf(a,20));return c+=Xf(a,"T")+Xf(a,"N")+Xf(a,"Z")+Xf(a,"V")+Xf(a,"C")}k.sc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Zf(a));c&&(a.R=Z(d.u[7]),Qf(a,J(a,a.R.A)))}}function dg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Wf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} +function Vf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.R=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Rc=[];"call"==Ce&&(lb=1E5,Rc=["CALL"]);for(void 0!==Be&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Cb=X;Ee++;lb--}}Ee||(a.i("no "+De+"history available"),a.Cb=void 0)}else{var Yb=If(a,ia);if(Yb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||xg),Zb=xf(a,za)>>>0,65536>4||1;zg--&&0<$b;){var ac=0,Sc=0,pb,Tc="",He="",ia=J(a,Yb.A);for(pb=4==ob?16:a.qa;0bc?String.fromCharCode(bc):".";$b--}nb&&(nb+="\n");nb+=ia+" "+Tc+(0==pb?" "+He:"")}nb&&a.i(nb);a.nb=Yb}}}}break;case "e":if("else"==g[0])break;var Ra,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ra=1,Uc=255,Vc=a.jb,Wc=a.Lb):"e"==Xc||"ew"==Xc?(Ra=2,Uc=65535,Vc=a.Ha,Wc=a.nc):Yc=null;if(null==Yc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=If(a,Yc);if(cc)for(var dc=2;dcad;){for(var Aa=null,Dg=256;65536>sb.A>>>0;){bd.A=a.Ha(sb,2);if(null==sb.A||!Dg--)break;if(!(bd.A&1)){for(var Eg=a,ec=bd,Je=null,tb=ec.A,Ke=tb,cd=1;6>=cd&& +tb;cd++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;big){if(kg(d,this.I)){this.B=new O(this,"1.30.1","failsafe");kg(this.B)&&(pg(this,d),a=2,qg(this.B));this.B.set("timestamp",sa());rg(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=og(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?kg(d,g):("error"== +f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),qg(d),kg(d)?(c=og(d),e=!0):c=!1))}e&&ng(this,c?d:null)}else 2==a&&d.clear()}else ng(this);delete this.I;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(sg(this,this.b,b,c,a),this.b.yb());this.Y&&(pg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; +function pg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function fg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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);Kg(a,b,c)}})}else c(a,null)} +function Lg(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=ma(a))}function f(a){e("Error: "+a);l&&(--wg||Sa(!0));l=!1}var g,h,l=!0;wg++;$a[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Ig(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--wg||Sa(!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),--wg||Sa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ig(b,a,d,!0,e,m):Jg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Lg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 5453be8f6..a1de16dfc 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -9,144 +9,143 @@ typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encod function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} function va(a){if(ta)try{for(var b=0;bb?this.fb=this.id:(this.wb=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.nb=null;this.i.error=!1;this.w={};this.K=null;x.push(this)}var ya=void 0,za={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Mb=b.comment;this.fc=b;b=this.id.indexOf(".");0>b?this.cb=this.id:(this.wb=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.lb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.m=this.o/this.g|0;this.H=this.m-1;this.qa=[];this.A=null;this.Xa=this.I;a=new G;Ma(a,this.K);this.b=Array(this.m);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Xa(b|4186112,-1,1)} -function Oa(a,b,c){var d=!1,e=this.controller,f=e.qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Xa(c|4186112,b,1)}function Pa(a,b){var c=-1,d=this.controller;(a=d.qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Xa(b|4186112,-1,0)} -function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.qa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.Xa(c|4186112,b,0)}La.prototype.reset=function(){this.A&&this.A()};La.prototype.I=function(){return 0};La.prototype.la=function(a,b){b||this.reset();return!0}; -function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Ta)return l.tb+=l.Ta-f,l.Ta=f,!0;if(f>=l.Ta+l.tb){q=l.size-(f-m);q>g&&(q=g);l.tb=f-l.Ta+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.j)>>>a.c].Za(b&a.h,b)} -function Wa(a,b,c){var d=b&a.h,e=(b&a.j)>>>a.c;d!=a.h?a.b[e].Hc(d,c&65535,b):(a.b[e++].Sa(d,c&255,b),a.b[e&a.H].Sa(0,c>>8&255,b+1))}function Xa(a){for(var b=0,c=[],d=0;d>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.qa=[];this.m=null;this.Wa=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Wa(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Wa(c|4186112,b,1)} +function Pa(a,b){var c=-1,d=this.controller;(a=d.qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Wa(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.qa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.Wa(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.la=function(a,b){b||this.reset();return!0}; +function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Sa)return l.sb+=l.Sa-f,l.Sa=f,!0;if(f>=l.Sa+l.sb){q=l.size-(f-m);q>g&&(q=g);l.sb=f-l.Sa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Cb(b&a.h,b)} +function Wa(a){for(var b=0,c=[],d=0;d>5&3;c.hb=a>>1&15;c.ob=a&257?a&1?6:4:0;db(c);a=c.G;a&1|256&&(b=this.a.Ka&16?1:2);this.c.Na=this.c.Na&-8|b};k.lc=function(){return eb(this.a)};k.Ec=function(a){fb(this.a,a&-1809|eb(this.a)&1808);this.a.l|=128}; -function gb(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.ab=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ia[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;hb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ia[f])b.S|=32832, -b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.$a;e=65536-b.bb&65535;a.qb(b.T[f],c,d,e);return}}b.ab=f<<13|b.ab&8176|b.X%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.rc=function(a,b,c,d,e){var f=this.g;f.$a=d&65535;f.D=f.D&-49|d>>12&48;f.bb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function ib(a){var b=a.h,c,d,e,f=b.u>>8&3;b.u&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.sc,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.u>>1&7){case 2:b.xa&8&&(b.u&=63);b.xa=b.ac[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ia[f]){b.u|=37888;break}if((b.L&63)>=b.J[f]){b.u|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); -d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;hb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.u|=37888;else if((b.L&63)>=b.J[f])b.u|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ra&63)<<16|b.Wa;e=65536-b.xa&65535;a.qb(b.T[f],c,d,e);return}}I(a.a,20,5,112,function(){b.u|=129;return!!(b.u&64)})} -k.sc=function(a,b,c,d,e){var f=this.h;f.Wa=d&65535;f.u=f.u&-49|d>>12&48;f.ra=d>>16&63;f.L=~~(c/f.J[b.ja])<<6|c%f.J[b.ja];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.u|=33792;break;case 2:f.u|=40960}I(this.a,20,5,112,function(){f.u|=129;return!!(f.u&64)})};function jb(a){a=a.j;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.Ma=a.Qa=a.Oa=a.Aa=a.Fb=0} -function kb(a,b){var c=a.j,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.tc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.sb[b]=c.ma[b];c.F|=32896;c.V[b]|=32896;c.Ma|=1<=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ -(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;hb(a,c.T[b],d,e,f);return;case 57:if(c.ma[b]>=c.ub[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.ma[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Oa;f=65536-c.Qa&65535;a.qb(c.T[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} -k.tc=function(a,b,c,d,e){var f=this.j;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.ja]=e%f.Ha[0]<<8|c%f.J[0];f.sb[b.ja]=f.ma[b.ja]=d;f.Ma|=1<=b.ic-1&&(f.V[b.ja]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.V[b.ja]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function lb(a,b,c,d,e,f){var g=~~((f+c.sa-1)/c.sa),h=new XMLHttpRequest;2048>g&&d+2048g){b.Cb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Cb(0,b,c,d,e)}k.reset=function(){this.c.Na=this.c.Na&-120|20;this.b.wa=0;this.g.D=128;this.h.u=128;jb(this)}; -k.$b=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Eb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Eb=d;f.l|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.La[e]=b),d=f.La[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.La[e]=b),d=f.La[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.rb,a,b,c);0<=d&&(f.rb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Bc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.ab,a,b,c);0<=d&&(e.ab=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&gb(this));break;case 4194054:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194056:d=J(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194058:d=J(this,e.X,a,b,c);0<=d&&(e.X= -d);break;case 4194060:break;case 4194062:d=J(this,e.Sb,a,b,c);0<=d&&(e.Sb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.j;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?kb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= -J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&jb(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.Ma,a,b,c);0<=d&&(g.Ma=d&255);break;case 4193744:d=g.yc[e];break;case 4193746:d=J(this,g.Tb,a,b,c);0<=d&&(g.Tb=d);break;case 4193748:d=J(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.zc[e];break;case 4193754:d=J(this,g.Vb[e],a,b,c);0<=d&&(g.Vb[e]=d);break;case 4193756:d=J(this,g.ma[e],a,b,c);0<=d&&(g.ma[e]= -d&511);break;case 4193758:g.sb[e]=g.ma[e];d=g.sb[e];break;case 4193760:d=g.wc[e];break;case 4193762:d=g.xc[e];break;case 4193764:d=g.uc[e];break;case 4193766:d=g.vc[e];break;case 4193768:d=J(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Fb,a,b,c);0<=d&&(g.Fb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.u,a,b,c);0<=b&&0<=d&&(e.ra=e.ra&60|d>>4&3,e.u=e.u&-1023|d&1022,e.u&128||ib(this));break;case 4192514:d= -J(this,e.Wa,a,b,c);0<=d&&(e.Wa=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=J(this,e.ra,a,b,c);0<=d&&(e.ra=d&63,e.u=e.u&-49|(e.ra&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ka:(d=J(this,f.Ka,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ka=d,f.pb[0]=d&4?15:7,f.pb[1]=d&2?15:7,f.pb[3]=d&1?15:7,f.ob&&(e=2,f.Ka&16&&(e=1),this.c.Na=this.c.Na&-8|e)));break;default:return f.s|= -16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.cb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.cb[e]=a&2?d<<16|f.cb[e]&65535:f.cb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var ob={},cb=(ob[65382]=[null,null,H.prototype.jc,H.prototype.Cc,"LKS"],ob[65402]=[null,null,H.prototype.kc,H.prototype.Dc,"MMR0"],ob[65534]=[null,null,H.prototype.lc,H.prototype.Ec,"PSW"],ob);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>5&3;c.fb=a>>1&15;c.mb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ja&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.lc=function(){return db(this.a)};k.Ec=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; +function fb(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:256,mapped:0,maxblock:b.Ha[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.Za=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ha[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.Ya;e=65536-b.$a&65535;gb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ha[f])b.S|=32832, +b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.Ya;e=65536-b.$a&65535;a.pb(b.T[f],c,d,e);return}}b.Za=f<<13|b.Za&8176|b.X%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.rc=function(a,b,c,d,e){var f=this.g;f.Ya=d&65535;f.D=f.D&-49|d>>12&48;f.$a=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.sc,drive:f,blocksize:128,mapped:1,maxblock:b.Ha[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.xa&8&&(b.v&=63);b.xa=b.$b[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ha[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); +d=(b.ra&63)<<16|b.Va;e=65536-b.xa&65535;gb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ha[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ra&63)<<16|b.Va;e=65536-b.xa&65535;a.pb(b.T[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} +k.sc=function(a,b,c,d,e){var f=this.h;f.Va=d&65535;f.v=f.v&-49|d>>12&48;f.ra=d>>16&63;f.L=~~(c/f.J[b.ja])<<6|c%f.J[b.ja];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Oa=[0,0,0,0,0,0,0,0];a.La=a.Pa=a.Na=a.Aa=a.Fb=0} +function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.tc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ga[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.rb[b]=c.ma[b];c.F|=32896;c.V[b]|=32896;c.La|=1<=c.ub[0]||c.ba[b]>>8>=c.Ga[0]||(c.ba[b]&255)>=c.J[0]){c.Oa[b]|=1024;c.F|=49152;break}d=(c.ma[b]*c.Ga[0]+(c.ba[b]>>8))*c.J[0]+ +(c.ba[b]&255);e=(c.Aa&63)<<16|c.Na;f=65536-c.Pa&65535;gb(a,c.T[b],d,e,f);return;case 57:if(c.ma[b]>=c.ub[0]||c.ba[b]>>8>=c.Ga[0]||(c.ba[b]&255)>=c.J[0])c.Oa[b]|=1024,c.F|=49152;else{d=(c.ma[b]*c.Ga[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Na;f=65536-c.Pa&65535;a.pb(c.T[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} +k.tc=function(a,b,c,d,e){var f=this.l;f.Pa=65536-e&65535;f.Na=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ga[0]);f.ba[b.ja]=e%f.Ga[0]<<8|c%f.J[0];f.rb[b.ja]=f.ma[b.ja]=d;f.La|=1<=b.ic-1&&(f.V[b.ja]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.V[b.ja]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function kb(a,b,c,d,e,f){var g=~~((f+c.sa-1)/c.sa),h=new XMLHttpRequest;2048>g&&d+2048lb(this.a,a.hc?mb(this.a,c):c,a.cache[b][e])){a.ob(2,a,b,c,d);return}c+=2;--d}b++}a.ob(0,a,b,c,d)}; +function gb(a,b,c,d,e){for(var f,g;0g){b.ob(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.ob(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.wa=0;this.g.D=128;this.h.v=128;ib(this)}; +k.ac=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Eb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Eb=d;f.j|=2}break;case 4194294:if(70!==f.Ia)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ia)return K(f,4);d=1;break;case 4194290:if(70!==f.Ia)return K(f,4);d=0;break;case 4194288:if(70!==f.Ia)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ia)return K(f,4);e=a-4194272>>1;0>b?d=f.zb[e]:(d=J(this,f.zb[e],a,b,c),0<=d&&(f.zb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.qb,a,b,c);0<=d&&(f.qb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Bc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.Za,a,b,c);0<=d&&(e.Za=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194056:d=J(this,e.Ya,a,b,c);0<=d&&(e.Ya=d);break;case 4194058:d=J(this,e.X,a,b,c);0<=d&&(e.X= +d);break;case 4194060:break;case 4194062:d=J(this,e.Sb,a,b,c);0<=d&&(e.Sb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Pa,a,b,c);0<=d&&(g.Pa=d);break;case 4193732:d=J(this,g.Na,a,b,c);0<=d&&(g.Na=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= +J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Oa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.yc[e];break;case 4193746:d=J(this,g.Tb,a,b,c);0<=d&&(g.Tb=d);break;case 4193748:d=J(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.zc[e];break;case 4193754:d=J(this,g.Vb[e],a,b,c);0<=d&&(g.Vb[e]=d);break;case 4193756:d=J(this,g.ma[e],a,b,c);0<=d&&(g.ma[e]= +d&511);break;case 4193758:g.rb[e]=g.ma[e];d=g.rb[e];break;case 4193760:d=g.wc[e];break;case 4193762:d=g.xc[e];break;case 4193764:d=g.uc[e];break;case 4193766:d=g.vc[e];break;case 4193768:d=J(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Fb,a,b,c);0<=d&&(g.Fb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ra=e.ra&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= +J(this,e.Va,a,b,c);0<=d&&(e.Va=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=J(this,e.ra,a,b,c);0<=d&&(e.ra=d&63,e.v=e.v&-49|(e.ra&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ja:(d=J(this,f.Ja,a,b,c),0<=d&&(70!==f.Ia&&(d&=-49),f.Ja=d,f.nb[0]=d&4?15:7,f.nb[1]=d&2?15:7,f.nb[3]=d&1?15:7,f.mb&&(e=2,f.Ja&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ia)return K(f,4);e=a>>2&31;d=f.ab[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.ab[e]=a&2?d<<16|f.ab[e]&65535:f.ab[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var ob={},bb=(ob[65382]=[null,null,H.prototype.jc,H.prototype.Cc,"LKS"],ob[65402]=[null,null,H.prototype.kc,H.prototype.Dc,"MMR0"],ob[65534]=[null,null,H.prototype.lc,H.prototype.Ec,"PSW"],ob);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.c,0,c>>2),vb(this,rb?wb:xb);else{this.a=Array(c>>2);for(a=0;a>1),this.a=new Int32Array(this.b,0,c>>2),vb(this,rb?wb:xb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ga:function(a){var 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},pa: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},I:function(a,b){return this.M(a,b)},ca:function(a,b){return this.ea(a, -b)},na:function(a,b,c){this.w||this.Zb(a,b,c)},Da:function(a,b,c){this.w||this.Ea(a,b,c)},H:function(a){return this.b[a]},N:function(a){return this.b[a]},Z:function(a){return this.g.getUint16(a,!0)},fa:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.m[a>>1]},ha:function(a,b){this.b[a]=b;this.ta=!0},oa:function(a,b){this.b[a]=b;this.ta=!0},Ca:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Fa:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.m[a>>1]=b;this.ta=!0}}; -function Ma(a,b,c){a.K=b;a.h=a.j=0;c&&((a.h=c.h)&&zb(a,Ab,!1),(a.j=c.j)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.j||(a.Sa=!a.w&&b[1]||a.v,a.Hc=!a.w&&b[3]||a.G);if(c||void 0===c)a.Zb=b[1]||a.v,a.Ea=b[3]||a.G}function zb(a,b,c){c&&a.h||(a.Za=b[0]||a.o,a.oc=b[2]||a.A);if(c||void 0===c)a.M=b[0]||a.o,a.ea=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.W,G.prototype.pa,G.prototype.ga,G.prototype.Ga],Ab=[G.prototype.I,G.prototype.na,G.prototype.ca,G.prototype.Da]; -if(Ia)var xb=[G.prototype.H,G.prototype.ha,G.prototype.Z,G.prototype.Ca],wb=[G.prototype.N,G.prototype.oa,G.prototype.fa,G.prototype.Fa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.lb=a.cycles||b;this.ga=c;this.xb=Math.round(this.lb/1E4)/100;this.na=this.xb*this.ga;this.i.$=!1;this.i.Wb=!1;this.i.Va=a.autoStart;this.i.Hb=!1;this.i.mb=!1;this.jb=this.oa=0;this.kb=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.Ac.bind(this);F(this)}y(Db); -var Eb=["power","reset"];k=Db.prototype;k.va=function(a,b,c,d){this.A=a;this.B=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.ea/a.na&&(b=1),a.ga=b,b=a.xb*a.ga,a.na!=b)){a.na=b;b=a.na.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Nb(a,a.ca);a.ca=0;a.Z=ja();a.fa=0;Ob(a)}function ab(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.lb*a.ga/1E3,a.M[b][0]=c)} -k.Ac=function(){if(this.i.$){this.Bb>=this.lb&&Ob(this,!0);this.Ga=0;this.ib=ja();if(this.fa){var a=this.ib-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.ib&&(this.Z=this.ib))}try{do{for(var b,c=this.i.mb?1:this.eb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Xb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ga+=f;this.ca+=f;Nb(this,0,!0);a=f;if(this.i.mb){var l= -!1;this.jb=this.jb+this.Mb()|0;this.oa-=a;0>=this.oa&&(this.oa+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Pb(this)&&(this.Da=this.Ea=-1,Hb(this),Lb(this),l=!0);l&&this.U(Pb(this)+" cycles: checksum="+n(this.jb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.eb;15<=++this.Ob&&(this.A&&this.A.Ra(),this.Ob=0);break}}while(this.i.$)}catch(m){Lb(this);Ib(this);this.A&&this.A.stop(ja(),Pb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ja();d=this.Nb;this.Ga&& -(d=Math.round(d*this.Ga/this.eb));d-=this.fa-this.ib;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Mb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Bb+=this.Ga;this.fa+=d;b(c,d)}}};function Jb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Mb(a);a.i.$=!0;a.i.Wb=!0;a.Ca&&a.Ca.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.Z,Pb(a));Ib(a,!0);setTimeout(a.Qb,0)}}k.Xb=function(){return 0}; -function Lb(a){if(a.i.$){a.W-=a.a;a.a=0;Nb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ja(),Pb(a));Ib(a)}a.i.complete=void 0}function Ib(a,b){a.A&&a.A.Ra(b)} -function Qb(a){this.gc=a.resetAddr||0;Db.call(this,a,6666667);this.Kb=0;this.decode=Rb.bind(this);this.j=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.gc];this.La=[0,0,0,0,0,0];this.da=[0,0,0,0];this.hb=this.v=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.l=0;this.Ja=70;this.pa=-1;Sb(this);this.i.complete=this.i.bc=!1}y(Qb,Db);k=Qb.prototype;k.reset=function(){this.i.$&&Lb(this);Sb(this);Gb(this);this.i.error=!1;this.parent.reset.call(this)}; -function Sb(a){a.za=255;a.s=0;a.Eb=0;a.G=0;a.ya=0;a.rb=0;a.Ka=0;a.ob=0;a.gb=0;a.pb=[7,7,7,7];a.o=[];a.l|=2;db(a)}function db(a){a.ob?(a.Jb=65536,a.N=a.ec):(a.Jb=0,a.N=a.dc)}k.Mb=function(){return 0};k.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Xa(this.B));return a.data()}; -k.restore=function(a){var b=a[1];this.ha=b[1];Mb(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.o[f].ia-=b;break}b-=a.o[f].ia}a.o.splice(f+1,0,{ia:b,Rb:c<<5&224,Yb:d,yb:e})}a.l|=2}function eb(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|M(a)} -function fb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.j=b<<16;if((b^a.C)&2048)for(var c=a.La.length;0<=--c;){var d=a.f[c];a.f[c]=a.La[c];a.La[c]=d}a.v=b>>14&3;c=a.C>>14&3;a.v!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.v]);a.l|=2;a.C=b}function O(a,b){a.l&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.l&128||(a.m=a.h=a.j=b,a.g=c||0)}function Ub(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^b)&(d^b))}function Q(a,b){a.l&128||(a.m=a.h=a.j=b,a.g=a.m^a.j>>1)}function Vb(a,b,c,d){a.l&128||(a.m=a.h=a.j=b,a.g=(c^d)&(d^b))} -function K(a,b){var c=!1;0>a.pa?a.pa=eb(a):a.v||(b=4,c=!0);a.G&57344||(a.ya=63222,a.rb=b);a.v=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);fb(a,e&-12289|a.pa>>2&12288);c&&(a.s|=4,a.f[6]=4);Wb(a,a.pa);Wb(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.pa=-1;throw b;}function Xb(a){var b=Yb(a),c=Yb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;fb(a,c);a.l&=-17} -function mb(a,b){var c=b>>13&31;31>c?a.Ka&32&&(b=a.cb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Zb(a,b,c){var d,e,f,g=0;if(c&a.ob){d=b>>13&a.pb[a.v];e=a.R[a.v][d];f=(a.R[a.v][d+16]<<6)+(b&8191)&4194303;a.Ka&16?3932160<=f&&4186112>f&&(f=mb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&(3915776<=f&&(a.s|=32,K(a,4)),f&1&&!(c&1)&&(a.s|=64,K(a,4)));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.R[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;g&&(g&57344&&(0<=a.pa&&(g|=128),a.G&57344||(a.G=a.G|g|a.gb<<5|a.hb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239>>a.c;return c!=a.h?a.b[d].oc(c,b):a.b[d++].Za(c,b)|a.b[d&a.H].Za(0,b+1)<<8}function N(a,b){return nb(a,Zb(a,b,2))} -function Yb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b}function Wb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.v&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; -case 6:return e=Tb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Tb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.l|=64));return e}k.dc=function(a,b,c){return $b(this,a,b,c)};k.ec=function(a,b,c){return Zb(this,$b(this,a,b,c),c)}; -function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=N(a,d|c&65536),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function bc(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.v=a.C>>12&3,e=Zb(a,e|c&65536,4),a.v=a.C>>14&3,Wa(a.B,e,d&65535)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} -function cc(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)}function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.B,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Va(a.B,e)),e&1&&a.a--,a=a.B,a.b[(e&a.j)>>>a.c].Sa(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),c=d.call(a,c,nb(a,e)),Wa(a.B,e,c&65535)):a.f[e]=d.call(a,c,a.f[e])} -function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.B,a.b[(d&a.j)>>>a.c].Sa(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,d,4),Wa(a.B,d,c&65535)):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -k.Xb=function(a){this.i.complete=!0;this.i.bc=!1;this.i.Wb=!1;this.W=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?K(this,168):this.l&64?K(this,4):this.l&16&&K(this,12),this.l&=-113),this.l&7))if(this.l&2){this.l&=-3;a=null;for(var b=this.Eb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Rb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.l&4&&(this.f[7]= -this.f[7]+2&65535,this.l&=-5),a?K(this,a.Yb):K(this,160))}else this.l&1&&this.l++;this.G&57344||(this.ya=0,this.rb=this.f[7]);this.l=this.l&7|this.C&16;this.decode(Tb(this))}while(0>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},oa: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},H:function(a,b){return this.I(a,b)},Z:function(a,b){return this.ca(a, +b)},ha:function(a,b,c){this.A||this.Zb(a,b,c)},Ca:function(a,b,c){this.A||this.Da(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},W:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.ta=!0},na:function(a,b){this.c[a]=b;this.ta=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Ea:function(a,b){this.l[a>>1]=b;this.ta=!0}}; +function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&zb(a,Ab,!1),(a.u=c.u)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.u||(a.tb=!a.A&&b[1]||a.B,a.Hc=!a.A&&b[3]||a.w);if(c||void 0===c)a.Zb=b[1]||a.B,a.Da=b[3]||a.w}function zb(a,b,c){c&&a.h||(a.Cb=b[0]||a.m,a.oc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.oa,G.prototype.fa,G.prototype.Fa],Ab=[G.prototype.H,G.prototype.ha,G.prototype.Z,G.prototype.Ca]; +if(Ia)var xb=[G.prototype.G,G.prototype.ga,G.prototype.W,G.prototype.pa],wb=[G.prototype.M,G.prototype.na,G.prototype.ea,G.prototype.Ea];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.bb=a.cycles||b;this.ga=c;this.Ab=Math.round(this.bb/1E4)/100;this.na=this.Ab*this.ga;this.i.$=!1;this.i.Wb=!1;this.i.Ua=a.autoStart;this.i.Hb=!1;this.i.kb=!1;this.hb=this.oa=0;this.ib=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.Ac.bind(this);F(this)}y(Db); +var Eb=["power","reset"];k=Db.prototype;k.va=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} +k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.ea/a.na&&(b=1),a.ga=b,b=a.Ab*a.ga,a.na!=b)){a.na=b;b=a.na.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Nb(a,a.ca);a.ca=0;a.Z=ja();a.fa=0;Ob(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.bb*a.ga/1E3,a.M[b][0]=c)} +k.Ac=function(){if(this.i.$){this.Bb>=this.bb&&Ob(this,!0);this.Ra=0;this.gb=ja();if(this.fa){var a=this.gb-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.gb&&(this.Z=this.gb))}try{do{for(var b,c=this.i.kb?1:this.jb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Xb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ra+=f;this.ca+=f;Nb(this,0,!0);a=f;if(this.i.kb){var l= +!1;this.hb=this.hb+this.Lb()|0;this.oa-=a;0>=this.oa&&(this.oa+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Pb(this)&&(this.Da=this.Ea=-1,Hb(this),Lb(this),l=!0);l&&this.U(Pb(this)+" cycles: checksum="+n(this.hb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.jb;15<=++this.Pb&&(this.B&&this.B.Qa(),this.Pb=0);break}}while(this.i.$)}catch(m){Lb(this);Ib(this);this.B&&this.B.stop(ja(),Pb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ja();d=this.Nb;this.Ra&& +(d=Math.round(d*this.Ra/this.jb));d-=this.fa-this.gb;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Mb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Bb+=this.Ra;this.fa+=d;b(c,d)}}};function Jb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Mb(a);a.i.$=!0;a.i.Wb=!0;a.Ca&&a.Ca.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Z,Pb(a));Ib(a,!0);setTimeout(a.Qb,0)}}k.Xb=function(){return 0}; +function Lb(a){if(a.i.$){a.W-=a.a;a.a=0;Nb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Pb(a));Ib(a)}a.i.complete=void 0}function Ib(a,b){a.B&&a.B.Qa(b)} +function Qb(a){this.gc=a.resetAddr||0;Db.call(this,a,6666667);this.Kb=0;this.decode=Rb.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.gc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.fb=this.w=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.zb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.j=0;this.Ia=70;this.pa=-1;Sb(this);this.i.complete=this.i.bc=!1}y(Qb,Db);k=Qb.prototype;k.reset=function(){this.i.$&&Lb(this);Sb(this);Gb(this);this.i.error=!1;this.parent.reset.call(this)}; +function Sb(a){a.za=255;a.s=0;a.Eb=0;a.G=0;a.ya=0;a.qb=0;a.Ja=0;a.mb=0;a.eb=0;a.nb=[7,7,7,7];a.o=[];a.j|=2;cb(a)}function cb(a){a.mb?(a.Jb=65536,a.N=a.ec):(a.Jb=0,a.N=a.dc)}k.Lb=function(){return 0};k.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Wa(this.u));return a.data()}; +k.restore=function(a){var b=a[1];this.ha=b[1];Mb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ia-=b;break}b-=a.o[f].ia}a.o.splice(f+1,0,{ia:b,Rb:c<<5&224,Yb:d,xb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|M(a)} +function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Ub(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Vb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.pa?a.pa=db(a):a.w||(b=4,c=!0);a.G&57344||(a.ya=63222,a.qb=b);a.w=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);eb(a,e&-12289|a.pa>>2&12288);c&&(a.s|=4,a.f[6]=4);Wb(a,a.pa);Wb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.pa=-1;throw b;}function Xb(a){var b=Yb(a),c=Yb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} +function mb(a,b){var c=b>>13&31;31>c?a.Ja&32&&(b=a.ab[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Zb(a,b,c){var d,e,f,g=0;if(c&a.mb){d=b>>13&a.nb[a.w];e=a.R[a.w][d];f=(a.R[a.w][d+16]<<6)+(b&8191)&4194303;a.Ja&16?3932160<=f&&4186112>f&&(f=mb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&3915776<=f&&(a.s|=32,K(a,4));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.R[a.w][d]=e;if(4194170!== +f||a.w)a.eb=a.w,a.fb=d;g&&(g&57344&&(0<=a.pa&&(g|=128),a.G&57344||(a.G=a.G|g|a.eb<<5|a.fb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239>>a.c].oc(b&a.h,b)}function N(a,b){return nb(a,Zb(a,b,2))}function lb(a,b,c){b&1&&(a.s|=64,K(a,4));a=a.u;a.b[(b&a.u)>>>a.c].Hc(b&a.h,c&65535,b)}function Yb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b} +function Wb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.w&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; +case 6:return e=Tb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Tb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.dc=function(a,b,c){return $b(this,a,b,c)};k.ec=function(a,b,c){return Zb(this,$b(this,a,b,c),c)}; +function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=N(a,d|c&65536),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function bc(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Zb(a,e|c&65536,4),a.w=a.C>>14&3,lb(a,e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} +function cc(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)}function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].tb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),lb(a,e,d.call(a,c,nb(a,e)))):a.f[e]=d.call(a,c,a.f[e])}function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].tb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c} +function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?lb(a,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +k.Xb=function(a){this.i.complete=!0;this.i.bc=!1;this.i.Wb=!1;this.W=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Eb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Rb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?K(this,a.Yb):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.ya=0,this.qb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Tb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function nc(a,b){a=b&~a;O(this,a);return a}function oc(a,b){a=b&~a;O(this,a<<8);return a}function pc(a,b){a|=b;O(this,a);return a}function qc(a,b){a|=b;O(this,a<<8);return a}function rc(a,b){a=~b|65536;P(this,a);return a&65535} -function sc(a,b){a=~b|256;P(this,a<<8);return a&255}function tc(a,b){a=b-a;this.l&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.l&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.l&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function yc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function zc(a,b){a=b<<1|this.j>>16&1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1|this.j>>16&1;Q(this,a<<8);return a&255}function Bc(a,b){a=(this.j&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=((this.j&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Vb(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Vb(this,c<<8,a<<8,b<<8);return c&255} -function Fc(a,b){this.l&128||(this.m=this.h=b&65280,this.g=this.j=0);return(b<<8|b>>8)&65535}function Gc(a,b){a^=b;O(this,a);return a&65535}function Hc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.j=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Ic(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.j=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.j=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Jc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.j=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.j=65536,this.a-=7}var Kc=[0,7,7,10,7,11,9,13];function Lc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Kc[this.c]} -var Mc=[0,14,14,17,14,18,16,20];function Nc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Wb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Mc[this.c]}var Oc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Pc=[7,13,13,17,14,18,17,21];function Qc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.j=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Tc(a){U(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Uc(a){U(this,a,R(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Rb(a){Vc[a>>12].call(this,a)} +function sc(a,b){a=~b|256;P(this,a<<8);return a&255}function tc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function yc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function zc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function Bc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Vb(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Vb(this,c<<8,a<<8,b<<8);return c&255} +function Fc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Gc(a,b){a^=b;O(this,a);return a&65535}function Hc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Ic(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Jc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Kc=[0,7,7,10,7,11,9,13];function Lc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Kc[this.c]} +var Mc=[0,14,14,17,14,18,16,20];function Nc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Wb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Mc[this.c]}var Oc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Pc=[7,13,13,17,14,18,17,21];function Qc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Tc(a){U(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Uc(a){U(this,a,R(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Rb(a){Vc[a>>12].call(this,a)} var Vc=[function(a){Wc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,gc(this,a,b));this.a=c-Oc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Vb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? 2:0)},function(a){U(this,a,R(this,a),pc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Xc[a>>8&15].call(this,a)},function(a){Yc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);O(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Vb(this,b-a,a,b);this.a-=this.c?4+ (this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),oc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),qc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Dc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Wc=[function(a){Zc[a>> 4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ua()==!(this.g&32768))},function(a){V(this,a,!this.ua()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))},Nc,Nc,function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>> 6&3].call(this,a)},Y,Y],$c=[function(a){P(this,gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){U(this,a,0,xc);this.a-=this.c?11:6},function(a){U(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],bd=[function(a){U(this,a,0,Bc);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)},function(a){U(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],cd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=N(this,a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Wb(this,a);O(this,a);this.a-=11}, -function(a){var b=Yb(this),c=this.a;bc(this,a,0,b);O(this,b);this.a=c-Pc[this.c]},function(a){O(this,gc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){dd[a&15].call(this,a)},Y,Y,Y,Lc,Lc,Lc,Lc,function(a){if(a&8)K(this,8);else{var b=Yb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.l|=1),this.a-=5):K(this,8)},function(a){ed[a&15].call(this,a)},function(a){fd[a&15].call(this,a)},Tc,Tc,Tc,Tc], -dd=[function(){this.C&49152?(this.s|=128,K(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Xb(this);this.l|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Sb(this),this.B.reset());this.a-=667},function(){Xb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ed=[Rc,function(){this.j=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= -0;this.a-=5},W,W,W,W,W,W,W],fd=[Rc,function(){this.j=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Xc=[Qc,Qc,Jc,Jc,Hc,Hc,Ic,Ic,Uc,Uc,Y,Y,Y,Y,Sc,Sc],Yc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!M(this)&&!!(this.h&65535))},function(a){V(this,a,M(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +function(a){var b=Yb(this),c=this.a;bc(this,a,0,b);O(this,b);this.a=c-Pc[this.c]},function(a){O(this,gc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){dd[a&15].call(this,a)},Y,Y,Y,Lc,Lc,Lc,Lc,function(a){if(a&8)K(this,8);else{var b=Yb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){ed[a&15].call(this,a)},function(a){fd[a&15].call(this,a)},Tc,Tc,Tc,Tc], +dd=[function(){this.C&49152?(this.s|=128,K(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Xb(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Sb(this),this.u.reset());this.a-=667},function(){Xb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ed=[Rc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= +0;this.a-=5},W,W,W,W,W,W,W],fd=[Rc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Xc=[Qc,Qc,Jc,Jc,Hc,Hc,Ic,Ic,Uc,Uc,Y,Y,Y,Y,Sc,Sc],Yc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!M(this)&&!!(this.h&65535))},function(a){V(this,a,M(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, a,!M(this))},function(a){V(this,a,M(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},Y,Y],gd=[function(a){P(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,uc);this.a-=this.c? 9:3+(7==this.b?2:0)}],hd=[function(a){T(this,a,0,yc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],id=[function(a){T(this,a,0,Cc);this.a-=this.c?9+(this.vb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,mc);this.a-=this.c?9+(this.vb&1):3+(7==this.b? 2:0)},function(a){T(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],jd=[Y,function(a){a=ac(this,a,65536);Wb(this,a);O(this,a);this.a-=11},function(a){var b=Yb(this),c=this.a;bc(this,a,65536,b);O(this,b);this.a=c-Pc[this.c]},Y]; -function kd(a){v.call(this,"ROM",a,kd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.A=ba(this.h);if(this.h){a=this.h;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){ld(c,a,b,f)})}}y(kd);kd.prototype.va=function(a,b,c,d){this.B=b;this.a=c;this.K=d;md(this)};kd.prototype.la=function(){this.j&&(this.K&&this.K.a(this.id,this.m,this.c,this.j),delete this.j);return!0}; +function kd(a){v.call(this,"ROM",a,kd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){ld(c,a,b,f)})}}y(kd);kd.prototype.va=function(a,b,c,d){this.u=b;this.a=c;this.K=d;md(this)};kd.prototype.la=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; kd.prototype.ka=function(){return!0}; -function ld(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.j=h.symbols;if(!a.b.length){r("Empty ROM: "+b); +function ld(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].Zb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.fb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.v=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.la=function(a,b){if(!b)if(this.Pb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ka=function(a){return a?this.save():!0};k.reset=function(){rd(this)};k.save=function(){var a=new L(this);a.set(0,[]);return a.data()};k.restore=function(){return rd(this)};function rd(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Db=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.j){if(10==a||1024<=this.j.length)this.U(this.j), -this.j="";10!=a&&(this.j+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.nc,Z.prototype.Gc,"RCSR"],sd[65394]=[null,null,Z.prototype.mc,Z.prototype.Fc,"RBUF"],sd[65396]=[null,null,Z.prototype.qc,Z.prototype.Jc,"XCSR"],sd[65398]=[null,null,Z.prototype.pc,Z.prototype.Ic,"XBUF"],sd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b>>d.c].Zb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.cb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.la=function(a,b){if(!b)if(this.Ob(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ka=function(a){return a?this.save():!0};k.reset=function(){rd(this)};k.save=function(){var a=new L(this);a.set(0,[]);return a.data()};k.restore=function(){return rd(this)};function rd(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Db=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.U(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.nc,Z.prototype.Gc,"RCSR"],sd[65394]=[null,null,Z.prototype.mc,Z.prototype.Fc,"RBUF"],sd[65396]=[null,null,Z.prototype.qc,Z.prototype.Jc,"XCSR"],sd[65398]=[null,null,Z.prototype.pc,Z.prototype.Ic,"XBUF"],sd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.A)){this.j=new L(this,"1.30.1","failsafe");xd(this.j)&&(Cd(this,d),a=2,Dd(this.j));this.j.set("timestamp",ka());Ed(this.j);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xd(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.A;delete this.v}e=z(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Va());this.I&&(Cd(this,b),b.clear());!c&&this.j&&(this.j.clear(),delete this.j);this.g=0}; +k.Xa=function(a){void 0===a&&(a=this.b||(this.B?1:vd));if(!this.g){this.g++;var b=!1,c=!1;this.I=!1;var d=this.w||new L(this,"1.30.1");if(-1==a)b=!0;else if(a>vd){if(xd(d,this.B)){this.l=new L(this,"1.30.1","failsafe");xd(this.l)&&(Cd(this,d),a=2,Dd(this.l));this.l.set("timestamp",ka());Ed(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xd(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Ua());this.I&&(Cd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; function Cd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),g=new L(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&Lb(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;l Date: Thu, 6 Oct 2016 14:40:58 -0700 Subject: [PATCH 03/36] Picked up minor gh-pages changes --- modules/pdp11/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/pdp11/README.md b/modules/pdp11/README.md index 487326fca..008d511f0 100644 --- a/modules/pdp11/README.md +++ b/modules/pdp11/README.md @@ -20,6 +20,7 @@ PDPjs is currently comprised of the following non-shared components, as listed i * [messages.js](/modules/pdp11/lib/messages.js) * [panel.js](/modules/pdp11/lib/panel.js) * [bus.js](/modules/pdp11/lib/bus.js) +* [device.js](/modules/pdp11/lib/device.js) * [memory.js](/modules/pdp11/lib/memory.js) * [cpu.js](/modules/pdp11/lib/cpu.js) * [cpustate.js](/modules/pdp11/lib/cpustate.js) @@ -27,5 +28,6 @@ PDPjs is currently comprised of the following non-shared components, as listed i * [rom.js](/modules/pdp11/lib/rom.js) * [ram.js](/modules/pdp11/lib/ram.js) * [keyboard.js](/modules/pdp11/lib/keyboard.js) +* [serialport.js](/modules/pdp11/lib/serialport.js) * [debugger.js](/modules/pdp11/lib/debugger.js) * [computer.js](/modules/pdp11/lib/computer.js) From e24d507aa2cde835a32dbf6bfc7fd9d71d47b82c Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 6 Oct 2016 16:22:24 -0700 Subject: [PATCH 04/36] Removed useless version numbers and dates from .js file headers --- README.md | 2 +- modules/build/lib/build.js | 5 +---- modules/c1pjs/lib/computer.js | 5 +---- modules/c1pjs/lib/cpu.js | 5 +---- modules/c1pjs/lib/debugger.js | 5 +---- modules/c1pjs/lib/defines.js | 5 +---- modules/c1pjs/lib/disk.js | 5 +---- modules/c1pjs/lib/keyboard.js | 5 +---- modules/c1pjs/lib/nodebugger.js | 5 +---- modules/c1pjs/lib/panel.js | 5 +---- modules/c1pjs/lib/ram.js | 5 +---- modules/c1pjs/lib/rom.js | 5 +---- modules/c1pjs/lib/serial.js | 5 +---- modules/c1pjs/lib/video.js | 5 +---- modules/diskdump/lib/diskdump.js | 5 +---- modules/filedump/lib/filedump.js | 5 +---- modules/grunts/prepjs/tasks/prepjs.js | 5 +---- modules/htmlout/lib/htmlout.js | 5 +---- modules/htmlout/lib/httpapi.js | 5 +---- modules/markout/lib/markout.js | 5 +---- modules/pc6502/lib/bus.js | 5 +---- modules/pc6502/lib/computer.js | 5 +---- modules/pc6502/lib/cpu.js | 5 +---- modules/pc6502/lib/cpudef.js | 5 +---- modules/pc6502/lib/cpuops.js | 5 +---- modules/pc6502/lib/cpustate.js | 5 +---- modules/pc6502/lib/debugger.js | 5 +---- modules/pc6502/lib/defines.js | 5 +---- modules/pc6502/lib/keyboard.js | 5 +---- modules/pc6502/lib/memory.js | 5 +---- modules/pc6502/lib/messages.js | 5 +---- modules/pc6502/lib/nodebugger.js | 5 +---- modules/pc6502/lib/panel.js | 5 +---- modules/pc6502/lib/ram.js | 5 +---- modules/pc6502/lib/rom.js | 5 +---- modules/pc6502/lib/state.js | 5 +---- modules/pc6502/lib/video.js | 5 +---- modules/pc8080/lib/bus.js | 5 +---- modules/pc8080/lib/chipset.js | 5 +---- modules/pc8080/lib/computer.js | 5 +---- modules/pc8080/lib/cpu.js | 5 +---- modules/pc8080/lib/cpudef.js | 5 +---- modules/pc8080/lib/cpuops.js | 5 +---- modules/pc8080/lib/cpustate.js | 5 +---- modules/pc8080/lib/debugger.js | 5 +---- modules/pc8080/lib/defines.js | 5 +---- modules/pc8080/lib/keyboard.js | 5 +---- modules/pc8080/lib/memory.js | 5 +---- modules/pc8080/lib/messages.js | 5 +---- modules/pc8080/lib/nodebugger.js | 5 +---- modules/pc8080/lib/panel.js | 5 +---- modules/pc8080/lib/ram.js | 5 +---- modules/pc8080/lib/rom.js | 5 +---- modules/pc8080/lib/serialport.js | 5 +---- modules/pc8080/lib/video.js | 5 +---- modules/pcx86/bin/x86gen.js | 5 +---- modules/pcx86/lib/bus.js | 5 +---- modules/pcx86/lib/chipset.js | 5 +---- modules/pcx86/lib/computer.js | 5 +---- modules/pcx86/lib/cpu.js | 5 +---- modules/pcx86/lib/debugger.js | 5 +---- modules/pcx86/lib/defines.js | 5 +---- modules/pcx86/lib/disk.js | 5 +---- modules/pcx86/lib/fdc.js | 5 +---- modules/pcx86/lib/hdc.js | 5 +---- modules/pcx86/lib/interrupts.js | 5 +---- modules/pcx86/lib/keyboard.js | 5 +---- modules/pcx86/lib/memory.js | 5 +---- modules/pcx86/lib/messages.js | 5 +---- modules/pcx86/lib/mouse.js | 5 +---- modules/pcx86/lib/nodebugger.js | 5 +---- modules/pcx86/lib/panel.js | 5 +---- modules/pcx86/lib/parallelport.js | 5 +---- modules/pcx86/lib/ram.js | 5 +---- modules/pcx86/lib/rom.js | 5 +---- modules/pcx86/lib/serialport.js | 5 +---- modules/pcx86/lib/video.js | 5 +---- modules/pcx86/lib/x86.js | 5 +---- modules/pcx86/lib/x86cpu.js | 5 +---- modules/pcx86/lib/x86fpu.js | 5 +---- modules/pcx86/lib/x86func.js | 5 +---- modules/pcx86/lib/x86help.js | 5 +---- modules/pcx86/lib/x86mods.js | 5 +---- modules/pcx86/lib/x86op0f.js | 5 +---- modules/pcx86/lib/x86ops.js | 5 +---- modules/pcx86/lib/x86seg.js | 5 +---- modules/pdp11/README.md | 2 +- modules/pdp11/bin/oct2hex.js | 5 +---- modules/pdp11/lib/bus.js | 3 +-- modules/pdp11/lib/computer.js | 3 +-- modules/pdp11/lib/cpu.js | 3 +-- modules/pdp11/lib/cpuops.js | 3 +-- modules/pdp11/lib/cpustate.js | 3 +-- modules/pdp11/lib/debugger.js | 3 +-- modules/pdp11/lib/defines.js | 3 +-- modules/pdp11/lib/device.js | 3 +-- modules/pdp11/lib/keyboard.js | 3 +-- modules/pdp11/lib/memory.js | 3 +-- modules/pdp11/lib/messages.js | 3 +-- modules/pdp11/lib/nodebugger.js | 3 +-- modules/pdp11/lib/panel.js | 3 +-- modules/pdp11/lib/ram.js | 3 +-- modules/pdp11/lib/rom.js | 3 +-- modules/pdp11/lib/serialport.js | 3 +-- modules/shared/lib/component.js | 5 +---- modules/shared/lib/debugger.js | 5 +---- modules/shared/lib/defines.js | 5 +---- modules/shared/lib/diskapi.js | 5 +---- modules/shared/lib/dumpapi.js | 5 +---- modules/shared/lib/embed.js | 5 +---- modules/shared/lib/externs.js | 5 +---- modules/shared/lib/keys.js | 5 +---- modules/shared/lib/netlib.js | 5 +---- modules/shared/lib/nodebug.js | 5 +---- modules/shared/lib/private.js | 5 +---- modules/shared/lib/proclib.js | 5 +---- modules/shared/lib/reportapi.js | 5 +---- modules/shared/lib/save.js | 5 +---- modules/shared/lib/sockets.js | 5 +---- modules/shared/lib/state.js | 5 +---- modules/shared/lib/strlib.js | 5 +---- modules/shared/lib/userapi.js | 5 +---- modules/shared/lib/usrlib.js | 5 +---- modules/shared/lib/weblib.js | 5 +---- modules/textout/lib/textout.js | 5 +---- 125 files changed, 125 insertions(+), 462 deletions(-) diff --git a/README.md b/README.md index 5a9984b90..b1a8a6510 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ PCjs Machines -=== +============= Welcome to PCjs, home of [PCx86](/docs/pcx86/), the original IBM PC simulation that runs in your web browser. It is one of several JavaScript Machines in the [PCjs Project](https://github.com/jeffpar/pcjs), an open-source project that diff --git a/modules/build/lib/build.js b/modules/build/lib/build.js index 1fd2026e9..f434e5b59 100644 --- a/modules/build/lib/build.js +++ b/modules/build/lib/build.js @@ -1,10 +1,7 @@ /** * @fileoverview PCjs Build Options * @author Jeff Parsons - * @version 1.0 - * Created 2016-Feb-10 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/computer.js b/modules/c1pjs/lib/computer.js index e440c94a5..4f437d50f 100644 --- a/modules/c1pjs/lib/computer.js +++ b/modules/c1pjs/lib/computer.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Computer component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/cpu.js b/modules/c1pjs/lib/cpu.js index 600eaae47..7755f2d99 100644 --- a/modules/c1pjs/lib/cpu.js +++ b/modules/c1pjs/lib/cpu.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs 6502 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/debugger.js b/modules/c1pjs/lib/debugger.js index ef4e55ccc..83c8b98c1 100644 --- a/modules/c1pjs/lib/debugger.js +++ b/modules/c1pjs/lib/debugger.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Debugger component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-21 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/defines.js b/modules/c1pjs/lib/defines.js index 9ebb2c260..dbda2ee1a 100644 --- a/modules/c1pjs/lib/defines.js +++ b/modules/c1pjs/lib/defines.js @@ -1,10 +1,7 @@ /** * @fileoverview C1Pjs-specific compile-time definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/disk.js b/modules/c1pjs/lib/disk.js index bf5437cee..598c6d604 100644 --- a/modules/c1pjs/lib/disk.js +++ b/modules/c1pjs/lib/disk.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs DiskController component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Aug-09 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/keyboard.js b/modules/c1pjs/lib/keyboard.js index 869ce73d1..d72945ef0 100644 --- a/modules/c1pjs/lib/keyboard.js +++ b/modules/c1pjs/lib/keyboard.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Keyboard component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-20 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/nodebugger.js b/modules/c1pjs/lib/nodebugger.js index 930cd0525..4e9a98899 100644 --- a/modules/c1pjs/lib/nodebugger.js +++ b/modules/c1pjs/lib/nodebugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/panel.js b/modules/c1pjs/lib/panel.js index 73e444ad1..5bf81be49 100644 --- a/modules/c1pjs/lib/panel.js +++ b/modules/c1pjs/lib/panel.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Panel component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/ram.js b/modules/c1pjs/lib/ram.js index ee9b52d8d..5180bef38 100644 --- a/modules/c1pjs/lib/ram.js +++ b/modules/c1pjs/lib/ram.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs RAM component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/rom.js b/modules/c1pjs/lib/rom.js index c4b78948a..33e597305 100644 --- a/modules/c1pjs/lib/rom.js +++ b/modules/c1pjs/lib/rom.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs ROM component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/serial.js b/modules/c1pjs/lib/serial.js index 56bf53de5..f5597cc41 100644 --- a/modules/c1pjs/lib/serial.js +++ b/modules/c1pjs/lib/serial.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs SerialPort component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jul-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/c1pjs/lib/video.js b/modules/c1pjs/lib/video.js index 14179090a..3e524c2bf 100644 --- a/modules/c1pjs/lib/video.js +++ b/modules/c1pjs/lib/video.js @@ -1,10 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Video component * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/diskdump/lib/diskdump.js b/modules/diskdump/lib/diskdump.js index da82aac94..240140ace 100644 --- a/modules/diskdump/lib/diskdump.js +++ b/modules/diskdump/lib/diskdump.js @@ -1,10 +1,7 @@ /** * @fileoverview Converts disk images to/from JSON * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-02-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index 909ce4418..28a7c3554 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -1,10 +1,7 @@ /** * @fileoverview Converts file contents to JSON * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-02-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/grunts/prepjs/tasks/prepjs.js b/modules/grunts/prepjs/tasks/prepjs.js index 286afc32c..2d28959fa 100644 --- a/modules/grunts/prepjs/tasks/prepjs.js +++ b/modules/grunts/prepjs/tasks/prepjs.js @@ -1,10 +1,7 @@ /** * @fileoverview Pre-process JavaScript file(s) with well-defined constants inlined * @author Jeff Parsons (@jeffpar) - * @version 1.1 - * Created 2014-Mar-22 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/htmlout/lib/htmlout.js b/modules/htmlout/lib/htmlout.js index f0431ebad..691a4539f 100644 --- a/modules/htmlout/lib/htmlout.js +++ b/modules/htmlout/lib/htmlout.js @@ -1,10 +1,7 @@ /** * @fileoverview Builds default ("index.html") documents from HTML templates * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-02-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/htmlout/lib/httpapi.js b/modules/htmlout/lib/httpapi.js index 9977fbc50..00c198ba5 100644 --- a/modules/htmlout/lib/httpapi.js +++ b/modules/htmlout/lib/httpapi.js @@ -1,10 +1,7 @@ /** * @fileoverview Handles API requests and redirects * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-02-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/markout/lib/markout.js b/modules/markout/lib/markout.js index 7e2ec5c70..85b368bdc 100644 --- a/modules/markout/lib/markout.js +++ b/modules/markout/lib/markout.js @@ -1,10 +1,7 @@ /** * @fileoverview Parses simplified Markdown files * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-02-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/bus.js b/modules/pc6502/lib/bus.js index 834ecf9f5..13db606af 100644 --- a/modules/pc6502/lib/bus.js +++ b/modules/pc6502/lib/bus.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Bus component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/computer.js b/modules/pc6502/lib/computer.js index 02cc96891..c52e12f2f 100644 --- a/modules/pc6502/lib/computer.js +++ b/modules/pc6502/lib/computer.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Computer component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/cpu.js b/modules/pc6502/lib/cpu.js index 56b82e5ac..d14baad7e 100644 --- a/modules/pc6502/lib/cpu.js +++ b/modules/pc6502/lib/cpu.js @@ -1,10 +1,7 @@ /** * @fileoverview Controls the PC6502 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/cpudef.js b/modules/pc6502/lib/cpudef.js index 94acec96c..95afc6719 100644 --- a/modules/pc6502/lib/cpudef.js +++ b/modules/pc6502/lib/cpudef.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines PC6502 CPU constants. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/cpuops.js b/modules/pc6502/lib/cpuops.js index 5c5f5c7fd..814bac717 100644 --- a/modules/pc6502/lib/cpuops.js +++ b/modules/pc6502/lib/cpuops.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PC6502 opcode handlers. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/cpustate.js b/modules/pc6502/lib/cpustate.js index ac9ed61fc..30c9387a0 100644 --- a/modules/pc6502/lib/cpustate.js +++ b/modules/pc6502/lib/cpustate.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/debugger.js b/modules/pc6502/lib/debugger.js index bf9ec20b2..71a2b33b6 100644 --- a/modules/pc6502/lib/debugger.js +++ b/modules/pc6502/lib/debugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Debugger component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/defines.js b/modules/pc6502/lib/defines.js index 87e3fbfaf..9e732b90f 100644 --- a/modules/pc6502/lib/defines.js +++ b/modules/pc6502/lib/defines.js @@ -1,10 +1,7 @@ /** * @fileoverview PC6502-specific compile-time definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/keyboard.js b/modules/pc6502/lib/keyboard.js index 33b53136e..a8d69055c 100644 --- a/modules/pc6502/lib/keyboard.js +++ b/modules/pc6502/lib/keyboard.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Keyboard component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/memory.js b/modules/pc6502/lib/memory.js index 6c91972c6..8fe88bbcf 100644 --- a/modules/pc6502/lib/memory.js +++ b/modules/pc6502/lib/memory.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Memory component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/messages.js b/modules/pc6502/lib/messages.js index 30269ff95..b019b123a 100644 --- a/modules/pc6502/lib/messages.js +++ b/modules/pc6502/lib/messages.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/nodebugger.js b/modules/pc6502/lib/nodebugger.js index 638c0f2ae..6516aacf0 100644 --- a/modules/pc6502/lib/nodebugger.js +++ b/modules/pc6502/lib/nodebugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/panel.js b/modules/pc6502/lib/panel.js index 3af3affaa..d6b6ec53d 100644 --- a/modules/pc6502/lib/panel.js +++ b/modules/pc6502/lib/panel.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Panel component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/ram.js b/modules/pc6502/lib/ram.js index a1c4c7d7e..cd09c6daf 100644 --- a/modules/pc6502/lib/ram.js +++ b/modules/pc6502/lib/ram.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 RAM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/rom.js b/modules/pc6502/lib/rom.js index faa97ccec..c4eab4ebc 100644 --- a/modules/pc6502/lib/rom.js +++ b/modules/pc6502/lib/rom.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 ROM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/state.js b/modules/pc6502/lib/state.js index ca06ec461..ed2c7bc55 100644 --- a/modules/pc6502/lib/state.js +++ b/modules/pc6502/lib/state.js @@ -1,10 +1,7 @@ /** * @fileoverview The State class used by PCjs machines. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc6502/lib/video.js b/modules/pc6502/lib/video.js index ba541aecb..fcc4b7838 100644 --- a/modules/pc6502/lib/video.js +++ b/modules/pc6502/lib/video.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC6502 Video component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/bus.js b/modules/pc8080/lib/bus.js index e29ddc529..804e65eb5 100644 --- a/modules/pc8080/lib/bus.js +++ b/modules/pc8080/lib/bus.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Bus component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/chipset.js b/modules/pc8080/lib/chipset.js index 7514533a9..48beb7f3f 100644 --- a/modules/pc8080/lib/chipset.js +++ b/modules/pc8080/lib/chipset.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 ChipSet component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-25 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/computer.js b/modules/pc8080/lib/computer.js index 1912af22c..04c2194fc 100644 --- a/modules/pc8080/lib/computer.js +++ b/modules/pc8080/lib/computer.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Computer component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/cpu.js b/modules/pc8080/lib/cpu.js index 1b216fafa..0c64e3259 100644 --- a/modules/pc8080/lib/cpu.js +++ b/modules/pc8080/lib/cpu.js @@ -1,10 +1,7 @@ /** * @fileoverview Controls the PC8080 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/cpudef.js b/modules/pc8080/lib/cpudef.js index 76f0513eb..6b0837253 100644 --- a/modules/pc8080/lib/cpudef.js +++ b/modules/pc8080/lib/cpudef.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines PC8080 CPU constants. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/cpuops.js b/modules/pc8080/lib/cpuops.js index cd56061a5..7b4d99561 100644 --- a/modules/pc8080/lib/cpuops.js +++ b/modules/pc8080/lib/cpuops.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PC8080 opcode handlers. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-20 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/cpustate.js b/modules/pc8080/lib/cpustate.js index 42e1e77a3..de9fccd3b 100644 --- a/modules/pc8080/lib/cpustate.js +++ b/modules/pc8080/lib/cpustate.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/debugger.js b/modules/pc8080/lib/debugger.js index 927354f7d..76e1adb7f 100644 --- a/modules/pc8080/lib/debugger.js +++ b/modules/pc8080/lib/debugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Debugger component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/defines.js b/modules/pc8080/lib/defines.js index aa700ad07..5514989e7 100644 --- a/modules/pc8080/lib/defines.js +++ b/modules/pc8080/lib/defines.js @@ -1,10 +1,7 @@ /** * @fileoverview PC8080-specific compile-time definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/keyboard.js b/modules/pc8080/lib/keyboard.js index 6a1fd10f0..c3d3a3a7d 100644 --- a/modules/pc8080/lib/keyboard.js +++ b/modules/pc8080/lib/keyboard.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Keyboard component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/memory.js b/modules/pc8080/lib/memory.js index 5a7f4d1f1..79cdf68f9 100644 --- a/modules/pc8080/lib/memory.js +++ b/modules/pc8080/lib/memory.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Memory component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/messages.js b/modules/pc8080/lib/messages.js index 12db148ee..6b7df1580 100644 --- a/modules/pc8080/lib/messages.js +++ b/modules/pc8080/lib/messages.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-18 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/nodebugger.js b/modules/pc8080/lib/nodebugger.js index 638c0f2ae..6516aacf0 100644 --- a/modules/pc8080/lib/nodebugger.js +++ b/modules/pc8080/lib/nodebugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2016-May-12 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/panel.js b/modules/pc8080/lib/panel.js index fd780a0df..65778e021 100644 --- a/modules/pc8080/lib/panel.js +++ b/modules/pc8080/lib/panel.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Panel component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/ram.js b/modules/pc8080/lib/ram.js index 37238ffc6..051f3dcba 100644 --- a/modules/pc8080/lib/ram.js +++ b/modules/pc8080/lib/ram.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 RAM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/rom.js b/modules/pc8080/lib/rom.js index da0dee586..b60042bf3 100644 --- a/modules/pc8080/lib/rom.js +++ b/modules/pc8080/lib/rom.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 ROM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/serialport.js b/modules/pc8080/lib/serialport.js index 4ba66a468..ac9a189f0 100644 --- a/modules/pc8080/lib/serialport.js +++ b/modules/pc8080/lib/serialport.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 SerialPort component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Aug-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pc8080/lib/video.js b/modules/pc8080/lib/video.js index 4c4ac5c83..3a79c5746 100644 --- a/modules/pc8080/lib/video.js +++ b/modules/pc8080/lib/video.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PC8080 Video component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-20 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/bin/x86gen.js b/modules/pcx86/bin/x86gen.js index bef6bf836..6217d3bd1 100644 --- a/modules/pcx86/bin/x86gen.js +++ b/modules/pcx86/bin/x86gen.js @@ -1,10 +1,7 @@ /** * @fileoverview This file generates PCjs 8086 mode-byte decoders. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/bus.js b/modules/pcx86/lib/bus.js index 431df4159..e6d93388e 100644 --- a/modules/pcx86/lib/bus.js +++ b/modules/pcx86/lib/bus.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Bus component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/chipset.js b/modules/pcx86/lib/chipset.js index 07c96d1f0..aeea597aa 100644 --- a/modules/pcx86/lib/chipset.js +++ b/modules/pcx86/lib/chipset.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 ChipSet component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/computer.js b/modules/pcx86/lib/computer.js index c9d3501a2..293c2b88d 100644 --- a/modules/pcx86/lib/computer.js +++ b/modules/pcx86/lib/computer.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Computer component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/cpu.js b/modules/pcx86/lib/cpu.js index 5eb906117..73de14c10 100644 --- a/modules/pcx86/lib/cpu.js +++ b/modules/pcx86/lib/cpu.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/debugger.js b/modules/pcx86/lib/debugger.js index b7411abbf..324126ec9 100644 --- a/modules/pcx86/lib/debugger.js +++ b/modules/pcx86/lib/debugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Debugger component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-21 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/defines.js b/modules/pcx86/lib/defines.js index 5b7bfaa06..dabacef80 100644 --- a/modules/pcx86/lib/defines.js +++ b/modules/pcx86/lib/defines.js @@ -1,10 +1,7 @@ /** * @fileoverview PCx86-specific compile-time definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/disk.js b/modules/pcx86/lib/disk.js index f2b2311b0..0100a85ad 100644 --- a/modules/pcx86/lib/disk.js +++ b/modules/pcx86/lib/disk.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements disk image support for both FDC and HDC. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Nov-26 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/fdc.js b/modules/pcx86/lib/fdc.js index b2911bfef..92afcbc59 100644 --- a/modules/pcx86/lib/fdc.js +++ b/modules/pcx86/lib/fdc.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Floppy Drive Controller (FDC) component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Aug-09 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/hdc.js b/modules/pcx86/lib/hdc.js index 532fbf021..74abbac93 100644 --- a/modules/pcx86/lib/hdc.js +++ b/modules/pcx86/lib/hdc.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Hard Drive Controller (HDC) component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Nov-26 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/interrupts.js b/modules/pcx86/lib/interrupts.js index 62dd8aec2..455afc625 100644 --- a/modules/pcx86/lib/interrupts.js +++ b/modules/pcx86/lib/interrupts.js @@ -1,10 +1,7 @@ /** * @fileoverview PCx86-specific BIOS/DOS interrupt definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2014-Dec-11 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/keyboard.js b/modules/pcx86/lib/keyboard.js index bc5b5fa8f..723d38c82 100644 --- a/modules/pcx86/lib/keyboard.js +++ b/modules/pcx86/lib/keyboard.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Keyboard component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-20 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/memory.js b/modules/pcx86/lib/memory.js index ed70294e4..f244160c1 100644 --- a/modules/pcx86/lib/memory.js +++ b/modules/pcx86/lib/memory.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 "physical" Memory component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/messages.js b/modules/pcx86/lib/messages.js index 5d5d63b2b..b108468ea 100644 --- a/modules/pcx86/lib/messages.js +++ b/modules/pcx86/lib/messages.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @version 1.0 - * Created 2014-Dec-11 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/mouse.js b/modules/pcx86/lib/mouse.js index 1355c92fa..cebfa12aa 100644 --- a/modules/pcx86/lib/mouse.js +++ b/modules/pcx86/lib/mouse.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Mouse component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jul-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/nodebugger.js b/modules/pcx86/lib/nodebugger.js index 678f62d1a..2d632d516 100644 --- a/modules/pcx86/lib/nodebugger.js +++ b/modules/pcx86/lib/nodebugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/panel.js b/modules/pcx86/lib/panel.js index d44df9236..a90bcff0c 100644 --- a/modules/pcx86/lib/panel.js +++ b/modules/pcx86/lib/panel.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Panel component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-19 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/parallelport.js b/modules/pcx86/lib/parallelport.js index 82372bcc8..ea889fb3e 100644 --- a/modules/pcx86/lib/parallelport.js +++ b/modules/pcx86/lib/parallelport.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 ParallelPort component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jul-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/ram.js b/modules/pcx86/lib/ram.js index f003862e4..671229ecd 100644 --- a/modules/pcx86/lib/ram.js +++ b/modules/pcx86/lib/ram.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 RAM component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/rom.js b/modules/pcx86/lib/rom.js index f5a3f87ab..6567b3f83 100644 --- a/modules/pcx86/lib/rom.js +++ b/modules/pcx86/lib/rom.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 ROM component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/serialport.js b/modules/pcx86/lib/serialport.js index ff782e18e..8a04b0f6e 100644 --- a/modules/pcx86/lib/serialport.js +++ b/modules/pcx86/lib/serialport.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 SerialPort component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jul-01 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/video.js b/modules/pcx86/lib/video.js index c8b6da4ff..f8a35bf0f 100644 --- a/modules/pcx86/lib/video.js +++ b/modules/pcx86/lib/video.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements the PCx86 Video component. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-15 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86.js b/modules/pcx86/lib/x86.js index a9cb15ec5..86933679e 100644 --- a/modules/pcx86/lib/x86.js +++ b/modules/pcx86/lib/x86.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines PCx86 constants. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-05 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86cpu.js b/modules/pcx86/lib/x86cpu.js index 194092d64..b65d2e4f6 100644 --- a/modules/pcx86/lib/x86cpu.js +++ b/modules/pcx86/lib/x86cpu.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 8086/8088 CPU logic. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-05 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86fpu.js b/modules/pcx86/lib/x86fpu.js index ca5e93c74..e2c9a1d0d 100644 --- a/modules/pcx86/lib/x86fpu.js +++ b/modules/pcx86/lib/x86fpu.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 8087 FPU logic. * @author Jeff Parsons - * @version 1.0 - * Created 2015-Nov-09 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86func.js b/modules/pcx86/lib/x86func.js index 58d3a5b7b..1d13a694a 100644 --- a/modules/pcx86/lib/x86func.js +++ b/modules/pcx86/lib/x86func.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 8086 opcode helpers. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-05 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86help.js b/modules/pcx86/lib/x86help.js index bcc89f56c..3c4f4bf21 100644 --- a/modules/pcx86/lib/x86help.js +++ b/modules/pcx86/lib/x86help.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 opcode helpers. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Mar-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86mods.js b/modules/pcx86/lib/x86mods.js index 71ab398f3..87c9860c1 100644 --- a/modules/pcx86/lib/x86mods.js +++ b/modules/pcx86/lib/x86mods.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 general-purpose ModRegRM decoding. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Mar-06 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86op0f.js b/modules/pcx86/lib/x86op0f.js index 728905c54..252d530a7 100644 --- a/modules/pcx86/lib/x86op0f.js +++ b/modules/pcx86/lib/x86op0f.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 0x0F two-byte opcodes * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-05 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86ops.js b/modules/pcx86/lib/x86ops.js index bb7101ac5..3db5d9750 100644 --- a/modules/pcx86/lib/x86ops.js +++ b/modules/pcx86/lib/x86ops.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 8086 opcode decoding. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Sep-05 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pcx86/lib/x86seg.js b/modules/pcx86/lib/x86seg.js index b1d3d7b28..e8678112b 100644 --- a/modules/pcx86/lib/x86seg.js +++ b/modules/pcx86/lib/x86seg.js @@ -1,10 +1,7 @@ /** * @fileoverview Implements PCx86 X86 Segment Registers * @author Jeff Parsons - * @version 1.0 - * Created 2014-Sep-10 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/README.md b/modules/pdp11/README.md index 008d511f0..363bbf838 100644 --- a/modules/pdp11/README.md +++ b/modules/pdp11/README.md @@ -5,7 +5,7 @@ permalink: /modules/pdp11/ --- PDP-11 Machine Emulation Module (PDPjs) -========================================= +======================================= Overview --- diff --git a/modules/pdp11/bin/oct2hex.js b/modules/pdp11/bin/oct2hex.js index 5daa66fac..54fbcd904 100644 --- a/modules/pdp11/bin/oct2hex.js +++ b/modules/pdp11/bin/oct2hex.js @@ -1,10 +1,7 @@ /** * @fileoverview Converts octal constants to hex. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 1f3dbe00e..9b3ef927a 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Bus component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 57dd720ff..abc29fb2f 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Computer component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 40412c24b..a3381ddeb 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -1,8 +1,7 @@ /** * @fileoverview Controls the PDP11 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index b859c6d5a..b5f7a15c7 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements PDP11 opcode handlers. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 7e37f91b3..db17473df 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 CPU component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 4a584ad66..05d98af18 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Debugger component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 95a4983f7..147c603c0 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -1,8 +1,7 @@ /** * @fileoverview PDP11-specific compile-time definitions. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 47aa06c2e..fbc74f654 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements PDP11 device support. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-20 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/keyboard.js b/modules/pdp11/lib/keyboard.js index e8b0c9189..223eb7e3c 100644 --- a/modules/pdp11/lib/keyboard.js +++ b/modules/pdp11/lib/keyboard.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Keyboard component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index ba4c0080a..71c2599e5 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Memory component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index 3f09fe0bb..38ca2f2c2 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -1,8 +1,7 @@ /** * @fileoverview Defines PDP11 message categories. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/nodebugger.js b/modules/pdp11/lib/nodebugger.js index 4b4f7d92a..37799a030 100644 --- a/modules/pdp11/lib/nodebugger.js +++ b/modules/pdp11/lib/nodebugger.js @@ -1,8 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 25c9da565..3bb09c339 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 Panel component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 528295035..ae533f7ed 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 RAM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index a8d0844f8..baa978281 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 ROM component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Sep-03 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 9e3d9fcd7..9b14a54b7 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -1,8 +1,7 @@ /** * @fileoverview Implements the PDP11 SerialPort component. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Oct-04 + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index 6e70c0d90..ed6a9f9eb 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -1,10 +1,7 @@ /** * @fileoverview The Component class used by all PCjs components. * @author Jeff Parsons - * @version 1.0 - * Created 2012-May-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 168438853..481c66320 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -1,10 +1,7 @@ /** * @fileoverview Common PCjs Debugger support. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-21 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/defines.js b/modules/shared/lib/defines.js index 8e293612a..4fa92f6f5 100644 --- a/modules/shared/lib/defines.js +++ b/modules/shared/lib/defines.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions used by C1Pjs and PCjs. * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/diskapi.js b/modules/shared/lib/diskapi.js index 84fd9cbe7..dead0dc19 100644 --- a/modules/shared/lib/diskapi.js +++ b/modules/shared/lib/diskapi.js @@ -1,10 +1,7 @@ /** * @fileoverview Disk APIs, as defined by httpapi.js and consumed by disk.js * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/dumpapi.js b/modules/shared/lib/dumpapi.js index c91d13beb..290d47dec 100644 --- a/modules/shared/lib/dumpapi.js +++ b/modules/shared/lib/dumpapi.js @@ -1,10 +1,7 @@ /** * @fileoverview Disk APIs, as defined by diskdump.js and consumed by disk.js * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/embed.js b/modules/shared/lib/embed.js index c955260be..74895da68 100644 --- a/modules/shared/lib/embed.js +++ b/modules/shared/lib/embed.js @@ -1,10 +1,7 @@ /** * @fileoverview C1Pjs and PCjs embedding functionality. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Aug-28 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/externs.js b/modules/shared/lib/externs.js index e1a6509b9..f9368e8c7 100644 --- a/modules/shared/lib/externs.js +++ b/modules/shared/lib/externs.js @@ -1,10 +1,7 @@ /** * @fileoverview Externs used by PCjs and C1Pjs (for the Closure Compiler) * @author Jeff Parsons - * @version 1.0 - * Created 2012-Dec-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/keys.js b/modules/shared/lib/keys.js index ac80f390e..e0f841542 100644 --- a/modules/shared/lib/keys.js +++ b/modules/shared/lib/keys.js @@ -1,10 +1,7 @@ /** * @fileoverview Defines browser keyboard constants. * @author Jeff Parsons - * @version 1.0 - * Created 2012-Jun-20 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/netlib.js b/modules/shared/lib/netlib.js index 560c3a747..01defd8f4 100644 --- a/modules/shared/lib/netlib.js +++ b/modules/shared/lib/netlib.js @@ -1,10 +1,7 @@ /** * @fileoverview Net-related functions * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-03-16 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/nodebug.js b/modules/shared/lib/nodebug.js index 16f2f9ab0..b06f30e68 100644 --- a/modules/shared/lib/nodebug.js +++ b/modules/shared/lib/nodebug.js @@ -1,10 +1,7 @@ /** * @fileoverview Compile-time definitions for non-DEBUG configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2014-Aug-22 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/private.js b/modules/shared/lib/private.js index 9ad74208d..efea19a4e 100644 --- a/modules/shared/lib/private.js +++ b/modules/shared/lib/private.js @@ -1,10 +1,7 @@ /** * @fileoverview Definitions for PRIVATE configurations. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Apr-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/proclib.js b/modules/shared/lib/proclib.js index 086b51022..17877a0e2 100644 --- a/modules/shared/lib/proclib.js +++ b/modules/shared/lib/proclib.js @@ -1,10 +1,7 @@ /** * @fileoverview Process-related helper functions * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-05-07 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/reportapi.js b/modules/shared/lib/reportapi.js index aea3f8a5f..941cc13be 100644 --- a/modules/shared/lib/reportapi.js +++ b/modules/shared/lib/reportapi.js @@ -1,10 +1,7 @@ /** * @fileoverview Report API, as defined by httpapi.js * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-13 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/save.js b/modules/shared/lib/save.js index 548e4564a..54347ad41 100644 --- a/modules/shared/lib/save.js +++ b/modules/shared/lib/save.js @@ -1,10 +1,7 @@ /** * @fileoverview PCjs save functionality. * @author Jeff Parsons - * @version 1.0 - * Created 2016-Feb-17 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/sockets.js b/modules/shared/lib/sockets.js index c2b404397..34e8f212f 100644 --- a/modules/shared/lib/sockets.js +++ b/modules/shared/lib/sockets.js @@ -1,10 +1,7 @@ /** * @fileoverview Experimental code included by HTMLOut() only if "--sockets" * @author Jeff Parsons - * @version 1.0 - * Created 2014-Apr-29 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/state.js b/modules/shared/lib/state.js index 9dc1655bd..9b122a3ba 100644 --- a/modules/shared/lib/state.js +++ b/modules/shared/lib/state.js @@ -1,10 +1,7 @@ /** * @fileoverview The State class used by PCjs machines. * @author Jeff Parsons - * @version 1.0 - * Created 2012-May-14 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/strlib.js b/modules/shared/lib/strlib.js index b5aec8fdc..e0ea069ce 100644 --- a/modules/shared/lib/strlib.js +++ b/modules/shared/lib/strlib.js @@ -1,10 +1,7 @@ /** * @fileoverview String-related helper functions * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-03-09 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/userapi.js b/modules/shared/lib/userapi.js index b5baa8fb1..884d78d38 100644 --- a/modules/shared/lib/userapi.js +++ b/modules/shared/lib/userapi.js @@ -1,10 +1,7 @@ /** * @fileoverview User API, as defined by httpapi.js * @author Jeff Parsons - * @version 1.0 - * Created 2014-May-13 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/usrlib.js b/modules/shared/lib/usrlib.js index 18fadd948..fa1455910 100644 --- a/modules/shared/lib/usrlib.js +++ b/modules/shared/lib/usrlib.js @@ -1,10 +1,7 @@ /** * @fileoverview Assorted helper functions * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-03-09 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index 157febc84..ae7e3cce4 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -1,10 +1,7 @@ /** * @fileoverview Browser-related helper functions * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2014-05-08 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * diff --git a/modules/textout/lib/textout.js b/modules/textout/lib/textout.js index 657136b57..a85a2a3b6 100644 --- a/modules/textout/lib/textout.js +++ b/modules/textout/lib/textout.js @@ -1,10 +1,7 @@ /** * @fileoverview Provides miscellaneous text-munging services * @author Jeff Parsons (@jeffpar) - * @version 1.0 - * Created 2015-Apr-04 - * - * Copyright © 2012-2016 Jeff Parsons + * @copyright Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * From c69ebb7bcb17a02230346b2d51495621d2a51574 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 7 Oct 2016 09:49:02 -0700 Subject: [PATCH 05/36] Factored out mapVirtualToPhysical() calls when MMU not enabled, and fixed HALT (it actually halts the CPU now) --- docs/pcx86/examples/pcx86-dbg.js | 996 ++++++++++++++++++++++- docs/pcx86/examples/pcx86.js | 996 ++++++++++++++++++++++- modules/pdp11/bin/oct2hex.js | 7 +- modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/cpustate.js | 434 +++++----- versions/c1pjs/1.30.1/c1p-dbg.js | 441 +++++++++- versions/c1pjs/1.30.1/c1p.js | 441 +++++++++- versions/pc8080/1.30.1/pc8080-dbg.js | 671 +++++++++++++++- versions/pc8080/1.30.1/pc8080.js | 671 +++++++++++++++- versions/pcx86/1.30.1/pcx86-dbg.js | 996 ++++++++++++++++++++++- versions/pcx86/1.30.1/pcx86.js | 996 ++++++++++++++++++++++- versions/pdpjs/1.30.1/pdp11-dbg.js | 1103 +++++++++++++++++++++----- versions/pdpjs/1.30.1/pdp11.js | 963 ++++++++++++++++++---- 13 files changed, 8150 insertions(+), 567 deletions(-) diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 83f97359b..7d9c94ec9 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -1,4 +1,998 @@ -(function(){var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + + FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: + The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + + FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: + The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0= 0 && match.index > iComment) break; @@ -44,14 +44,15 @@ try { console.log("found negative octal value (" + match[2] + "), skipping"); continue; } - var sReplace = match[1] + "0x" + ("0000" + n.toString(16).toUpperCase()).substr(-4) + match[3] + " /*" + match[2] + "*/"; + var cch = (n <= 255? 2 : (n <= 65535? 4 : 8)); + var sReplace = match[1] + "0x" + ("00000000" + n.toString(16).toUpperCase()).substr(-cch) + match[3] + " /*" + match[2] + "*/"; sLine = sLine.substr(0, match.index) + sReplace + sLine.substr(match.index + match[0].length); re.lastIndex = match.index + sReplace.length; asLines[iLine] = sLine; } } sText = ""; - for (var iLine = 0; iLine < asLines.length; iLine++) { + for (iLine = 0; iLine < asLines.length; iLine++) { if (sText) sText += '\n'; sText += asLines[iLine]; } diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index b5f7a15c7..a3f04d256 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1101,7 +1101,7 @@ PDP11.opHALT = function(opCode) this.regErr |= PDP11.CPUERR.BADHALT; this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.HALT); } else { - this.endBurst(); + this.stopCPU(); } this.nStepCycles -= 7; }; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index db17473df..bc8345d31 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -201,9 +201,24 @@ CPUStatePDP11.prototype.resetRegs = function() this.regMMR3 = 0; // 172516 this.mmuEnable = 0; // MMU enabled for PDP11.ACCESS.READ or PDP11.ACCESS.WRITE this.mmuLastMode = 0; - this.mmuMask = [ // mask to control I&D access for each mode - 0x7, 0x7, 0x7, 0x7 + + this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit + this.mmuMask = 0x3ffff; + this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; + + this.mmuPDR = [ // memory management PDR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff], // mode 2 with illegal PDRs + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 ]; + this.mmuPAR = [ // memory management PAR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 + ]; + /** @type {Array.} */ this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; @@ -213,19 +228,27 @@ CPUStatePDP11.prototype.resetRegs = function() /** * initMemoryAccess() * - * Define getAddr() handler and DSPACE setting appropriate for the current MMU mode, in order to eliminate + * Define handlers and DSPACE setting appropriate for the current MMU mode, in order to eliminate * unnecessary calls to mapVirtualToPhysical(). * + * TODO: We could further optimize readWordFromAddr(), splitting it into readWordFromDSpace() and + * readWordFromISpace(), eliminating the need to OR the addrDSpace bit when we know that bit is zero, + * but that seems like a pretty tiny optimization. + * * @this {CPUStatePDP11} */ CPUStatePDP11.prototype.initMemoryAccess = function() { if (this.mmuEnable) { this.addrDSpace = PDP11.ACCESS.DSPACE; - this.getAddr = this.getAddrVirtual; + this.getAddrByMode = this.getVirtualAddrByMode; + this.readWordFromAddr = this.readWordFromVirtual; + this.writeWordToAddr = this.writeWordToVirtual; } else { this.addrDSpace = 0; - this.getAddr = this.getAddrPhysical; + this.getAddrByMode = this.getPhysicalAddrByMode; + this.readWordFromAddr = this.readWordFromPhysical; + this.writeWordToAddr = this.writeWordToPhysical; } }; @@ -519,7 +542,7 @@ CPUStatePDP11.prototype.getPC = function() */ CPUStatePDP11.prototype.getPCWord = function() { - var data = this.readWordFromVirtual(this.regsGen[PDP11.REG.PC]); + var data = this.readWordFromAddr(this.regsGen[PDP11.REG.PC]); this.advancePC(2); return data; }; @@ -568,17 +591,6 @@ CPUStatePDP11.prototype.setSP = function(addr) this.regsGen[PDP11.REG.SP] = addr & 0xffff; }; -/** - * requestHALT() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.requestHALT = function() -{ - // TODO: There will be more work to do than this.... - this.endBurst(); -}; - /** * interrupt(delay, priority, vector, callback) * @@ -957,8 +969,8 @@ CPUStatePDP11.prototype.trap = function(vector, reason) * Read from kernel D space */ this.mmuMode = 0; - var newPC = this.readWordFromVirtual(vector | PDP11.ACCESS.DSPACE); - var newPSW = this.readWordFromVirtual(((vector + 2) & 0xffff) | PDP11.ACCESS.DSPACE); + var newPC = this.readWordFromAddr(vector | this.addrDSpace); + var newPSW = this.readWordFromAddr(((vector + 2) & 0xffff) | this.addrDSpace); /* * Set new PSW with previous mode @@ -1038,14 +1050,13 @@ CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) * mapVirtualToPhysical(virtualAddress, accessFlags) * * mapVirtualToPhysical() does memory management. It converts a 17 bit I/D - * virtual address to a 22 bit physical address (Note: the eight pseudo addresses - * for handling registers are NOT known at this level - those exist only for higher - * level functions). A real PDP 11/70 memory management unit can be enabled separately - * for read and write for diagnostic purposes. This is handled here by having by having - * an enable mask (mmuEnable) which is tested against the operation access mask - * (accessFlags). If there is no match then the virtual address is simply mapped - * as a 16 bit physical address with the upper page going to the IO address space. - * Significant access mask values used are PDP11.ACCESS.READ and PDP11.ACCESS.WRITE + * virtual address to a 22 bit physical address. A real PDP 11/70 memory management + * unit can be enabled separately for read and write for diagnostic purposes. + * This is handled here by having an enable mask (mmuEnable) which is tested against + * the operation access mask (accessFlags). If there is no match then the virtual + * address is simply mapped as a 16 bit physical address with the upper page going + * to the IO address space. Significant access mask values used are PDP11.ACCESS.READ + * and PDP11.ACCESS.WRITE * * As an aside it turns out that it is the memory management unit that does odd address * and non-existent memory trapping: who knew? :-) I thought these would have been @@ -1059,13 +1070,6 @@ CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) * however something happens to cause a trap then no restore is done as setPSW() * will have been invoked as part of the trap, which will resynchronize mmuMode * - * mmuMask[mmuMode] is used to control whether I/D space is active or not for - * each address space. If separate I/D mapping is enabled then this mask will contain - * 0xF to retain the I/D bit - or if not it will contain 0x7 to mask out the I/D bit. - * - * mmuMap[mmuMode] contains the memory map. Each entry has 32 values; 16 PDRs - * (8 I space pages and 8 D space pages) followed by 16 PARs - * * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 * & above) maps directly to UNIBUS space - including low memory. This doesn't appear to * be particularly useful as it restricts maximum system memory - although it does appear @@ -1085,114 +1089,106 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl { var page, pdr, physicalAddress, errorMask = 0; - //if (virtualAddress & ~0x1ffff) this.panic(89); // check VA range - //if (!accessFlags) this.panic(93); // must have PDP11.ACCESS.READ or PDP11.ACCESS.WRITE + /* + * Verify that 1) the incoming virtual address is within the 17-bit I/D range, 2) that + * accessFlags is properly set, and 3) that the MMU is enabled (because non-MMU code paths + * should no longer be going through this function; the Bus component is responsible for + * mapping physical addresses appropriately). + */ + this.assert(!(virtualAddress & ~0x1ffff) && accessFlags && (accessFlags & this.mmuEnable)); - if (!(accessFlags & this.mmuEnable)) { - physicalAddress = virtualAddress & 0xffff; // virtual address without MMU is 16 bit (no I&D) - this.mmuLastVirtual = physicalAddress; - if (physicalAddress >= BusPDP11.IOPAGE_VIRT) { - physicalAddress |= BusPDP11.IOPAGE_22BIT; - } + this.mmuLastVirtual = virtualAddress; + + page = virtualAddress >> 13; + if (!(this.regMMR3 & this.mapMMR3[this.mmuMode])) page &= 7; + pdr = this.mmuPDR[this.mmuMode][page]; + physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask; + + if (physicalAddress < this.mmuMemorySize) { /* - * I'm moving this alignment test to the CPU->Bus interfaces that read/write physical words; - * hopefully there are no order dependencies on this test. - * - else { // no max_memory check in 16 bit mode - if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } + * I'm leaving this code here, per Paul's comments above, but it does surprisingly redundant + * to have to perform this check here AND at the physical level (see readWordFromPhysical() and + * writeWordToPhysical()). + */ + if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { + this.regErr |= PDP11.CPUERR.ODDADDR; + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); } - */ } else { - this.mmuLastVirtual = virtualAddress; - page = (virtualAddress >> 13) & this.mmuMask[this.mmuMode]; - pdr = this.mmuMap[this.mmuMode][page]; - physicalAddress = ((this.mmuMap[this.mmuMode][page + 16] << 6) + (virtualAddress & 0x1fff)) & 0x3fffff; - if (this.regMMR3 & 0x10) { // if 22 bit MM mode - if (physicalAddress >= BusPDP11.IOPAGE_UNIBUS && physicalAddress < BusPDP11.IOPAGE_22BIT) { - physicalAddress = this.mapUnibus(physicalAddress & 0x3ffff); // 18bit unibus space - } - } else { - physicalAddress &= 0x3ffff; // truncate if only 18 bit mapping + if (!(this.regMMR3 & 0x10)) { if (physicalAddress >= BusPDP11.IOPAGE_18BIT) physicalAddress |= BusPDP11.IOPAGE_22BIT; } - if (physicalAddress < BusPDP11.IOPAGE_UNIBUS) { - if (physicalAddress >= BusPDP11.MAX_MEMORY) { + if (physicalAddress < BusPDP11.IOPAGE_22BIT) { + if (physicalAddress >= BusPDP11.IOPAGE_UNIBUS) { + physicalAddress = this.mapUnibus(physicalAddress & 0x3ffff); // 18bit unibus space + } + if (physicalAddress >= this.mmuMemorySize && physicalAddress < BusPDP11.IOPAGE_22BIT) { this.regErr |= PDP11.CPUERR.NOMEMORY; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOMEMORY); // KB11-EM does this after ABORT handling - KB11-CM before + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOMEMORY); // KB11-EM does this after ABORT handling - KB11-CM before } - /* - * I'm moving this alignment test to the CPU->Bus interfaces that read/write physical words; - * hopefully there are no order dependencies on this test. - * - if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMMUADDR); - } - */ } - switch (pdr & 0x7) { - case 1: // read-only with trap - errorMask = 0x1000; // MMU trap - /* falls through */ - case 2: // read-only - pdr |= 0x80; // Set A bit - if (accessFlags & PDP11.ACCESS.WRITE) { - errorMask = 0x2000; // read-only abort - } - break; - case 4: // read-write with read-write trap - errorMask = 0x1000; // MMU trap - /* falls through */ - case 5: // read-write with write trap - if (accessFlags & PDP11.ACCESS.WRITE) { - errorMask = 0x1000; // MMU trap - } - /* falls through */ - case 6: // read-write: set A & W bits - pdr |= ((accessFlags & PDP11.ACCESS.WRITE) ? 0xc0 : 0x80); - break; - default: - errorMask = 0x8000; // non-resident abort - break; - } - if ((pdr & 0x7f08) !== 0x7f00) { // skip checking most common case (hopefully) - if (pdr & 0x8) { // expand downwards - if (pdr & 0x7f00) { - if ((virtualAddress & 0x1fc0) < ((pdr >> 2) & 0x1fc0)) { - errorMask |= 0x4000; // page length error abort - } - } - } else { // expand upwards - if ((virtualAddress & 0x1fc0) > ((pdr >> 2) & 0x1fc0)) { - errorMask |= 0x4000; // page length error abort - } - } - } - // aborts and traps: log FIRST trap and MOST RECENT abort + } - this.mmuMap[this.mmuMode][page] = pdr; - if ((physicalAddress !== 0x3fff7a) || this.mmuMode) { // MMR0 is 017777572 - this.mmuLastMode = this.mmuMode; - this.mmuLastPage = page; + switch (pdr & 0x7) { + case 1: // read-only with trap + errorMask = 0x1000; // MMU trap + /* falls through */ + case 2: // read-only + pdr |= 0x80; // Set A bit + if (accessFlags & PDP11.ACCESS.WRITE) { + errorMask = 0x2000; // read-only abort } - if (errorMask) { - if (errorMask & 0xe000) { - if (this.trapPSW >= 0) errorMask |= 0x80; // Instruction complete - if (!(this.regMMR0 & 0xe000)) { - this.regMMR0 |= errorMask | (this.mmuLastMode << 5) | (this.mmuLastPage << 1); + break; + case 4: // read-write with read-write trap + errorMask = 0x1000; // MMU trap + /* falls through */ + case 5: // read-write with write trap + if (accessFlags & PDP11.ACCESS.WRITE) { + errorMask = 0x1000; // MMU trap + } + /* falls through */ + case 6: // read-write: set A & W bits + pdr |= ((accessFlags & PDP11.ACCESS.WRITE) ? 0xc0 : 0x80); + break; + default: + errorMask = 0x8000; // non-resident abort + break; + } + + if ((pdr & 0x7f08) !== 0x7f00) { // skip checking most common case (hopefully) + if (pdr & 0x8) { // expand downwards + if (pdr & 0x7f00) { + if ((virtualAddress & 0x1fc0) < ((pdr >> 2) & 0x1fc0)) { + errorMask |= 0x4000; // page length error abort } - this.trap(PDP11.TRAP.MMU_FAULT, PDP11.REASON.MAPERROR); } - if (!(this.regMMR0 & 0xf000)) { - //if (physicalAddress < 017772200 || physicalAddress > 017777677) { - if (physicalAddress < 0x3ff480 || physicalAddress > 0x3fffbf) { - this.regMMR0 |= 0x1000; // MMU trap flag - if (this.regMMR0 & 0x0200) { - this.opFlags |= PDP11.OPFLAG.TRAP_MMU; - } + } else { // expand upwards + if ((virtualAddress & 0x1fc0) > ((pdr >> 2) & 0x1fc0)) { + errorMask |= 0x4000; // page length error abort + } + } + } + // aborts and traps: log FIRST trap and MOST RECENT abort + + this.mmuPDR[this.mmuMode][page] = pdr; + if ((physicalAddress !== 0x3fff7a) || this.mmuMode) { // MMR0 is 017777572 + this.mmuLastMode = this.mmuMode; + this.mmuLastPage = page; + } + if (errorMask) { + if (errorMask & 0xe000) { + if (this.trapPSW >= 0) errorMask |= 0x80; // Instruction complete + if (!(this.regMMR0 & 0xe000)) { + this.regMMR0 |= errorMask | (this.mmuLastMode << 5) | (this.mmuLastPage << 1); + } + this.trap(PDP11.TRAP.MMU_FAULT, PDP11.REASON.MAPERROR); + } + if (!(this.regMMR0 & 0xf000)) { + //if (physicalAddress < 017772200 || physicalAddress > 017777677) { + if (physicalAddress < 0x3ff480 || physicalAddress > 0x3fffbf) { + this.regMMR0 |= 0x1000; // MMU trap flag + if (this.regMMR0 & 0x0200) { + this.opFlags |= PDP11.OPFLAG.TRAP_MMU; } } } @@ -1201,7 +1197,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl }; /** - * readByteFromPhysical(physicalAddress) [formerly readByteByAddr] + * readByteFromPhysical(physicalAddress) * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1213,34 +1209,7 @@ CPUStatePDP11.prototype.readByteFromPhysical = function(physicalAddress) }; /** - * readWordFromPhysical(physicalAddress) [formerly readWordByAddr] - * - * @this {CPUStatePDP11} - * @param {number} physicalAddress - * @return {number} - */ -CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) -{ - if (physicalAddress & 0x1) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } - return this.bus.getWord(physicalAddress); -}; - -/** - * readWordFromVirtual(virtualAddress) - * - * @this {CPUStatePDP11} - * @param {number} virtualAddress (input address is 17 bit (I&D)) - */ -CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) -{ - return this.readWordFromPhysical(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD)); -}; - -/** - * writeByteToPhysical(physicalAddress, data) [formerly writeByteByAddr] + * writeByteToPhysical(physicalAddress, data) * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1252,22 +1221,6 @@ CPUStatePDP11.prototype.writeByteToPhysical = function(physicalAddress, data) this.bus.setByte(physicalAddress, data & 0xff); }; -/** - * writeWordToPhysical(physicalAddress, data) [formerly writeWordByAddr] - * - * @this {CPUStatePDP11} - * @param {number} physicalAddress - * @param {number} data - */ -CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) -{ - if (physicalAddress & 0x1) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } - this.bus.setWord(physicalAddress, data & 0xffff); -}; - /** * popWord() * @@ -1276,7 +1229,7 @@ CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) */ CPUStatePDP11.prototype.popWord = function() { - var result = this.readWordFromVirtual(this.regsGen[6] | PDP11.ACCESS.DSPACE); + var result = this.readWordFromAddr(this.regsGen[6] | this.addrDSpace); this.regsGen[6] = (this.regsGen[6] + 2) & 0xffff; return result; }; @@ -1307,16 +1260,13 @@ CPUStatePDP11.prototype.pushWord = function(data) this.opFlags |= 4; } } - - var physicalAddress = this.mapVirtualToPhysical(virtualAddress | PDP11.ACCESS.DSPACE, PDP11.ACCESS.WRITE_WORD); - this.writeWordToPhysical(physicalAddress, data); + this.writeWordToAddr(virtualAddress, data); }; - /** - * getVirtual(mode, reg, accessFlags) + * getAddress(mode, reg, accessFlags) * - * getVirtual() maps a six bit operand to a 17 bit I/D virtual address space. + * getAddress() maps a six bit operand to a 17 bit I/D virtual address space. * * Instruction operands are six bits in length - three bits for the mode and three * for the register. The 17th I/D bit in the resulting virtual address represents @@ -1343,7 +1293,7 @@ CPUStatePDP11.prototype.pushWord = function(data) * @param {number} accessFlags * @return {number} */ -CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) +CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) { var virtualAddress, stepSize; var addrDSpace = (accessFlags & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace; @@ -1356,9 +1306,9 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) /* * Mode 0: Registers don't have a virtual address, so trap. * - * NOTE: Most instruction code paths never call getVirtual() when the mode is zero; + * NOTE: Most instruction code paths never call getAddress() when the mode is zero; * JMP and JSR instructions are exceptions, but that's OK, because those are documented to - * "cause an 'illegal' instruction" condition", which we interpret to mean a BUS_ERROR trap. + * "cause an 'illegal' instruction" condition", which presumably means a BUS_ERROR trap. */ case 0: this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOREGADDR); @@ -1404,7 +1354,7 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) stepSize = 2; virtualAddress = this.regsGen[reg]; if (reg !== 7) virtualAddress |= addrDSpace; - virtualAddress = this.readWordFromVirtual(virtualAddress); + virtualAddress = this.readWordFromAddr(virtualAddress); // if (reg === 7) LOG_ADDRESS(virtualAddress); // @#n not operational virtualAddress |= addrDSpace; this.nStepCycles -= (5 + 2); @@ -1428,7 +1378,7 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) stepSize = -2; virtualAddress = (this.regsGen[reg] - 2) & 0xffff; if (reg !== 7) virtualAddress |= addrDSpace; - virtualAddress = this.readWordFromVirtual(virtualAddress) | addrDSpace; + virtualAddress = this.readWordFromAddr(virtualAddress) | addrDSpace; this.nStepCycles -= (6 + 2); break; @@ -1447,7 +1397,7 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) case 7: virtualAddress = this.getPCWord(); virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff; - virtualAddress = this.readWordFromVirtual(virtualAddress | PDP11.ACCESS.DSPACE) | addrDSpace; + virtualAddress = this.readWordFromAddr(virtualAddress | this.addrDSpace) | addrDSpace; this.nStepCycles -= (7 + 3); return virtualAddress; } @@ -1472,7 +1422,9 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) }; /** - * getAddrPhysical(mode, reg, accessFlags) + * getPhysicalAddrByMode(mode, reg, accessFlags) + * + * This is a handler set up by initMemoryAccess(). All calls should go through getAddrByMode(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1480,13 +1432,15 @@ CPUStatePDP11.prototype.getVirtual = function(mode, reg, accessFlags) * @param {number} accessFlags * @return {number} */ -CPUStatePDP11.prototype.getAddrPhysical = function(mode, reg, accessFlags) +CPUStatePDP11.prototype.getPhysicalAddrByMode = function(mode, reg, accessFlags) { - return this.getVirtual(mode, reg, accessFlags); + return this.getAddress(mode, reg, accessFlags); }; /** - * getAddrVirtual(mode, reg, accessFlags) + * getVirtualAddrByMode(mode, reg, accessFlags) + * + * This is a handler set up by initMemoryAccess(). All calls should go through getAddrByMode(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1494,9 +1448,73 @@ CPUStatePDP11.prototype.getAddrPhysical = function(mode, reg, accessFlags) * @param {number} accessFlags * @return {number} */ -CPUStatePDP11.prototype.getAddrVirtual = function(mode, reg, accessFlags) +CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, accessFlags) { - return this.mapVirtualToPhysical(this.getVirtual(mode, reg, accessFlags), accessFlags); + return this.mapVirtualToPhysical(this.getAddress(mode, reg, accessFlags), accessFlags); +}; + +/** + * readWordFromPhysical(physicalAddress) + * + * This is a handler set up by initMemoryAccess(). All calls should go through readWordFromAddr(). + * + * @this {CPUStatePDP11} + * @param {number} physicalAddress + * @return {number} + */ +CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) +{ + if (physicalAddress & 0x1) { + this.regErr |= PDP11.CPUERR.ODDADDR; + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); + } + return this.bus.getWord(physicalAddress); +}; + +/** + * readWordFromVirtual(virtualAddress) + * + * This is a handler set up by initMemoryAccess(). All calls should go through readWordFromAddr(). + * + * @this {CPUStatePDP11} + * @param {number} virtualAddress (input address is 17 bit (I&D)) + * @return {number} + */ +CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) +{ + return this.readWordFromPhysical(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD)); +}; + +/** + * writeWordToPhysical(physicalAddress, data) + * + * This is a handler set up by initMemoryAccess(). All calls should go through writeWordToAddr(). + * + * @this {CPUStatePDP11} + * @param {number} physicalAddress + * @param {number} data + */ +CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) +{ + if (physicalAddress & 0x1) { + this.regErr |= PDP11.CPUERR.ODDADDR; + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); + } + this.bus.setWord(physicalAddress, data & 0xffff); +}; + +/** + * writeWordToVirtual(virtualAddress, data) + * + * This is a handler set up by initMemoryAccess(). All calls should go through writeWordToAddr(). + * + * @this {CPUStatePDP11} + * @param {number} virtualAddress (input address is 17 bit (I&D)) + * @param {number} data + */ +CPUStatePDP11.prototype.writeWordToVirtual = function(virtualAddress, data) +{ + this.writeWordToPhysical(this.mapVirtualToPhysical(virtualAddress | PDP11.ACCESS.DSPACE, PDP11.ACCESS.WRITE_WORD), data); }; /** @@ -1519,12 +1537,12 @@ CPUStatePDP11.prototype.readWordFromPrevSpace = function(opCode, accessFlags) src = this.regsAltStack[(this.regPSW >> 12) & 3]; } } else { - var addr = this.getVirtual(mode, reg, PDP11.ACCESS.READ_WORD); + var addr = this.getAddress(mode, reg, PDP11.ACCESS.READ_WORD); if (!(accessFlags & PDP11.ACCESS.DSPACE)) { if ((this.regPSW & 0xf000) !== 0xf000) addr &= 0xffff; } this.mmuMode = (this.regPSW >> 12) & 3; - src = this.readWordFromVirtual(addr | (accessFlags & PDP11.ACCESS.DSPACE)); + src = this.readWordFromAddr(addr | (accessFlags & this.addrDSpace)); this.mmuMode = (this.regPSW >> 14) & 3; } return src; @@ -1552,8 +1570,14 @@ CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, accessFlags, dat this.regsAltStack[(this.regPSW >> 12) & 3] = data; } } else { - var addr = this.getVirtual(mode, reg, PDP11.ACCESS.WRITE_WORD); + var addr = this.getAddress(mode, reg, PDP11.ACCESS.WRITE_WORD); if (!(accessFlags & PDP11.ACCESS.DSPACE)) addr &= 0xffff; + /* + * TODO: Consider replacing the following code with writeWordToAddr(), by adding optional mmuMode + * parameters for each of the discrete mapVirtualToPhysical() and writeWordToPhysical() operations, + * because as it stands, this is the only remaining call to mapVirtualToPhysical() outside of our + * initMemoryAccess() handlers. + */ this.mmuMode = (this.regPSW >> 12) & 3; addr = this.mapVirtualToPhysical(addr | (accessFlags & PDP11.ACCESS.DSPACE), PDP11.ACCESS.WRITE); this.mmuMode = (this.regPSW >> 14) & 3; @@ -1577,7 +1601,7 @@ CPUStatePDP11.prototype.readSrcByte = function(opCode) if (!mode) { result = this.regsGen[reg] & 0xff; } else { - result = this.readByteFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_BYTE)); + result = this.readByteFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_BYTE)); } return result; }; @@ -1598,7 +1622,7 @@ CPUStatePDP11.prototype.readSrcWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.readWordFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.readWordFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1614,7 +1638,7 @@ CPUStatePDP11.prototype.readDstAddr = function(opCode) { var reg = this.dstReg = opCode & PDP11.OPREG.MASK; var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT; - return this.getVirtual(mode, reg, PDP11.ACCESS.VIRT); + return this.getAddress(mode, reg, PDP11.ACCESS.VIRT); }; /** @@ -1632,7 +1656,7 @@ CPUStatePDP11.prototype.readDstByte = function(opCode) if (!mode) { result = this.regsGen[reg] & 0xff; } else { - result = this.readByteFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_BYTE)); + result = this.readByteFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_BYTE)); } return result; }; @@ -1652,7 +1676,7 @@ CPUStatePDP11.prototype.readDstWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.readWordFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.readWordFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1674,7 +1698,7 @@ CPUStatePDP11.prototype.updateDstByte = function(opCode, src, fnOp) if (!mode) { this.regsGen[reg] = (this.regsGen[reg] & 0xff00) | fnOp.call(this, src, this.regsGen[reg]); } else { - var addr = this.dstAddr = this.getAddr(mode, reg, PDP11.ACCESS.UPDATE_BYTE); + var addr = this.dstAddr = this.getAddrByMode(mode, reg, PDP11.ACCESS.UPDATE_BYTE); this.writeByteToPhysical(addr, fnOp.call(this, src, this.readByteFromPhysical(addr))); } }; @@ -1696,7 +1720,7 @@ CPUStatePDP11.prototype.updateDstWord = function(opCode, src, fnOp) if (!mode) { this.regsGen[reg] = fnOp.call(this, src, this.regsGen[reg]); } else { - var addr = this.getAddr(mode, reg, PDP11.ACCESS.UPDATE_WORD); + var addr = this.getAddrByMode(mode, reg, PDP11.ACCESS.UPDATE_WORD); this.writeWordToPhysical(addr, fnOp.call(this, src, this.readWordFromPhysical(addr))); } }; @@ -1725,7 +1749,7 @@ CPUStatePDP11.prototype.writeDstByte = function(opCode, data, writeFlags) this.regsGen[reg] = (this.regsGen[reg] & ~0xff) | (data & 0xff); } } else { - this.writeByteToPhysical(this.getAddr(mode, reg, PDP11.ACCESS.WRITE_BYTE), data); + this.writeByteToPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_BYTE), data); } return data; }; @@ -1747,7 +1771,7 @@ CPUStatePDP11.prototype.writeDstWord = function(opCode, data) if (!mode) { this.regsGen[reg] = data & 0xffff; } else { - this.writeWordToPhysical(this.getAddr(mode, reg, PDP11.ACCESS.WRITE_WORD), data); + this.writeWordToPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_WORD), data); } return data; }; diff --git a/versions/c1pjs/1.30.1/c1p-dbg.js b/versions/c1pjs/1.30.1/c1p-dbg.js index eed646849..2384c0f1e 100644 --- a/versions/c1pjs/1.30.1/c1p-dbg.js +++ b/versions/c1pjs/1.30.1/c1p-dbg.js @@ -1,4 +1,443 @@ -(function(){var f;function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,2,!0)}function r(a){return p(a,4,!0)}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var f;function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,2,!0)}function r(a){return p(a,4,!0)}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var ea=Date.now||function(){return+new Date}; function t(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else if("function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var e=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");e.onreadystatechange=function(){4===e.readyState&&(d=e.responseText,200==e.status||!e.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=e.status||-1),b&&b(a,d,c))};e.open("GET",a,!0);e.send()}} function u(a){window&&window.alert(a)}function v(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0=f?48:55),d=String.fromCharCode(f)+d;a>>=4}return(c?"0x":"")+d}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"}; +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var e;function p(a,b,c){var d="";b?8=f?48:55),d=String.fromCharCode(f)+d;a>>=4}return(c?"0x":"")+d}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"}; function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var q=Date.now||function(){return+new Date}; function r(a,b){var c=0,d=null;if("object"==typeof resources&&(d=resources[a]))b&&b(a,d,c);else if("function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var f=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");f.onreadystatechange=function(){4===f.readyState&&(d=f.responseText,200==f.status||!f.status&&d.length&&"file:"==(window?window.location.protocol:"file:")||(c=f.status||-1),b&&b(a,d,c))};f.open("GET",a,!0);f.send()}} function t(a){window&&window.alert(a)}function u(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var v={init:[],show:[],exit:[]},ea=!1,fa=!1,w=!0;function ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function x(a){v.init.push(a)} diff --git a/versions/pc8080/1.30.1/pc8080-dbg.js b/versions/pc8080/1.30.1/pc8080-dbg.js index df08cc6a9..9d6df2ef5 100644 --- a/versions/pc8080/1.30.1/pc8080-dbg.js +++ b/versions/pc8080/1.30.1/pc8080-dbg.js @@ -1,4 +1,673 @@ -(function(){var l,m={me:1,ne:3,oe:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ub:65,Hc:66,Jc:67,Xb:68,E:69,Mc:70,Nc:71,Oc:72,Pc:73,Wc:74,Xc:75,Zb:76,dd:77,ed:78,gd:79,hd:80,Q:81,od:82,rd:83,xd:84,yd:85,zd:86,Ad:87,Cd:88,Dd:89,Ed:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ve:97,We:98,Xe:99,d:100,e:101,Ye:102,Ze:103,$e:104,af:105,bf:106,k:107,cf:108, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var l,m={me:1,ne:3,oe:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ub:65,Hc:66,Jc:67,Xb:68,E:69,Mc:70,Nc:71,Oc:72,Pc:73,Wc:74,Xc:75,Zb:76,dd:77,ed:78,gd:79,hd:80,Q:81,od:82,rd:83,xd:84,yd:85,zd:86,Ad:87,Cd:88,Dd:89,Ed:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ve:97,We:98,Xe:99,d:100,e:101,Ye:102,Ze:103,$e:104,af:105,bf:106,k:107,cf:108, df:109,n:110,ef:111,p:112,q:113,r:114,ff:115,t:116,hf:117,jf:118,kf:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function t(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ca(a){return t(a,2,!0)} diff --git a/versions/pc8080/1.30.1/pc8080.js b/versions/pc8080/1.30.1/pc8080.js index 398bbecbd..afb784b73 100644 --- a/versions/pc8080/1.30.1/pc8080.js +++ b/versions/pc8080/1.30.1/pc8080.js @@ -1,4 +1,673 @@ -(function(){var k,m={pd:1,qd:3,rd:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,jb:65,Mb:66,Ob:67,mb:68,E:69,Rb:70,Sb:71,Tb:72,Ub:73,ac:74,bc:75,ob:76,ic:77,jc:78,mc:79,nc:80,Q:81,tc:82,wc:83,Bc:84,Cc:85,Dc:86,Ec:87,Gc:88,Hc:89,Ic:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Zd:97,$d:98,ae:99,d:100,e:101,be:102,ce:103,de:104,ee:105,fe:106,k:107,ge:108, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var k,m={pd:1,qd:3,rd:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,jb:65,Mb:66,Ob:67,mb:68,E:69,Rb:70,Sb:71,Tb:72,Ub:73,ac:74,bc:75,ob:76,ic:77,jc:78,mc:79,nc:80,Q:81,tc:82,wc:83,Bc:84,Cc:85,Dc:86,Ec:87,Gc:88,Hc:89,Ic:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Zd:97,$d:98,ae:99,d:100,e:101,be:102,ce:103,de:104,ee:105,fe:106,k:107,ge:108, he:109,n:110,ie:111,p:112,q:113,r:114,je:115,t:116,ke:117,le:118,me:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + + FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: + The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + + FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: + The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var k; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ba(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} @@ -10,221 +693,221 @@ function t(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window. function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Pb=this.id:(this.cc=this.id.substr(0,b),this.Pb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Bb:!1,dc:!1,ia:!1,error:!1};this.Rb=null;this.v.error=!1;this.K={};this.j=null;this.ka=d||0;x.push(this)}var Ua=void 0,Va={}; +function w(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.wc=b.comment;this.cd=b;b=this.id.indexOf(".");0>b?this.Qb=this.id:(this.dc=this.id.substr(0,b),this.Qb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Eb:!1,ec:!1,ia:!1,error:!1};this.Sb=null;this.v.error=!1;this.L={};this.j=null;this.la=d||0;x.push(this)}var Ua=void 0,Va={}; if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=w);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},x=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Ca-1;this.w=this.F/this.Ca|0;this.Ra=[];this.D=null;this.Eb=this.od;a=new I;Ab(a,this.j);this.X=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ra[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Eb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} -function Cb(a,b,c){var d=!1,e=this.controller,f=e.Ra[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ra[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Eb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} -function Db(a,b){var c=-1,d=this.controller;(a=d.Ra[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Eb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} -function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Ra[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Eb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; -k.od=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ja=function(a,b){b||this.reset();return!0}; -function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ca;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Ob+=l.A-f,l.A=f,!0;if(f>=l.A+l.Ob){n=l.size-(f-m);n>g&&(n=g);l.Ob=f-l.A+n;f=m+a.Ca;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ca,d,e);Ab(f,a.j,l);a.X[h++]=f;f=m+a.Ca;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} -k.jb=function(a){return this.X[(a&this.g)>>>this.ca].Wb(a&this.f,a)};k.Ha=function(a){return this.X[(a&this.g)>>>this.ca].Bc(a&this.f,a)};function Jb(a,b){return a.X[(b&a.g)>>>a.ca].jc(b&a.f,b)}k.Lb=function(a,b){this.X[(a&this.g)>>>this.ca].$b(a&this.f,b&255,a)};k.nc=function(a,b){this.X[(a&this.g)>>>this.ca].Ic(a&this.f,b&65535,a)}; -function Kb(a){for(var b=0,c=[],d=0;d>1)+2;10>this.ba&&(this.ba=10);15>2;this.f=this.Ba-1;this.w=this.F/this.Ba|0;this.Sa=[];this.D=null;this.Fb=this.xd;a=new I;Ab(a,this.j);this.$=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} +function Cb(a,b,c){var d=!1,e=this.controller,f=e.Sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} +function Db(a,b){var c=-1,d=this.controller;(a=d.Sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} +function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; +k.xd=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ia=function(a,b){b||this.reset();return!0}; +function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ba;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Pb+=l.A-f,l.A=f,!0;if(f>=l.A+l.Pb){n=l.size-(f-m);n>g&&(n=g);l.Pb=f-l.A+n;f=m+a.Ba;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ba,d,e);Ab(f,a.j,l);a.$[h++]=f;f=m+a.Ba;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} +k.kb=function(a){return this.$[(a&this.g)>>>this.ba].Xb(a&this.f,a)};k.Ga=function(a){return this.$[(a&this.g)>>>this.ba].Gc(a&this.f,a)};function Jb(a,b){return a.$[(b&a.g)>>>a.ba].kc(b&a.f,b)}k.Mb=function(a,b){this.$[(a&this.g)>>>this.ba].ac(a&this.f,b&255,a)};k.oc=function(a,b){this.$[(a&this.g)>>>this.ba].Oc(a&this.f,b&65535,a)}; +function Kb(a){for(var b=0,c=[],d=0;d>5&3;c.xa=a>>1&15;c.Tb=a&257?a&1?6:4:0;Rb(c);a=c.G;a&1|256&&(b=this.b.lb&16?1:2);this.g.pb=this.g.pb&-8|b};k.Yc=function(){return Sb(this.b)};k.rd=function(a){Tb(this.b,a&-1809|Sb(this.b)&1808);this.b.C|=128}; -function Ub(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.cd,drive:f,blocksize:256,mapped:0,maxblock:b.eb[f]*b.da[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Jb=2496;b.oa=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.eb[f]){b.oa|=32832;b.P|=49152;break}if((b.va&15)>=b.da[f]){b.oa|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.P&48)<<12|b.Ib;e=65536-b.Kb&65535;Vb(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.eb[f])b.oa|= -32832,b.P|=49152;else if((b.va&15)>=b.da[f])b.oa|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.da[f]+(b.va&15);d=(b.P&48)<<12|b.Ib;e=65536-b.Kb&65535;a.Xb(b.ra[f],c,d,e);return}}b.Jb=f<<13|b.Jb&8176|b.va%9&15;L(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.cd=function(a,b,c,d,e){var f=this.D;f.Ib=d&65535;f.P=f.P&-49|d>>12&48;f.Kb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.P|=49152;break;case 2:f.oa|=33792,f.P|=49152}L(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; -function Wb(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.dd,drive:f,blocksize:128,mapped:1,maxblock:b.eb[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Wa&8&&(b.M&=63);b.Wa=b.Jc[f]|b.bb&64;break;case 3:1==(b.fa&3)&&(b.bb=b.fa&4?b.bb+(b.fa&65408)&65408|b.fa<<2&64:b.bb-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.bb);break;case 4:b.Wa=b.bb;break;case 5:if(b.fa>>6>=b.eb[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* -b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Ab;e=65536-b.Wa&65535;Vb(a,b.ra[f],c,d,e);return;case 6:if(b.fa>>6>=b.eb[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Sa&63)<<16|b.Ab;e=65536-b.Wa&65535;a.Xb(b.ra[f],c,d,e);return}}L(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -k.dd=function(a,b,c,d,e){var f=this.w;f.Ab=d&65535;f.M=f.M&-49|d>>12&48;f.Sa=d>>16&63;f.fa=~~(c/f.da[b.Ma])<<6|c%f.da[b.Ma];f.bb=f.fa;f.Wa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}L(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function Xb(a){a=a.B;a.S=2176;a.Da=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.tb=[0,0,0,0,0,0,0,0];a.mb=a.ub=a.sb=a.$a=a.mc=0} -function gc(a,b){var c=a.B,d,e,f;c.S&=-16513;c.Da&=-2049;c.ta[b]&=-1153;L(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.ed,drive:b,blocksize:256,mapped:0,maxblock:c.bc[0]*c.cb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.S&63){case 5:c.Zb[b]=c.Qa[b];c.S|=32896;c.ta[b]|=32896;c.mb|=1<=c.bc[0]||c.Ea[b]>>8>=c.cb[0]||(c.Ea[b]&255)>=c.da[0]){c.tb[b]|=1024;c.S|=49152;break}d=(c.Qa[b]*c.cb[0]+(c.Ea[b]>>8))* -c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.sb;f=65536-c.ub&65535;Vb(a,c.ra[b],d,e,f);return;case 57:if(c.Qa[b]>=c.bc[0]||c.Ea[b]>>8>=c.cb[0]||(c.Ea[b]&255)>=c.da[0])c.tb[b]|=1024,c.S|=49152;else{d=(c.Qa[b]*c.cb[0]+(c.Ea[b]>>8))*c.da[0]+(c.Ea[b]&255);e=(c.$a&63)<<16|c.sb;f=65536-c.ub&65535;a.Xb(c.ra[b],d,e,f);return}}L(a.b,3,5,172,function(){c.S=c.S&65534|128;c.ta[b]|=128;return!!(c.S&64)})} -k.ed=function(a,b,c,d,e){var f=this.B;f.ub=65536-e&65535;f.sb=d&65535;f.S=f.S&-769|d>>8&768;f.$a=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.cb[0]);f.Ea[b.Ma]=e%f.cb[0]<<8|c%f.da[0];f.Zb[b.Ma]=f.Qa[b.Ma]=d;f.mb|=1<=b.Uc-1&&(f.ta[b.Ma]|=1024);switch(a){case 1:f.Da|=512;f.S|=49152;break;case 2:f.Da|=2048,f.S|=49152}L(this.b,20,5,172,function(){f.ta[b.Ma]|=128;f.S=f.S&65534|128;return!!(f.S&64)})}; -function hc(a,b,c,d,e,f){var g=~~((f+c.Ta-1)/c.Ta),h=new XMLHttpRequest;2048>g&&d+2048ic(this.b,a.Tc?jc(this.b,c):c,a.cache[b][e])){a.Vb(2,a,b,c,d);return}c+=2;--d}b++}a.Vb(0,a,b,c,d)}; -function Vb(a,b,c,d,e){for(var f,g;0g){b.Vb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Vb(0,b,c,d,e)}k.reset=function(){this.g.pb=this.g.pb&-120|20;this.f.Va=0;this.D.P=128;this.w.M=128;Xb(this)}; -k.Lc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Za&65280:(a&1&&(b<<=8),f.Za=b|255,d=0);break;case 4194298:if(0>b)d=f.lc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.lc=d;f.C|=2}break;case 4194294:if(70!==f.ib)return f.L(4,222);0>b?d=f.J:d=f.J=0;break;case 4194292:if(70!==f.ib)return f.L(4,224);d=1;break;case 4194290:if(70!==f.ib)return f.L(4,226);d=0;break;case 4194288:if(70!==f.ib)return f.L(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.ib)return f.L(4,232);e=a-4194272>>1;0>b?d=f.gc[e]:(d=M(this,f.gc[e],a,b,c),0<=d&&(f.gc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Pa[e]= -b),d=f.Pa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Pa[e]=b),d=f.Pa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.J|=16,f.L(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.na[3][e],a,b,c);0<=d&&(f.na[3][e]=d,f.na[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.Yb,a,b,c);0<=d&&(f.Yb=d);break;case 4194172:d=f.Ya;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.nd&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.J|=16,f.L(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=M(this,e.Jb,a,b,c);0<=d&&(e.Jb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Ub(this));break;case 4194054:d=M(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194056:d=M(this,e.Ib,a,b,c);0<=d&&(e.Ib=d); -break;case 4194058:d=M(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=M(this,e.Cc,a,b,c);0<=d&&(e.Cc=d);break;default:return f.J|=16,f.L(4,128)}break;case 4193728:var g=this.B;e=g.Da&7;switch(a&-2){case 4193728:d=M(this,g.S,a,b,c);0<=b&&0<=d&&(g.$a=g.$a&60|d>>8&3,g.S=d&17279|g.S&34944|2048,d&1&&g.S&128?gc(this,e):192==(d&192)&&L(f,0,5,172));break;case 4193730:d=M(this,g.ub,a,b,c);0<=d&&(g.ub=d);break;case 4193732:d=M(this,g.sb,a,b,c);0<=d&&(g.sb=d&65534);break;case 4193734:d= -M(this,g.Ea[e],a,b,c);0<=d&&(g.Ea[e]=d&7967);break;case 4193736:d=M(this,g.Da,a,b,c);0<=d&&(g.Da=d&63|g.Da&65472,d&128&&Xb(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.tb[e];break;case 4193742:d=M(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.kd[e];break;case 4193746:d=M(this,g.Dc,a,b,c);0<=d&&(g.Dc=d);break;case 4193748:d=M(this,g.Ec[e],a,b,c);0<=d&&(g.Ec[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ld[e];break;case 4193754:d=M(this,g.Fc[e],a,b,c);0<=d&& -(g.Fc[e]=d);break;case 4193756:d=M(this,g.Qa[e],a,b,c);0<=d&&(g.Qa[e]=d&511);break;case 4193758:g.Zb[e]=g.Qa[e];d=g.Zb[e];break;case 4193760:d=g.hd[e];break;case 4193762:d=g.jd[e];break;case 4193764:d=g.fd[e];break;case 4193766:d=g.gd[e];break;case 4193768:d=M(this,g.$a,a,b,c);0<=d&&(g.$a=d&63,g.S=g.S&-769|(d&3)<<8);break;case 4193770:d=M(this,g.mc,a,b,c);0<=d&&(g.mc=d);break;default:return f.J|=16,f.L(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Sa= -e.Sa&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||Wb(this));break;case 4192514:d=M(this,e.Ab,a,b,c);0<=d&&(e.Ab=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Wa,a,b,c);0<=d&&(e.Wa=d);break;case 4192520:d=M(this,e.Sa,a,b,c);0<=d&&(e.Sa=d&63,e.M=e.M&-49|(e.Sa&3)<<4);break;default:return f.J|=16,f.L(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.lb:(d=M(this,f.lb,a,b,c),0<=d&&(70!==f.ib&&(d&=-49),f.lb=d,f.Ub[0]=d&4?15:7,f.Ub[1]=d&2?15:7,f.Ub[3]= -d&1?15:7,f.Tb&&(e=2,f.lb&16&&(e=1),this.g.pb=this.g.pb&-8|e)));break;default:return f.J|=16,f.L(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.na[0][e],a,b,c);0<=d&&(f.na[0][e]=d,f.na[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.na[1][e],a,b,c);0<=d&&(f.na[1][e]=d,f.na[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.ib)return f.L(4,234);e=a>>2&31;d=f.Mb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Mb[e]=a&2?d<<16|f.Mb[e]&65535:f.Mb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Nb[a>>1&255];else return f.J|=16,f.L(4,138);break;default:return f.J|=16,f.L(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var lc={},Qb=(lc[65382]=[null,null,K.prototype.Wc,K.prototype.pd,"LKS"],lc[65402]=[null,null,K.prototype.Xc,K.prototype.qd,"MMR0"],lc[65534]=[null,null,K.prototype.Yc,K.prototype.rd,"PSW"],lc); -La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),sc(this,oc?tc:uc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Z:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},la:function(a){var 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<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ua=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.T)&&c.ja(!0)}return this.ic(a,b)},ea:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.T)&&c.ja(!0)}return this.jc(a,b)},qa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,1,d.G)&&d.ja(!0)}this.f?this.K(a, -b,c):this.ac(a,b,c)},za:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.G)&&d.ja(!0)}this.f?this.K(a,b,c):this.qc(a,b,c)},R:function(a){return this.w[a]},Y:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},$:function(a){return this.B.getUint16(a,!0)},ha:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ma:function(a,b){this.w[a]=b; -this.Ua=!0},ua:function(a,b,c){this.w[a]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},xa:function(a,b){this.B.setUint16(a,b,!0);this.Ua=!0},Aa:function(a,b,c){this.H[a>>1]=b;this.Ua=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&yc(a,xc,!1),(a.F=c.F)&&wc(a,xc,!1))} -function Ac(a,b){b?--a.F||(a.$b=a.f?a.K:a.ac,a.Ic=a.f?a.G:a.qc):--a.g||(a.Wb=a.ic,a.Bc=a.jc)}function wc(a,b,c){c&&a.F||(a.$b=!a.f&&b[1]||a.K,a.Ic=!a.f&&b[3]||a.G);if(c||void 0===c)a.ac=b[1]||a.K,a.qc=b[3]||a.G}function yc(a,b,c){c&&a.g||(a.Wb=b[0]||a.I,a.Bc=b[2]||a.N);if(c||void 0===c)a.ic=b[0]||a.I,a.jc=b[2]||a.N}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)}var Bc=[],vc=[I.prototype.Z,I.prototype.wa,I.prototype.la,I.prototype.Ba],xc=[I.prototype.T,I.prototype.qa,I.prototype.ea,I.prototype.za]; -if(kb)var uc=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.xa],tc=[I.prototype.Y,I.prototype.ua,I.prototype.ha,I.prototype.Aa];function Cc(a,b){w.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Aa=a.cycles||b;this.Xa=c;this.ab=Math.round(this.Aa/1E4)/100;this.kb=this.ab*this.Xa;this.v.ga=!1;this.v.oc=!1;this.v.yb=a.autoStart;this.v.uc=!1;this.v.ob=!1;this.Fb=this.ha=0;this.Gb=a.csStart;this.qb=a.csInterval;this.rb=a.csStop;this.N=[];this.Sb=this.md.bind(this);G(this)}y(Cc); -var Dc=["power","reset"];k=Cc.prototype;k.Oa=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ha&&(a.ha+=a.qb,c=!0);0<=a.rb&&a.rb<=Jc(a)&&(a.qb=a.rb=-1,Gc(a),a.ja(),c=!0);c&&a.i(Jc(a)+" cycles: checksum="+p(a.Fb))}} -function Kc(a,b,c,d){if(a.K[b]){void 0===c&&(jb(a,"Value for "+b+" is invalid"),a.ja());var e=a.j&&a.j.qa||8;c=!a.v.ga||a.v.uc?8==e?ca(c,d):p(c,d):"--------".substr(0,d||4);a.K[b].textContent!=c&&(a.K[b].textContent=c)}} -k.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.K[b]=c;a=!0;break;case "run":this.K[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.Y/a.kb?b=1:d=!0;a.Xa=b;b=a.ab*a.Xa;if(a.kb!=b){a.kb=b;b=a.kb.toFixed(2)+"Mhz";var e=a.K.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Nb()}Mc(a,a.T);a.T=0;a.R=ra();a.Z=0;Nc(a);return d}function Ob(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Pb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Aa*a.Xa/1E3,a.N[b][0]=c)}function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function hd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function id(a){a.$-=a.b;a.b=0} -k.md=function(){if(this.v.ga){this.nb>=this.Aa&&Nc(this,!0);this.ua=0;this.za=ra();if(this.Z){var a=this.za-this.Z;a>this.Db&&(this.R+=a,this.R>this.za&&(this.R=this.za))}try{do{var b=gd(this,this.v.ob?1:this.Ba);try{this.wb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.$-this.b;hd(this,c);this.ua+=c;this.T+=c;Mc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Qb&&(this.D&&this.D.Fa(),this.Qb=0);break}}while(this.v.ga)}catch(e){this.ja();N(this);this.D&&this.D.stop(ra(), -Jc(this));jb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Sb;this.Z=ra();c=this.Db;this.ua&&(c=Math.round(c*this.ua/this.Ba));var c=c-(this.Z-this.za),d=this.Z-this.R;d&&(this.Y=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ea=0,Lc(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.nb+=this.ua;this.Z+=c;a(b,c)}}}; -k.vb=function(a){if(ib(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Lc(this);this.v.ga=!0;this.v.oc=!0;this.qa&&this.qa.start();var b=this.K.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Nb(!0),this.D.start(this.R,Jc(this)));N(this,!0);setTimeout(this.Sb,0);return!0};k.wb=function(){return 0}; -k.ja=function(a){if(this.v.ga){id(this);Mc(this,this.T);this.T=0;this.v.ga=!1;this.qa&&this.qa.stop();var b=this.K.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Jc(this));N(this)}this.v.complete=a};function N(a,b){a.D&&a.D.Fa(b)} -function jd(a){this.Vc=+a.model||1170;this.hc=a.resetAddr||0;Cc.call(this,a,6666667);this.Cb=0;this.decode=kd.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.W=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.hc];this.Pa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.xa=this.B=0;this.na=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0, -0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Mb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.gc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.fb=this.H=this.I=this.C=0;this.ib=70;this.ma=-1;ld(this);this.v.complete=this.v.Nc=!1}y(jd,Cc);k=jd.prototype;k.reset=function(){this.v.ga&&this.ja();ld(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ld(a){a.Za=255;a.J=0;a.lc=0;a.G=0;a.Ya=0;a.Yb=0;a.lb=0;a.Tb=0;a.wa=0;a.Ub=[7,7,7,7];a.w=[];a.C|=2;Rb(a)}function Rb(a){a.Tb?(a.zb=65536,a.ba=a.Qc):(a.zb=0,a.ba=a.Pc)}k.wc=function(){return 0};k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ea,this.Xa]);a.set(2,Kb(this.F));return a.data()}; -k.restore=function(a){var b=a[1];this.ea=b[1];Lc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].La-=b;break}b-=a.w[f].La}a.w.splice(f+1,0,{La:b,Ac:c<<5&224,Hc:d,fc:e})}a.C|=2}function Sb(a){return a.O=a.O&63728|a.Na()|od(a)|nd(a)|md(a)} -function Tb(a,b){a.W=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Pa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Pa[c];a.Pa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function P(a,b){a.C&128||(a.W=a.aa=b,a.V=0)}function sd(a,b,c){a.C&128||(a.W=a.aa=a.U=b,a.V=c||0)}function td(a,b,c,d){a.C&128||(a.W=a.aa=a.U=b,a.V=(c^b)&(d^b))}function ud(a,b){a.C&128||(a.W=a.aa=a.U=b,a.V=a.W^a.U>>1)} -function vd(a,b,c,d){a.C&128||(a.W=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.L=function(a){var b=!1;0>this.ma?this.ma=Sb(this):this.B||(a=4,b=!0);this.G&57344||(this.Ya=63222,this.Yb=a);this.B=0;var c=qd(this,a|65536),d=qd(this,a+2&65535|65536);Tb(this,d&-12289|this.ma>>2&12288);b&&(this.J|=4,this.u[6]=4);wd(this,this.ma);wd(this,this.u[7]);rd(this,c);this.C&=-113;this.ma=-1;throw a;};function xd(a){var b=yd(a),c=yd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);rd(a,b);Tb(a,c);a.C&=-17} -function jc(a,b){var c=b>>13&31;31>c?a.lb&32&&(b=a.Mb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function zd(a,b,c){var d,e,f,g=0;if(c&a.Tb){d=b>>13&a.Ub[a.B];e=a.na[a.B][d];f=(a.na[a.B][d+16]<<6)+(b&8191)&4194303;a.lb&16?3932160<=f&&4186112>f&&(f=jc(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&3915776<=f&&(a.J|=32,a.L(4,12));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.na[a.B][d]=e;if(4194170!== -f||a.B)a.wa=a.B,a.xa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.L(168,16)),a.G&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=qd(a,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=qd(a,e)|g; -a.b-=8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=qd(a,e|65536)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.J|=4,a.u[6]=4,a.L(4,24)):(a.J|=8,a.C|=64));return e}k.Pc=function(a,b,c){return Ad(this,a,b,c)};k.Qc=function(a,b,c){return zd(this,Ad(this,a,b,c),c)}; -function Bd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Ad(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=qd(a,d|c&65536),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c}function Cd(a,b,c,d){a.G&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Ad(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=zd(a,e|c&65536,4),a.B=a.O>>14&3,ic(a,e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d} -function Dd(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.ba(b,c,3),a=a.F.jb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=kc(a,a.ba(b,d,2)):c=a.u[d];return c}function Fd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Ad(a,b,c,8)}function Gd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.ba(b,c,3),a=a.F.jb(c)):a=a.u[c]&255;return a}function Hd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=kc(a,a.ba(b,d,2)):c=a.u[d];return c} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.fb=a.ba(b,e,7),c=d.call(a,c,a.F.jb(e)),e&1&&a.b--,a.F.Lb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),ic(a,e,d.call(a,c,kc(a,e)))):a.u[e]=d.call(a,c,a.u[e])}function Id(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),d&1&&a.b--,a.F.Lb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function Jd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?ic(a,a.ba(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(rd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.wb=function(a){this.v.complete=!0;var b=this.v.Nc=this.j&&Kd(this.j),c=a?this.v.oc?0:1:-1;this.v.oc=!1;this.$=this.b=a;do{if(b){if(Ld(this.j,this.u[7],c)){this.ja();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.L(168,28):this.C&64?this.L(4,30):this.C&16&&this.L(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.lc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Ac,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.L(a.Hc,26):this.L(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Ya=0,this.Yb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(pd(this))}while(0>1|b<<16;ud(this,a);return a&65535}function Rd(a,b){a=b&2048|b>>1|b<<8;ud(this,a<<8);return a&255}function Sd(a,b){a=b&~a;P(this,a);return a}function Td(a,b){a=b&~a;P(this,a<<8);return a}function Ud(a,b){a|=b;P(this,a);return a} -function Vd(a,b){a|=b;P(this,a<<8);return a}function Wd(a,b){a=~b|65536;sd(this,a);return a&65535}function Xd(a,b){a=~b|256;sd(this,a<<8);return a&255}function Yd(a,b){a=b-a;this.C&128||(this.W=this.aa=a,this.V=b&(b^a));return a&65535}function Zd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.W=this.aa=c,this.V=b&(b^c));return a&255}function $d(a,b){a=b+a;this.C&128||(this.W=this.aa=a,this.V=a&(b^a));return a&65535} -function ae(a,b){a=b+a;var c=a<<8;this.C&128||(this.W=this.aa=c,this.V=c&(b<<8^c));return a&255}function be(a,b){a=-b;sd(this,a,a&b&32768);return a&65535}function ce(a,b){a=-b;sd(this,a<<8,(a&b&128)<<8);return a&255}function de(a,b){a=b<<1|this.U>>16&1;ud(this,a);return a&65535}function ee(a,b){a=b<<1|this.U>>16&1;ud(this,a<<8);return a&255}function fe(a,b){a=(this.U&65536|b)>>1|b<<16;ud(this,a);return a&65535}function ge(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;ud(this,a<<8);return a&255} -function he(a,b){var c=b-a;vd(this,c,a,b);return c&65535}function ie(a,b){var c=b-a;vd(this,c<<8,a<<8,b<<8);return c&255}function je(a,b){this.C&128||(this.W=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function ke(a,b){a^=b;P(this,a);return a&65535} -function le(a){var b=Hd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.W=this.aa=c;this.b-=(this.g?6:7)+b} -function me(a){var b=Hd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.W=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.W=0);this.b-=5} -function ne(a){var b=Hd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.W=d>>16):(this.V=32768,this.aa=d>>15|d,this.W=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.W=0,this.V=32768,this.U=65536,this.b-=7}var oe=[0,7,7,10,7,11,9,13];function pe(a){var b=this.b;rd(this,Fd(this,a));this.b=b-oe[this.g]} -var qe=[0,14,14,17,14,18,16,20];function re(a){var b=this.b,c=Fd(this,a);a=a>>6&7;wd(this,this.u[a]);this.u[a]=this.u[7];rd(this,c);this.b=b-qe[this.g]}var se=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],te=[7,13,13,17,14,18,17,21];function ue(a){var b=Hd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.W=b>>16,this.aa=this.W|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)rd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Qe(a){R(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)}function Re(a){R(this,a,Ed(this,a),ke);this.b-=this.g?9:3+(7==this.f?2:0)}function W(){this.L(8,6)}function kd(a){Se[a>>12].call(this,a)} -var Se=[function(a){Te[a>>8&15].call(this,a)},function(a){var b=Ed(this,a),c=this.b;P(this,Jd(this,a,b));this.b=c-se[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ed(this,a);a=Hd(this,a);vd(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Ed(this,a)&Hd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),Sd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){R(this,a,Ed(this,a),Ud);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),Md);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Ue[a>>8&15].call(this,a)},function(a){Ve[a>>8&15].call(this,a)},function(a){var b=Dd(this,a);P(this,Id(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Dd(this,a)<<8;a=Gd(this,a)<<8;vd(this,b-a,a,b);this.b-=this.g? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Dd(this,a)&Gd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Vd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Ed(this,a),he);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],Te= -[function(a){We[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!od(this))},function(a){T(this,a,od(this))},function(a){T(this,a,!this.Na()==!nd(this))},function(a){T(this,a,!this.Na()!=!nd(this))},function(a){T(this,a,!od(this)&&!this.Na()==!nd(this))},function(a){T(this,a,od(this)||!this.Na()!=!nd(this))},re,re,function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},function(a){$e[a>>6&3].call(this,a)},W,W],Xe=[function(a){sd(this, -Jd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ye=[function(a){R(this,a,0,be);this.b-=this.g?11:6},function(a){R(this,a,md(this)?1:0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,md(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Hd(this,a);sd(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],Ze=[function(a){R(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Qd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Od);this.b-=this.g?9:3+(7==this.f?2:0)}],$e=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=qd(this,a|65536);rd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Bd(this,a,0);wd(this,a);P(this,a);this.b-=11},function(a){var b=yd(this),c=this.b;Cd(this,a, -0,b);P(this,b);this.b=c-te[this.g]},function(a){P(this,Jd(this,a,this.Na?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],We=[function(a){af[a&15].call(this,a)},W,W,W,pe,pe,pe,pe,function(a){if(a&8)this.L(8,6);else{var b=yd(this);a&=7;rd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.L(8,6)},function(a){bf[a&15].call(this,a)},function(a){cf[a&15].call(this,a)},Qe,Qe,Qe,Qe],af=[function(){this.O&49152?(this.J|=128,this.L(4, -3)):id(this);this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){xd(this);this.C|=this.O&16;this.b-=13},function(){this.L(12,1);this.b-=5},function(){this.L(16,4);this.b-=25},function(){this.O&49152||(ld(this),this.F.reset());this.b-=667},function(){xd(this);this.b-=13},W,W,W,W,W,W,W,W,W],bf=[ve,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.W=0;this.b-=5},U,U,U,U,U,U,U],cf=[ve,function(){this.U= -65536;this.b-=5},function(){this.V=32768;this.b-=5},V,function(){this.aa=0;this.b-=5},V,V,V,function(){this.W=32768;this.b-=5},V,V,V,V,V,V,V],Ue=[ue,ue,ne,ne,le,le,me,me,Re,Re,W,W,W,W,we,we],Ve=[function(a){T(this,a,!this.Na())},function(a){T(this,a,this.Na())},function(a){T(this,a,!md(this)&&!od(this))},function(a){T(this,a,md(this)||od(this))},function(a){T(this,a,!nd(this))},function(a){T(this,a,nd(this))},function(a){T(this,a,!md(this))},function(a){T(this,a,md(this))},function(){this.L(24,2); -this.b-=25},function(){this.L(28,5);this.b-=5},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},function(a){gf[a>>6&3].call(this,a)},W,W],df=[function(a){sd(this,Id(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.g?9:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,ce);this.b-= -this.g?11:6},function(a){Q(this,a,md(this)?1:0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);sd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],ff=[function(a){Q(this,a,0,ge);this.b-=this.g?9+(this.fb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Rd);this.b-=this.g?9+(this.fb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.g?9:3+(7== -this.f?2:0)}],gf=[W,function(a){a=Bd(this,a,65536);wd(this,a);P(this,a);this.b-=11},function(a){var b=yd(this),c=this.b;Cd(this,a,65536,b);P(this,b);this.b=c-te[this.g]},W];function hf(a){w.call(this,"ROM",a,hf);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){jf(c,a,b,f)})}}y(hf); -hf.prototype.Oa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;kf(this)};hf.prototype.Ja=function(){if(this.Ka){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ka,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.sc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({xd:b,A:c,Sc:d,Ka:e,rc:f})}delete this.Ka}return!0};hf.prototype.Ia=function(){return!0}; -function jf(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.cc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ka=h.symbols;if(!a.f.length){t("Empty ROM: "+ -b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].ac(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> -e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Pb)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.N=d.receiveData){this.status(this.cc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ia=function(a){return a?this.save():!0};k.reset=function(){pf(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return pf(this)};function pf(a){a.Y=0;a.f=0;a.g=128;a.B=[];return!0}k.kc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.H%a,this.Z&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;L(this.b,100,4,52,this.T)}};var qf={},of=(qf[65392]=[null,null,Y.prototype.$c,Y.prototype.td,"RCSR"],qf[65394]=[null,null,Y.prototype.Zc,Y.prototype.sd,"RBUF"],qf[65396]=[null,null,Y.prototype.bd,Y.prototype.vd,"XCSR"],qf[65398]=[null,null,Y.prototype.ad,Y.prototype.ud,"XBUF"],qf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};rf.prototype.xc=function(){return-1};rf.prototype.yc=function(){}; -function tf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} -function uf(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; +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];k=Nb.prototype;k.Na=function(a,b,c,d){this.F=b;this.b=c;this.j=d;var e=this;this.f.qc=Pb(this.b,function(){e.f.Wa|=128;e.f.Wa&64&&(K(e.b,0,6,64),Qb(e.b,e.f.qc,1E3/60))});Lb(b,this,Rb);Mb(b,this.reset.bind(this),this.Rc.bind(this));G(this)};k.ed=function(){var a=this.f.Wa;this.f.Wa&=-129;return a}; +k.yd=function(a){this.f.Wa=a;a&64&&Qb(this.b,this.f.qc,1E3/60);this.f.Wa=a&-129};k.fd=function(){var a=this.b;return a.G&62337|a.za<<5|a.Aa<<1};k.zd=function(a){var b=4,c=this.b;c.G=a&=62337;c.za=a>>5&3;c.Aa=a>>1&15;c.ic=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.$a&16?1:2);this.g.rb=this.g.rb&-8|b};k.gd=function(){return Tb(this.b)};k.Ad=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; +function Vb(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.md,drive:f,blocksize:256,mapped:0,maxblock:b.gb[f]*b.ca[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Kb=2496;b.na=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.gb[f]){b.na|=32832;b.P|=49152;break}if((b.va&15)>=b.ca[f]){b.na|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;ec(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.gb[f])b.na|= +32832,b.P|=49152;else if((b.va&15)>=b.ca[f])b.na|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;a.Yb(b.ra[f],c,d,e);return}}b.Kb=f<<13|b.Kb&8176|b.va%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.md=function(a,b,c,d,e){var f=this.D;f.Jb=d&65535;f.P=f.P&-49|d>>12&48;f.Lb=65536-e&65535;switch(a){case 1:f.na|=33024;f.P|=49152;break;case 2:f.na|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; +function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.nd,drive:f,blocksize:128,mapped:1,maxblock:b.gb[f]*b.ca[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Xa&8&&(b.M&=63);b.Xa=b.Pc[f]|b.eb&64;break;case 3:1==(b.ea&3)&&(b.eb=b.ea&4?b.eb+(b.ea&65408)&65408|b.ea<<2&64:b.eb-(b.ea&65408)&65408|b.ea<<2&64,b.ea=b.eb);break;case 4:b.Xa=b.eb;break;case 5:if(b.ea>>6>=b.gb[f]){b.M|=37888;break}if((b.ea&63)>=b.ca[f]){b.M|=37888;break}c=(b.ea>>6)* +b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;ec(a,b.ra[f],c,d,e);return;case 6:if(b.ea>>6>=b.gb[f])b.M|=37888;else if((b.ea&63)>=b.ca[f])b.M|=37888;else{c=(b.ea>>6)*b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;a.Yb(b.ra[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +k.nd=function(a,b,c,d,e){var f=this.w;f.Db=d&65535;f.M=f.M&-49|d>>12&48;f.Ta=d>>16&63;f.ea=~~(c/f.ca[b.La])<<6|c%f.ca[b.La];f.eb=f.ea;f.Xa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ca=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.bb=a.nc=0} +function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ca&=-2049;c.ta[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.od,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.fb[0]*c.ca[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.$b[b]=c.Pa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))* +c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;ec(a,c.ra[b],d,e,f);return;case 57:if(c.Pa[b]>=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))*c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;a.Yb(c.ra[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} +k.od=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.bb=d>>16&63;e=~~(c/f.ca[0]);d=~~(e/f.fb[0]);f.Da[b.La]=e%f.fb[0]<<8|c%f.ca[0];f.$b[b.La]=f.Pa[b.La]=d;f.mb|=1<=b.$c-1&&(f.ta[b.La]|=1024);switch(a){case 1:f.Ca|=512;f.T|=49152;break;case 2:f.Ca|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ta[b.La]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; +function ic(a,b,c,d,e,f){var g=~~((f+c.Ua-1)/c.Ua),h=new XMLHttpRequest;2048>g&&d+2048this.b.Ab(a.Zc?jc(this.b,c):c,a.cache[b][e])){a.Wb(2,a,b,c,d);return}c+=2;--d}b++}a.Wb(0,a,b,c,d)}; +function ec(a,b,c,d,e){for(var f,g;0g){b.Wb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Wb(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Wa=0;this.D.P=128;this.w.M=128;gc(this)}; +k.Rc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.ab&65280:(a&1&&(b<<=8),f.ab=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.C|=2}break;case 4194294:if(70!==f.jb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.jb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.jb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.jb)return f.K(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.jb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=L(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Oa[e]= +b),d=f.Oa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Oa[e]=b),d=f.Oa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=L(this,f.xa[3][e],a,b,c);0<=d&&(f.xa[3][e]=d,f.xa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=L(this,f.Zb,a,b,c);0<=d&&(f.Zb=d);break;case 4194172:d=f.Za;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.wd&65535:(d=L(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=L(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194050:d=L(this,e.na,a,b,c);0<=d&&(e.na=d);break;case 4194052:d=L(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=L(this,e.Lb,a,b,c);0<=d&&(e.Lb=d);break;case 4194056:d=L(this,e.Jb,a,b,c);0<=d&&(e.Jb=d); +break;case 4194058:d=L(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=L(this,e.Ic,a,b,c);0<=d&&(e.Ic=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ca&7;switch(a&-2){case 4193728:d=L(this,g.T,a,b,c);0<=b&&0<=d&&(g.bb=g.bb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=L(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=L(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= +L(this,g.Da[e],a,b,c);0<=d&&(g.Da[e]=d&7967);break;case 4193736:d=L(this,g.Ca,a,b,c);0<=d&&(g.Ca=d&63|g.Ca&65472,d&128&&gc(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=L(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.td[e];break;case 4193746:d=L(this,g.Jc,a,b,c);0<=d&&(g.Jc=d);break;case 4193748:d=L(this,g.Kc[e],a,b,c);0<=d&&(g.Kc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ud[e];break;case 4193754:d=L(this,g.Lc[e],a,b,c);0<=d&& +(g.Lc[e]=d);break;case 4193756:d=L(this,g.Pa[e],a,b,c);0<=d&&(g.Pa[e]=d&511);break;case 4193758:g.$b[e]=g.Pa[e];d=g.$b[e];break;case 4193760:d=g.rd[e];break;case 4193762:d=g.sd[e];break;case 4193764:d=g.pd[e];break;case 4193766:d=g.qd[e];break;case 4193768:d=L(this,g.bb,a,b,c);0<=d&&(g.bb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=L(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=L(this,e.M,a,b,c);0<=b&&0<=d&&(e.Ta= +e.Ta&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=L(this,e.Db,a,b,c);0<=d&&(e.Db=d&65534);break;case 4192516:d=L(this,e.ea,a,b,c);0<=d&&(e.ea=d);break;case 4192518:d=L(this,e.Xa,a,b,c);0<=d&&(e.Xa=d);break;case 4192520:d=L(this,e.Ta,a,b,c);0<=d&&(e.Ta=d&63,e.M=e.M&-49|(e.Ta&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.$a:(d=L(this,f.$a,a,b,c),0<=d&&(70!==f.jb&&(d&=-49),f.$a=d,f.Vb[0]=d&4?15:7,f.Vb[1]=d&2?15:7,f.Vb[3]= +d&1?15:7,f.ic&&(e=2,f.$a&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=L(this,f.xa[0][e],a,b,c);0<=d&&(f.xa[0][e]=d,f.xa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=L(this,f.xa[1][e],a,b,c);0<=d&&(f.xa[1][e]=d,f.xa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.jb)return f.K(4,234);e=a>>2&31;d=f.Nb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=L(this,d,a,b,c),0<=d&&(f.Nb[e]=a&2?d<<16|f.Nb[e]&65535:f.Nb[e]&4294901760|d&65534));break; +case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Ob[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,Nb.prototype.ed,Nb.prototype.yd,"LKS"],kc[65402]=[null,null,Nb.prototype.fd,Nb.prototype.zd,"MMR0"],kc[65534]=[null,null,Nb.prototype.gd,Nb.prototype.Ad,"PSW"],kc); +La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< +a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Va=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.S)&&c.ha(!0)}return this.jc(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.S)&&c.ha(!0)}return this.kc(a,b)},ma:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.G)&&d.ha(!0)}this.f?this.L(a, +b,c):this.bc(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.G)&&d.ha(!0)}this.f?this.L(a,b,c):this.rc(a,b,c)},R:function(a){return this.w[a]},W:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},Z:function(a){return this.B.getUint16(a,!0)},ga:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.w[a]=b; +this.Va=!0},pa:function(a,b,c){this.w[a]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b){this.B.setUint16(a,b,!0);this.Va=!0},za:function(a,b,c){this.H[a>>1]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&xc(a,wc,!1),(a.F=c.F)&&vc(a,wc,!1))} +function zc(a,b){b?--a.F||(a.ac=a.f?a.L:a.bc,a.Oc=a.f?a.G:a.rc):--a.g||(a.Xb=a.jc,a.Gc=a.kc)}function vc(a,b,c){c&&a.F||(a.ac=!a.f&&b[1]||a.L,a.Oc=!a.f&&b[3]||a.G);if(c||void 0===c)a.bc=b[1]||a.L,a.rc=b[3]||a.G}function xc(a,b,c){c&&a.g||(a.Xb=b[0]||a.J,a.Gc=b[2]||a.N);if(c||void 0===c)a.jc=b[0]||a.J,a.kc=b[2]||a.N}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.Y,I.prototype.qa,I.prototype.ja,I.prototype.Aa],wc=[I.prototype.S,I.prototype.ma,I.prototype.da,I.prototype.wa]; +if(wb)var tc=[I.prototype.R,I.prototype.ka,I.prototype.Z,I.prototype.ua],sc=[I.prototype.W,I.prototype.pa,I.prototype.ga,I.prototype.za];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Ra=a.cycles||b;this.Ya=c;this.ob=Math.round(this.Ra/1E4)/100;this.lb=this.ob*this.Ya;this.v.fa=!1;this.v.pc=!1;this.v.Cb=a.autoStart;this.v.uc=!1;this.v.pb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Dc=this.vd.bind(this);G(this)}y(Bc); +var Cc=["power","reset"];k=Bc.prototype;k.Na=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ma&&(a.ma+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ha(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Gb))}} +function Jc(a,b,c,d){if(a.L[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ha());var e=a.j&&a.j.ma||8;c=!a.v.fa||a.v.uc?8==e?ba(c,d):p(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} +k.oa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.ga/a.lb?b=1:d=!0;a.Ya=b;b=a.ob*a.Ya;if(a.lb!=b){a.lb=b;b=a.lb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Ob()}dd(a,a.Z);a.Z=0;a.Y=ra();a.ja=0;ed(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ra*a.Ya/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +k.vd=function(){if(this.v.fa){this.qb>=this.Ra&&ed(this,!0);this.wa=0;this.Qa=ra();if(this.ja){var a=this.Qa-this.ja;a>this.Ac&&(this.Y+=a,this.Y>this.Qa&&(this.Y=this.Qa))}try{do{var b=fd(this,this.v.pb?1:this.cb);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;gd(this,c);this.wa+=c;this.Z+=c;dd(this,0,!0);Hc(this,c);this.pa-=c;if(0>=this.pa){this.pa+=this.cb;15<=++this.Cc&&(this.D&&this.D.Ea(),this.Cc=0);break}}while(this.v.fa)}catch(e){this.ha();M(this);this.D&&this.D.stop(ra(), +Ic(this));vb(this,e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.Dc;this.ja=ra();c=this.Ac;this.wa&&(c=Math.round(c*this.wa/this.cb));var c=c-(this.ja-this.Qa),d=this.ja-this.Y;d&&(this.ga=Math.round(this.Z/(10*d))/100,864E5<=d&&(this.ka=0,Kc(this)));if(0>c||this.gac&&(this.Y-=c),c=0;this.qb+=this.wa;this.ja+=c;a(b,c)}}}; +k.yb=function(a){if(ib(this))return!1;if(this.v.fa)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.fa=!0;this.v.pc=!0;this.ua&&this.ua.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Ob(!0),this.D.start(this.Y,Ic(this)));M(this,!0);setTimeout(this.Dc,0);return!0};k.zb=function(){return 0}; +k.ha=function(a){if(this.v.fa){this.S-=this.b;this.b=0;dd(this,this.Z);this.Z=0;this.v.fa=!1;this.ua&&this.ua.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Ic(this));M(this)}this.v.complete=a};function M(a,b){a.D&&a.D.Ea(b)} +function hd(a){this.ad=+a.model||1170;this.dd=a.resetAddr||0;Bc.call(this,a,6666667);this.Rb=0;this.decode=id.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.X=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Oa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.Aa=this.B=0;this.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],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Nb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.nb=this.H=this.J=this.C=0;this.jb=70;this.qa=-1;jd(this);this.v.complete=this.v.Tc=!1}y(hd,Bc);k=hd.prototype;k.reset=function(){this.v.fa&&this.ha();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.ab=255;a.I=0;a.mc=0;a.G=0;a.Za=0;a.Zb=0;a.$a=0;a.ic=0;a.za=0;a.Yc=[4,2,0,1];a.Vb=262143;a.Tb=253952;a.Ub=[[0,0,0,0,0,0,0,0,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.bd=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.w=[];a.C|=2;Sb(a)} +function Sb(a){a.ic?(a.da=65536,a.R=a.Wc,a.W=a.Hc,a.Ec=a.Dd):(a.da=0,a.R=a.Vc,a.W=a.ub,a.Ec=a.Ab)}k.xc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ka,this.Ya]);a.set(2,Kb(this.F));return a.data()}; +k.restore=function(a){var b=a[1];this.ka=b[1];Kc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ka-=b;break}b-=a.w[f].Ka}a.w.splice(f+1,0,{Ka:b,Fc:c<<5&224,Nc:d,gc:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Ma()|md(a)|ld(a)|kd(a)} +function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Oa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Oa[c];a.Oa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function O(a,b){a.C&128||(a.X=a.aa=b,a.V=0)}function pd(a,b,c){a.C&128||(a.X=a.aa=a.U=b,a.V=c||0)}function qd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^b)&(d^b))}function rd(a,b){a.C&128||(a.X=a.aa=a.U=b,a.V=a.X^a.U>>1)} +function sd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.K=function(a){var b=!1;0>this.qa?this.qa=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.Za=63222,this.Zb=a);this.B=0;var c=this.W(a|this.da),d=this.W(a+2&65535|this.da);Ub(this,d&-12289|this.qa>>2&12288);b&&(this.I|=4,this.u[6]=4);td(this,this.qa);td(this,this.u[7]);od(this,c);this.C&=-113;this.qa=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);od(a,b);Ub(a,c);a.C&=-17} +function jc(a,b){var c=b>>13&31;31>c?a.$a&32&&(b=a.Nb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.$a&a.Yc[a.B]||(d&=7);e=a.Ub[a.B][d];f=(a.bd[a.B][d]<<6)+(b&8191)&a.Vb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Tb&&4186112>f&&(a.I|=32,a.K(4,12))));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.Ub[a.B][d]=e;if(4194170!==f||a.B)a.za=a.B,a.Aa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.G&57344||(a.G=a.G|g|a.za<<5|a.Aa<<1),a.K(168,16)),a.G&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.W(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.W(e)|g;a.b-= +8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.W(e|a.da)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Za=a.Za<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.ab||65534<=a.u[6])&&(a.u[6]<=a.ab-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}k.Vc=function(a,b,c){return xd(this,a,b,c)};k.Wc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};k.ub=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ga(a)}; +k.Hc=function(a){return this.ub(wd(this,a,2))};k.Ab=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.oc(a,b&65535)};k.Dd=function(a,b){this.Ab(wd(this,a|65536,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.W(d|c&a.da),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c} +function zd(a,b,c,d){a.G&57344||(a.Za=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=wd(a,e|c&65536,4),a.B=a.O>>14&3,a.Ab(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d}function Ad(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Bd(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function Cd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xd(a,b,c,8)} +function Dd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.nb=a.R(b,e,7),c=d.call(a,c,a.F.kb(e)),e&1&&a.b--,a.F.Mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Ab(e,d.call(a,c,a.ub(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Fd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Ab(a.R(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.zb=function(a){this.v.complete=!0;var b=this.v.Tc=this.j&&Hd(this.j),c=a?this.v.pc?0:1:-1;this.v.pc=!1;this.S=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ha();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Fc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Nc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Za=0,this.Zb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} +function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.C&128||(this.X=this.aa=a,this.V=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.X=this.aa=c,this.V=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.C&128||(this.X=this.aa=a,this.V=a&(b^a));return a&65535} +function Yd(a,b){a=b+a;var c=a<<8;this.C&128||(this.X=this.aa=c,this.V=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.U>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.U>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.U&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} +function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.C&128||(this.X=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} +function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.V=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.V=32768,this.U=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.g]} +var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.g]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.X=b>>16,this.aa=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ne(a){Q(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){Q(this,a,Bd(this,a),he);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function id(a){Pe[a>>12].call(this,a)} +var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.g? +4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= +[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ma()==!ld(this))},function(a){R(this,a,!this.Ma()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ma()==!ld(this))},function(a){R(this,a,md(this)||!this.Ma()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, +Gd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.g?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Hc(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, +0,b);O(this,b);this.b=c-qe[this.g]},function(a){O(this,Gd(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.K(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},Ne,Ne,Ne,Ne],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, +3)):this.ha();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(jd(this),this.F.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},S,function(){this.aa=1;this.b-=5},S,S,S,function(){this.X=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.U= +65536;this.b-=5},function(){this.V=32768;this.b-=5},U,function(){this.aa=0;this.b-=5},U,U,U,function(){this.X=32768;this.b-=5},U,U,U,U,U,U,U],Re=[re,re,ke,ke,ie,ie,je,je,Oe,Oe,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ma())},function(a){R(this,a,this.Ma())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.K(24,2); +this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= +this.g?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.g?9:3+(7== +this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.g]},V];function ef(a){w.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Na=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ia=function(){if(this.Ja){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ja,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Hd:b,A:c,Xc:d,Ja:e,sc:f})}delete this.Ja}return!0};ef.prototype.Ha=function(){return!0}; +function ff(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ja=h.symbols;if(!a.f.length){t("Empty ROM: "+ +b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ba].bc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> +e.ba;0>>=e.ba;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Qb)return;b=oa(b[1]);if(this.J=cb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ia=function(a,b){if(!b)if(this.Bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ha=function(a){return a?this.save():!0};k.reset=function(){mf(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return mf(this)};function mf(a){a.W=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.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.Y||8,c=a-this.H%a,this.Y&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.jd,W.prototype.Cd,"RCSR"],nf[65394]=[null,null,W.prototype.hd,W.prototype.Bd,"RBUF"],nf[65396]=[null,null,W.prototype.ld,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.kd,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.yc=function(){return-1};of.prototype.zc=function(){}; +function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.Z?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +function rf(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 vf(a,b,c){var d;if(b){b=wf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function zf(a,b){if(b)return yf(a,b,a.ha[b]);var c=0;for(b in a.ha)yf(a,b,a.ha[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ga[b]);var c=0;for(b in a.ga)vf(a,b,a.ga[b]),c++;return 0>>d.F.ca;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ca].ic(d&c.f,d),this.g--,b&&Jf(a,b));return c}; -k.Ha=function(a,b){var c=65535,d=this.ba(a,!1,2);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Jf(a,b));return c};k.Lb=function(a,b,c){var d=this.ba(a,!0,1);if(-1!==d){this.g++;var e=this.F;e.X[(d&e.g)>>>e.ca].ac(d&e.f,b&255,d);this.g--;c&&Jf(a,c);N(this.b,!0)}};k.nc=function(a,b,c){var d=this.ba(a,!0,2);if(-1!==d){this.g++;var e=this.F;e.X[(d&e.g)>>>e.ca].qc(d&e.f,b&65535,d);this.g--;c&&Jf(a,c);N(this.b,!0)}};function Z(a){return{A:a,Ga:!1}}function Kf(a){return[a.A,a.Ga]} -function Lf(a){return{A:a[0],Ga:a[1]}}function If(a,b,c){var d;c=(c?a.R:a.nb).A;if(void 0!==b){d=b=wf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.yc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Pa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Sb(this.b)));return b}; -k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,Z(this.b.u[7]).A)),this.ka&1073741824?this.za.push(a):this.xa&&a==this.xa||(this.xa=a,this.ka&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,id(a),a.la=0,N(a))))}; -function Cf(a){var b;if(Kd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.T=["br"];if(a.G)for(b=1;b>>d.ca],!0);a.G=["bw"];a.zb=0} -k.gb=function(a,b,c){var d=!0;c||Sf(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.X[e>>>f.ca].gb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Ga=!0:(Tf(this,a,a.length-1,"set"),Cf(this)));return d};function Sf(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ca],b==a.G));h.Ga||Cf(a);break}}return f} -function Uf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Nf(z);break;case 8:v="@"+Nf(z);break;case 16:7>z?v="("+Nf(z)+ -")+":(A=u.Ha(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Nf(z)+")+":(A=u.Ha(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Nf(z)+")";break;case 40:v="@-("+Nf(z)+")";break;case 48:A=u.Ha(q,2);v=J(u,A,0,!0)+"("+Nf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ha(q,2),v="@"+J(u,A)+"("+Nf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Nf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Pa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Sb(d)));c&&(c+=" ");return c}function Zf(a){var b,c="";for(b=0;6>b;b++)c+=Yf(a,b);c=c+"\n"+(Yf(a,6)+Yf(a,7)+Yf(a,20));return c+=Xf(a,"T")+Xf(a,"N")+Xf(a,"Z")+Xf(a,"V")+Xf(a,"C")}k.sc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}N(d);a.i("updated registers:")}a.i(Zf(a));c&&(a.R=Z(d.u[7]),Qf(a,J(a,a.R.A)))}}function dg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Wf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} -function Vf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+J(a,a.Z.A)),a.R=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.xa=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),X=ja.length);ba-=X;0>ba&&(null==ja[ja.length-1].A?(X=ba+X,ba=0):ba+=ja.length);var Rc=[];"call"==Ce&&(lb=1E5,Rc=["CALL"]);for(void 0!==Be&&a.i(X+" instructions earlier:");0=ja.length&&(ba=0);a.Cb=X;Ee++;lb--}}Ee||(a.i("no "+De+"history available"),a.Cb=void 0)}else{var Yb=If(a,ia);if(Yb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||xg),Zb=xf(a,za)>>>0,65536>4||1;zg--&&0<$b;){var ac=0,Sc=0,pb,Tc="",He="",ia=J(a,Yb.A);for(pb=4==ob?16:a.qa;0bc?String.fromCharCode(bc):".";$b--}nb&&(nb+="\n");nb+=ia+" "+Tc+(0==pb?" "+He:"")}nb&&a.i(nb);a.nb=Yb}}}}break;case "e":if("else"==g[0])break;var Ra,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ra=1,Uc=255,Vc=a.jb,Wc=a.Lb):"e"==Xc||"ew"==Xc?(Ra=2,Uc=65535,Vc=a.Ha,Wc=a.nc):Yc=null;if(null==Yc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=If(a,Yc);if(cc)for(var dc=2;dcad;){for(var Aa=null,Dg=256;65536>sb.A>>>0;){bd.A=a.Ha(sb,2);if(null==sb.A||!Dg--)break;if(!(bd.A&1)){for(var Eg=a,ec=bd,Je=null,tb=ec.A,Ke=tb,cd=1;6>=cd&& -tb;cd++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;big){if(kg(d,this.I)){this.B=new O(this,"1.30.1","failsafe");kg(this.B)&&(pg(this,d),a=2,qg(this.B));this.B.set("timestamp",sa());rg(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=og(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?kg(d,g):("error"== -f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),qg(d),kg(d)?(c=og(d),e=!0):c=!1))}e&&ng(this,c?d:null)}else 2==a&&d.clear()}else ng(this);delete this.I;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ia=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(sg(this,this.b,b,c,a),this.b.yb());this.Y&&(pg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; -function pg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function fg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.ja(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(a.id),l=0;l>>d.F.ba;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ba].jc(d&c.f,d),this.g--,b&&Gf(a,b));return c};k.Ga=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Gf(a,b));return c}; +k.Mb=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].bc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};k.oc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].rc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,Fa:!1}}function Hf(a){return[a.A,a.Fa]}function If(a){return{A:a[0],Fa:a[1]}} +function Ff(a,b,c){var d;c=(c?a.R:a.cb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.zc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Oa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; +k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,X(this.b.u[7]).A)),this.la&1073741824?this.wa.push(a):this.ua&&a==this.ua||(this.ua=a,this.la&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.pa=0,M(a))))}; +function zf(a){var b;if(Hd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ba],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ba],!0);a.G=["bw"];a.nb=0} +k.hb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.$[e>>>f.ba].hb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Fa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ba],b==a.G));h.Fa||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Kf(z);break;case 8:v="@"+Kf(z);break;case 16:7>z?v="("+Kf(z)+ +")+":(A=u.Ga(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Kf(z)+")+":(A=u.Ga(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Kf(z)+")";break;case 40:v="@-("+Kf(z)+")";break;case 48:A=u.Ga(q,2);v=J(u,A,0,!0)+"("+Kf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ga(q,2),v="@"+J(u,A)+"("+Kf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Oa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Xc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=X(d.u[7]),Nf(a,J(a,a.R.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} +function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.Z&&(a.i("ended assemble at "+J(a,a.Y.A)),a.R=a.Y,a.Z=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Y=ja.length);ca-=Y;0>ca&&(null==ja[ja.length-1].A?(Y=ca+Y,ca=0):ca+=ja.length);var Oc=[];"call"==ze&&(jb=1E5,Oc=["CALL"]);for(void 0!==ye&&a.i(Y+" instructions earlier:");0=ja.length&&(ca=0);a.ob=Y;Be++;jb--}}Be||(a.i("no "+Ae+"history available"),a.ob=void 0)}else{var Wb=Ff(a,ia);if(Wb){var Xb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Xb=uf(a,za)>>>0,65536>4||1;wg--&&0$b?String.fromCharCode($b):".";Yb--}lb&&(lb+="\n");lb+=ia+" "+Qc+(0==nb?" "+Ee:"")}lb&&a.i(lb);a.cb=Wb}}}}break;case "e":if("else"==g[0])break;var Ra,Rc,Sc,Tc,Uc=g[0],Vc=g[1];"eb"==Uc?(Ra=1,Rc=255,Sc=a.kb,Tc=a.Mb):"e"==Uc||"ew"==Uc?(Ra=2,Rc=65535,Sc=a.Ga,Tc=a.oc):Vc=null;if(null==Vc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var ac=Ff(a,Vc);if(ac)for(var bc=2;bcYc;){for(var Aa=null,Ag=256;65536>qb.A>>>0;){Zc.A=a.Ga(qb,2);if(null==qb.A||!Ag--)break;if(!(Zc.A&1)){for(var Bg=a,cc=Zc,Ge=null,rb=cc.A,He=rb,$c=1;6>=$c&& +rb;$c++){if(2<$c){cc.A=rb;var dc=Tf(Bg,cc);if(0<=dc.indexOf("JSR")){var Ie=dc.indexOf(" ");if(rb+(dc.indexOf(" ",Ie+1)-Ie-1)/2==He){Ge=dc;break}}}rb-=2}cc.A=He;if(Aa=Ge)break}}if(!Aa||null==Aa)break;var Je=null;if("ks"==zg){var Ke=Aa.match(/[0-9A-F]+$/);Ke&&(Je=$f(a,Ke[0]))}Aa=na(Aa,50)+" ;"+(Je||"stack="+J(a,qb.A));a.i(Aa);Yc++}Yc||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,C=g[1];"?"==C&&(C=void 0);if(void 0!==C){var ta= +0;if("all"==C)ta=1878917119,C=null;else if("on"==C)la=!0,C=null;else if("off"==C)la=!1,C=null;else{"keys"==C&&(C="key");"kbd"==C&&(C="keyboard");for(ka in H)if(C==ka){ta=H[ka];la=!!(a.la&ta);break}if(!ta){a.i("unknown message category: "+C);break a}}if(ta)if("on"==g[2])a.la|=ta,la=!0;else if("off"==g[2]&&(a.la&=~ta,la=!1,1073741824==ta)){for(var ad=0;ad\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new N(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",sa());og(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.v.ia=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Cb());this.W&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; +function mg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ha&&(c&&a.b.ha(),d=a.b.Ha(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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);Kg(a,b,c)}})}else c(a,null)} -function Lg(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=ma(a))}function f(a){e("Error: "+a);l&&(--wg||Sa(!0));l=!1}var g,h,l=!0;wg++;$a[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Ig(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--wg||Sa(!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),--wg||Sa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ig(b,a,d,!0,e,m):Jg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Lg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); +k.oa=function(a,b,c){var d=this;switch(b){case "power":return this.L[b]=c,c.onclick=function(){d.D||(d.v.ia?cg(d,!1,!0):jg(d,d.Ib))},!0;case "reset":return this.L[b]=c,c.onclick=function(){if(d.v.ia&&!d.D)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");cg(d,a,!0);!a&&d.S?window&&window.location.reload():d.Ib(fg)}else d.reset(),d.b&&d.b.Cb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.L[b]= +c,c.onclick=function(){var a=gg(d,!0);if(a){var b=!!(d.f&&!d.H||d.S),c=cg(d,b);b?qg(d,a,c):d.sa("Resume disabled, machine state not saved")}},!0}return!1}; +function gg(a,b){var c=a.g;c||((c=Ba("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=rg(a,c))||a.sa("The user ID is invalid.")):b&&a.sa("Browser local storage is not available"));return c} +function rg(a,b){a.g=null;b=ua(ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ca("user",b.data),a.g=b.data)}catch(d){t(d.message+" ("+c+")")}return a.g}function ig(a){var b=null;a.g&&(b=ga()+"/api/v1/user?req=load&user="+a.g+"&state="+sg(a,"1.30.1"));return b} +function qg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=sg(a,"1.30.1");d.data=c;b=ua(ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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+"...");ua(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);Hg(a,b,c)}})}else c(a,null)} +function Ig(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=ma(a))}function f(a){e("Error: "+a);l&&(--tg||Sa(!0));l=!1}var g,h,l=!0;tg++;$a[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Fg(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--tg||Sa(!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),--tg||Sa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,m):Gg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Ig(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index a1de16dfc..a5013259a 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -1,4 +1,687 @@ -(function(){var k; +(function(){/* + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + may be used freely provided the original author name is acknowledged in any modified source code. + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. + Jeff Parsons 2012-2016 + + This file is part of PCjs, a computer emulation software project at . + + PCjs is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + + PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with PCjs. If not, + see . + + You are required to include the above copyright notice in every source code file of every + copy or modified version of this work, and to display that copyright notice on every screen + that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + + Some PCjs files also attempt to load external resource files, such as character-image files, + ROM files, and disk image files. Those external resource files are not considered part of PCjs + for purposes of the GNU General Public License, and the author does not claim any copyright + as to their contents. +*/ +var k; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} @@ -9,151 +692,151 @@ typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encod function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} function va(a){if(ta)try{for(var b=0;bb?this.cb=this.id:(this.wb=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Lc:!1,Mc:!1,P:!1,error:!1};this.lb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Pb=b.comment;this.qc=b;b=this.id.indexOf(".");0>b?this.hb=this.id:(this.Cb=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Vc:!1,Wc:!1,P:!1,error:!1};this.pb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.qa=[];this.m=null;this.Wa=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.qa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.Wa(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.qa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.qa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.Wa(c|4186112,b,1)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.qa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.Wa(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.qa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.Wa(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.la=function(a,b){b||this.reset();return!0}; -function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Sa)return l.sb+=l.Sa-f,l.Sa=f,!0;if(f>=l.Sa+l.sb){q=l.size-(f-m);q>g&&(q=g);l.sb=f-l.Sa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Cb(b&a.h,b)} -function Wa(a){for(var b=0,c=[],d=0;d>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.sa=[];this.m=null;this.$a=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.$a(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.$a(c|4186112,b,1)} +function Pa(a,b){var c=-1,d=this.controller;(a=d.sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.$a(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.$a(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.na=function(a,b){b||this.reset();return!0}; +function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Wa)return l.vb+=l.Wa-f,l.Wa=f,!0;if(f>=l.Wa+l.vb){q=l.size-(f-m);q>g&&(q=g);l.vb=f-l.Wa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Gb(b&a.h,b)} +function Wa(a){for(var b=0,c=[],d=0;d>5&3;c.fb=a>>1&15;c.mb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ja&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.lc=function(){return db(this.a)};k.Ec=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; -function fb(a){var b=a.g,c,d,e,f=b.X>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.rc,drive:f,blocksize:256,mapped:0,maxblock:b.Ha[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.Za=2496;b.S=0;b.D=128;b.X=0;break;case 1:if((b.X>>4&511)>=b.Ha[f]){b.S|=32832;b.D|=49152;break}if((b.X&15)>=b.J[f]){b.S|=32800;b.D|=49152;break}c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.Ya;e=65536-b.$a&65535;gb(a,b.T[f],c,d,e);return;case 2:if((b.X>>4&511)>=b.Ha[f])b.S|=32832, -b.D|=49152;else if((b.X&15)>=b.J[f])b.S|=32800,b.D|=49152;else{c=(b.X>>4&511)*b.J[f]+(b.X&15);d=(b.D&48)<<12|b.Ya;e=65536-b.$a&65535;a.pb(b.T[f],c,d,e);return}}b.Za=f<<13|b.Za&8176|b.X%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.rc=function(a,b,c,d,e){var f=this.g;f.Ya=d&65535;f.D=f.D&-49|d>>12&48;f.$a=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.sc,drive:f,blocksize:128,mapped:1,maxblock:b.Ha[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.xa&8&&(b.v&=63);b.xa=b.$b[f]|b.Ba&64;break;case 3:1==(b.L&3)&&(b.Ba=b.L&4?b.Ba+(b.L&65408)&65408|b.L<<2&64:b.Ba-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ba);break;case 4:b.xa=b.Ba;break;case 5:if(b.L>>6>=b.Ha[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); -d=(b.ra&63)<<16|b.Va;e=65536-b.xa&65535;gb(a,b.T[f],c,d,e);return;case 6:if(b.L>>6>=b.Ha[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ra&63)<<16|b.Va;e=65536-b.xa&65535;a.pb(b.T[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} -k.sc=function(a,b,c,d,e){var f=this.h;f.Va=d&65535;f.v=f.v&-49|d>>12&48;f.ra=d>>16&63;f.L=~~(c/f.J[b.ja])<<6|c%f.J[b.ja];f.Ba=f.L;f.xa=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Oa=[0,0,0,0,0,0,0,0];a.La=a.Pa=a.Na=a.Aa=a.Fb=0} -function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.V[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.tc,drive:b,blocksize:256,mapped:0,maxblock:c.ub[0]*c.Ga[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.rb[b]=c.ma[b];c.F|=32896;c.V[b]|=32896;c.La|=1<=c.ub[0]||c.ba[b]>>8>=c.Ga[0]||(c.ba[b]&255)>=c.J[0]){c.Oa[b]|=1024;c.F|=49152;break}d=(c.ma[b]*c.Ga[0]+(c.ba[b]>>8))*c.J[0]+ -(c.ba[b]&255);e=(c.Aa&63)<<16|c.Na;f=65536-c.Pa&65535;gb(a,c.T[b],d,e,f);return;case 57:if(c.ma[b]>=c.ub[0]||c.ba[b]>>8>=c.Ga[0]||(c.ba[b]&255)>=c.J[0])c.Oa[b]|=1024,c.F|=49152;else{d=(c.ma[b]*c.Ga[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Aa&63)<<16|c.Na;f=65536-c.Pa&65535;a.pb(c.T[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} -k.tc=function(a,b,c,d,e){var f=this.l;f.Pa=65536-e&65535;f.Na=d&65535;f.F=f.F&-769|d>>8&768;f.Aa=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ga[0]);f.ba[b.ja]=e%f.Ga[0]<<8|c%f.J[0];f.rb[b.ja]=f.ma[b.ja]=d;f.La|=1<=b.ic-1&&(f.V[b.ja]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.V[b.ja]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function kb(a,b,c,d,e,f){var g=~~((f+c.sa-1)/c.sa),h=new XMLHttpRequest;2048>g&&d+2048lb(this.a,a.hc?mb(this.a,c):c,a.cache[b][e])){a.ob(2,a,b,c,d);return}c+=2;--d}b++}a.ob(0,a,b,c,d)}; -function gb(a,b,c,d,e){for(var f,g;0g){b.ob(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.ob(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.wa=0;this.g.D=128;this.h.v=128;ib(this)}; -k.ac=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.za&65280:(a&1&&(b<<=8),f.za=b|255,d=0);break;case 4194298:if(0>b)d=f.Eb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Eb=d;f.j|=2}break;case 4194294:if(70!==f.Ia)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ia)return K(f,4);d=1;break;case 4194290:if(70!==f.Ia)return K(f,4);d=0;break;case 4194288:if(70!==f.Ia)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ia)return K(f,4);e=a-4194272>>1;0>b?d=f.zb[e]:(d=J(this,f.zb[e],a,b,c),0<=d&&(f.zb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.R[3][e],a,b,c);0<=d&&(f.R[3][e]=d,f.R[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.qb,a,b,c);0<=d&&(f.qb=d);break;case 4194172:d=f.ya;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Bc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.Za,a,b,c);0<=d&&(e.Za=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.$a,a,b,c);0<=d&&(e.$a=d);break;case 4194056:d=J(this,e.Ya,a,b,c);0<=d&&(e.Ya=d);break;case 4194058:d=J(this,e.X,a,b,c);0<=d&&(e.X= -d);break;case 4194060:break;case 4194062:d=J(this,e.Sb,a,b,c);0<=d&&(e.Sb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Aa=g.Aa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Pa,a,b,c);0<=d&&(g.Pa=d);break;case 4193732:d=J(this,g.Na,a,b,c);0<=d&&(g.Na=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= -J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Oa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.yc[e];break;case 4193746:d=J(this,g.Tb,a,b,c);0<=d&&(g.Tb=d);break;case 4193748:d=J(this,g.Ub[e],a,b,c);0<=d&&(g.Ub[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.zc[e];break;case 4193754:d=J(this,g.Vb[e],a,b,c);0<=d&&(g.Vb[e]=d);break;case 4193756:d=J(this,g.ma[e],a,b,c);0<=d&&(g.ma[e]= -d&511);break;case 4193758:g.rb[e]=g.ma[e];d=g.rb[e];break;case 4193760:d=g.wc[e];break;case 4193762:d=g.xc[e];break;case 4193764:d=g.uc[e];break;case 4193766:d=g.vc[e];break;case 4193768:d=J(this,g.Aa,a,b,c);0<=d&&(g.Aa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Fb,a,b,c);0<=d&&(g.Fb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ra=e.ra&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= -J(this,e.Va,a,b,c);0<=d&&(e.Va=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4192520:d=J(this,e.ra,a,b,c);0<=d&&(e.ra=d&63,e.v=e.v&-49|(e.ra&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ja:(d=J(this,f.Ja,a,b,c),0<=d&&(70!==f.Ia&&(d&=-49),f.Ja=d,f.nb[0]=d&4?15:7,f.nb[1]=d&2?15:7,f.nb[3]=d&1?15:7,f.mb&&(e=2,f.Ja&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= -16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.R[0][e],a,b,c);0<=d&&(f.R[0][e]=d,f.R[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.R[1][e],a,b,c);0<=d&&(f.R[1][e]=d,f.R[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ia)return K(f,4);e=a>>2&31;d=f.ab[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.ab[e]=a&2?d<<16|f.ab[e]&65535:f.ab[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var ob={},bb=(ob[65382]=[null,null,H.prototype.jc,H.prototype.Cc,"LKS"],ob[65402]=[null,null,H.prototype.kc,H.prototype.Dc,"MMR0"],ob[65534]=[null,null,H.prototype.lc,H.prototype.Ec,"PSW"],ob);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),vb(this,rb?wb:xb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},oa: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},H:function(a,b){return this.I(a,b)},Z:function(a,b){return this.ca(a, -b)},ha:function(a,b,c){this.A||this.Zb(a,b,c)},Ca:function(a,b,c){this.A||this.Da(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},W:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.ta=!0},na:function(a,b){this.c[a]=b;this.ta=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.ta=!0},Ea:function(a,b){this.l[a>>1]=b;this.ta=!0}}; -function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&zb(a,Ab,!1),(a.u=c.u)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.u||(a.tb=!a.A&&b[1]||a.B,a.Hc=!a.A&&b[3]||a.w);if(c||void 0===c)a.Zb=b[1]||a.B,a.Da=b[3]||a.w}function zb(a,b,c){c&&a.h||(a.Cb=b[0]||a.m,a.oc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.oa,G.prototype.fa,G.prototype.Fa],Ab=[G.prototype.H,G.prototype.ha,G.prototype.Z,G.prototype.Ca]; -if(Ia)var xb=[G.prototype.G,G.prototype.ga,G.prototype.W,G.prototype.pa],wb=[G.prototype.M,G.prototype.na,G.prototype.ea,G.prototype.Ea];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.bb=a.cycles||b;this.ga=c;this.Ab=Math.round(this.bb/1E4)/100;this.na=this.Ab*this.ga;this.i.$=!1;this.i.Wb=!1;this.i.Ua=a.autoStart;this.i.Hb=!1;this.i.kb=!1;this.hb=this.oa=0;this.ib=a.csStart;this.Da=a.csInterval;this.Ea=a.csStop;this.M=[];this.Qb=this.Ac.bind(this);F(this)}y(Db); -var Eb=["power","reset"];k=Db.prototype;k.va=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} -k.Y=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.ea/a.na&&(b=1),a.ga=b,b=a.Ab*a.ga,a.na!=b)){a.na=b;b=a.na.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Nb(a,a.ca);a.ca=0;a.Z=ja();a.fa=0;Ob(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.bb*a.ga/1E3,a.M[b][0]=c)} -k.Ac=function(){if(this.i.$){this.Bb>=this.bb&&Ob(this,!0);this.Ra=0;this.gb=ja();if(this.fa){var a=this.gb-this.fa;a>this.Nb&&(this.Z+=a,this.Z>this.gb&&(this.Z=this.gb))}try{do{for(var b,c=this.i.kb?1:this.jb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Xb(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.W-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Ra+=f;this.ca+=f;Nb(this,0,!0);a=f;if(this.i.kb){var l= -!1;this.hb=this.hb+this.Lb()|0;this.oa-=a;0>=this.oa&&(this.oa+=this.Da,l=!0);0<=this.Ea&&this.Ea<=Pb(this)&&(this.Da=this.Ea=-1,Hb(this),Lb(this),l=!0);l&&this.U(Pb(this)+" cycles: checksum="+n(this.hb))}this.Fa-=f;if(0>=this.Fa){this.Fa+=this.jb;15<=++this.Pb&&(this.B&&this.B.Qa(),this.Pb=0);break}}while(this.i.$)}catch(m){Lb(this);Ib(this);this.B&&this.B.stop(ja(),Pb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Qb;this.fa=ja();d=this.Nb;this.Ra&& -(d=Math.round(d*this.Ra/this.jb));d-=this.fa-this.gb;if(e=this.fa-this.Z)this.ea=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ha=0,Mb(this));if(0>d||this.ead&&(this.Z-=d),d=0;this.Bb+=this.Ra;this.fa+=d;b(c,d)}}};function Jb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.U(a.toString()+" busy");else{Mb(a);a.i.$=!0;a.i.Wb=!0;a.Ca&&a.Ca.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Z,Pb(a));Ib(a,!0);setTimeout(a.Qb,0)}}k.Xb=function(){return 0}; -function Lb(a){if(a.i.$){a.W-=a.a;a.a=0;Nb(a,a.ca);a.ca=0;a.i.$=!1;a.Ca&&a.Ca.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Pb(a));Ib(a)}a.i.complete=void 0}function Ib(a,b){a.B&&a.B.Qa(b)} -function Qb(a){this.gc=a.resetAddr||0;Db.call(this,a,6666667);this.Kb=0;this.decode=Rb.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.gc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.fb=this.w=0;this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.zb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.vb=this.H=this.I=this.j=0;this.Ia=70;this.pa=-1;Sb(this);this.i.complete=this.i.bc=!1}y(Qb,Db);k=Qb.prototype;k.reset=function(){this.i.$&&Lb(this);Sb(this);Gb(this);this.i.error=!1;this.parent.reset.call(this)}; -function Sb(a){a.za=255;a.s=0;a.Eb=0;a.G=0;a.ya=0;a.qb=0;a.Ja=0;a.mb=0;a.eb=0;a.nb=[7,7,7,7];a.o=[];a.j|=2;cb(a)}function cb(a){a.mb?(a.Jb=65536,a.N=a.ec):(a.Jb=0,a.N=a.dc)}k.Lb=function(){return 0};k.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.ha,this.ga]);a.set(2,Wa(this.u));return a.data()}; -k.restore=function(a){var b=a[1];this.ha=b[1];Mb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ia-=b;break}b-=a.o[f].ia}a.o.splice(f+1,0,{ia:b,Rb:c<<5&224,Yb:d,xb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.ua()|(a.h&65535?0:4)|(a.g&32768?2:0)|M(a)} -function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Ub(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Vb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} -function K(a,b){var c=!1;0>a.pa?a.pa=db(a):a.w||(b=4,c=!0);a.G&57344||(a.ya=63222,a.qb=b);a.w=0;var d=N(a,b|65536),e=N(a,b+2&65535|65536);eb(a,e&-12289|a.pa>>2&12288);c&&(a.s|=4,a.f[6]=4);Wb(a,a.pa);Wb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.pa=-1;throw b;}function Xb(a){var b=Yb(a),c=Yb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} -function mb(a,b){var c=b>>13&31;31>c?a.Ja&32&&(b=a.ab[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Zb(a,b,c){var d,e,f,g=0;if(c&a.mb){d=b>>13&a.nb[a.w];e=a.R[a.w][d];f=(a.R[a.w][d+16]<<6)+(b&8191)&4194303;a.Ja&16?3932160<=f&&4186112>f&&(f=mb(a,f&262143)):(f&=262143,253952<=f&&(f|=4186112));3932160>f&&3915776<=f&&(a.s|=32,K(a,4));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.R[a.w][d]=e;if(4194170!== -f||a.w)a.eb=a.w,a.fb=d;g&&(g&57344&&(0<=a.pa&&(g|=128),a.G&57344||(a.G=a.G|g|a.eb<<5|a.fb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239>>a.c].oc(b&a.h,b)}function N(a,b){return nb(a,Zb(a,b,2))}function lb(a,b,c){b&1&&(a.s|=64,K(a,4));a=a.u;a.b[(b&a.u)>>>a.c].Hc(b&a.h,c&65535,b)}function Yb(a){var b=N(a,a.f[6]|65536);a.f[6]=a.f[6]+2&65535;return b} -function Wb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.G&57344||(a.ya=a.ya<<8|246);!a.w&&c<=a.za&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=N(a,e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=N(a,e)|g;a.a-=8;break; -case 6:return e=Tb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Tb(a),e=e+a.f[c]&65535,e=N(a,e|65536)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.ya=a.ya<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.za||65534<=a.f[6])&&(a.f[6]<=a.za-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.dc=function(a,b,c){return $b(this,a,b,c)};k.ec=function(a,b,c){return Zb(this,$b(this,a,b,c),c)}; -function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=N(a,d|c&65536),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c}function bc(a,b,c,d){a.G&57344||(a.ya=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Zb(a,e|c&65536,4),a.w=a.C>>14&3,lb(a,e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d} -function cc(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)}function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=nb(a,a.N(b,d,2)):c=a.f[d];return c} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.vb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].tb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),lb(a,e,d.call(a,c,nb(a,e)))):a.f[e]=d.call(a,c,a.f[e])}function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].tb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c} -function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?lb(a,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -k.Xb=function(a){this.i.complete=!0;this.i.bc=!1;this.i.Wb=!1;this.W=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Eb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Rb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?K(this,a.Yb):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.ya=0,this.qb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Tb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function nc(a,b){a=b&~a;O(this,a);return a}function oc(a,b){a=b&~a;O(this,a<<8);return a}function pc(a,b){a|=b;O(this,a);return a}function qc(a,b){a|=b;O(this,a<<8);return a}function rc(a,b){a=~b|65536;P(this,a);return a&65535} -function sc(a,b){a=~b|256;P(this,a<<8);return a&255}function tc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function yc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function zc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function Ac(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function Bc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function Cc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Vb(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Vb(this,c<<8,a<<8,b<<8);return c&255} -function Fc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Gc(a,b){a^=b;O(this,a);return a&65535}function Hc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Ic(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Jc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Kc=[0,7,7,10,7,11,9,13];function Lc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Kc[this.c]} -var Mc=[0,14,14,17,14,18,16,20];function Nc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Wb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Mc[this.c]}var Oc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Pc=[7,13,13,17,14,18,17,21];function Qc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Tc(a){U(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Uc(a){U(this,a,R(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Rb(a){Vc[a>>12].call(this,a)} -var Vc=[function(a){Wc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,gc(this,a,b));this.a=c-Oc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Vb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? -2:0)},function(a){U(this,a,R(this,a),pc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Xc[a>>8&15].call(this,a)},function(a){Yc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);O(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Vb(this,b-a,a,b);this.a-=this.c?4+ -(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),oc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,cc(this,a),qc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Dc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Wc=[function(a){Zc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ua()==!(this.g&32768))},function(a){V(this,a,!this.ua()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))},Nc,Nc,function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>> -6&3].call(this,a)},Y,Y],$c=[function(a){P(this,gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){U(this,a,0,xc);this.a-=this.c?11:6},function(a){U(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],bd=[function(a){U(this,a,0,Bc);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)},function(a){U(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],cd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=N(this,a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Wb(this,a);O(this,a);this.a-=11}, -function(a){var b=Yb(this),c=this.a;bc(this,a,0,b);O(this,b);this.a=c-Pc[this.c]},function(a){O(this,gc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){dd[a&15].call(this,a)},Y,Y,Y,Lc,Lc,Lc,Lc,function(a){if(a&8)K(this,8);else{var b=Yb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){ed[a&15].call(this,a)},function(a){fd[a&15].call(this,a)},Tc,Tc,Tc,Tc], -dd=[function(){this.C&49152?(this.s|=128,K(this,4)):(this.W-=this.a,this.a=0);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Xb(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Sb(this),this.u.reset());this.a-=667},function(){Xb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ed=[Rc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m= -0;this.a-=5},W,W,W,W,W,W,W],fd=[Rc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Xc=[Qc,Qc,Jc,Jc,Hc,Hc,Ic,Ic,Uc,Uc,Y,Y,Y,Y,Sc,Sc],Yc=[function(a){V(this,a,!this.ua())},function(a){V(this,a,this.ua())},function(a){V(this,a,!M(this)&&!!(this.h&65535))},function(a){V(this,a,M(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, -a,!M(this))},function(a){V(this,a,M(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},Y,Y],gd=[function(a){P(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,uc);this.a-=this.c? -9:3+(7==this.b?2:0)}],hd=[function(a){T(this,a,0,yc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],id=[function(a){T(this,a,0,Cc);this.a-=this.c?9+(this.vb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,mc);this.a-=this.c?9+(this.vb&1):3+(7==this.b? -2:0)},function(a){T(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],jd=[Y,function(a){a=ac(this,a,65536);Wb(this,a);O(this,a);this.a-=11},function(a){var b=Yb(this),c=this.a;bc(this,a,65536,b);O(this,b);this.a=c-Pc[this.c]},Y]; -function kd(a){v.call(this,"ROM",a,kd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){ld(c,a,b,f)})}}y(kd);kd.prototype.va=function(a,b,c,d){this.u=b;this.a=c;this.K=d;md(this)};kd.prototype.la=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; -kd.prototype.ka=function(){return!0}; -function ld(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.wb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); -return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].Zb(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.cb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.wb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.la=function(a,b){if(!b)if(this.Ob(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ka=function(a){return a?this.save():!0};k.reset=function(){rd(this)};k.save=function(){var a=new L(this);a.set(0,[]);return a.data()};k.restore=function(){return rd(this)};function rd(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Db=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.U(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.nc,Z.prototype.Gc,"RCSR"],sd[65394]=[null,null,Z.prototype.mc,Z.prototype.Fc,"RBUF"],sd[65396]=[null,null,Z.prototype.qc,Z.prototype.Jc,"XCSR"],sd[65398]=[null,null,Z.prototype.pc,Z.prototype.Ic,"XBUF"],sd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.B)){this.l=new L(this,"1.30.1","failsafe");xd(this.l)&&(Cd(this,d),a=2,Dd(this.l));this.l.set("timestamp",ka());Ed(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xd(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Z=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Ua());this.I&&(Cd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; -function Cd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} -function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),g=new L(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&Lb(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;l>5&3;c.jb=a>>1&15;c.Fb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ba&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.tc=function(){return db(this.a)};k.Nc=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; +function fb(a){var b=a.g,c,d,e,f=b.W>>13&7;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.zc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.cb=2496;b.R=0;b.D=128;b.W=0;break;case 1:if((b.W>>4&511)>=b.Ia[f]){b.R|=32832;b.D|=49152;break}if((b.W&15)>=b.J[f]){b.R|=32800;b.D|=49152;break}c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;gb(a,b.S[f],c,d,e);return;case 2:if((b.W>>4&511)>=b.Ia[f])b.R|=32832, +b.D|=49152;else if((b.W&15)>=b.J[f])b.R|=32800,b.D|=49152;else{c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;a.sb(b.S[f],c,d,e);return}}b.cb=f<<13|b.cb&8176|b.W%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.zc=function(a,b,c,d,e){var f=this.g;f.bb=d&65535;f.D=f.D&-49|d>>12&48;f.eb=65536-e&65535;switch(a){case 1:f.R|=33024;f.D|=49152;break;case 2:f.R|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.Ac,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.za&8&&(b.v&=63);b.za=b.gc[f]|b.Ea&64;break;case 3:1==(b.L&3)&&(b.Ea=b.L&4?b.Ea+(b.L&65408)&65408|b.L<<2&64:b.Ea-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ea);break;case 4:b.za=b.Ea;break;case 5:if(b.L>>6>=b.Ia[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); +d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;gb(a,b.S[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;a.sb(b.S[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} +k.Ac=function(a,b,c,d,e){var f=this.h;f.Za=d&65535;f.v=f.v&-49|d>>12&48;f.ta=d>>16&63;f.L=~~(c/f.J[b.la])<<6|c%f.J[b.la];f.Ea=f.L;f.za=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.U=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.La=a.Qa=a.Oa=a.Da=a.Jb=0} +function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.U[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.S[b]&&(c.S[b]={cache:[],postProcess:a.Bc,drive:b,blocksize:256,mapped:0,maxblock:c.xb[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.ub[b]=c.oa[b];c.F|=32896;c.U[b]|=32896;c.La|=1<=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ +(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;gb(a,c.S[b],d,e,f);return;case 57:if(c.oa[b]>=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;a.sb(c.S[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.U[b]|=128;return!!(c.F&64)})} +k.Bc=function(a,b,c,d,e){var f=this.l;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Da=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.la]=e%f.Ha[0]<<8|c%f.J[0];f.ub[b.la]=f.oa[b.la]=d;f.La|=1<=b.nc-1&&(f.U[b.la]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.U[b.la]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function kb(a,b,c,d,e,f){var g=~~((f+c.ua-1)/c.ua),h=new XMLHttpRequest;2048>g&&d+2048this.a.Sa(a.mc?lb(this.a,c):c,a.cache[b][e])){a.rb(2,a,b,c,d);return}c+=2;--d}b++}a.rb(0,a,b,c,d)}; +function gb(a,b,c,d,e){for(var f,g;0g){b.rb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.rb(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ya=0;this.g.D=128;this.h.v=128;ib(this)}; +k.hc=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ca&65280:(a&1&&(b<<=8),f.Ca=b|255,d=0);break;case 4194298:if(0>b)d=f.Ib;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Ib=d;f.j|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.Z[3][e],a,b,c);0<=d&&(f.Z[3][e]=d,f.Z[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.tb,a,b,c);0<=d&&(f.tb=d);break;case 4194172:d=f.Aa;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Kc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.cb,a,b,c);0<=d&&(e.cb=d);break;case 4194050:d=J(this,e.R,a,b,c);0<=d&&(e.R=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194056:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194058:d=J(this,e.W,a,b,c);0<=d&&(e.W= +d);break;case 4194060:break;case 4194062:d=J(this,e.Zb,a,b,c);0<=d&&(e.Zb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Da=g.Da&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= +J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.U[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.Gc[e];break;case 4193746:d=J(this,g.$b,a,b,c);0<=d&&(g.$b=d);break;case 4193748:d=J(this,g.ac[e],a,b,c);0<=d&&(g.ac[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Hc[e];break;case 4193754:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d);break;case 4193756:d=J(this,g.oa[e],a,b,c);0<=d&&(g.oa[e]= +d&511);break;case 4193758:g.ub[e]=g.oa[e];d=g.ub[e];break;case 4193760:d=g.Ec[e];break;case 4193762:d=g.Fc[e];break;case 4193764:d=g.Cc[e];break;case 4193766:d=g.Dc[e];break;case 4193768:d=J(this,g.Da,a,b,c);0<=d&&(g.Da=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Jb,a,b,c);0<=d&&(g.Jb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ta=e.ta&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= +J(this,e.Za,a,b,c);0<=d&&(e.Za=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.za,a,b,c);0<=d&&(e.za=d);break;case 4192520:d=J(this,e.ta,a,b,c);0<=d&&(e.ta=d&63,e.v=e.v&-49|(e.ta&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ba:(d=J(this,f.Ba,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ba=d,f.qb[0]=d&4?15:7,f.qb[1]=d&2?15:7,f.qb[3]=d&1?15:7,f.Fb&&(e=2,f.Ba&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.Z[0][e],a,b,c);0<=d&&(f.Z[0][e]=d,f.Z[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.Z[1][e],a,b,c);0<=d&&(f.Z[1][e]=d,f.Z[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.fb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.fb[e]=a&2?d<<16|f.fb[e]&65535:f.fb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var mb={},bb=(mb[65382]=[null,null,H.prototype.rc,H.prototype.Lc,"LKS"],mb[65402]=[null,null,H.prototype.sc,H.prototype.Mc,"MMR0"],mb[65534]=[null,null,H.prototype.tc,H.prototype.Nc,"PSW"],mb);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),tb(this,pb?ub:vb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},ja:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},H:function(a,b){return this.I(a,b)},Y:function(a,b){return this.ca(a, +b)},ha:function(a,b,c){this.A||this.fc(a,b,c)},qa:function(a,b,c){this.A||this.ra(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},V:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.va=!0},ia:function(a,b){this.c[a]=b;this.va=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.va=!0},Fa:function(a,b){this.l[a>>1]=b;this.va=!0}}; +function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&xb(a,yb,!1),(a.u=c.u)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.u||(a.wb=!a.A&&b[1]||a.B,a.Qc=!a.A&&b[3]||a.w);if(c||void 0===c)a.fc=b[1]||a.B,a.ra=b[3]||a.w}function xb(a,b,c){c&&a.h||(a.Gb=b[0]||a.m,a.wc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[G.prototype.N,G.prototype.ja,G.prototype.fa,G.prototype.Ga],yb=[G.prototype.H,G.prototype.ha,G.prototype.Y,G.prototype.qa]; +if(Ia)var vb=[G.prototype.G,G.prototype.ga,G.prototype.V,G.prototype.pa],ub=[G.prototype.M,G.prototype.ia,G.prototype.ea,G.prototype.Fa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.mb=a.cycles||b;this.ia=c;this.Db=Math.round(this.mb/1E4)/100;this.pa=this.Db*this.ia;this.i.$=!1;this.i.cc=!1;this.i.Ya=a.autoStart;this.i.Lb=!1;this.i.ob=!1;this.gb=this.qa=0;this.lb=a.csStart;this.Ga=a.csInterval;this.Ta=a.csStop;this.M=[];this.Vb=this.Ic.bind(this);F(this)}y(Bb); +var Cb=["power","reset"];k=Bb.prototype;k.xa=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} +k.X=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.fa/a.pa&&(b=1),a.ia=b,b=a.Db*a.ia,a.pa!=b)){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.T("target speed: "+b)}Kb(a,a.ca);a.ca=0;a.Y=ja();a.ga=0;Lb(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.mb*a.ia/1E3,a.M[b][0]=c)} +k.Ic=function(){if(this.i.$){this.Eb>=this.mb&&Lb(this,!0);this.Va=0;this.kb=ja();if(this.ga){var a=this.kb-this.ga;a>this.Tb&&(this.Y+=a,this.Y>this.kb&&(this.Y=this.kb))}try{do{for(var b,c=this.i.ob?1:this.nb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.dc(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.ha-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Va+=f;this.ca+=f;Kb(this,0,!0);a=f;if(this.i.ob){var l= +!1;this.gb=this.gb+this.Nb()|0;this.qa-=a;0>=this.qa&&(this.qa+=this.Ga,l=!0);0<=this.Ta&&this.Ta<=Mb(this)&&(this.Ga=this.Ta=-1,Fb(this),L(this),l=!0);l&&this.T(Mb(this)+" cycles: checksum="+n(this.gb))}this.Ua-=f;if(0>=this.Ua){this.Ua+=this.nb;15<=++this.Ub&&(this.B&&this.B.Ra(),this.Ub=0);break}}while(this.i.$)}catch(m){L(this);Gb(this);this.B&&this.B.stop(ja(),Mb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Vb;this.ga=ja();d=this.Tb;this.Va&&(d= +Math.round(d*this.Va/this.nb));d-=this.ga-this.kb;if(e=this.ga-this.Y)this.fa=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ja=0,Jb(this));if(0>d||this.fad&&(this.Y-=d),d=0;this.Eb+=this.Va;this.ga+=d;b(c,d)}}};function Hb(a){var b;a.i.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.T(a.toString()+" busy");else{Jb(a);a.i.$=!0;a.i.cc=!0;a.Fa&&a.Fa.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Y,Mb(a));Gb(a,!0);setTimeout(a.Vb,0)}}k.dc=function(){return 0}; +function L(a){if(a.i.$){a.ha-=a.a;a.a=0;Kb(a,a.ca);a.ca=0;a.i.$=!1;a.Fa&&a.Fa.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Mb(a));Gb(a)}a.i.complete=void 0}function Gb(a,b){a.B&&a.B.Ra(b)} +function Nb(a){this.Jc=a.resetAddr||0;Bb.call(this,a,6666667);this.Ob=0;this.decode=Ob.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.Jc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.jb=this.w=0;this.Z=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Bb=this.H=this.I=this.j=0;this.Ja=70;this.ra=-1;Pb(this);this.i.complete=this.i.ic=!1}y(Nb,Bb);k=Nb.prototype;k.reset=function(){this.i.$&&L(this);Pb(this);Eb(this);this.i.error=!1;this.parent.reset.call(this)}; +function Pb(a){a.Ca=255;a.s=0;a.Ib=0;a.G=0;a.Aa=0;a.tb=0;a.Ba=0;a.Fb=0;a.ib=0;a.oc=[4,2,0,1];a.qb=262143;a.Rb=253952;a.Sb=[[0,0,0,0,0,0,0,0,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.pc=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.o=[];a.j|=2;cb(a)} +function cb(a){a.Fb?(a.ea=65536,a.N=a.lc,a.V=a.Yb,a.Wb=a.Rc):(a.ea=0,a.N=a.kc,a.V=a.Na,a.Wb=a.Sa)}k.Nb=function(){return 0};k.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ja,this.ia]);a.set(2,Wa(this.u));return a.data()}; +k.restore=function(a){var b=a[1];this.ja=b[1];Jb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ka-=b;break}b-=a.o[f].ka}a.o.splice(f+1,0,{ka:b,Xb:c<<5&224,ec:d,yb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.wa()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)} +function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Sb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.ra?a.ra=db(a):a.w||(b=4,c=!0);a.G&57344||(a.Aa=63222,a.tb=b);a.w=0;var d=a.V(b|a.ea),e=a.V(b+2&65535|a.ea);eb(a,e&-12289|a.ra>>2&12288);c&&(a.s|=4,a.f[6]=4);Tb(a,a.ra);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ra=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} +function lb(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.fb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Wb(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.oc[a.w]||(d&=7);e=a.Sb[a.w][d];f=(a.pc[a.w][d]<<6)+(b&8191)&a.qb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Rb&&4186112>f&&(a.s|=32,K(a,4))));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.Sb[a.w][d]=e;if(4194170!==f||a.w)a.ib=a.w,a.jb=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.ib<<5|a.jb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-=8;break; +case 6:return e=Qb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.V(e|a.ea)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ca||65534<=a.f[6])&&(a.f[6]<=a.Ca-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.kc=function(a,b,c){return Xb(this,a,b,c)};k.lc=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};k.Na=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].wc(a&b.h,a)}; +k.Yb=function(a){return this.Na(Wb(this,a,2))};k.Sa=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].Qc(a&c.h,b&65535,a)};k.Rc=function(a,b){this.Sa(Wb(this,a|65536,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.V(d|c&a.ea),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c} +function Zb(a,b,c,d){a.G&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Wb(a,e|c&65536,4),a.w=a.C>>14&3,a.Sa(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d}function $b(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} +function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Bb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].wb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),a.Sa(e,d.call(a,c,a.Na(e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].wb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Sa(a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +k.dc=function(a){this.i.complete=!0;this.i.ic=!1;this.i.cc=!1;this.ha=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Ib&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Xb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?K(this,a.ec):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.Aa=0,this.tb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Qb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function kc(a,b){a=b&~a;O(this,a);return a}function lc(a,b){a=b&~a;O(this,a<<8);return a}function mc(a,b){a|=b;O(this,a);return a}function nc(a,b){a|=b;O(this,a<<8);return a}function oc(a,b){a=~b|65536;P(this,a);return a&65535} +function pc(a,b){a=~b|256;P(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function vc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} +function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;O(this,a);return a&65535}function Ec(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Fc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Gc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} +var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,R(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Ob(a){Sc[a>>12].call(this,a)} +var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,dc(this,a,b));this.a=c-Lc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),kc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? +2:0)},function(a){U(this,a,R(this,a),mc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);O(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ +(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),lc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Ac);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.wa()==!(this.g&32768))},function(a){V(this,a,!this.wa()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.wa()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.wa()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> +6&3].call(this,a)},Y,Y],Xc=[function(a){P(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,N(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,N(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, +a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);O(this,a);this.a-= +11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);O(this,b);this.a=c-Mc[this.c]},function(a){O(this,dc(this,a,this.wa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, +Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Pb(this),this.u.reset());this.a-=667},function(){Ub(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= +5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.wa())},function(a){V(this,a,this.wa())},function(a){V(this,a,!N(this)&&!!(this.h&65535))},function(a){V(this,a,N(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +a,!N(this))},function(a){V(this,a,N(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){P(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? +9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b? +2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Yb(this,a,65536);Tb(this,a);O(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);O(this,b);this.a=c-Mc[this.c]},Y]; +function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}y(hd);hd.prototype.xa=function(a,b,c,d){this.u=b;this.a=c;this.K=d;jd(this)};hd.prototype.na=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; +hd.prototype.ma=function(){return!0}; +function id(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Cb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); +return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].fc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.hb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Cb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.na=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ma=function(a){return a?this.save():!0};k.reset=function(){od(this)};k.save=function(){var a=new M(this);a.set(0,[]);return a.data()};k.restore=function(){return od(this)};function od(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Hb=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.T(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.vc,Z.prototype.Pc,"RCSR"],pd[65394]=[null,null,Z.prototype.uc,Z.prototype.Oc,"RBUF"],pd[65396]=[null,null,Z.prototype.yc,Z.prototype.Tc,"XCSR"],pd[65398]=[null,null,Z.prototype.xc,Z.prototype.Sc,"XBUF"],pd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new M(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.T(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Y=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.Ya());this.I&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +function zd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} +function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),g=new M(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ma&&(c&&L(a.a),d=a.a.ma(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.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);Nd(a,b,c)}})}else c(a,null)} -function Od(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=ga(a))}function f(a){e("Error: "+a);l&&(--Kd||wa(!0));l=!1}var g,h,l=!0;Kd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Ld(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Kd||wa(!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),--Kd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,m):Md(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Od(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +k.X=function(a,b,c){var d=this;switch(b){case "power":return this.A[b]=c,c.onclick=function(){d.g||(d.i.P?Dd(d,!1,!0):wd(d,d.ab))},!0;case "reset":return this.A[b]=c,c.onclick=function(){if(d.i.P&&!d.g)if(d.b&&!d.o){var a=la("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Dd(d,a,!0);!a&&d.H?window&&window.location.reload():d.ab(sd)}else d.reset(),d.a&&d.a.Ya()},!0;case "save":if(da())c.parentNode.removeChild(c);else return this.A[b]= +c,c.onclick=function(){var a=td(d,!0);if(a){var b=!!(d.b&&!d.o||d.H),c=Dd(d,b);b?Ed(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1}; +function td(a,b){var c=a.c;c||((c=oa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Fd(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c} +function Fd(a,b){a.c=null;b=p(ea()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(pa("user",b.data),a.c=b.data)}catch(d){r(d.message+" ("+c+")")}return a.c}function vd(a){var b=null;a.c&&(b=ea()+"/api/v1/user?req=load&user="+a.c+"&state="+Gd(a,"1.30.1"));return b} +function Ed(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Gd(a,"1.30.1");d.data=c;b=p(ea()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.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);Kd(a,b,c)}})}else c(a,null)} +function Ld(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=ga(a))}function f(a){e("Error: "+a);l&&(--Hd||wa(!0));l=!1}var g,h,l=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Id(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hd||wa(!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),--Hd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,m):Jd(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); From cd8b6464a3a48bf1339e5e7a04628a1d41981106 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 7 Oct 2016 10:58:15 -0700 Subject: [PATCH 06/36] Added more MMU handlers --- modules/pdp11/lib/cpustate.js | 29 +- modules/pdp11/lib/device.js | 431 ++++++++++++++++++++++++++- versions/pdpjs/1.30.1/pdp11-dbg.js | 448 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 308 ++++++++++---------- 4 files changed, 831 insertions(+), 385 deletions(-) diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index bc8345d31..fa8f8df0f 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -151,6 +151,21 @@ CPUStatePDP11.prototype.initRegs = function() this.mmuMode = 0; // current memory management mode (see PDP11.MODE.KERNEL | SUPER | UNUSED | USER) this.mmuLastPage = 0; this.mmuLastVirtual = 0; + + this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit + this.mmuPDR = [ // memory management PDR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff], // mode 2 with illegal PDRs + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 + ]; + this.mmuPAR = [ // memory management PAR registers by mode + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 + ]; + this.mmuMap = [ // memory management register by mode - 16 PDR (8 I then 8 D descriptors) followed by 16 PAR (I/D addresses) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super @@ -202,23 +217,9 @@ CPUStatePDP11.prototype.resetRegs = function() this.mmuEnable = 0; // MMU enabled for PDP11.ACCESS.READ or PDP11.ACCESS.WRITE this.mmuLastMode = 0; - this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit this.mmuMask = 0x3ffff; this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; - this.mmuPDR = [ // memory management PDR registers by mode - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 - [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff], // mode 2 with illegal PDRs - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 - ]; - this.mmuPAR = [ // memory management PAR registers by mode - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super 1 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 - ]; - /** @type {Array.} */ this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index fbc74f654..ac1d91c11 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -259,6 +259,327 @@ DevicePDP11.prototype.writeMMR0 = function(data, addr) this.display.misc = (this.display.misc & ~7) | idx; }; +/** + * readSISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + * @return {number} + */ +DevicePDP11.prototype.readSISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[1][reg]; +}; + +/** + * writeSISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + */ +DevicePDP11.prototype.writeSISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[1][reg] = data & 0xff0f; +}; + +/** + * readSDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + * @return {number} + */ +DevicePDP11.prototype.readSDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[1][reg]; +}; + +/** + * writeSDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + */ +DevicePDP11.prototype.writeSDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[1][reg] = data & 0xff0f; +}; + +/** + * readSISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + * @return {number} + */ +DevicePDP11.prototype.readSISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[1][reg]; +}; + +/** + * writeSISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + */ +DevicePDP11.prototype.writeSISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[1][reg] = data; + this.cpu.mmuPDR[1][reg] &= 0xff0f; + +}; + +/** + * readSDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + * @return {number} + */ +DevicePDP11.prototype.readSDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[1][reg]; +}; + +/** + * writeSDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + */ +DevicePDP11.prototype.writeSDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[1][reg] = data; + this.cpu.mmuPDR[1][reg] &= 0xff0f; +}; + +/** + * readKISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + * @return {number} + */ +DevicePDP11.prototype.readKISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[0][reg]; +}; + +/** + * writeKISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + */ +DevicePDP11.prototype.writeKISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[0][reg] = data & 0xff0f; +}; + +/** + * readKDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + * @return {number} + */ +DevicePDP11.prototype.readKDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[0][reg]; +}; + +/** + * writeKDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + */ +DevicePDP11.prototype.writeKDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[0][reg] = data & 0xff0f; +}; + +/** + * readKISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + * @return {number} + */ +DevicePDP11.prototype.readKISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[0][reg]; +}; + +/** + * writeKISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + */ +DevicePDP11.prototype.writeKISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[0][reg] = data; + this.cpu.mmuPDR[0][reg] &= 0xff0f; + +}; + +/** + * readKDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + * @return {number} + */ +DevicePDP11.prototype.readKDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[0][reg]; +}; + +/** + * writeKDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + */ +DevicePDP11.prototype.writeKDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[0][reg] = data; + this.cpu.mmuPDR[0][reg] &= 0xff0f; +}; + +/** + * readUISDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + * @return {number} + */ +DevicePDP11.prototype.readUISDR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPDR[3][reg]; +}; + +/** + * writeUISDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + */ +DevicePDP11.prototype.writeUISDR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPDR[3][reg] = data & 0xff0f; +}; + +/** + * readUDSDR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + * @return {number} + */ +DevicePDP11.prototype.readUDSDR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPDR[3][reg]; +}; + +/** + * writeUDSDR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + */ +DevicePDP11.prototype.writeUDSDR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPDR[3][reg] = data & 0xff0f; +}; + +/** + * readUISAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + * @return {number} + */ +DevicePDP11.prototype.readUISAR = function(addr) +{ + var reg = (addr >> 1) & 7; + return this.cpu.mmuPAR[3][reg]; +}; + +/** + * writeUISAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + */ +DevicePDP11.prototype.writeUISAR = function(data, addr) +{ + var reg = (addr >> 1) & 7; + this.cpu.mmuPAR[3][reg] = data; + this.cpu.mmuPDR[3][reg] &= 0xff0f; + +}; + +/** + * readUDSAR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + * @return {number} + */ +DevicePDP11.prototype.readUDSAR = function(addr) +{ + var reg = ((addr >> 1) & 7) + 8; + return this.cpu.mmuPAR[3][reg]; +}; + +/** + * writeUDSAR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + */ +DevicePDP11.prototype.writeUDSAR = function(data, addr) +{ + var reg = ((addr >> 1) & 7) + 8; + this.cpu.mmuPAR[3][reg] = data; + this.cpu.mmuPDR[3][reg] &= 0xff0f; +}; + /** * readPSW(addr) * @@ -1466,11 +1787,119 @@ DevicePDP11.prototype.access = function(physicalAddress, data, byteFlag) * ES6 ALERT: As you can see below, I've finally started using computed property names. */ DevicePDP11.UNIBUS_IOTABLE = { + [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR"], + [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR"], + [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR"], + [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR"], + [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR"], + [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR"], + [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR"], + [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR"], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], - [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"] + [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR"], + [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR"], + [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR"], + [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR"], + [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"], }; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; + +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; + /** * DevicePDP11.init() * diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index a54258695..fb1e12144 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -681,233 +681,241 @@ for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ -var k; +var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} -function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function t(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Qb=this.id:(this.dc=this.id.substr(0,b),this.Qb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Eb:!1,ec:!1,ia:!1,error:!1};this.Sb=null;this.v.error=!1;this.L={};this.j=null;this.la=d||0;x.push(this)}var Ua=void 0,Va={}; -if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=w);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},x=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ja(a){return a.replace(/[&<>"']/g,function(a){return ia[a]})}function oa(a,b){return(a+" ").slice(0,b)} +function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function ra(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ua(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 m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}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 ha(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function wa(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}xa=a}return xa}function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function Da(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ea(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sb=this.id:(this.fc=this.id.substr(0,b),this.Sb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Gb:!1,gc:!1,ja:!1,error:!1};this.Ub=null;this.v.error=!1;this.L={};this.j=null;this.ma=d||0;v.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=u);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},v=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ba&&(this.ba=10);15>2;this.f=this.Ba-1;this.w=this.F/this.Ba|0;this.Sa=[];this.D=null;this.Fb=this.xd;a=new I;Ab(a,this.j);this.$=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&E(this.j,e[5]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,1);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c));return c} -function Cb(a,b,c){var d=!1,e=this.controller,f=e.Sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&E(this.j,f[5]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,1),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b)))} -function Db(a,b){var c=-1,d=this.controller;(a=d.Sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&E(this.j,a[5]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=d.Fb(b|4186112,-1,0);this.j&&F(this.j,64)&&E(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c));return c} -function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&E(this.j,a[5]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(e.Fb(c|4186112,b,0),this.j&&F(this.j,64)&&E(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b)))}k=zb.prototype;k.reset=function(){this.D&&this.D()}; -k.xd=function(a,b,c){this.j&&F(this.j,64)&&E(this.j,"warning: unrecognized I/O access("+J(this.j,a)+","+J(this.j,b)+","+c+")");return 0};k.Ia=function(a,b){b||this.reset();return!0}; -function Fb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ba;0g&&(n=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.A)return l.Pb+=l.A-f,l.A=f,!0;if(f>=l.A+l.Pb){n=l.size-(f-m);n>g&&(n=g);l.Pb=f-l.A+n;f=m+a.Ba;g-=n;h++;continue}}return Hb(1,f,g)}f=new I(f,n,a.Ba,d,e);Ab(f,a.j,l);a.$[h++]=f;f=m+a.Ba;g-=n}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ib[d]+" at "+p(b,8,!0)),!0):Hb(2,b,c)} -k.kb=function(a){return this.$[(a&this.g)>>>this.ba].Xb(a&this.f,a)};k.Ga=function(a){return this.$[(a&this.g)>>>this.ba].Gc(a&this.f,a)};function Jb(a,b){return a.$[(b&a.g)>>>a.ba].kc(b&a.f,b)}k.Mb=function(a,b){this.$[(a&this.g)>>>this.ba].ac(a&this.f,b&255,a)};k.oc=function(a,b){this.$[(a&this.g)>>>this.ba].Oc(a&this.f,b&65535,a)}; -function Kb(a){for(var b=0,c=[],d=0;d>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Da-1;this.w=this.F/this.Da|0;this.Ua=[];this.D=null;this.Hb=this.Jd;a=new H;Cb(a,this.j);this.aa=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[5]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c));return c} +function Eb(a,b,c){var d=!1,e=this.controller,f=e.Ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[5]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b)))} +function Fb(a,b){var c=-1,d=this.controller;(a=d.Ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[5]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c));return c} +function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[5]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b)))}h=Bb.prototype;h.reset=function(){this.D&&this.D()}; +h.Jd=function(a,b,c){this.j&&F(this.j,64)&&D(this.j,"warning: unrecognized I/O access("+I(this.j,a)+","+I(this.j,b)+","+c+")");return 0};h.Ka=function(a,b){b||this.reset();return!0}; +function Hb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.ca;0g&&(p=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.A)return m.Rb+=m.A-f,m.A=f,!0;if(f>=m.A+m.Rb){p=m.size-(f-n);p>g&&(p=g);m.Rb=f-m.A+p;f=n+a.Da;g-=p;k++;continue}}return Jb(1,f,g)}f=new H(f,p,a.Da,d,e);Cb(f,a.j,m);a.aa[k++]=f;f=n+a.Da;g-=p}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Kb[d]+" at "+l(b,8,!0)),!0):Jb(2,b,c)} +h.mb=function(a){return this.aa[(a&this.g)>>>this.ca].Zb(a&this.f,a)};h.Ia=function(a){return this.aa[(a&this.g)>>>this.ca].Hc(a&this.f,a)};function Lb(a,b){return a.aa[(b&a.g)>>>a.ca].mc(b&a.f,b)}h.Ob=function(a,b){this.aa[(a&this.g)>>>this.ca].cc(a&this.f,b&255,a)};h.qc=function(a,b){this.aa[(a&this.g)>>>this.ca].Pc(a&this.f,b&65535,a)}; +function Mb(a){for(var b=0,c=[],d=0;d>5&3;c.Aa=a>>1&15;c.ic=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.$a&16?1:2);this.g.rb=this.g.rb&-8|b};k.gd=function(){return Tb(this.b)};k.Ad=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; -function Vb(a){var b=a.D,c,d,e,f=b.va>>13&7;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.md,drive:f,blocksize:256,mapped:0,maxblock:b.gb[f]*b.ca[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Kb=2496;b.na=0;b.P=128;b.va=0;break;case 1:if((b.va>>4&511)>=b.gb[f]){b.na|=32832;b.P|=49152;break}if((b.va&15)>=b.ca[f]){b.na|=32800;b.P|=49152;break}c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;ec(a,b.ra[f],c,d,e);return;case 2:if((b.va>>4&511)>=b.gb[f])b.na|= -32832,b.P|=49152;else if((b.va&15)>=b.ca[f])b.na|=32800,b.P|=49152;else{c=(b.va>>4&511)*b.ca[f]+(b.va&15);d=(b.P&48)<<12|b.Jb;e=65536-b.Lb&65535;a.Yb(b.ra[f],c,d,e);return}}b.Kb=f<<13|b.Kb&8176|b.va%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}k.md=function(a,b,c,d,e){var f=this.D;f.Jb=d&65535;f.P=f.P&-49|d>>12&48;f.Lb=65536-e&65535;switch(a){case 1:f.na|=33024;f.P|=49152;break;case 2:f.na|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; -function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.ra[f]&&(b.ra[f]={cache:[],postProcess:a.nd,drive:f,blocksize:128,mapped:1,maxblock:b.gb[f]*b.ca[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Xa&8&&(b.M&=63);b.Xa=b.Pc[f]|b.eb&64;break;case 3:1==(b.ea&3)&&(b.eb=b.ea&4?b.eb+(b.ea&65408)&65408|b.ea<<2&64:b.eb-(b.ea&65408)&65408|b.ea<<2&64,b.ea=b.eb);break;case 4:b.Xa=b.eb;break;case 5:if(b.ea>>6>=b.gb[f]){b.M|=37888;break}if((b.ea&63)>=b.ca[f]){b.M|=37888;break}c=(b.ea>>6)* -b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;ec(a,b.ra[f],c,d,e);return;case 6:if(b.ea>>6>=b.gb[f])b.M|=37888;else if((b.ea&63)>=b.ca[f])b.M|=37888;else{c=(b.ea>>6)*b.ca[f]+(b.ea&63);d=(b.Ta&63)<<16|b.Db;e=65536-b.Xa&65535;a.Yb(b.ra[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -k.nd=function(a,b,c,d,e){var f=this.w;f.Db=d&65535;f.M=f.M&-49|d>>12&48;f.Ta=d>>16&63;f.ea=~~(c/f.ca[b.La])<<6|c%f.ca[b.La];f.eb=f.ea;f.Xa=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ca=0;a.ta=[4544,4544,4544,4544,4544,4544,4544,4544];a.wb=[0,0,0,0,0,0,0,0];a.mb=a.xb=a.vb=a.bb=a.nc=0} -function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ca&=-2049;c.ta[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.ra[b]&&(c.ra[b]={cache:[],postProcess:a.od,drive:b,blocksize:256,mapped:0,maxblock:c.cc[0]*c.fb[0]*c.ca[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.$b[b]=c.Pa[b];c.T|=32896;c.ta[b]|=32896;c.mb|=1<=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0]){c.wb[b]|=1024;c.T|=49152;break}d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))* -c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;ec(a,c.ra[b],d,e,f);return;case 57:if(c.Pa[b]>=c.cc[0]||c.Da[b]>>8>=c.fb[0]||(c.Da[b]&255)>=c.ca[0])c.wb[b]|=1024,c.T|=49152;else{d=(c.Pa[b]*c.fb[0]+(c.Da[b]>>8))*c.ca[0]+(c.Da[b]&255);e=(c.bb&63)<<16|c.vb;f=65536-c.xb&65535;a.Yb(c.ra[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ta[b]|=128;return!!(c.T&64)})} -k.od=function(a,b,c,d,e){var f=this.B;f.xb=65536-e&65535;f.vb=d&65535;f.T=f.T&-769|d>>8&768;f.bb=d>>16&63;e=~~(c/f.ca[0]);d=~~(e/f.fb[0]);f.Da[b.La]=e%f.fb[0]<<8|c%f.ca[0];f.$b[b.La]=f.Pa[b.La]=d;f.mb|=1<=b.$c-1&&(f.ta[b.La]|=1024);switch(a){case 1:f.Ca|=512;f.T|=49152;break;case 2:f.Ca|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ta[b.La]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; -function ic(a,b,c,d,e,f){var g=~~((f+c.Ua-1)/c.Ua),h=new XMLHttpRequest;2048>g&&d+2048this.b.Ab(a.Zc?jc(this.b,c):c,a.cache[b][e])){a.Wb(2,a,b,c,d);return}c+=2;--d}b++}a.Wb(0,a,b,c,d)}; -function ec(a,b,c,d,e){for(var f,g;0g){b.Wb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Wb(0,b,c,d,e)}k.reset=function(){this.g.rb=this.g.rb&-120|20;this.f.Wa=0;this.D.P=128;this.w.M=128;gc(this)}; -k.Rc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.ab&65280:(a&1&&(b<<=8),f.ab=b|255,d=0);break;case 4194298:if(0>b)d=f.mc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.mc=d;f.C|=2}break;case 4194294:if(70!==f.jb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.jb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.jb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.jb)return f.K(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.jb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.hc[e]:(d=L(this,f.hc[e],a,b,c),0<=d&&(f.hc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[3]=b),d=f.ya[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[1]=b),d=f.ya[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Oa[e]= -b),d=f.Oa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.ya[0]=b),d=f.ya[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Oa[e]=b),d=f.Oa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=L(this,f.xa[3][e],a,b,c);0<=d&&(f.xa[3][e]=d,f.xa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=L(this,f.Zb,a,b,c);0<=d&&(f.Zb=d);break;case 4194172:d=f.Za;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.wd&65535:(d=L(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=L(this,e.Kb,a,b,c);0<=d&&(e.Kb=d);break;case 4194050:d=L(this,e.na,a,b,c);0<=d&&(e.na=d);break;case 4194052:d=L(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=L(this,e.Lb,a,b,c);0<=d&&(e.Lb=d);break;case 4194056:d=L(this,e.Jb,a,b,c);0<=d&&(e.Jb=d); -break;case 4194058:d=L(this,e.va,a,b,c);0<=d&&(e.va=d);break;case 4194060:break;case 4194062:d=L(this,e.Ic,a,b,c);0<=d&&(e.Ic=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ca&7;switch(a&-2){case 4193728:d=L(this,g.T,a,b,c);0<=b&&0<=d&&(g.bb=g.bb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=L(this,g.xb,a,b,c);0<=d&&(g.xb=d);break;case 4193732:d=L(this,g.vb,a,b,c);0<=d&&(g.vb=d&65534);break;case 4193734:d= -L(this,g.Da[e],a,b,c);0<=d&&(g.Da[e]=d&7967);break;case 4193736:d=L(this,g.Ca,a,b,c);0<=d&&(g.Ca=d&63|g.Ca&65472,d&128&&gc(this));break;case 4193738:d=g.ta[e];break;case 4193740:d=g.wb[e];break;case 4193742:d=L(this,g.mb,a,b,c);0<=d&&(g.mb=d&255);break;case 4193744:d=g.td[e];break;case 4193746:d=L(this,g.Jc,a,b,c);0<=d&&(g.Jc=d);break;case 4193748:d=L(this,g.Kc[e],a,b,c);0<=d&&(g.Kc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.ud[e];break;case 4193754:d=L(this,g.Lc[e],a,b,c);0<=d&& -(g.Lc[e]=d);break;case 4193756:d=L(this,g.Pa[e],a,b,c);0<=d&&(g.Pa[e]=d&511);break;case 4193758:g.$b[e]=g.Pa[e];d=g.$b[e];break;case 4193760:d=g.rd[e];break;case 4193762:d=g.sd[e];break;case 4193764:d=g.pd[e];break;case 4193766:d=g.qd[e];break;case 4193768:d=L(this,g.bb,a,b,c);0<=d&&(g.bb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=L(this,g.nc,a,b,c);0<=d&&(g.nc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=L(this,e.M,a,b,c);0<=b&&0<=d&&(e.Ta= -e.Ta&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=L(this,e.Db,a,b,c);0<=d&&(e.Db=d&65534);break;case 4192516:d=L(this,e.ea,a,b,c);0<=d&&(e.ea=d);break;case 4192518:d=L(this,e.Xa,a,b,c);0<=d&&(e.Xa=d);break;case 4192520:d=L(this,e.Ta,a,b,c);0<=d&&(e.Ta=d&63,e.M=e.M&-49|(e.Ta&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.$a:(d=L(this,f.$a,a,b,c),0<=d&&(70!==f.jb&&(d&=-49),f.$a=d,f.Vb[0]=d&4?15:7,f.Vb[1]=d&2?15:7,f.Vb[3]= -d&1?15:7,f.ic&&(e=2,f.$a&16&&(e=1),this.g.rb=this.g.rb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=L(this,f.xa[0][e],a,b,c);0<=d&&(f.xa[0][e]=d,f.xa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=L(this,f.xa[1][e],a,b,c);0<=d&&(f.xa[1][e]=d,f.xa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.jb)return f.K(4,234);e=a>>2&31;d=f.Nb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=L(this,d,a,b,c),0<=d&&(f.Nb[e]=a&2?d<<16|f.Nb[e]&65535:f.Nb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Ob[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var kc={},Rb=(kc[65382]=[null,null,Nb.prototype.ed,Nb.prototype.yd,"LKS"],kc[65402]=[null,null,Nb.prototype.fd,Nb.prototype.zd,"MMR0"],kc[65534]=[null,null,Nb.prototype.gd,Nb.prototype.Ad,"PSW"],kc); -La(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),rc(this,nc?sc:tc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Va=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.S)&&c.ha(!0)}return this.jc(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.S)&&c.ha(!0)}return this.kc(a,b)},ma:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,1,d.G)&&d.ha(!0)}this.f?this.L(a, -b,c):this.bc(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.G)&&d.ha(!0)}this.f?this.L(a,b,c):this.rc(a,b,c)},R:function(a){return this.w[a]},W:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&E(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},Z:function(a){return this.B.getUint16(a,!0)},ga:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&E(this.j,"Memory.readWord("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.w[a]=b; -this.Va=!0},pa:function(a,b,c){this.w[a]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b){this.B.setUint16(a,b,!0);this.Va=!0},za:function(a,b,c){this.H[a>>1]=b;this.Va=!0;this.j&&F(this.j,128)&&E(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};function Ab(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&xc(a,wc,!1),(a.F=c.F)&&vc(a,wc,!1))} -function zc(a,b){b?--a.F||(a.ac=a.f?a.L:a.bc,a.Oc=a.f?a.G:a.rc):--a.g||(a.Xb=a.jc,a.Gc=a.kc)}function vc(a,b,c){c&&a.F||(a.ac=!a.f&&b[1]||a.L,a.Oc=!a.f&&b[3]||a.G);if(c||void 0===c)a.bc=b[1]||a.L,a.rc=b[3]||a.G}function xc(a,b,c){c&&a.g||(a.Xb=b[0]||a.J,a.Gc=b[2]||a.N);if(c||void 0===c)a.jc=b[0]||a.J,a.kc=b[2]||a.N}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}var Ac=[],uc=[I.prototype.Y,I.prototype.qa,I.prototype.ja,I.prototype.Aa],wc=[I.prototype.S,I.prototype.ma,I.prototype.da,I.prototype.wa]; -if(wb)var tc=[I.prototype.R,I.prototype.ka,I.prototype.Z,I.prototype.ua],sc=[I.prototype.W,I.prototype.pa,I.prototype.ga,I.prototype.za];function Bc(a,b){w.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Ra=a.cycles||b;this.Ya=c;this.ob=Math.round(this.Ra/1E4)/100;this.lb=this.ob*this.Ya;this.v.fa=!1;this.v.pc=!1;this.v.Cb=a.autoStart;this.v.uc=!1;this.v.pb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.N=[];this.Dc=this.vd.bind(this);G(this)}y(Bc); -var Cc=["power","reset"];k=Bc.prototype;k.Na=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.ma&&(a.ma+=a.sb,c=!0);0<=a.tb&&a.tb<=Ic(a)&&(a.sb=a.tb=-1,Fc(a),a.ha(),c=!0);c&&a.i(Ic(a)+" cycles: checksum="+p(a.Gb))}} -function Jc(a,b,c,d){if(a.L[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ha());var e=a.j&&a.j.ma||8;c=!a.v.fa||a.v.uc?8==e?ba(c,d):p(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} -k.oa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ia)a=!0;else{var b=null,c,h=bb(a.id);for(c=0;ca.ga/a.lb?b=1:d=!0;a.Ya=b;b=a.ob*a.Ya;if(a.lb!=b){a.lb=b;b=a.lb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Ob()}dd(a,a.Z);a.Z=0;a.Y=ra();a.ja=0;ed(a);return d}function Pb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ra*a.Ya/1E3,a.N[b][0]=c)}function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function gd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -k.vd=function(){if(this.v.fa){this.qb>=this.Ra&&ed(this,!0);this.wa=0;this.Qa=ra();if(this.ja){var a=this.Qa-this.ja;a>this.Ac&&(this.Y+=a,this.Y>this.Qa&&(this.Y=this.Qa))}try{do{var b=fd(this,this.v.pb?1:this.cb);try{this.zb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;gd(this,c);this.wa+=c;this.Z+=c;dd(this,0,!0);Hc(this,c);this.pa-=c;if(0>=this.pa){this.pa+=this.cb;15<=++this.Cc&&(this.D&&this.D.Ea(),this.Cc=0);break}}while(this.v.fa)}catch(e){this.ha();M(this);this.D&&this.D.stop(ra(), -Ic(this));vb(this,e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.Dc;this.ja=ra();c=this.Ac;this.wa&&(c=Math.round(c*this.wa/this.cb));var c=c-(this.ja-this.Qa),d=this.ja-this.Y;d&&(this.ga=Math.round(this.Z/(10*d))/100,864E5<=d&&(this.ka=0,Kc(this)));if(0>c||this.gac&&(this.Y-=c),c=0;this.qb+=this.wa;this.ja+=c;a(b,c)}}}; -k.yb=function(a){if(ib(this))return!1;if(this.v.fa)return this.i(this.toString()+" busy"),!1;Kc(this);this.v.fa=!0;this.v.pc=!0;this.ua&&this.ua.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Ob(!0),this.D.start(this.Y,Ic(this)));M(this,!0);setTimeout(this.Dc,0);return!0};k.zb=function(){return 0}; -k.ha=function(a){if(this.v.fa){this.S-=this.b;this.b=0;dd(this,this.Z);this.Z=0;this.v.fa=!1;this.ua&&this.ua.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(ra(),Ic(this));M(this)}this.v.complete=a};function M(a,b){a.D&&a.D.Ea(b)} -function hd(a){this.ad=+a.model||1170;this.dd=a.resetAddr||0;Bc.call(this,a,6666667);this.Rb=0;this.decode=id.bind(this);this.U=65536;this.V=32768;this.aa=65535;this.X=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Oa=[0,0,0,0,0,0];this.ya=[0,0,0,0];this.Aa=this.B=0;this.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],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Nb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.hc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.nb=this.H=this.J=this.C=0;this.jb=70;this.qa=-1;jd(this);this.v.complete=this.v.Tc=!1}y(hd,Bc);k=hd.prototype;k.reset=function(){this.v.fa&&this.ha();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.ab=255;a.I=0;a.mc=0;a.G=0;a.Za=0;a.Zb=0;a.$a=0;a.ic=0;a.za=0;a.Yc=[4,2,0,1];a.Vb=262143;a.Tb=253952;a.Ub=[[0,0,0,0,0,0,0,0,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.bd=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.w=[];a.C|=2;Sb(a)} -function Sb(a){a.ic?(a.da=65536,a.R=a.Wc,a.W=a.Hc,a.Ec=a.Dd):(a.da=0,a.R=a.Vc,a.W=a.ub,a.Ec=a.Ab)}k.xc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ka,this.Ya]);a.set(2,Kb(this.F));return a.data()}; -k.restore=function(a){var b=a[1];this.ka=b[1];Kc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ka-=b;break}b-=a.w[f].Ka}a.w.splice(f+1,0,{Ka:b,Fc:c<<5&224,Nc:d,gc:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Ma()|md(a)|ld(a)|kd(a)} -function Ub(a,b){a.X=b<<12;a.aa=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Oa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Oa[c];a.Oa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.ya[c]=a.u[6],a.u[6]=a.ya[a.B]);a.C|=2;a.O=b}function O(a,b){a.C&128||(a.X=a.aa=b,a.V=0)}function pd(a,b,c){a.C&128||(a.X=a.aa=a.U=b,a.V=c||0)}function qd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^b)&(d^b))}function rd(a,b){a.C&128||(a.X=a.aa=a.U=b,a.V=a.X^a.U>>1)} -function sd(a,b,c,d){a.C&128||(a.X=a.aa=a.U=b,a.V=(c^d)&(d^b))}k.K=function(a){var b=!1;0>this.qa?this.qa=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.Za=63222,this.Zb=a);this.B=0;var c=this.W(a|this.da),d=this.W(a+2&65535|this.da);Ub(this,d&-12289|this.qa>>2&12288);b&&(this.I|=4,this.u[6]=4);td(this,this.qa);td(this,this.u[7]);od(this,c);this.C&=-113;this.qa=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);od(a,b);Ub(a,c);a.C&=-17} -function jc(a,b){var c=b>>13&31;31>c?a.$a&32&&(b=a.Nb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.$a&a.Yc[a.B]||(d&=7);e=a.Ub[a.B][d];f=(a.bd[a.B][d]<<6)+(b&8191)&a.Vb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Tb&&4186112>f&&(a.I|=32,a.K(4,12))));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.Ub[a.B][d]=e;if(4194170!==f||a.B)a.za=a.B,a.Aa=d;g&&(g&57344&&(0<=a.qa&&(g|=128),a.G&57344||(a.G=a.G|g|a.za<<5|a.Aa<<1),a.K(168,16)),a.G&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.W(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.W(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.W(e|a.da)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Za=a.Za<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.ab||65534<=a.u[6])&&(a.u[6]<=a.ab-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}k.Vc=function(a,b,c){return xd(this,a,b,c)};k.Wc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};k.ub=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ga(a)}; -k.Hc=function(a){return this.ub(wd(this,a,2))};k.Ab=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.oc(a,b&65535)};k.Dd=function(a,b){this.Ab(wd(this,a|65536,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.W(d|c&a.da),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.ya[a.O>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Za=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=wd(a,e|c&65536,4),a.B=a.O>>14&3,a.Ab(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.ya[a.O>>12&3]=d}function Ad(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Bd(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function Cd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xd(a,b,c,8)} -function Dd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.kb(c)):a=a.u[c]&255;return a}function Ed(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.ub(a.R(b,d,2)):c=a.u[d];return c}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.nb=a.R(b,e,7),c=d.call(a,c,a.F.kb(e)),e&1&&a.b--,a.F.Mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Ab(e,d.call(a,c,a.ub(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Fd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Ab(a.R(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.zb=function(a){this.v.complete=!0;var b=this.v.Tc=this.j&&Hd(this.j),c=a?this.v.pc?0:1:-1;this.v.pc=!1;this.S=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ha();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.mc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Fc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Nc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.Za=0,this.Zb=this.u[7]);this.C=this.C&7|this.O&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.C&128||(this.X=this.aa=a,this.V=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.X=this.aa=c,this.V=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.C&128||(this.X=this.aa=a,this.V=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.C&128||(this.X=this.aa=c,this.V=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.U>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.U>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.U&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.C&128||(this.X=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} -function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.V=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.V=32768,this.U=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.g]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.g]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.X=b>>16,this.aa=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ne(a){Q(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){Q(this,a,Bd(this,a),he);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function id(a){Pe[a>>12].call(this,a)} -var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.g? -4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= -[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ma()==!ld(this))},function(a){R(this,a,!this.Ma()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ma()==!ld(this))},function(a){R(this,a,md(this)||!this.Ma()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, -Gd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.g?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Hc(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.g]},function(a){O(this,Gd(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.K(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},Ne,Ne,Ne,Ne],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, -3)):this.ha();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(jd(this),this.F.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},S,function(){this.aa=1;this.b-=5},S,S,S,function(){this.X=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.U= -65536;this.b-=5},function(){this.V=32768;this.b-=5},U,function(){this.aa=0;this.b-=5},U,U,U,function(){this.X=32768;this.b-=5},U,U,U,U,U,U,U],Re=[re,re,ke,ke,ie,ie,je,je,Oe,Oe,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ma())},function(a){R(this,a,this.Ma())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.K(24,2); -this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= -this.g?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9+(this.nb&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.g?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.g]},V];function ef(a){w.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Na=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ia=function(){if(this.Ja){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.Ja,f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=qa(n,l,a.tc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Hd:b,A:c,Xc:d,Ja:e,sc:f})}delete this.Ja}return!0};ef.prototype.Ha=function(){return!0}; -function ff(a,b,c,d){if(d)a.sa("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.dc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.f=f;else if(f=h.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=h;a.Ja=h.symbols;if(!a.f.length){t("Empty ROM: "+ -b);return}if(1==a.f.length){t(a.f[0]);return}}catch(l){a.sa("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ba].bc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>> -e.ba;0>>=e.ba;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Qb)return;b=oa(b[1]);if(this.J=cb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.dc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ia=function(a,b){if(!b)if(this.Bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ha=function(a){return a?this.save():!0};k.reset=function(){mf(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return mf(this)};function mf(a){a.W=0;a.f=0;a.g=128;a.B=[];return!0}k.lc=function(a){if("number"==typeof a)this.B.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.Y||8,c=a-this.H%a,this.Y&&(b=na("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.jd,W.prototype.Cd,"RCSR"],nf[65394]=[null,null,W.prototype.hd,W.prototype.Bd,"RBUF"],nf[65396]=[null,null,W.prototype.ld,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.kd,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=D(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.yc=function(){return-1};of.prototype.zc=function(){}; -function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.Z?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];h=J.prototype;h.Pa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;var e=this;this.f.sc=Qb(this.b,function(){e.f.Ya|=128;e.f.Ya&64&&(K(e.b,0,6,64),Rb(e.b,e.f.sc,1E3/60))});Nb(b,this,L);Ob(b,this.reset.bind(this),this.Sc.bind(this));G(this)};h.jd=function(){var a=this.f.Ya;this.f.Ya&=-129;return a}; +h.Od=function(a){this.f.Ya=a;a&64&&Rb(this.b,this.f.sc,1E3/60);this.f.Ya=a&-129};h.kd=function(){var a=this.b;return a.G&62337|a.Ba<<5|a.Ca<<1};h.Pd=function(a){var b=4,c=this.b;c.G=a&=62337;c.Ba=a>>5&3;c.Ca=a>>1&15;c.kc=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.bb&16?1:2);this.g.tb=this.g.tb&-8|b};h.rd=function(a){return this.b.W[1][a>>1&7]};h.Wd=function(a,b){this.b.W[1][b>>1&7]=a&65295};h.pd=function(a){return this.b.W[1][(a>>1&7)+8]};h.Ud=function(a,b){this.b.W[1][(b>>1&7)+8]=a&65295}; +h.qd=function(a){return this.b.wa[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.od=function(a){return this.b.wa[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.hd=function(a){return this.b.W[0][a>>1&7]};h.Nd=function(a,b){this.b.W[0][b>>1&7]=a&65295};h.fd=function(a){return this.b.W[0][(a>>1&7)+8]};h.Ld=function(a,b){this.b.W[0][(b>>1&7)+8]=a&65295};h.gd=function(a){return this.b.wa[0][a>>1&7]}; +h.Md=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.ed=function(a){return this.b.wa[0][(a>>1&7)+8]};h.Kd=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.vd=function(a){return this.b.W[3][a>>1&7]};h.$d=function(a,b){this.b.W[3][b>>1&7]=a&65295};h.td=function(a){return this.b.W[3][(a>>1&7)+8]};h.Yd=function(a,b){this.b.W[3][(b>>1&7)+8]=a&65295};h.ud=function(a){return this.b.wa[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.W[3][b]&=65295}; +h.sd=function(a){return this.b.wa[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.W[3][b]&=65295};h.ld=function(){return Tb(this.b)};h.Qd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; +function Vb(a){var b=a.D,c,d,e,f=b.xa>>13&7;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.yd,drive:f,blocksize:256,mapped:0,maxblock:b.ib[f]*b.da[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Mb=2496;b.oa=0;b.P=128;b.xa=0;break;case 1:if((b.xa>>4&511)>=b.ib[f]){b.oa|=32832;b.P|=49152;break}if((b.xa&15)>=b.da[f]){b.oa|=32800;b.P|=49152;break}c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;Wb(a,b.sa[f],c,d,e);return;case 2:if((b.xa>>4&511)>=b.ib[f])b.oa|= +32832,b.P|=49152;else if((b.xa&15)>=b.da[f])b.oa|=32800,b.P|=49152;else{c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;a.$b(b.sa[f],c,d,e);return}}b.Mb=f<<13|b.Mb&8176|b.xa%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}h.yd=function(a,b,c,d,e){var f=this.D;f.Lb=d&65535;f.P=f.P&-49|d>>12&48;f.Nb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.P|=49152;break;case 2:f.oa|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; +function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.zd,drive:f,blocksize:128,mapped:1,maxblock:b.ib[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Za&8&&(b.M&=63);b.Za=b.Qc[f]|b.gb&64;break;case 3:1==(b.fa&3)&&(b.gb=b.fa&4?b.gb+(b.fa&65408)&65408|b.fa<<2&64:b.gb-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.gb);break;case 4:b.Za=b.gb;break;case 5:if(b.fa>>6>=b.ib[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* +b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;Wb(a,b.sa[f],c,d,e);return;case 6:if(b.fa>>6>=b.ib[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;a.$b(b.sa[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} +h.zd=function(a,b,c,d,e){var f=this.w;f.Fb=d&65535;f.M=f.M&-49|d>>12&48;f.Va=d>>16&63;f.fa=~~(c/f.da[b.Na])<<6|c%f.da[b.Na];f.gb=f.fa;f.Za=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ea=0;a.ua=[4544,4544,4544,4544,4544,4544,4544,4544];a.yb=[0,0,0,0,0,0,0,0];a.ob=a.zb=a.xb=a.eb=a.pc=0} +function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ea&=-2049;c.ua[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.sa[b]&&(c.sa[b]={cache:[],postProcess:a.Ad,drive:b,blocksize:256,mapped:0,maxblock:c.ec[0]*c.hb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Ra[b];c.T|=32896;c.ua[b]|=32896;c.ob|=1<=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0]){c.yb[b]|=1024;c.T|=49152;break}d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))* +c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;Wb(a,c.sa[b],d,e,f);return;case 57:if(c.Ra[b]>=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0])c.yb[b]|=1024,c.T|=49152;else{d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))*c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;a.$b(c.sa[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ua[b]|=128;return!!(c.T&64)})} +h.Ad=function(a,b,c,d,e){var f=this.B;f.zb=65536-e&65535;f.xb=d&65535;f.T=f.T&-769|d>>8&768;f.eb=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.hb[0]);f.Fa[b.Na]=e%f.hb[0]<<8|c%f.da[0];f.bc[b.Na]=f.Ra[b.Na]=d;f.ob|=1<=b.bd-1&&(f.ua[b.Na]|=1024);switch(a){case 1:f.Ea|=512;f.T|=49152;break;case 2:f.Ea|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ua[b.Na]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; +function ic(a,b,c,d,e,f){var g=~~((f+c.Wa-1)/c.Wa),k=new XMLHttpRequest;2048>g&&d+2048this.b.Cb(a.ad?jc(this.b,c):c,a.cache[b][e])){a.Yb(2,a,b,c,d);return}c+=2;--d}b++}a.Yb(0,a,b,c,d)}; +function Wb(a,b,c,d,e){for(var f,g;0g){b.Yb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Yb(0,b,c,d,e)}h.reset=function(){this.g.tb=this.g.tb&-120|20;this.f.Ya=0;this.D.P=128;this.w.M=128;gc(this)}; +h.Sc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.cb&65280:(a&1&&(b<<=8),f.cb=b|255,d=0);break;case 4194298:if(0>b)d=f.oc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.oc=d;f.C|=2}break;case 4194294:if(70!==f.lb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.lb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.lb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.lb)return f.K(4,228);d=61183;break;case 4194296:0<= +b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.lb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.jc[e]:(d=M(this,f.jc[e],a,b,c),0<=d&&(f.jc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[3]=b),d=f.Aa[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[1]=b),d=f.Aa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Qa[e]= +b),d=f.Qa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[0]=b),d=f.Aa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Qa[e]=b),d=f.Qa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.za[3][e],a,b,c);0<=d&&(f.za[3][e]=d,f.za[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.ab;d&65280&& +(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.Id&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=M(this,e.Mb,a,b,c);0<=d&&(e.Mb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=M(this,e.Nb,a,b,c);0<=d&&(e.Nb=d);break;case 4194056:d=M(this,e.Lb,a,b,c);0<=d&&(e.Lb=d); +break;case 4194058:d=M(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4194060:break;case 4194062:d=M(this,e.Jc,a,b,c);0<=d&&(e.Jc=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ea&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.eb=g.eb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=M(this,g.zb,a,b,c);0<=d&&(g.zb=d);break;case 4193732:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d&65534);break;case 4193734:d= +M(this,g.Fa[e],a,b,c);0<=d&&(g.Fa[e]=d&7967);break;case 4193736:d=M(this,g.Ea,a,b,c);0<=d&&(g.Ea=d&63|g.Ea&65472,d&128&&gc(this));break;case 4193738:d=g.ua[e];break;case 4193740:d=g.yb[e];break;case 4193742:d=M(this,g.ob,a,b,c);0<=d&&(g.ob=d&255);break;case 4193744:d=g.Fd[e];break;case 4193746:d=M(this,g.Kc,a,b,c);0<=d&&(g.Kc=d);break;case 4193748:d=M(this,g.Lc[e],a,b,c);0<=d&&(g.Lc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Gd[e];break;case 4193754:d=M(this,g.Mc[e],a,b,c);0<=d&& +(g.Mc[e]=d);break;case 4193756:d=M(this,g.Ra[e],a,b,c);0<=d&&(g.Ra[e]=d&511);break;case 4193758:g.bc[e]=g.Ra[e];d=g.bc[e];break;case 4193760:d=g.Dd[e];break;case 4193762:d=g.Ed[e];break;case 4193764:d=g.Bd[e];break;case 4193766:d=g.Cd[e];break;case 4193768:d=M(this,g.eb,a,b,c);0<=d&&(g.eb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.pc,a,b,c);0<=d&&(g.pc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Va= +e.Va&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=M(this,e.Fb,a,b,c);0<=d&&(e.Fb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Za,a,b,c);0<=d&&(e.Za=d);break;case 4192520:d=M(this,e.Va,a,b,c);0<=d&&(e.Va=d&63,e.M=e.M&-49|(e.Va&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.bb:(d=M(this,f.bb,a,b,c),0<=d&&(70!==f.lb&&(d&=-49),f.bb=d,f.Xb[0]=d&4?15:7,f.Xb[1]=d&2?15:7,f.Xb[3]= +d&1?15:7,f.kc&&(e=2,f.bb&16&&(e=1),this.g.tb=this.g.tb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.za[0][e],a,b,c);0<=d&&(f.za[0][e]=d,f.za[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.za[1][e],a,b,c);0<=d&&(f.za[1][e]=d,f.za[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.lb)return f.K(4,234);e=a>>2&31;d=f.Pb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Pb[e]=a&2?d<<16|f.Pb[e]&65535:f.Pb[e]&4294901760|d&65534));break; +case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Pb[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; +var N={},L=(N[62592]=[null,null,J.prototype.rd,J.prototype.Wd,"SISDR"],N[62608]=[null,null,J.prototype.pd,J.prototype.Ud,"SDSDR"],N[62624]=[null,null,J.prototype.qd,J.prototype.Vd,"SISAR"],N[62640]=[null,null,J.prototype.od,J.prototype.Td,"SDSAR"],N[62656]=[null,null,J.prototype.hd,J.prototype.Nd,"KISDR"],N[62672]=[null,null,J.prototype.fd,J.prototype.Ld,"KDSDR"],N[62688]=[null,null,J.prototype.gd,J.prototype.Md,"KISAR"],N[62704]=[null,null,J.prototype.ed,J.prototype.Kd,"KDSAR"],N[65382]=[null,null, +J.prototype.jd,J.prototype.Od,"LKS"],N[65402]=[null,null,J.prototype.kd,J.prototype.Pd,"MMR0"],N[65408]=[null,null,J.prototype.vd,J.prototype.$d,"UISDR"],N[65424]=[null,null,J.prototype.td,J.prototype.Yd,"UDSDR"],N[65440]=[null,null,J.prototype.ud,J.prototype.Zd,"UISAR"],N[65456]=[null,null,J.prototype.sd,J.prototype.Xd,"UDSAR"],N[65534]=[null,null,J.prototype.ld,J.prototype.Qd,"PSW"],N);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592]; +L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656]; +L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408]; +L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; +Ma(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),qc(this,mc?rc:sc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Z:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ka:function(a){var 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},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< +a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,1,c.S)&&c.ia(!0)}return this.lc(a,b)},ea:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,2,c.S)&&c.ia(!0)}return this.mc(a,b)},na:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,1,d.G)&&d.ia(!0)}this.f?this.L(a, +b,c):this.dc(a,b,c)},ya:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,2,d.G)&&d.ia(!0)}this.f?this.L(a,b,c):this.tc(a,b,c)},R:function(a){return this.w[a]},X:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},$:function(a){return this.B.getUint16(a,!0)},ha:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&D(this.j,"Memory.readWord("+I(this.j,b)+"): "+I(this.j,a),!0);return a},la:function(a,b){this.w[a]=b; +this.Xa=!0},qa:function(a,b,c){this.w[a]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},va:function(a,b){this.B.setUint16(a,b,!0);this.Xa=!0},Ba:function(a,b,c){this.H[a>>1]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}};function Cb(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&wc(a,vc,!1),(a.F=c.F)&&uc(a,vc,!1))} +function yc(a,b){b?--a.F||(a.cc=a.f?a.L:a.dc,a.Pc=a.f?a.G:a.tc):--a.g||(a.Zb=a.lc,a.Hc=a.mc)}function uc(a,b,c){c&&a.F||(a.cc=!a.f&&b[1]||a.L,a.Pc=!a.f&&b[3]||a.G);if(c||void 0===c)a.dc=b[1]||a.L,a.tc=b[3]||a.G}function wc(a,b,c){c&&a.g||(a.Zb=b[0]||a.J,a.Hc=b[2]||a.N);if(c||void 0===c)a.lc=b[0]||a.J,a.mc=b[2]||a.N}function qc(a,b){b||(b=zc);wc(a,b,void 0);uc(a,b,void 0)}var zc=[],tc=[H.prototype.Z,H.prototype.ra,H.prototype.ka,H.prototype.Ca],vc=[H.prototype.S,H.prototype.na,H.prototype.ea,H.prototype.ya]; +if(xb)var sc=[H.prototype.R,H.prototype.la,H.prototype.$,H.prototype.va],rc=[H.prototype.X,H.prototype.qa,H.prototype.ha,H.prototype.Ba];function Ac(a,b){u.call(this,"CPU",a,Ac,1);var c=a.multiplier||1;this.Ta=a.cycles||b;this.$a=c;this.qb=Math.round(this.Ta/1E4)/100;this.nb=this.qb*this.$a;this.v.ga=!1;this.v.rc=!1;this.v.Eb=a.autoStart;this.v.wc=!1;this.v.rb=!1;this.Ib=this.na=0;this.Jb=a.csStart;this.ub=a.csInterval;this.vb=a.csStop;this.N=[];this.Ec=this.Hd.bind(this);G(this)}y(Ac); +var Bc=["power","reset"];h=Ac.prototype;h.Pa=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.na&&(a.na+=a.ub,c=!0);0<=a.vb&&a.vb<=Hc(a)&&(a.ub=a.vb=-1,Ec(a),a.ia(),c=!0);c&&a.i(Hc(a)+" cycles: checksum="+l(a.Ib))}} +function Ic(a,b,c,d){if(a.L[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ia());var e=a.j&&a.j.na||8;c=!a.v.ga||a.v.wc?8==e?ca(c,d):l(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} +h.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ja)a=!0;else{var b=null,c,k=cb(a.id);for(c=0;ca.ha/a.nb?b=1:d=!0;a.$a=b;b=a.qb*a.$a;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Qb()}Kc(a,a.$);a.$=0;a.Z=sa();a.ka=0;Lc(a);return d}function Qb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ta*a.$a/1E3,a.N[b][0]=c)}function ed(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +h.Hd=function(){if(this.v.ga){this.sb>=this.Ta&&Lc(this,!0);this.ya=0;this.Sa=sa();if(this.ka){var a=this.Sa-this.ka;a>this.Wb&&(this.Z+=a,this.Z>this.Sa&&(this.Z=this.Sa))}try{do{var b=ed(this,this.v.rb?1:this.fb);try{this.Bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;fd(this,c);this.ya+=c;this.$+=c;Kc(this,0,!0);Gc(this,c);this.qa-=c;if(0>=this.qa){this.qa+=this.fb;15<=++this.Cc&&(this.D&&this.D.Ga(),this.Cc=0);break}}while(this.v.ga)}catch(e){this.ia();O(this);this.D&&this.D.stop(sa(), +Hc(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Ec;this.ka=sa();c=this.Wb;this.ya&&(c=Math.round(c*this.ya/this.fb));var c=c-(this.ka-this.Sa),d=this.ka-this.Z;d&&(this.ha=Math.round(this.$/(10*d))/100,864E5<=d&&(this.la=0,Jc(this)));if(0>c||this.hac&&(this.Z-=c),c=0;this.sb+=this.ya;this.ka+=c;a(b,c)}}}; +h.Ab=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Jc(this);this.v.ga=!0;this.v.rc=!0;this.va&&this.va.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Qb(!0),this.D.start(this.Z,Hc(this)));O(this,!0);setTimeout(this.Ec,0);return!0};h.Bb=function(){return 0}; +h.ia=function(a){if(this.v.ga){this.S-=this.b;this.b=0;Kc(this,this.$);this.$=0;this.v.ga=!1;this.va&&this.va.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(sa(),Hc(this));O(this)}this.v.complete=a};function O(a,b){a.D&&a.D.Ga(b)} +function gd(a){this.cd=+a.model||1170;this.dd=a.resetAddr||0;Ac.call(this,a,6666667);this.Tb=0;this.decode=hd.bind(this);this.U=65536;this.V=32768;this.ba=65535;this.Y=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Qa=[0,0,0,0,0,0];this.Aa=[0,0,0,0];this.Ca=this.B=0;this.Yc=[4,2,0,1];this.W=[[0,0,0,0,0,0,0,0,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]];this.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.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],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Pb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.jc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.pb=this.H=this.J=this.C=0;this.lb=70;this.ra=-1;id(this);this.v.complete=this.v.Uc=!1}y(gd,Ac);h=gd.prototype;h.reset=function(){this.v.ga&&this.ia();id(this);Dc(this);this.v.error=!1;this.parent.reset.call(this)};function id(a){a.cb=255;a.I=0;a.oc=0;a.G=0;a.ab=0;a.ac=0;a.bb=0;a.kc=0;a.Ba=0;a.Xb=262143;a.Vb=253952;a.w=[];a.C|=2;Sb(a)} +function Sb(a){a.kc?(a.ea=65536,a.R=a.Xc,a.X=a.Ic,a.Fc=a.ae):(a.ea=0,a.R=a.Wc,a.X=a.wb,a.Fc=a.Cb)}h.zc=function(){return 0};h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.la,this.$a]);a.set(2,Mb(this.F));return a.data()}; +h.restore=function(a){var b=a[1];this.la=b[1];Jc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ma-=b;break}b-=a.w[f].Ma}a.w.splice(f+1,0,{Ma:b,Gc:c<<5&224,Oc:d,ic:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Oa()|ld(a)|kd(a)|jd(a)} +function Ub(a,b){a.Y=b<<12;a.ba=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Qa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Qa[c];a.Qa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.Aa[c]=a.u[6],a.u[6]=a.Aa[a.B]);a.C|=2;a.O=b}function Q(a,b){a.C&128||(a.Y=a.ba=b,a.V=0)}function od(a,b,c){a.C&128||(a.Y=a.ba=a.U=b,a.V=c||0)}function pd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^b)&(d^b))}function qd(a,b){a.C&128||(a.Y=a.ba=a.U=b,a.V=a.Y^a.U>>1)} +function rd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^d)&(d^b))}h.K=function(a){var b=!1;0>this.ra?this.ra=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.ab=63222,this.ac=a);this.B=0;var c=this.X(a|this.ea),d=this.X(a+2&65535|this.ea);Ub(this,d&-12289|this.ra>>2&12288);b&&(this.I|=4,this.u[6]=4);sd(this,this.ra);sd(this,this.u[7]);nd(this,c);this.C&=-113;this.ra=-1;throw a;};function td(a){var b=ud(a),c=ud(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);nd(a,b);Ub(a,c);a.C&=-17} +function jc(a,b){var c=b>>13&31;31>c?a.bb&32&&(b=a.Pb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function vd(a,b,c){var d,e,f,g=0;d=b>>13;a.bb&a.Yc[a.B]||(d&=7);e=a.W[a.B][d];f=(a.wa[a.B][d]<<6)+(b&8191)&a.Xb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Vb&&4186112>f&&(a.I|=32,a.K(4,12))));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.W[a.B][d]=e;if(4194170!==f||a.B)a.Ba=a.B,a.Ca=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.Ba<<5|a.Ca<<1),a.K(168,16)),a.G&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.X(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.X(e)|g;a.b-= +8;break;case 6:return e=md(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=md(a),e=e+a.u[c]&65535,e=a.X(e|a.ea)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.ab=a.ab<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.cb||65534<=a.u[6])&&(a.u[6]<=a.cb-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}h.Wc=function(a,b,c){return wd(this,a,b,c)};h.Xc=function(a,b,c){return vd(this,wd(this,a,b,c),c)};h.wb=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ia(a)}; +h.Ic=function(a){return this.wb(vd(this,a,2))};h.Cb=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.qc(a,b&65535)};h.ae=function(a,b){this.Cb(vd(this,a|65536,4),b)};function xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=wd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.X(d|c&a.ea),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.Aa[a.O>>12&3];return c} +function yd(a,b,c,d){a.G&57344||(a.ab=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=wd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=vd(a,e|c&65536,4),a.B=a.O>>14&3,a.Cb(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.Aa[a.O>>12&3]=d}function zd(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Ad(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function Bd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return wd(a,b,c,8)} +function Cd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.pb=a.R(b,e,7),c=d.call(a,c,a.F.mb(e)),e&1&&a.b--,a.F.Ob(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Cb(e,d.call(a,c,a.wb(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Ed(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Ob(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Fd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Cb(a.R(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(nd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.Bb=function(a){this.v.complete=!0;var b=this.v.Uc=this.j&&Gd(this.j),c=a?this.v.rc?0:1:-1;this.v.rc=!1;this.S=this.b=a;do{if(b){if(Hd(this.j,this.u[7],c)){this.ia();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.oc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Gc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Oc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.ab=0,this.ac=this.u[7]);this.C=this.C&7|this.O&16;this.decode(md(this))}while(0>1|b<<16;qd(this,a);return a&65535}function Nd(a,b){a=b&2048|b>>1|b<<8;qd(this,a<<8);return a&255}function Od(a,b){a=b&~a;Q(this,a);return a}function Pd(a,b){a=b&~a;Q(this,a<<8);return a}function Qd(a,b){a|=b;Q(this,a);return a} +function Rd(a,b){a|=b;Q(this,a<<8);return a}function Sd(a,b){a=~b|65536;od(this,a);return a&65535}function Td(a,b){a=~b|256;od(this,a<<8);return a&255}function Ud(a,b){a=b-a;this.C&128||(this.Y=this.ba=a,this.V=b&(b^a));return a&65535}function Vd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.Y=this.ba=c,this.V=b&(b^c));return a&255}function Wd(a,b){a=b+a;this.C&128||(this.Y=this.ba=a,this.V=a&(b^a));return a&65535} +function Xd(a,b){a=b+a;var c=a<<8;this.C&128||(this.Y=this.ba=c,this.V=c&(b<<8^c));return a&255}function Yd(a,b){a=-b;od(this,a,a&b&32768);return a&65535}function Zd(a,b){a=-b;od(this,a<<8,(a&b&128)<<8);return a&255}function $d(a,b){a=b<<1|this.U>>16&1;qd(this,a);return a&65535}function ae(a,b){a=b<<1|this.U>>16&1;qd(this,a<<8);return a&255}function be(a,b){a=(this.U&65536|b)>>1|b<<16;qd(this,a);return a&65535}function ce(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;qd(this,a<<8);return a&255} +function de(a,b){var c=b-a;rd(this,c,a,b);return c&65535}function ee(a,b){var c=b-a;rd(this,c<<8,a<<8,b<<8);return c&255}function fe(a,b){this.C&128||(this.Y=this.ba=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function ge(a,b){a^=b;Q(this,a);return a&65535} +function he(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.Y=this.ba=c;this.b-=(this.g?6:7)+b} +function ie(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.ba=1);a&8&&(this.Y=0);this.b-=5} +function je(a){var b=Dd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.Y=d>>16):(this.V=32768,this.ba=d>>15|d,this.Y=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.Y=0,this.V=32768,this.U=65536,this.b-=7}var ke=[0,7,7,10,7,11,9,13];function le(a){var b=this.b;nd(this,Bd(this,a));this.b=b-ke[this.g]} +var me=[0,14,14,17,14,18,16,20];function ne(a){var b=this.b,c=Bd(this,a);a=a>>6&7;sd(this,this.u[a]);this.u[a]=this.u[7];nd(this,c);this.b=b-me[this.g]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],pe=[7,13,13,17,14,18,17,21];function qe(a){var b=Dd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.Y=b>>16,this.ba=this.Y|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)nd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){S(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){S(this,a,Ad(this,a),ge);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function hd(a){Pe[a>>12].call(this,a)} +var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Ad(this,a),c=this.b;Q(this,Fd(this,a,b));this.b=c-oe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ad(this,a);a=Dd(this,a);rd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,Ad(this,a)&Dd(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Od);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){S(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Id);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=zd(this,a);Q(this,Ed(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=zd(this,a)<<8;a=Cd(this,a)<<8;rd(this,b-a,a,b);this.b-=this.g? +4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,(zd(this,a)&Cd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),de);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= +[function(a){Te[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(a){T(this,a,!this.Oa()==!kd(this))},function(a){T(this,a,!this.Oa()!=!kd(this))},function(a){T(this,a,!ld(this)&&!this.Oa()==!kd(this))},function(a){T(this,a,ld(this)||!this.Oa()!=!kd(this))},ne,ne,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){od(this, +Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ud);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){S(this,a,0,Yd);this.b-=this.g?11:6},function(a){S(this,a,jd(this)?1:0,Id);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,jd(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);od(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],We=[function(a){S(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Ic(a|65536);nd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xd(this,a,0);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a, +0,b);Q(this,b);this.b=c-pe[this.g]},function(a){Q(this,Fd(this,a,this.Oa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,le,le,le,le,function(a){if(a&8)this.K(8,6);else{var b=ud(this);a&=7;nd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, +3)):this.ia();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){td(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(id(this),this.F.reset());this.b-=667},function(){td(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[re,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},U,function(){this.ba=1;this.b-=5},U,U,U,function(){this.Y=0;this.b-=5},U,U,U,U,U,U,U],$e=[re,function(){this.U= +65536;this.b-=5},function(){this.V=32768;this.b-=5},se,function(){this.ba=0;this.b-=5},se,se,se,function(){this.Y=32768;this.b-=5},se,se,se,se,se,se,se],Re=[qe,qe,je,je,he,he,ie,ie,Oe,Oe,V,V,V,V,te,te],Se=[function(a){T(this,a,!this.Oa())},function(a){T(this,a,this.Oa())},function(a){T(this,a,!jd(this)&&!ld(this))},function(a){T(this,a,jd(this)||ld(this))},function(a){T(this,a,!kd(this))},function(a){T(this,a,kd(this))},function(a){T(this,a,!jd(this))},function(a){T(this,a,jd(this))},function(){this.K(24, +2);this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){od(this,Ed(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){R(this,a,0,Zd);this.b-= +this.g?11:6},function(a){R(this,a,jd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,jd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Cd(this,a);od(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){R(this,a,0,ce);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ld);this.b-=this.g?9:3+(7== +this.f?2:0)}],df=[V,function(a){a=xd(this,a,65536);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a,65536,b);Q(this,b);this.b=c-pe[this.g]},V];function ef(a){u.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=fa(this.H);"json"!=b&&"hex"!=b&&(a=ha()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Pa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ka=function(){if(this.La){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.La,f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var m=k.o,n=k.a;if(void 0!==m){var p=f,m=[m>>>0,g],t=ra(p,m,a.vc);0>t&&p.splice(-(t+1),0,m)}n&&(k.a=n.replace(/''/g,'"'))}a.H.push({ee:b,A:c,Zc:d,La:e,uc:f})}delete this.La}return!0};ef.prototype.Ja=function(){return!0}; +function ff(a,b,c,d){if(d)a.ta("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.fc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,k=eval("("+c+")");if(f=k.bytes)a.f=f;else if(f=k.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=k.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=k;a.La=k.symbols;if(!a.f.length){q("Empty ROM: "+ +b);return}if(1==a.f.length){q(a.f[0]);return}}catch(m){a.ta("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].dc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>>e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=pa(b[0]);if(c!=this.Sb)return;b=pa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.fc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ka=function(a,b){if(!b)if(this.Dc(),!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(){mf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.X=0;a.f=0;a.g=128;a.B=[];return!0}h.nc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.H%a,this.Z&&(b=oa("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,X.prototype.nd,X.prototype.Sd,"RCSR"],nf[65394]=[null,null,X.prototype.md,X.prototype.Rd,"RBUF"],nf[65396]=[null,null,X.prototype.xd,X.prototype.ce,"XCSR"],nf[65398]=[null,null,X.prototype.wd,X.prototype.be,"XBUF"],nf);Ma(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ac=function(){return-1};of.prototype.Bc=function(){}; +function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(pa(b.substring(c,f))),c=f+1}}return a} function rf(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 sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ga[b]);var c=0;for(b in a.ga)vf(a,b,a.ga[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=l(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ha[b]);var c=0;for(b in a.ha)vf(a,b,a.ha[b]),c++;return 0>>d.F.ba;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ib[c],n&&d.i(p(n.id,8)+" %"+p(e<>>c.ba].jc(d&c.f,d),this.g--,b&&Gf(a,b));return c};k.Ga=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Jb(this.F,d),this.g--,b&&Gf(a,b));return c}; -k.Mb=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].bc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};k.oc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.$[(d&e.g)>>>e.ba].rc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,Fa:!1}}function Hf(a){return[a.A,a.Fa]}function If(a){return{A:a[0],Fa:a[1]}} -function Ff(a,b,c){var d;c=(c?a.R:a.cb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.zc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Oa[a-8]:20>a?b=this.b.ya[a-16]:20==a&&(b=Tb(this.b)));return b}; -k.message=function(a,b){this.g||(b&&(a+=" @"+J(this,X(this.b.u[7]).A)),this.la&1073741824?this.wa.push(a):this.ua&&a==this.ua||(this.ua=a,this.la&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.pa=0,M(a))))}; -function zf(a){var b;if(Hd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ba],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ba],!0);a.G=["bw"];a.nb=0} -k.hb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+J(this,b.A)),d=!1;else{var f=this.F;f.$[e>>>f.ba].hb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Fa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ba],b==a.G));h.Fa||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,v=J(u,q);else if(8192==A)q=q.A-((f&63)<<1)&65535,v=J(u,q);else if(12288==A)v=J(u,f&7,1);else if(24576==A)v=J(u,f&63,1);else if(A=f&z,z&4032&&(A>>=6,z>>=6),z&63)switch(z=A&7,A&56){case 0:v=Kf(z);break;case 8:v="@"+Kf(z);break;case 16:7>z?v="("+Kf(z)+ -")+":(A=u.Ga(q,2),v="#"+J(u,A,0,!0));break;case 24:7>z?v="@("+Kf(z)+")+":(A=u.Ga(q,2),v="@#"+J(u,A,0,!0));break;case 32:v="-("+Kf(z)+")";break;case 40:v="@-("+Kf(z)+")";break;case 48:A=u.Ga(q,2);v=J(u,A,0,!0)+"("+Kf(z)+")";7==z&&(v=[v,J(u,A+q.A&65535)]);break;case 56:A=u.Ga(q,2),v="@"+J(u,A)+"("+Kf(z)+")",7==z&&(v=[v,J(u,A+q.A&65535)])}u=v;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(l=u[1],u=u[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Oa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ya[b-16]):20==b&&(c="PS="+J(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}k.tc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Xc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=X(d.u[7]),Nf(a,J(a,a.R.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-l;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.Z&&(a.i("ended assemble at "+J(a,a.Y.A)),a.R=a.Y,a.Z=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ua=null;if(hb(a)&&0n||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Y=ja.length);ca-=Y;0>ca&&(null==ja[ja.length-1].A?(Y=ca+Y,ca=0):ca+=ja.length);var Oc=[];"call"==ze&&(jb=1E5,Oc=["CALL"]);for(void 0!==ye&&a.i(Y+" instructions earlier:");0=ja.length&&(ca=0);a.ob=Y;Be++;jb--}}Be||(a.i("no "+Ae+"history available"),a.ob=void 0)}else{var Wb=Ff(a,ia);if(Wb){var Xb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Xb=uf(a,za)>>>0,65536>4||1;wg--&&0$b?String.fromCharCode($b):".";Yb--}lb&&(lb+="\n");lb+=ia+" "+Qc+(0==nb?" "+Ee:"")}lb&&a.i(lb);a.cb=Wb}}}}break;case "e":if("else"==g[0])break;var Ra,Rc,Sc,Tc,Uc=g[0],Vc=g[1];"eb"==Uc?(Ra=1,Rc=255,Sc=a.kb,Tc=a.Mb):"e"==Uc||"ew"==Uc?(Ra=2,Rc=65535,Sc=a.Ga,Tc=a.oc):Vc=null;if(null==Vc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var ac=Ff(a,Vc);if(ac)for(var bc=2;bcYc;){for(var Aa=null,Ag=256;65536>qb.A>>>0;){Zc.A=a.Ga(qb,2);if(null==qb.A||!Ag--)break;if(!(Zc.A&1)){for(var Bg=a,cc=Zc,Ge=null,rb=cc.A,He=rb,$c=1;6>=$c&& -rb;$c++){if(2<$c){cc.A=rb;var dc=Tf(Bg,cc);if(0<=dc.indexOf("JSR")){var Ie=dc.indexOf(" ");if(rb+(dc.indexOf(" ",Ie+1)-Ie-1)/2==He){Ge=dc;break}}}rb-=2}cc.A=He;if(Aa=Ge)break}}if(!Aa||null==Aa)break;var Je=null;if("ks"==zg){var Ke=Aa.match(/[0-9A-F]+$/);Ke&&(Je=$f(a,Ke[0]))}Aa=na(Aa,50)+" ;"+(Je||"stack="+J(a,qb.A));a.i(Aa);Yc++}Yc||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,C=g[1];"?"==C&&(C=void 0);if(void 0!==C){var ta= -0;if("all"==C)ta=1878917119,C=null;else if("on"==C)la=!0,C=null;else if("off"==C)la=!1,C=null;else{"keys"==C&&(C="key");"kbd"==C&&(C="keyboard");for(ka in H)if(C==ka){ta=H[ka];la=!!(a.la&ta);break}if(!ta){a.i("unknown message category: "+C);break a}}if(ta)if("on"==g[2])a.la|=ta,la=!0;else if("off"==g[2]&&(a.la&=~ta,la=!1,1073741824==ta)){for(var ad=0;ad\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new N(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",sa());og(this.B);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== -f&&"no machine state"!=g?(this.sa("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=bb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.v.ia=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Cb());this.W&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; -function mg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ha&&(c&&a.b.ha(),d=a.b.Ha(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ia=!1,!1===d&&(e=null)));for(var h=bb(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(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]*/, +63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};h=xf.prototype; +h.Pa=function(a,b,c,d){this.F=b;this.b=c;this.D=a;(a=Cc(a,"messages"))&&Af(this,a);this.sb=Df;Ef(this,function(a){a:{var b=d.F.aa,c=a[0],e=a=0,m=b.length;if(c){a=Z(Ff(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.F.ca;m=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var p=b[e];p.type==c?n++||d.i("..."):(c=p.type,n=Kb[c],p&&d.i(l(p.id,8)+" %"+l(e<>>c.ca].lc(d&c.f,d),this.g--,b&&Gf(a,b));return c};h.Ia=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Lb(this.F,d),this.g--,b&&Gf(a,b));return c}; +h.Ob=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].dc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};h.qc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].tc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};function Y(a){return{A:a,Ha:!1}}function Hf(a){return[a.A,a.Ha]}function If(a){return{A:a[0],Ha:a[1]}} +function Ff(a,b,c){var d;c=(c?a.R:a.fb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Bc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Qa[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Tb(this.b)));return b}; +h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,Y(this.b.u[7]).A)),this.ma&1073741824?this.ya.push(a):this.va&&a==this.va||(this.va=a,this.ma&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.qa=0,O(a))))}; +function zf(a){var b;if(Gd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ca],!0);a.G=["bw"];a.pb=0} +h.jb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+I(this,b.A)),d=!1;else{var f=this.F;f.aa[e>>>f.ca].jb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Ha=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ca],b==a.G));k.Ha||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,x=I(w,r);else if(8192==C)r=r.A-((f&63)<<1)&65535,x=I(w,r);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Kf(B);break;case 8:x="@"+Kf(B);break;case 16:7>B?x="("+Kf(B)+ +")+":(C=w.Ia(r,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Kf(B)+")+":(C=w.Ia(r,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Kf(B)+")";break;case 40:x="@-("+Kf(B)+")";break;case 48:C=w.Ia(r,2);x=I(w,C,0,!0)+"("+Kf(B)+")";7==B&&(x=[x,I(w,C+r.A&65535)]);break;case 56:C=w.Ia(r,2),x="@"+I(w,C)+"("+Kf(B)+")",7==B&&(x=[x,I(w,C+r.A&65535)])}w=x;if(!w||!w.length){k="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Qa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.Aa[b-16]):20==b&&(c="PS="+I(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.vc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,k=f.Zc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}O(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=Y(d.u[7]),Nf(a,I(a,a.R.A)))}}function ag(a,b){b=pa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var n=k[0]+":";k[2]&&(n+=" "+k[2]);a.i(n)}k[3]&&(g=k[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-m;c++}}} +function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+I(a,a.Z.A)),a.R=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.va=null;if(ib(a)&&0p||"z"la.length&&(a.i("note: only "+la.length+" available"),ba=la.length);ea-=ba;0>ea&&(null==la[la.length-1].A?(ba=ea+ba,ea=0):ea+=la.length);var Pc=[];"call"==Ae&&(lb=1E5,Pc=["CALL"]);for(void 0!==ze&&a.i(ba+" instructions earlier:");0=la.length&&(ea=0);a.qb=ba;Ce++;lb--}}Ce||(a.i("no "+Be+"history available"),a.qb=void 0)}else{var Xb=Ff(a,ka);if(Xb){var Yb=0;Ba&&("l"==Ba.charAt(0)&&(Ba=Ba.substr(1)||ug),Yb=uf(a,Ba)>>>0,65536>4||1;wg--&&0ac?String.fromCharCode(ac):".";Zb--}nb&&(nb+="\n");nb+=ka+" "+Rc+(0==pb?" "+Fe:"")}nb&&a.i(nb);a.fb=Xb}}}}break;case "e":if("else"==g[0])break;var Ta,Sc,Tc,Uc,Vc=g[0],Wc=g[1];"eb"==Vc?(Ta=1,Sc=255,Tc=a.mb,Uc=a.Ob):"e"==Vc||"ew"==Vc?(Ta=2,Sc=65535,Tc=a.Ia,Uc=a.qc):Wc=null;if(null==Wc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var bc=Ff(a,Wc);if(bc)for(var cc=2;ccZc;){for(var Ca=null,Ag=256;65536>sb.A>>>0;){$c.A=a.Ia(sb,2);if(null==sb.A||!Ag--)break;if(!($c.A&1)){for(var Bg=a,dc=$c,He=null,tb=dc.A, +Ie=tb,ad=1;6>=ad&&tb;ad++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new P(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",ta());og(this.B);var e=this.f&&!this.G;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +f&&"no machine state"!=g?(this.ta("Error: "+g),"unable to verify user"==g&&(Da("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ja=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Eb());this.X&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; +function mg(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new P(a,"1.30.1"),g=new P(a,"1.30.1","validate"),k=ta();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ia(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ja=!1,!1===d&&(e=null)));for(var k=cb(a.id),m=0;mf.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+"...");ua(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 m=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} -function Ig(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=ma(a))}function f(a){e("Error: "+a);l&&(--tg||Sa(!0));l=!1}var g,h,l=!0;tg++;$a[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Fg(c,null,null,!1,e,function(d,l){l?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--tg||Sa(!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),--tg||Sa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,m):Gg(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return l}window.embedPDP11=function(a,b,c,d){Sa(!1);return Ig(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); +function Ig(a,b,c,d){function e(a){if(void 0===k){var b=g&&A(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ja(a))}function f(a){e("Error: "+a);m&&(--tg||Oa(!0));m=!1}var g,k,m=!0;tg++;ab[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|| +(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,k){k?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--tg||Oa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Oa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,n):Gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(r){f(r.message)}return m}window.embedPDP11=function(a,b,c,d){Oa(!1);return Ig(a,b,c,d)};window.enableEvents=Oa;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index a5013259a..6432a8d2d 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -681,162 +681,170 @@ for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ -var k; +var h; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function p(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function r(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var t={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){t.init.push(a)} -function va(a){if(ta)try{for(var b=0;bb?this.hb=this.id:(this.Cb=this.id.substr(0,b),this.hb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Vc:!1,Wc:!1,P:!1,error:!1};this.pb=null;this.i.error=!1;this.A={};this.K=null;x.push(this)}var ya=void 0,za={}; +function p(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} +function va(a){if(ta)try{for(var b=0;bb?this.jb=this.id:(this.Eb=this.id.substr(0,b),this.jb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,td:!1,ud:!1,R:!1,error:!1};this.rb=null;this.i.error=!1;this.A={};this.L=null;w.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 y(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},x=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.sa=[];this.m=null;this.$a=this.G;a=new G;Ma(a,this.K);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.sa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.$a(b|4186112,-1,1)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.sa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.sa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.$a(c|4186112,b,1)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.sa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.$a(b|4186112,-1,0)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.sa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.$a(c|4186112,b,0)}La.prototype.reset=function(){this.m&&this.m()};La.prototype.G=function(){return 0};La.prototype.na=function(a,b){b||this.reset();return!0}; -function Ra(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.c;0g&&(q=g);if(l&&l.size){if(l.type==d&&l.controller==e){if(f+g<=l.Wa)return l.vb+=l.Wa-f,l.Wa=f,!0;if(f>=l.Wa+l.vb){q=l.size-(f-m);q>g&&(q=g);l.vb=f-l.Wa+q;f=m+a.g;g-=q;h++;continue}}return Ta(1,f,g)}f=new G(f,q,a.g,d,e);Ma(f,a.K,l);a.b[h++]=f;f=m+a.g;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Ua[d]+" at "+n(b,8,!0)),!0):Ta(2,b,c)}function Va(a,b){return a.b[(b&a.u)>>>a.c].Gb(b&a.h,b)} -function Wa(a){for(var b=0,c=[],d=0;d>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.ua=[];this.m=null;this.bb=this.H;a=new E;Na(a,this.L);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.bb(b|4186112,-1,1)}function Pa(a,b,c){var d=!1,e=this.controller,f=e.ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.bb(c|4186112,b,1)} +function Qa(a,b){var c=-1,d=this.controller;(a=d.ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.bb(b|4186112,-1,0)}function Ra(a,b,c){var d=!1,e=this.controller;if(a=e.ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.bb(c|4186112,b,0)}Ma.prototype.reset=function(){this.m&&this.m()};Ma.prototype.H=function(){return 0};Ma.prototype.pa=function(a,b){b||this.reset();return!0}; +function Sa(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.c;0g&&(t=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.Ya)return m.xb+=m.Ya-f,m.Ya=f,!0;if(f>=m.Ya+m.xb){t=m.size-(f-n);t>g&&(t=g);m.xb=f-m.Ya+t;f=n+a.g;g-=t;l++;continue}}return Ua(1,f,g)}f=new E(f,t,a.g,d,e);Na(f,a.L,m);a.b[l++]=f;f=n+a.g;g-=t}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+k(b,8,!0)),!0):Ua(2,b,c)}function Wa(a,b){return a.b[(b&a.u)>>>a.c].Ib(b&a.h,b)} +function Xa(a){for(var b=0,c=[],d=0;d>5&3;c.jb=a>>1&15;c.Fb=a&257?a&1?6:4:0;cb(c);a=c.G;a&1|256&&(b=this.a.Ba&16?1:2);this.c.Ma=this.c.Ma&-8|b};k.tc=function(){return db(this.a)};k.Nc=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; -function fb(a){var b=a.g,c,d,e,f=b.W>>13&7;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.zc,drive:f,blocksize:256,mapped:0,maxblock:b.Ia[f]*b.J[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.cb=2496;b.R=0;b.D=128;b.W=0;break;case 1:if((b.W>>4&511)>=b.Ia[f]){b.R|=32832;b.D|=49152;break}if((b.W&15)>=b.J[f]){b.R|=32800;b.D|=49152;break}c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;gb(a,b.S[f],c,d,e);return;case 2:if((b.W>>4&511)>=b.Ia[f])b.R|=32832, -b.D|=49152;else if((b.W&15)>=b.J[f])b.R|=32800,b.D|=49152;else{c=(b.W>>4&511)*b.J[f]+(b.W&15);d=(b.D&48)<<12|b.bb;e=65536-b.eb&65535;a.sb(b.S[f],c,d,e);return}}b.cb=f<<13|b.cb&8176|b.W%9&15;I(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}k.zc=function(a,b,c,d,e){var f=this.g;f.bb=d&65535;f.D=f.D&-49|d>>12&48;f.eb=65536-e&65535;switch(a){case 1:f.R|=33024;f.D|=49152;break;case 2:f.R|=33792,f.D|=49152}I(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.S[f]&&(b.S[f]={cache:[],postProcess:a.Ac,drive:f,blocksize:128,mapped:1,maxblock:b.Ia[f]*b.J[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.za&8&&(b.v&=63);b.za=b.gc[f]|b.Ea&64;break;case 3:1==(b.L&3)&&(b.Ea=b.L&4?b.Ea+(b.L&65408)&65408|b.L<<2&64:b.Ea-(b.L&65408)&65408|b.L<<2&64,b.L=b.Ea);break;case 4:b.za=b.Ea;break;case 5:if(b.L>>6>=b.Ia[f]){b.v|=37888;break}if((b.L&63)>=b.J[f]){b.v|=37888;break}c=(b.L>>6)*b.J[f]+(b.L&63); -d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;gb(a,b.S[f],c,d,e);return;case 6:if(b.L>>6>=b.Ia[f])b.v|=37888;else if((b.L&63)>=b.J[f])b.v|=37888;else{c=(b.L>>6)*b.J[f]+(b.L&63);d=(b.ta&63)<<16|b.Za;e=65536-b.za&65535;a.sb(b.S[f],c,d,e);return}}I(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} -k.Ac=function(a,b,c,d,e){var f=this.h;f.Za=d&65535;f.v=f.v&-49|d>>12&48;f.ta=d>>16&63;f.L=~~(c/f.J[b.la])<<6|c%f.J[b.la];f.Ea=f.L;f.za=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}I(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.aa=0;a.U=[4544,4544,4544,4544,4544,4544,4544,4544];a.Pa=[0,0,0,0,0,0,0,0];a.La=a.Qa=a.Oa=a.Da=a.Jb=0} -function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.aa&=-2049;c.U[b]&=-1153;I(a.a,-1,0,172);"undefined"===typeof c.S[b]&&(c.S[b]={cache:[],postProcess:a.Bc,drive:b,blocksize:256,mapped:0,maxblock:c.xb[0]*c.Ha[0]*c.J[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.ub[b]=c.oa[b];c.F|=32896;c.U[b]|=32896;c.La|=1<=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0]){c.Pa[b]|=1024;c.F|=49152;break}d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+ -(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;gb(a,c.S[b],d,e,f);return;case 57:if(c.oa[b]>=c.xb[0]||c.ba[b]>>8>=c.Ha[0]||(c.ba[b]&255)>=c.J[0])c.Pa[b]|=1024,c.F|=49152;else{d=(c.oa[b]*c.Ha[0]+(c.ba[b]>>8))*c.J[0]+(c.ba[b]&255);e=(c.Da&63)<<16|c.Oa;f=65536-c.Qa&65535;a.sb(c.S[b],d,e,f);return}}I(a.a,3,5,172,function(){c.F=c.F&65534|128;c.U[b]|=128;return!!(c.F&64)})} -k.Bc=function(a,b,c,d,e){var f=this.l;f.Qa=65536-e&65535;f.Oa=d&65535;f.F=f.F&-769|d>>8&768;f.Da=d>>16&63;e=~~(c/f.J[0]);d=~~(e/f.Ha[0]);f.ba[b.la]=e%f.Ha[0]<<8|c%f.J[0];f.ub[b.la]=f.oa[b.la]=d;f.La|=1<=b.nc-1&&(f.U[b.la]|=1024);switch(a){case 1:f.aa|=512;f.F|=49152;break;case 2:f.aa|=2048,f.F|=49152}I(this.a,20,5,172,function(){f.U[b.la]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function kb(a,b,c,d,e,f){var g=~~((f+c.ua-1)/c.ua),h=new XMLHttpRequest;2048>g&&d+2048this.a.Sa(a.mc?lb(this.a,c):c,a.cache[b][e])){a.rb(2,a,b,c,d);return}c+=2;--d}b++}a.rb(0,a,b,c,d)}; -function gb(a,b,c,d,e){for(var f,g;0g){b.rb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.rb(0,b,c,d,e)}k.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ya=0;this.g.D=128;this.h.v=128;ib(this)}; -k.hc=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ca&65280:(a&1&&(b<<=8),f.Ca=b|255,d=0);break;case 4194298:if(0>b)d=f.Ib;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Ib=d;f.j|=2}break;case 4194294:if(70!==f.Ja)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.Ja)return K(f,4);d=1;break;case 4194290:if(70!==f.Ja)return K(f,4);d=0;break;case 4194288:if(70!==f.Ja)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.Ja)return K(f,4);e=a-4194272>>1;0>b?d=f.Ab[e]:(d=J(this,f.Ab[e],a,b,c),0<=d&&(f.Ab[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[3]=b),d=f.da[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[1]=b),d=f.da[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ka[e]=b),d=f.Ka[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.da[0]=b),d=f.da[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ka[e]=b),d=f.Ka[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.Z[3][e],a,b,c);0<=d&&(f.Z[3][e]=d,f.Z[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.tb,a,b,c);0<=d&&(f.tb=d);break;case 4194172:d=f.Aa;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Kc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.cb,a,b,c);0<=d&&(e.cb=d);break;case 4194050:d=J(this,e.R,a,b,c);0<=d&&(e.R=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194056:d=J(this,e.bb,a,b,c);0<=d&&(e.bb=d);break;case 4194058:d=J(this,e.W,a,b,c);0<=d&&(e.W= -d);break;case 4194060:break;case 4194062:d=J(this,e.Zb,a,b,c);0<=d&&(e.Zb=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.aa&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Da=g.Da&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&I(f,0,5,172));break;case 4193730:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d);break;case 4193732:d=J(this,g.Oa,a,b,c);0<=d&&(g.Oa=d&65534);break;case 4193734:d=J(this,g.ba[e],a,b,c);0<=d&&(g.ba[e]=d&7967);break;case 4193736:d= -J(this,g.aa,a,b,c);0<=d&&(g.aa=d&63|g.aa&65472,d&128&&ib(this));break;case 4193738:d=g.U[e];break;case 4193740:d=g.Pa[e];break;case 4193742:d=J(this,g.La,a,b,c);0<=d&&(g.La=d&255);break;case 4193744:d=g.Gc[e];break;case 4193746:d=J(this,g.$b,a,b,c);0<=d&&(g.$b=d);break;case 4193748:d=J(this,g.ac[e],a,b,c);0<=d&&(g.ac[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Hc[e];break;case 4193754:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d);break;case 4193756:d=J(this,g.oa[e],a,b,c);0<=d&&(g.oa[e]= -d&511);break;case 4193758:g.ub[e]=g.oa[e];d=g.ub[e];break;case 4193760:d=g.Ec[e];break;case 4193762:d=g.Fc[e];break;case 4193764:d=g.Cc[e];break;case 4193766:d=g.Dc[e];break;case 4193768:d=J(this,g.Da,a,b,c);0<=d&&(g.Da=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Jb,a,b,c);0<=d&&(g.Jb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.ta=e.ta&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= -J(this,e.Za,a,b,c);0<=d&&(e.Za=d&65534);break;case 4192516:d=J(this,e.L,a,b,c);0<=d&&(e.L=d);break;case 4192518:d=J(this,e.za,a,b,c);0<=d&&(e.za=d);break;case 4192520:d=J(this,e.ta,a,b,c);0<=d&&(e.ta=d&63,e.v=e.v&-49|(e.ta&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Ba:(d=J(this,f.Ba,a,b,c),0<=d&&(70!==f.Ja&&(d&=-49),f.Ba=d,f.qb[0]=d&4?15:7,f.qb[1]=d&2?15:7,f.qb[3]=d&1?15:7,f.Fb&&(e=2,f.Ba&16&&(e=1),this.c.Ma=this.c.Ma&-8|e)));break;default:return f.s|= -16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.Z[0][e],a,b,c);0<=d&&(f.Z[0][e]=d,f.Z[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.Z[1][e],a,b,c);0<=d&&(f.Z[1][e]=d,f.Z[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.Ja)return K(f,4);e=a>>2&31;d=f.fb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.fb[e]=a&2?d<<16|f.fb[e]&65535:f.fb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=Za[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d};var mb={},bb=(mb[65382]=[null,null,H.prototype.rc,H.prototype.Lc,"LKS"],mb[65402]=[null,null,H.prototype.sc,H.prototype.Mc,"MMR0"],mb[65534]=[null,null,H.prototype.tc,H.prototype.Nc,"PSW"],mb);u(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),tb(this,pb?ub:vb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},fa:function(a){var 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},ja:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},H:function(a,b){return this.I(a,b)},Y:function(a,b){return this.ca(a, -b)},ha:function(a,b,c){this.A||this.fc(a,b,c)},qa:function(a,b,c){this.A||this.ra(a,b,c)},G:function(a){return this.c[a]},M:function(a){return this.c[a]},V:function(a){return this.g.getUint16(a,!0)},ea:function(a){return this.l[a>>1]},ga:function(a,b){this.c[a]=b;this.va=!0},ia:function(a,b){this.c[a]=b;this.va=!0},pa:function(a,b){this.g.setUint16(a,b,!0);this.va=!0},Fa:function(a,b){this.l[a>>1]=b;this.va=!0}}; -function Ma(a,b,c){a.K=b;a.h=a.u=0;c&&((a.h=c.h)&&xb(a,yb,!1),(a.u=c.u)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.u||(a.wb=!a.A&&b[1]||a.B,a.Qc=!a.A&&b[3]||a.w);if(c||void 0===c)a.fc=b[1]||a.B,a.ra=b[3]||a.w}function xb(a,b,c){c&&a.h||(a.Gb=b[0]||a.m,a.wc=b[2]||a.o);if(c||void 0===c)a.I=b[0]||a.m,a.ca=b[2]||a.o}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[G.prototype.N,G.prototype.ja,G.prototype.fa,G.prototype.Ga],yb=[G.prototype.H,G.prototype.ha,G.prototype.Y,G.prototype.qa]; -if(Ia)var vb=[G.prototype.G,G.prototype.ga,G.prototype.V,G.prototype.pa],ub=[G.prototype.M,G.prototype.ia,G.prototype.ea,G.prototype.Fa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.mb=a.cycles||b;this.ia=c;this.Db=Math.round(this.mb/1E4)/100;this.pa=this.Db*this.ia;this.i.$=!1;this.i.cc=!1;this.i.Ya=a.autoStart;this.i.Lb=!1;this.i.ob=!1;this.gb=this.qa=0;this.lb=a.csStart;this.Ga=a.csInterval;this.Ta=a.csStop;this.M=[];this.Vb=this.Ic.bind(this);F(this)}y(Bb); -var Cb=["power","reset"];k=Bb.prototype;k.xa=function(a,b,c,d){this.B=a;this.u=b;this.K=d;for(b=0;b>=3;d=""+e}else d=n(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} -k.X=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.P)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.fa/a.pa&&(b=1),a.ia=b,b=a.Db*a.ia,a.pa!=b)){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.T("target speed: "+b)}Kb(a,a.ca);a.ca=0;a.Y=ja();a.ga=0;Lb(a)}function $a(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function ab(a,b,c){0<=b&&ba.M[b][0]&&(c*=a.mb*a.ia/1E3,a.M[b][0]=c)} -k.Ic=function(){if(this.i.$){this.Eb>=this.mb&&Lb(this,!0);this.Va=0;this.kb=ja();if(this.ga){var a=this.kb-this.ga;a>this.Tb&&(this.Y+=a,this.Y>this.kb&&(this.Y=this.kb))}try{do{for(var b,c=this.i.ob?1:this.nb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.dc(b)}catch(m){if("number"!=typeof m)throw m;}for(var f=this.ha-this.a,a=f,g=this.M.length-1;0<=g;g--){var h=this.M[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Va+=f;this.ca+=f;Kb(this,0,!0);a=f;if(this.i.ob){var l= -!1;this.gb=this.gb+this.Nb()|0;this.qa-=a;0>=this.qa&&(this.qa+=this.Ga,l=!0);0<=this.Ta&&this.Ta<=Mb(this)&&(this.Ga=this.Ta=-1,Fb(this),L(this),l=!0);l&&this.T(Mb(this)+" cycles: checksum="+n(this.gb))}this.Ua-=f;if(0>=this.Ua){this.Ua+=this.nb;15<=++this.Ub&&(this.B&&this.B.Ra(),this.Ub=0);break}}while(this.i.$)}catch(m){L(this);Gb(this);this.B&&this.B.stop(ja(),Mb(this));b=m.stack||m.message;this.i.error=!0;this.O(b);return}if(this.i.$){b=setTimeout;c=this.Vb;this.ga=ja();d=this.Tb;this.Va&&(d= -Math.round(d*this.Va/this.nb));d-=this.ga-this.kb;if(e=this.ga-this.Y)this.fa=Math.round(this.ca/(10*e))/100,864E5<=e&&(this.ja=0,Jb(this));if(0>d||this.fad&&(this.Y-=d),d=0;this.Eb+=this.Va;this.ga+=d;b(c,d)}}};function Hb(a){var b;a.i.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.$)a.T(a.toString()+" busy");else{Jb(a);a.i.$=!0;a.i.cc=!0;a.Fa&&a.Fa.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.Y,Mb(a));Gb(a,!0);setTimeout(a.Vb,0)}}k.dc=function(){return 0}; -function L(a){if(a.i.$){a.ha-=a.a;a.a=0;Kb(a,a.ca);a.ca=0;a.i.$=!1;a.Fa&&a.Fa.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Mb(a));Gb(a)}a.i.complete=void 0}function Gb(a,b){a.B&&a.B.Ra(b)} -function Nb(a){this.Jc=a.resetAddr||0;Bb.call(this,a,6666667);this.Ob=0;this.decode=Ob.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.Jc];this.Ka=[0,0,0,0,0,0];this.da=[0,0,0,0];this.jb=this.w=0;this.Z=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Bb=this.H=this.I=this.j=0;this.Ja=70;this.ra=-1;Pb(this);this.i.complete=this.i.ic=!1}y(Nb,Bb);k=Nb.prototype;k.reset=function(){this.i.$&&L(this);Pb(this);Eb(this);this.i.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.Ca=255;a.s=0;a.Ib=0;a.G=0;a.Aa=0;a.tb=0;a.Ba=0;a.Fb=0;a.ib=0;a.oc=[4,2,0,1];a.qb=262143;a.Rb=253952;a.Sb=[[0,0,0,0,0,0,0,0,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.pc=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.o=[];a.j|=2;cb(a)} -function cb(a){a.Fb?(a.ea=65536,a.N=a.lc,a.V=a.Yb,a.Wb=a.Rc):(a.ea=0,a.N=a.kc,a.V=a.Na,a.Wb=a.Sa)}k.Nb=function(){return 0};k.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ja,this.ia]);a.set(2,Wa(this.u));return a.data()}; -k.restore=function(a){var b=a[1];this.ja=b[1];Jb(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ka-=b;break}b-=a.o[f].ka}a.o.splice(f+1,0,{ka:b,Xb:c<<5&224,ec:d,yb:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.wa()|(a.h&65535?0:4)|(a.g&32768?2:0)|N(a)} -function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ka.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ka[c];a.Ka[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.da[c]=a.f[6],a.f[6]=a.da[a.w]);a.j|=2;a.C=b}function O(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function P(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Sb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} -function K(a,b){var c=!1;0>a.ra?a.ra=db(a):a.w||(b=4,c=!0);a.G&57344||(a.Aa=63222,a.tb=b);a.w=0;var d=a.V(b|a.ea),e=a.V(b+2&65535|a.ea);eb(a,e&-12289|a.ra>>2&12288);c&&(a.s|=4,a.f[6]=4);Tb(a,a.ra);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ra=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} -function lb(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.fb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Wb(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.oc[a.w]||(d&=7);e=a.Sb[a.w][d];f=(a.pc[a.w][d]<<6)+(b&8191)&a.qb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Rb&&4186112>f&&(a.s|=32,K(a,4))));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.Sb[a.w][d]=e;if(4194170!==f||a.w)a.ib=a.w,a.jb=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.ib<<5|a.jb<<1),K(a,168)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.V(e|a.ea)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.G&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ca||65534<=a.f[6])&&(a.f[6]<=a.Ca-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}k.kc=function(a,b,c){return Xb(this,a,b,c)};k.lc=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};k.Na=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].wc(a&b.h,a)}; -k.Yb=function(a){return this.Na(Wb(this,a,2))};k.Sa=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].Qc(a&c.h,b&65535,a)};k.Rc=function(a,b){this.Sa(Wb(this,a|65536,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.V(d|c&a.ea),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.da[a.C>>12&3];return c} -function Zb(a,b,c,d){a.G&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Wb(a,e|c&65536,4),a.w=a.C>>14&3,a.Sa(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.da[a.C>>12&3]=d}function $b(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function R(a,b){var c;b>>=6;var d=a.I=b&7;(b=a.H=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} -function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Va(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Na(a.N(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Bb=a.N(b,e,7),c=d.call(a,c,Va(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].wb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),a.Sa(e,d.call(a,c,a.Na(e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].wb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Sa(a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -k.dc=function(a){this.i.complete=!0;this.i.ic=!1;this.i.cc=!1;this.ha=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Ib&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Xb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?K(this,a.ec):K(this,160))}else this.j&1&&this.j++;this.G&57344||(this.Aa=0,this.tb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Qb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function kc(a,b){a=b&~a;O(this,a);return a}function lc(a,b){a=b&~a;O(this,a<<8);return a}function mc(a,b){a|=b;O(this,a);return a}function nc(a,b){a|=b;O(this,a<<8);return a}function oc(a,b){a=~b|65536;P(this,a);return a&65535} -function pc(a,b){a=~b|256;P(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function vc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;Q(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;Q(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;Q(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} -function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;O(this,a);return a&65535}function Ec(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Fc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Gc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} -var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,R(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Ob(a){Sc[a>>12].call(this,a)} -var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,dc(this,a,b));this.a=c-Lc[(this.H?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=R(this,a);a=S(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),kc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b? -2:0)},function(a){U(this,a,R(this,a),mc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);O(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ -(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){O(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.I&&6<=this.b?1:0):(this.H?4:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),lc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){T(this,a,$b(this,a),nc);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},function(a){U(this,a,R(this,a),Ac);this.a-=this.c?9+(this.I&&6<=this.b?1:0):(this.H?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.wa()==!(this.g&32768))},function(a){V(this,a,!this.wa()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.wa()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.wa()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> -6&3].call(this,a)},Y,Y],Xc=[function(a){P(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,N(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,N(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);O(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);O(this,b);this.a=c-Mc[this.c]},function(a){O(this,dc(this,a,this.wa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, -Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Pb(this),this.u.reset());this.a-=667},function(){Ub(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= -5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.wa())},function(a){V(this,a,this.wa())},function(a){V(this,a,!N(this)&&!!(this.h&65535))},function(a){V(this,a,N(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, -a,!N(this))},function(a){V(this,a,N(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){P(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? -9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,N(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,N(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);P(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Bb&1):3+(7==this.b? -2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Yb(this,a,65536);Tb(this,a);O(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);O(this,b);this.a=c-Mc[this.c]},Y]; -function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}y(hd);hd.prototype.xa=function(a,b,c,d){this.u=b;this.a=c;this.K=d;jd(this)};hd.prototype.na=function(){this.l&&(this.K&&this.K.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; -hd.prototype.ma=function(){return!0}; -function id(a,b,c,d){if(d)a.O("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Cb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,h=eval("("+c+")");if(f=h.bytes)a.b=f;else if(f=h.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=h.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=h;a.l=h.symbols;if(!a.b.length){r("Empty ROM: "+b); -return}if(1==a.b.length){r(a.b[0]);return}}catch(l){a.O("ROM data error: "+l.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].fc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.hb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Cb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.na=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ma=function(a){return a?this.save():!0};k.reset=function(){od(this)};k.save=function(){var a=new M(this);a.set(0,[]);return a.data()};k.restore=function(){return od(this)};function od(a){a.I=0;a.b=0;a.c=128;a.h=[];return!0}k.Hb=function(a){if("number"==typeof a)this.h.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.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.G&&!this.m&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.T(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;I(this.a,100,4,52,this.H)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.vc,Z.prototype.Pc,"RCSR"],pd[65394]=[null,null,Z.prototype.uc,Z.prototype.Oc,"RBUF"],pd[65396]=[null,null,Z.prototype.yc,Z.prototype.Tc,"XCSR"],pd[65398]=[null,null,Z.prototype.xc,Z.prototype.Sc,"XBUF"],pd);u(function(){for(var a=D(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new M(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.T(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.Y=!0;this.i.P=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.Ya());this.I&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +0,3024,3103,65514,34562,0,264,8197,33779,5003,2574,32337,260,0,258,5579,12,6080,448,6081,450,6084,452,116,2,6084,65400,17860,65024,21956,62976,38848,65401,3200,161,76,0,16944,10797];h=F.prototype;h.za=function(a,b,c,d){this.u=b;this.a=c;this.L=d;var e=this;this.b.Mb=ab(this.a,function(){e.b.Aa|=128;e.b.Aa&64&&(G(e.a,0,6,64),bb(e.a,e.b.Mb,1E3/60))});Ya(b,this,I);Za(b,this.reset.bind(this),this.ic.bind(this));D(this)};h.wc=function(){var a=this.b.Aa;this.b.Aa&=-129;return a}; +h.ad=function(a){this.b.Aa=a;a&64&&bb(this.a,this.b.Mb,1E3/60);this.b.Aa=a&-129};h.xc=function(){var a=this.a;return a.H&62337|a.kb<<5|a.lb<<1};h.bd=function(a){var b=4,c=this.a;c.H=a&=62337;c.kb=a>>5&3;c.lb=a>>1&15;c.Hb=a&257?a&1?6:4:0;cb(c);a=c.H;a&1|256&&(b=this.a.Da&16?1:2);this.c.Oa=this.c.Oa&-8|b};h.Ec=function(a){return this.a.G[1][a>>1&7]};h.jd=function(a,b){this.a.G[1][b>>1&7]=a&65295};h.Cc=function(a){return this.a.G[1][(a>>1&7)+8]};h.gd=function(a,b){this.a.G[1][(b>>1&7)+8]=a&65295}; +h.Dc=function(a){return this.a.X[1][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.Bc=function(a){return this.a.X[1][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.vc=function(a){return this.a.G[0][a>>1&7]};h.$c=function(a,b){this.a.G[0][b>>1&7]=a&65295};h.tc=function(a){return this.a.G[0][(a>>1&7)+8]};h.Yc=function(a,b){this.a.G[0][(b>>1&7)+8]=a&65295};h.uc=function(a){return this.a.X[0][a>>1&7]}; +h.Zc=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.sc=function(a){return this.a.X[0][(a>>1&7)+8]};h.Xc=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.Ic=function(a){return this.a.G[3][a>>1&7]};h.nd=function(a,b){this.a.G[3][b>>1&7]=a&65295};h.Gc=function(a){return this.a.G[3][(a>>1&7)+8]};h.ld=function(a,b){this.a.G[3][(b>>1&7)+8]=a&65295};h.Hc=function(a){return this.a.X[3][a>>1&7]};h.md=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.G[3][b]&=65295}; +h.Fc=function(a){return this.a.X[3][(a>>1&7)+8]};h.kd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.G[3][b]&=65295};h.yc=function(){return db(this.a)};h.cd=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; +function fb(a){var b=a.g,c,d,e,f=b.Y>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Mc,drive:f,blocksize:256,mapped:0,maxblock:b.Ka[f]*b.K[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.fb=2496;b.S=0;b.D=128;b.Y=0;break;case 1:if((b.Y>>4&511)>=b.Ka[f]){b.S|=32832;b.D|=49152;break}if((b.Y&15)>=b.K[f]){b.S|=32800;b.D|=49152;break}c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;gb(a,b.T[f],c,d,e);return;case 2:if((b.Y>>4&511)>=b.Ka[f])b.S|=32832, +b.D|=49152;else if((b.Y&15)>=b.K[f])b.S|=32800,b.D|=49152;else{c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;a.ub(b.T[f],c,d,e);return}}b.fb=f<<13|b.fb&8176|b.Y%9&15;G(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}h.Mc=function(a,b,c,d,e){var f=this.g;f.eb=d&65535;f.D=f.D&-49|d>>12&48;f.gb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}G(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; +function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Nc,drive:f,blocksize:128,mapped:1,maxblock:b.Ka[f]*b.K[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.Ba&8&&(b.v&=63);b.Ba=b.hc[f]|b.Ga&64;break;case 3:1==(b.M&3)&&(b.Ga=b.M&4?b.Ga+(b.M&65408)&65408|b.M<<2&64:b.Ga-(b.M&65408)&65408|b.M<<2&64,b.M=b.Ga);break;case 4:b.Ba=b.Ga;break;case 5:if(b.M>>6>=b.Ka[f]){b.v|=37888;break}if((b.M&63)>=b.K[f]){b.v|=37888;break}c=(b.M>>6)*b.K[f]+(b.M&63); +d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;gb(a,b.T[f],c,d,e);return;case 6:if(b.M>>6>=b.Ka[f])b.v|=37888;else if((b.M&63)>=b.K[f])b.v|=37888;else{c=(b.M>>6)*b.K[f]+(b.M&63);d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;a.ub(b.T[f],c,d,e);return}}G(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} +h.Nc=function(a,b,c,d,e){var f=this.h;f.ab=d&65535;f.v=f.v&-49|d>>12&48;f.va=d>>16&63;f.M=~~(c/f.K[b.na])<<6|c%f.K[b.na];f.Ga=f.M;f.Ba=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}G(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.ca=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Ra=[0,0,0,0,0,0,0,0];a.Na=a.Sa=a.Qa=a.Fa=a.Lb=0} +function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.ca&=-2049;c.V[b]&=-1153;G(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.Oc,drive:b,blocksize:256,mapped:0,maxblock:c.zb[0]*c.Ja[0]*c.K[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.wb[b]=c.qa[b];c.F|=32896;c.V[b]|=32896;c.Na|=1<=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0]){c.Ra[b]|=1024;c.F|=49152;break}d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+ +(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;gb(a,c.T[b],d,e,f);return;case 57:if(c.qa[b]>=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0])c.Ra[b]|=1024,c.F|=49152;else{d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;a.ub(c.T[b],d,e,f);return}}G(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} +h.Oc=function(a,b,c,d,e){var f=this.l;f.Sa=65536-e&65535;f.Qa=d&65535;f.F=f.F&-769|d>>8&768;f.Fa=d>>16&63;e=~~(c/f.K[0]);d=~~(e/f.Ja[0]);f.da[b.na]=e%f.Ja[0]<<8|c%f.K[0];f.wb[b.na]=f.qa[b.na]=d;f.Na|=1<=b.oc-1&&(f.V[b.na]|=1024);switch(a){case 1:f.ca|=512;f.F|=49152;break;case 2:f.ca|=2048,f.F|=49152}G(this.a,20,5,172,function(){f.V[b.na]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; +function kb(a,b,c,d,e,f){var g=~~((f+c.wa-1)/c.wa),l=new XMLHttpRequest;2048>g&&d+2048this.a.Ua(a.nc?lb(this.a,c):c,a.cache[b][e])){a.tb(2,a,b,c,d);return}c+=2;--d}b++}a.tb(0,a,b,c,d)}; +function gb(a,b,c,d,e){for(var f,g;0g){b.tb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.tb(0,b,c,d,e)}h.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.Aa=0;this.g.D=128;this.h.v=128;ib(this)}; +h.ic=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ea&65280:(a&1&&(b<<=8),f.Ea=b|255,d=0);break;case 4194298:if(0>b)d=f.Kb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Kb=d;f.j|=2}break;case 4194294:if(70!==f.La)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.La)return K(f,4);d=1;break;case 4194290:if(70!==f.La)return K(f,4);d=0;break;case 4194288:if(70!==f.La)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= +255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.La)return K(f,4);e=a-4194272>>1;0>b?d=f.Cb[e]:(d=J(this,f.Cb[e],a,b,c),0<=d&&(f.Cb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[3]=b),d=f.fa[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[1]=b),d=f.fa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ma[e]=b),d=f.Ma[e]),d;case 4194246:return a& +1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[0]=b),d=f.fa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ma[e]=b),d=f.Ma[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.aa[3][e],a,b,c);0<=d&&(f.aa[3][e]=d,f.aa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.vb,a,b,c);0<=d&&(f.vb=d);break;case 4194172:d=f.Ca;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> +b?d=this.c.Wc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.fb,a,b,c);0<=d&&(e.fb=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.gb,a,b,c);0<=d&&(e.gb=d);break;case 4194056:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194058:d=J(this,e.Y,a,b,c);0<=d&&(e.Y= +d);break;case 4194060:break;case 4194062:d=J(this,e.$b,a,b,c);0<=d&&(e.$b=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.ca&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Fa=g.Fa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&G(f,0,5,172));break;case 4193730:d=J(this,g.Sa,a,b,c);0<=d&&(g.Sa=d);break;case 4193732:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d&65534);break;case 4193734:d=J(this,g.da[e],a,b,c);0<=d&&(g.da[e]=d&7967);break;case 4193736:d= +J(this,g.ca,a,b,c);0<=d&&(g.ca=d&63|g.ca&65472,d&128&&ib(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Ra[e];break;case 4193742:d=J(this,g.Na,a,b,c);0<=d&&(g.Na=d&255);break;case 4193744:d=g.Tc[e];break;case 4193746:d=J(this,g.ac,a,b,c);0<=d&&(g.ac=d);break;case 4193748:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Uc[e];break;case 4193754:d=J(this,g.cc[e],a,b,c);0<=d&&(g.cc[e]=d);break;case 4193756:d=J(this,g.qa[e],a,b,c);0<=d&&(g.qa[e]= +d&511);break;case 4193758:g.wb[e]=g.qa[e];d=g.wb[e];break;case 4193760:d=g.Rc[e];break;case 4193762:d=g.Sc[e];break;case 4193764:d=g.Pc[e];break;case 4193766:d=g.Qc[e];break;case 4193768:d=J(this,g.Fa,a,b,c);0<=d&&(g.Fa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Lb,a,b,c);0<=d&&(g.Lb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.va=e.va&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= +J(this,e.ab,a,b,c);0<=d&&(e.ab=d&65534);break;case 4192516:d=J(this,e.M,a,b,c);0<=d&&(e.M=d);break;case 4192518:d=J(this,e.Ba,a,b,c);0<=d&&(e.Ba=d);break;case 4192520:d=J(this,e.va,a,b,c);0<=d&&(e.va=d&63,e.v=e.v&-49|(e.va&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Da:(d=J(this,f.Da,a,b,c),0<=d&&(70!==f.La&&(d&=-49),f.Da=d,f.sb[0]=d&4?15:7,f.sb[1]=d&2?15:7,f.sb[3]=d&1?15:7,f.Hb&&(e=2,f.Da&16&&(e=1),this.c.Oa=this.c.Oa&-8|e)));break;default:return f.s|= +16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.aa[0][e],a,b,c);0<=d&&(f.aa[0][e]=d,f.aa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.aa[1][e],a,b,c);0<=d&&(f.aa[1][e]=d,f.aa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.La)return K(f,4);e=a>>2&31;d=f.hb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.hb[e]=a&2?d<<16|f.hb[e]&65535:f.hb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> +b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; +var L={},I=(L[62592]=[null,null,F.prototype.Ec,F.prototype.jd,"SISDR"],L[62608]=[null,null,F.prototype.Cc,F.prototype.gd,"SDSDR"],L[62624]=[null,null,F.prototype.Dc,F.prototype.hd,"SISAR"],L[62640]=[null,null,F.prototype.Bc,F.prototype.fd,"SDSAR"],L[62656]=[null,null,F.prototype.vc,F.prototype.$c,"KISDR"],L[62672]=[null,null,F.prototype.tc,F.prototype.Yc,"KDSDR"],L[62688]=[null,null,F.prototype.uc,F.prototype.Zc,"KISAR"],L[62704]=[null,null,F.prototype.sc,F.prototype.Xc,"KDSAR"],L[65382]=[null,null, +F.prototype.wc,F.prototype.ad,"LKS"],L[65402]=[null,null,F.prototype.xc,F.prototype.bd,"MMR0"],L[65408]=[null,null,F.prototype.Ic,F.prototype.nd,"UISDR"],L[65424]=[null,null,F.prototype.Gc,F.prototype.ld,"UDSDR"],L[65440]=[null,null,F.prototype.Hc,F.prototype.md,"UISAR"],L[65456]=[null,null,F.prototype.Fc,F.prototype.kd,"UDSAR"],L[65534]=[null,null,F.prototype.yc,F.prototype.cd,"PSW"],L);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592]; +I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640];I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656]; +I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704];I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408]; +I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; +u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),sb(this,ob?tb:ub);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},O:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ha:function(a){var 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},la: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.xa=!0},I:function(a,b){return this.J(a,b)},$:function(a,b){return this.ea(a, +b)},ja:function(a,b,c){this.A||this.gc(a,b,c)},sa:function(a,b,c){this.A||this.ta(a,b,c)},H:function(a){return this.c[a]},N:function(a){return this.c[a]},W:function(a){return this.g.getUint16(a,!0)},ga:function(a){return this.l[a>>1]},ia:function(a,b){this.c[a]=b;this.xa=!0},ka:function(a,b){this.c[a]=b;this.xa=!0},ra:function(a,b){this.g.setUint16(a,b,!0);this.xa=!0},Ha:function(a,b){this.l[a>>1]=b;this.xa=!0}}; +function Na(a,b,c){a.L=b;a.h=a.u=0;c&&((a.h=c.h)&&wb(a,xb,!1),(a.u=c.u)&&yb(a,xb,!1))}function yb(a,b,c){c&&a.u||(a.yb=!a.A&&b[1]||a.B,a.od=!a.A&&b[3]||a.w);if(c||void 0===c)a.gc=b[1]||a.B,a.ta=b[3]||a.w}function wb(a,b,c){c&&a.h||(a.Ib=b[0]||a.m,a.Jc=b[2]||a.o);if(c||void 0===c)a.J=b[0]||a.m,a.ea=b[2]||a.o}function sb(a,b){b||(b=zb);wb(a,b,void 0);yb(a,b,void 0)}var zb=[],vb=[E.prototype.O,E.prototype.la,E.prototype.ha,E.prototype.Ia],xb=[E.prototype.I,E.prototype.ja,E.prototype.$,E.prototype.sa]; +if(Ja)var ub=[E.prototype.H,E.prototype.ia,E.prototype.W,E.prototype.ra],tb=[E.prototype.N,E.prototype.ka,E.prototype.ga,E.prototype.Ha];function Ab(a,b){v.call(this,"CPU",a,Ab);var c=a.multiplier||1;this.ob=a.cycles||b;this.ka=c;this.Fb=Math.round(this.ob/1E4)/100;this.ra=this.Fb*this.ka;this.i.ba=!1;this.i.dc=!1;this.i.$a=a.autoStart;this.i.Nb=!1;this.i.qb=!1;this.ib=this.sa=0;this.nb=a.csStart;this.Ia=a.csInterval;this.Va=a.csStop;this.N=[];this.Wb=this.Vc.bind(this);D(this)}x(Ab); +var Bb=["power","reset"];h=Ab.prototype;h.za=function(a,b,c,d){this.B=a;this.u=b;this.L=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} +h.Z=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.R)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.ha/a.ra&&(b=1),a.ka=b,b=a.Fb*a.ka,a.ra!=b)){a.ra=b;b=a.ra.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Jb(a,a.ea);a.ea=0;a.$=ja();a.ia=0;Kb(a)}function ab(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.ob*a.ka/1E3,a.N[b][0]=c)} +h.Vc=function(){if(this.i.ba){this.Gb>=this.ob&&Kb(this,!0);this.Xa=0;this.mb=ja();if(this.ia){var a=this.mb-this.ia;a>this.Ub&&(this.$+=a,this.$>this.mb&&(this.$=this.mb))}try{do{for(var b,c=this.i.qb?1:this.pb,d=this.N.length-1;0<=d;d--){var e=this.N[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ec(b)}catch(n){if("number"!=typeof n)throw n;}for(var f=this.ja-this.a,a=f,g=this.N.length-1;0<=g;g--){var l=this.N[g];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Xa+=f;this.ea+=f;Jb(this,0,!0);a=f;if(this.i.qb){var m= +!1;this.ib=this.ib+this.Pb()|0;this.sa-=a;0>=this.sa&&(this.sa+=this.Ia,m=!0);0<=this.Va&&this.Va<=Lb(this)&&(this.Ia=this.Va=-1,Eb(this),M(this),m=!0);m&&this.U(Lb(this)+" cycles: checksum="+k(this.ib))}this.Wa-=f;if(0>=this.Wa){this.Wa+=this.pb;15<=++this.Vb&&(this.B&&this.B.Ta(),this.Vb=0);break}}while(this.i.ba)}catch(n){M(this);Fb(this);this.B&&this.B.stop(ja(),Lb(this));b=n.stack||n.message;this.i.error=!0;this.P(b);return}if(this.i.ba){b=setTimeout;c=this.Wb;this.ia=ja();d=this.Ub;this.Xa&& +(d=Math.round(d*this.Xa/this.pb));d-=this.ia-this.mb;if(e=this.ia-this.$)this.ha=Math.round(this.ea/(10*e))/100,864E5<=e&&(this.la=0,Ib(this));if(0>d||this.had&&(this.$-=d),d=0;this.Gb+=this.Xa;this.ia+=d;b(c,d)}}};function Gb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.ba)a.U(a.toString()+" busy");else{Ib(a);a.i.ba=!0;a.i.dc=!0;a.Ha&&a.Ha.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.$,Lb(a));Fb(a,!0);setTimeout(a.Wb,0)}}h.ec=function(){return 0}; +function M(a){if(a.i.ba){a.ja-=a.a;a.a=0;Jb(a,a.ea);a.ea=0;a.i.ba=!1;a.Ha&&a.Ha.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Lb(a));Fb(a)}a.i.complete=void 0}function Fb(a,b){a.B&&a.B.Ta(b)} +function Mb(a){this.rc=a.resetAddr||0;Ab.call(this,a,6666667);this.Qb=0;this.decode=Nb.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.rc];this.Ma=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.lb=this.w=0;this.pc=[4,2,0,1];this.G=[[0,0,0,0,0,0,0,0,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]];this.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.aa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.hb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0];this.Cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Db=this.I=this.J=this.j=0;this.La=70;this.ta=-1;Ob(this);this.i.complete=this.i.jc=!1}x(Mb,Ab);h=Mb.prototype;h.reset=function(){this.i.ba&&M(this);Ob(this);Db(this);this.i.error=!1;this.parent.reset.call(this)};function Ob(a){a.Ea=255;a.s=0;a.Kb=0;a.H=0;a.Ca=0;a.vb=0;a.Da=0;a.Hb=0;a.kb=0;a.sb=262143;a.Tb=253952;a.o=[];a.j|=2;cb(a)} +function cb(a){a.Hb?(a.ga=65536,a.O=a.mc,a.W=a.Zb,a.Xb=a.pd):(a.ga=0,a.O=a.lc,a.W=a.Pa,a.Xb=a.Ua)}h.Pb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.la,this.ka]);a.set(2,Xa(this.u));return a.data()}; +h.restore=function(a){var b=a[1];this.la=b[1];Ib(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ma-=b;break}b-=a.o[f].ma}a.o.splice(f+1,0,{ma:b,Yb:c<<5&224,fc:d,Ab:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.ya()|(a.h&65535?0:4)|(a.g&32768?2:0)|O(a)} +function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ma.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ma[c];a.Ma[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.fa[c]=a.f[6],a.f[6]=a.fa[a.w]);a.j|=2;a.C=b}function P(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function Q(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Qb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function R(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} +function K(a,b){var c=!1;0>a.ta?a.ta=db(a):a.w||(b=4,c=!0);a.H&57344||(a.Ca=63222,a.vb=b);a.w=0;var d=a.W(b|a.ga),e=a.W(b+2&65535|a.ga);eb(a,e&-12289|a.ta>>2&12288);c&&(a.s|=4,a.f[6]=4);Sb(a,a.ta);Sb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ta=-1;throw b;}function Tb(a){var b=Ub(a),c=Ub(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} +function lb(a,b){var c=b>>13&31;31>c?a.Da&32&&(b=a.hb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Vb(a,b,c){var d,e,f,g=0;d=b>>13;a.Da&a.pc[a.w]||(d&=7);e=a.G[a.w][d];f=(a.X[a.w][d]<<6)+(b&8191)&a.sb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Tb&&4186112>f&&(a.s|=32,K(a,4))));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.G[a.w][d]=e;if(4194170!==f||a.w)a.kb=a.w,a.lb=d;g&&(g&57344&&(0<=a.ta&&(g|=128),a.H&57344||(a.H=a.H|g|a.kb<<5|a.lb<<1),K(a,168)),a.H&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[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.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-=8;break; +case 6:return e=Pb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Pb(a),e=e+a.f[c]&65535,e=a.W(e|a.ga)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.H&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ea||65534<=a.f[6])&&(a.f[6]<=a.Ea-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}h.lc=function(a,b,c){return Wb(this,a,b,c)};h.mc=function(a,b,c){return Vb(this,Wb(this,a,b,c),c)};h.Pa=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].Jc(a&b.h,a)}; +h.Zb=function(a){return this.Pa(Vb(this,a,2))};h.Ua=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].od(a&c.h,b&65535,a)};h.pd=function(a,b){this.Ua(Vb(this,a|65536,4),b)};function Xb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Wb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.W(d|c&a.ga),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.fa[a.C>>12&3];return c} +function Yb(a,b,c,d){a.H&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Wb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Vb(a,e|c&65536,4),a.w=a.C>>14&3,a.Ua(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.fa[a.C>>12&3]=d}function Zb(a,b){b>>=6;var c=a.J=b&7;(b=a.I=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.I=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function $b(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Wb(a,b,c,8)} +function ac(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function bc(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Db=a.O(b,e,7),c=d.call(a,c,Wa(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].yb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.O(b,e,6),a.Ua(e,d.call(a,c,a.Pa(e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.O(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].yb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Ua(a.O(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +h.ec=function(a){this.i.complete=!0;this.i.jc=!1;this.i.dc=!1;this.ja=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Kb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Yb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?K(this,a.fc):K(this,160))}else this.j&1&&this.j++;this.H&57344||(this.Ca=0,this.vb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Pb(this))}while(0>1|b<<16;R(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;R(this,a<<8);return a&255}function kc(a,b){a=b&~a;P(this,a);return a}function lc(a,b){a=b&~a;P(this,a<<8);return a}function mc(a,b){a|=b;P(this,a);return a}function nc(a,b){a|=b;P(this,a<<8);return a}function oc(a,b){a=~b|65536;Q(this,a);return a&65535} +function pc(a,b){a=~b|256;Q(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;Q(this,a,a&b&32768);return a&65535} +function vc(a,b){a=-b;Q(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;R(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;R(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;R(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;R(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Rb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Rb(this,c<<8,a<<8,b<<8);return c&255} +function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;P(this,a);return a&65535}function Ec(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} +function Fc(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} +function Gc(a){var b=bc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=$b(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} +var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=$b(this,a);a=a>>6&7;Sb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=bc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,S(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Nb(a){Sc[a>>12].call(this,a)} +var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=S(this,a),c=this.a;P(this,dc(this,a,b));this.a=c-Lc[(this.I?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=S(this,a);a=bc(this,a);Rb(this,b-a,a,b);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,S(this,a)&bc(this,a));this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),kc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b? +2:0)},function(a){U(this,a,S(this,a),mc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),ec);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Zb(this,a);P(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){var b=Zb(this,a)<<8;a=ac(this,a)<<8;Rb(this,b-a,a,b);this.a-=this.c?4+ +(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,(Zb(this,a)&ac(this,a))<<8);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),lc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),nc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),Ac);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ya()==!(this.g&32768))},function(a){V(this,a,!this.ya()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ya()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ya()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> +6&3].call(this,a)},Y,Y],Xc=[function(a){Q(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,O(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,O(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this, +a);Q(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Xb(this,a,0);Sb(this,a);P(this,a);this.a-= +11},function(a){var b=Ub(this),c=this.a;Yb(this,a,0,b);P(this,b);this.a=c-Mc[this.c]},function(a){P(this,dc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Ub(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, +Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):M(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Tb(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Ob(this),this.u.reset());this.a-=667},function(){Tb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= +5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.ya())},function(a){V(this,a,this.ya())},function(a){V(this,a,!O(this)&&!!(this.h&65535))},function(a){V(this,a,O(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, +a,!O(this))},function(a){V(this,a,O(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){Q(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? +9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,O(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,O(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ac(this,a);Q(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Db&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Db&1):3+(7==this.b? +2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Xb(this,a,65536);Sb(this,a);P(this,a);this.a-=11},function(a){var b=Ub(this),c=this.a;Yb(this,a,65536,b);P(this,b);this.a=c-Mc[this.c]},Y]; +function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}x(hd);hd.prototype.za=function(a,b,c,d){this.u=b;this.a=c;this.L=d;jd(this)};hd.prototype.pa=function(){this.l&&(this.L&&this.L.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; +hd.prototype.oa=function(){return!0}; +function id(a,b,c,d){if(d)a.P("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Eb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=l;a.l=l.symbols;if(!a.b.length){q("Empty ROM: "+b); +return}if(1==a.b.length){q(a.b[0]);return}}catch(m){a.P("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].gc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.jb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Eb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.pa=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.oa=function(a){return a?this.save():!0};h.reset=function(){od(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return od(this)};function od(a){a.J=0;a.b=0;a.c=128;a.h=[];return!0}h.Jb=function(a){if("number"==typeof a)this.h.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.N||8,c=a-this.m%a,this.N&&(b=" ".slice(0,c)));this.H&&!this.m&&c&&(b=String.fromCharCode(this.H)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.U(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;G(this.a,100,4,52,this.I)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Ac,Z.prototype.ed,"RCSR"],pd[65394]=[null,null,Z.prototype.zc,Z.prototype.dd,"RBUF"],pd[65396]=[null,null,Z.prototype.Lc,Z.prototype.rd,"XCSR"],pd[65398]=[null,null,Z.prototype.Kc,Z.prototype.qd,"XBUF"],pd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new N(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== +f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.$=!0;this.i.R=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.$a());this.J&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; function zd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),g=new M(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ma&&(c&&L(a.a),d=a.a.ma(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.P=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(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,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.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]*/, +function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ka();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.oa&&(c&&M(a.a),d=a.a.oa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.R=!1,!1===d&&(e=null)));for(var l=y(a.id),m=0;mf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],n,t=/( [a-z]+=)(['"])(.*?)\2/g;n=t.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Kd(a,b,c)}})}else c(a,null)} -function Ld(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=ga(a))}function f(a){e("Error: "+a);l&&(--Hd||wa(!0));l=!1}var g,h,l=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=m:w.appendChild(document.createTextNode(m));q.appendChild(w)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");m=function(d,h){h?Id(c,null,null,!1,e,function(d,l){l?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hd||wa(!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),--Hd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,m):Jd(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(E){f(E.message)}return l}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +function Ld(a,b,c,d){function e(a){if(void 0===l){var b=g&&C(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);m&&(--Hd||wa(!0));m=!1}var g,l,m=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=n:z.appendChild(document.createTextNode(n));t.appendChild(z)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,l){l?Id(c,null,null,!1,e,function(d,m){m?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Hd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Hd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,n):Jd(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return m}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); From 0ee3a091b49309a71a55b3ef06b3b5b9279cf289 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 7 Oct 2016 17:37:13 -0700 Subject: [PATCH 07/36] More device refactoring --- devices/pdp11/machine/1170/machine.xml | 2 +- devices/pdp11/machine/1170/test/machine.xml | 2 +- modules/pdp11/lib/bus.js | 81 +- modules/pdp11/lib/cpustate.js | 154 +- modules/pdp11/lib/debugger.js | 8 +- modules/pdp11/lib/defines.js | 39 +- modules/pdp11/lib/device.js | 1802 ++++++------------- modules/pdp11/lib/memory.js | 28 +- modules/pdp11/lib/rk11.js | 85 + versions/pdpjs/1.30.1/pdp11-dbg.js | 444 +++-- versions/pdpjs/1.30.1/pdp11.js | 302 ++-- 11 files changed, 1192 insertions(+), 1755 deletions(-) create mode 100644 modules/pdp11/lib/rk11.js diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/machine.xml index 0210592e0..a0926e60b 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/machine.xml @@ -7,7 +7,7 @@ - + diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index f4a587aee..8ceb0eef0 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -7,7 +7,7 @@ - + diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 9b3ef927a..707bcc0c9 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -116,23 +116,21 @@ function BusPDP11(parmsBus, cpu, dbg) * Memory access handlers must service the entire block; see the setAccess() function in the Memory * component for details. * + * Finally, for debugging purposes, if an I/O address has a symbolic name, it will be saved here: + * + * [4]: symbolic name of I/O address + * * UPDATE: The Debugger wants to piggy-back on these arrays to indicate addresses for which it wants * notification. In those cases, the following additional element will be set: * - * [4]: true to break on I/O, false to ignore I/O + * [5]: true to break on I/O, false to ignore I/O * * The false case is important if fIOBreakAll is set, because it allows the Debugger to selectively * ignore specific addresses. - * - * Finally, for debugging purposes, if an I/O address has a symbolic name, it will be saved here: - * - * [5]: symbolic name of I/O address */ this.aIOHandlers = []; this.fIOBreakAll = false; - - this.fnReset = null; - this.fnIOAccess = this.unknownIO; + this.afnReset = []; /* * Allocate empty Memory blocks to span the entire physical address space. @@ -151,7 +149,6 @@ BusPDP11.IOPAGE_22BIT = 0x3FE000; /*017760000*/ // eg, PDP-11/70 BusPDP11.IOPAGE_LENGTH = 0x2000; // ie, 8Kb BusPDP11.IOPAGE_MASK = BusPDP11.IOPAGE_LENGTH - 1; BusPDP11.MAX_MEMORY = BusPDP11.IOPAGE_UNIBUS - 16384; // Maximum memory address (need less memory for BSD 2.9 boot) -BusPDP11.MAX_ADDRESS = 0x400000; /*020000000*/ // Register addresses are above 22 bit addressing BusPDP11.ERROR = { RANGE_INUSE: 1, @@ -191,7 +188,7 @@ BusPDP11.IOController = { var afn = bus.aIOHandlers[off]; if (afn) { if (afn[0]) { - b = afn[0](addr); + b = afn[0](addr) & 0xff; // we mask the result of readByte() in case the caller is re-using their readWord() handler } else if (afn[2]) { if (!(addr & 0x1)) { b = afn[2](addr) & 0xff; @@ -209,13 +206,13 @@ BusPDP11.IOController = { } if (b >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[5] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage(afn[4] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); } return b; } - b = bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1); + b = bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b)); + this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } return b; }, @@ -274,13 +271,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[5] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); + this.dbg.printMessage(afn[4] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); } return; } - bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1); + bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b)); + this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } }, @@ -296,7 +293,6 @@ BusPDP11.IOController = { { var w = -1; var bus = this.controller; - Component.assert(!(addr & 1)); // unaligned addresses should be getting trapped at a higher level var afn = bus.aIOHandlers[off]; if (afn) { if (afn[2]) { @@ -307,13 +303,13 @@ BusPDP11.IOController = { } if (w >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[5] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage(afn[4] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); } return w; } - w = bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0); + w = bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w)); + this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } return w; }, @@ -330,7 +326,6 @@ BusPDP11.IOController = { { var fWrite = false; var bus = this.controller; - Component.assert(!(addr & 1)); // unaligned addresses should be getting trapped at a higher level var afn = bus.aIOHandlers[off]; if (afn) { if (afn[3]) { @@ -344,13 +339,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[5] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); + this.dbg.printMessage(afn[4] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); } return; } - bus.fnIOAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0); + bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w)); + this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } } }; @@ -364,7 +359,7 @@ BusPDP11.IOController = { */ BusPDP11.prototype.initMemory = function() { - var block = new MemoryPDP11(); + var block = new MemoryPDP11(this.cpu); block.copyBreakpoints(this.dbg); this.aMemBlocks = new Array(this.nBlockTotal); for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) { @@ -414,18 +409,19 @@ BusPDP11.prototype.getControllerAccess = function() /** * reset() * - * The Device component initializes fnReset by calling addIODefaultHandlers() from its initBus() function; - * it will be that function's responsibility to reset all the necessary devices. + * Call all registered reset() handlers. * * @this {BusPDP11} */ BusPDP11.prototype.reset = function() { - if (this.fnReset) this.fnReset(); + for (var i = 0; i < this.afnReset.length; i++) { + this.afnReset[i](); + } }; /** - * unknownIO(addr, data, byteFlag) + * unknownAccess(addr, data, byteFlag) * * This is our default I/O handler, called whenever there's an IOPAGE access without a corresponding entry * in aIOHandlers; in the interim, our Device component will override this default handler with its own function @@ -437,12 +433,12 @@ BusPDP11.prototype.reset = function() * @param {number} data (-1 if read, otherwise write) * @param {number} byteFlag (true if byte I/O, otherwise word) */ -BusPDP11.prototype.unknownIO = function(addr, data, byteFlag) +BusPDP11.prototype.unknownAccess = function(addr, data, byteFlag) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")"); + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { + this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); } - return 0; + this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); }; /** @@ -537,7 +533,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) return this.reportError(BusPDP11.ERROR.RANGE_INUSE, addrNext, sizeLeft); } - var blockNew = new MemoryPDP11(addrNext, sizeBlock, this.nBlockSize, type, controller); + var blockNew = new MemoryPDP11(this.cpu, addrNext, sizeBlock, this.nBlockSize, type, controller); blockNew.copyBreakpoints(this.dbg, block); this.aMemBlocks[iBlock++] = blockNew; @@ -675,7 +671,7 @@ BusPDP11.prototype.removeMemory = function(addr, size) var iBlock = addr >>> this.nBlockShift; while (size > 0) { var blockOld = this.aMemBlocks[iBlock]; - var blockNew = new MemoryPDP11(addr); + var blockNew = new MemoryPDP11(this.cpu, addr); blockNew.copyBreakpoints(this.dbg, blockOld); this.aMemBlocks[iBlock++] = blockNew; addr = iBlock * this.nBlockSize; @@ -761,7 +757,7 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type) this.assert(block); if (!block) break; if (type !== undefined) { - var blockNew = new MemoryPDP11(addr); + var blockNew = new MemoryPDP11(this.cpu, addr); blockNew.clone(block, type, this.dbg); block = blockNew; } @@ -1044,7 +1040,7 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, Component.warning("I/O address already registered: " + str.toHexLong(addr)); continue; } - this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, false, sName || "unknown"]; + this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", false]; if (MAXDEBUG) this.log("addIOHandlers(" + str.toHexLong(addr) + ")"); } }; @@ -1062,6 +1058,7 @@ BusPDP11.prototype.addIOTable = function(component, table) { for (var port in table) { var afn = table[port]; + if (afn[5] && afn[5] > this.cpu.model) continue; var fnReadByte = afn[0]? afn[0].bind(component) : null; var fnWriteByte = afn[1]? afn[1].bind(component) : null; var fnReadWord = afn[2]? afn[2].bind(component) : null; @@ -1071,18 +1068,14 @@ BusPDP11.prototype.addIOTable = function(component, table) }; /** - * addIODefaultHandlers(fnReset, fnIOAccess) - * - * Add default I/O notification handlers. + * addResetHandler(fnReset) * * @this {BusPDP11} * @param {function()} fnReset - * @param {function(number,number,number)} fnIOAccess */ -BusPDP11.prototype.addIODefaultHandlers = function(fnReset, fnIOAccess) +BusPDP11.prototype.addResetHandler = function(fnReset) { - this.fnReset = fnReset; - this.fnIOAccess = fnIOAccess; + this.afnReset.push(fnReset); }; /** diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index fa8f8df0f..0e465f0da 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -151,7 +151,6 @@ CPUStatePDP11.prototype.initRegs = function() this.mmuMode = 0; // current memory management mode (see PDP11.MODE.KERNEL | SUPER | UNUSED | USER) this.mmuLastPage = 0; this.mmuLastVirtual = 0; - this.mapMMR3 = [4,2,0,1]; // map from mode to MMR3 I/D bit this.mmuPDR = [ // memory management PDR registers by mode [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel 0 @@ -165,20 +164,14 @@ CPUStatePDP11.prototype.initRegs = function() [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // mode 2 (not used) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 ]; - - this.mmuMap = [ // memory management register by mode - 16 PDR (8 I then 8 D descriptors) followed by 16 PAR (I/D addresses) - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // kernel - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // super - [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], // illegal mode 2 requires illegal PDRs - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user - ]; this.unibusMap = [ // 32 unibus map registers 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; - this.controlReg = [ // various control registers we don't really care about - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + this.regsControl = [ // various control registers we don't really care about + 0, 0, 0, 0, 0, 0, 0, 0 ]; + this.regMB = 0; /* * opFlags contains various triggers that stepCPU() needs to be aware of @@ -269,7 +262,6 @@ CPUStatePDP11.prototype.getMMR0 = function() * * @this {CPUStatePDP11} * @param {number} newMMR0 - * @return {number} */ CPUStatePDP11.prototype.setMMR0 = function(newMMR0) { @@ -286,7 +278,45 @@ CPUStatePDP11.prototype.setMMR0 = function(newMMR0) this.mmuEnable = 0; } this.initMemoryAccess(); - return this.regMMR0; +}; + +/** + * getMMR1() + * + * @this {CPUStatePDP11} + * @return {number} + */ +CPUStatePDP11.prototype.getMMR1 = function() +{ + var result = this.regMMR1; + if (result & 0xff00) { + result = ((result << 8) | (result >> 8)) & 0xffff; + } + return result; +}; + +/** + * setMMR3() + * + * @this {CPUStatePDP11} + * @param {number} newMMR3 + */ +CPUStatePDP11.prototype.setMMR3 = function(newMMR3) +{ + /* + * Don't allow 11/45 to do 22 bit or use unibus map + */ + if (this.cpuType !== 70) { + newMMR3 &= ~(PDP11.MMR3.MMU_22BIT | PDP11.MMR3.UNIBUS_MAP); + } + this.regMMR3 = newMMR3; + if (this.regMMR3 & PDP11.MMR3.MMU_22BIT) { + this.mmuMask = 0x3fffff; + this.mmuMemorySize = BusPDP11.MAX_MEMORY; + } else { + this.mmuMask = 0x3ffff; + this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; + } }; /** @@ -772,6 +802,58 @@ CPUStatePDP11.prototype.setPSW = function(newPSW) this.regPSW = newPSW; }; +/** + * getSL() + * + * @this {CPUStatePDP11} + * @return {number} + */ +CPUStatePDP11.prototype.getSL = function() +{ + return this.regSL & 0xff00; +}; + +/** + * setSL(newSL) + * + * @this {CPUStatePDP11} + * @param {number} newSL + */ +CPUStatePDP11.prototype.setSL = function(newSL) +{ + this.regSL = newSL | 0xff; +}; + +/** + * getPIR() + * + * @this {CPUStatePDP11} + * @return {number} + */ +CPUStatePDP11.prototype.getPIR = function() +{ + return this.regPIR; +}; + +/** + * setPIR(newPIR) + * + * @this {CPUStatePDP11} + * @param {number} newPIR + */ +CPUStatePDP11.prototype.setPIR = function(newPIR) +{ + newPIR &= 0xfe00; + if (newPIR) { + var i = newPIR >> 9; + do { + newPIR += 0x22; + } while (i >>= 1); + } + this.regPIR = newPIR; + this.opFlags |= PDP11.OPFLAG.INTQ; +}; + /** * updateNZVFlags(result) * @@ -926,6 +1008,19 @@ CPUStatePDP11.prototype.updateSubFlags = function(result, src, dst) } }; +/** + * fault(addr) + * + * Memory interface for signaling alignment errors. + * + * @this {CPUStatePDP11} + * @param {number} addr + */ +CPUStatePDP11.prototype.fault = function(addr) +{ + this.trap(PDP11.TRAP.BUS_ERROR, addr); +}; + /** * panic(reason) * @@ -992,7 +1087,7 @@ CPUStatePDP11.prototype.trap = function(vector, reason) if (DEBUG && this.dbg) { if (this.messageEnabled(MessagesPDP11.TRAP)) { - this.printMessage("trap to vector " + this.dbg.toStrBase(vector, 0, true) + (reason? " (reason " + reason + ")" : ""), MessagesPDP11.TRAP, true); + this.printMessage("trap to vector " + this.dbg.toStrBase(vector, 0, true) + (reason? " (" + this.dbg.toStrBase(reason) + ")" : ""), MessagesPDP11.TRAP, true); } } @@ -1057,7 +1152,7 @@ CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) * the operation access mask (accessFlags). If there is no match then the virtual * address is simply mapped as a 16 bit physical address with the upper page going * to the IO address space. Significant access mask values used are PDP11.ACCESS.READ - * and PDP11.ACCESS.WRITE + * and PDP11.ACCESS.WRITE. * * As an aside it turns out that it is the memory management unit that does odd address * and non-existent memory trapping: who knew? :-) I thought these would have been @@ -1106,11 +1201,6 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask; if (physicalAddress < this.mmuMemorySize) { - /* - * I'm leaving this code here, per Paul's comments above, but it does surprisingly redundant - * to have to perform this check here AND at the physical level (see readWordFromPhysical() and - * writeWordToPhysical()). - */ if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { this.regErr |= PDP11.CPUERR.ODDADDR; this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); @@ -1465,10 +1555,6 @@ CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, accessFlags) */ CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) { - if (physicalAddress & 0x1) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } return this.bus.getWord(physicalAddress); }; @@ -1483,7 +1569,7 @@ CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) */ CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) { - return this.readWordFromPhysical(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD)); + return this.bus.getWord(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.READ_WORD)); }; /** @@ -1497,10 +1583,6 @@ CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) */ CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) { - if (physicalAddress & 0x1) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } this.bus.setWord(physicalAddress, data & 0xffff); }; @@ -1515,7 +1597,7 @@ CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) */ CPUStatePDP11.prototype.writeWordToVirtual = function(virtualAddress, data) { - this.writeWordToPhysical(this.mapVirtualToPhysical(virtualAddress | PDP11.ACCESS.DSPACE, PDP11.ACCESS.WRITE_WORD), data); + this.bus.setWord(this.mapVirtualToPhysical(virtualAddress, PDP11.ACCESS.WRITE_WORD), data); }; /** @@ -1575,14 +1657,14 @@ CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, accessFlags, dat if (!(accessFlags & PDP11.ACCESS.DSPACE)) addr &= 0xffff; /* * TODO: Consider replacing the following code with writeWordToAddr(), by adding optional mmuMode - * parameters for each of the discrete mapVirtualToPhysical() and writeWordToPhysical() operations, - * because as it stands, this is the only remaining call to mapVirtualToPhysical() outside of our + * parameters for each of the discrete mapVirtualToPhysical() and bus.setWord() operations, because + * as it stands, this is the only remaining call to mapVirtualToPhysical() outside of our * initMemoryAccess() handlers. */ this.mmuMode = (this.regPSW >> 12) & 3; addr = this.mapVirtualToPhysical(addr | (accessFlags & PDP11.ACCESS.DSPACE), PDP11.ACCESS.WRITE); this.mmuMode = (this.regPSW >> 14) & 3; - this.writeWordToPhysical(addr, data); + this.bus.setWord(addr, data); } }; @@ -1623,7 +1705,7 @@ CPUStatePDP11.prototype.readSrcWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.readWordFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.bus.getWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1677,7 +1759,7 @@ CPUStatePDP11.prototype.readDstWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.readWordFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.bus.getWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1722,7 +1804,7 @@ CPUStatePDP11.prototype.updateDstWord = function(opCode, src, fnOp) this.regsGen[reg] = fnOp.call(this, src, this.regsGen[reg]); } else { var addr = this.getAddrByMode(mode, reg, PDP11.ACCESS.UPDATE_WORD); - this.writeWordToPhysical(addr, fnOp.call(this, src, this.readWordFromPhysical(addr))); + this.bus.setWord(addr, fnOp.call(this, src, this.bus.getWord(addr))); } }; @@ -1772,7 +1854,7 @@ CPUStatePDP11.prototype.writeDstWord = function(opCode, data) if (!mode) { this.regsGen[reg] = data & 0xffff; } else { - this.writeWordToPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_WORD), data); + this.bus.setWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_WORD), data); } return data; }; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 05d98af18..8cbd7edde 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -589,7 +589,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). */ b = this.bus.getByteDirect(addr); this.nDisableMessages--; @@ -613,7 +613,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). * * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are @@ -640,7 +640,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). */ this.bus.setByteDirect(addr, b); this.nDisableMessages--; @@ -663,7 +663,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.nDisableMessages++; /* - * TODO: We also need a Bus interface to disable fnIOAccess() calls that could trigger a trap(). + * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). * * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 147c603c0..a29d9ae67 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -455,11 +455,40 @@ var PDP11 = { UDSAR6: 0o177674, // User D Space Address Register 6 UDSAR7: 0o177676, // User D Space Address Register 7 - SIZE_LO: 0o177760, // Lower Size Register (last 32-word block) (11/70 only?) - SIZE_HI: 0o177762, // Upper Size Register (always zero) (11/70 only?) - SYSID: 0o177764, // System ID Register (11/70 only?) - CPUERR: 0o177766, // CPU error (11/70 only?) - MB: 0o177770, // Microprogram break (11/70 only?) + R0SET0: 0o177700, + R1SET0: 0o177701, + R2SET0: 0o177702, + R3SET0: 0o177703, + R4SET0: 0o177704, + R5SET0: 0o177705, + R6KERNEL: 0o177706, + R7KERNEL: 0o177707, + R0SET1: 0o177710, + R1SET1: 0o177711, + R2SET1: 0o177712, + R3SET1: 0o177713, + R4SET1: 0o177714, + R5SET1: 0o177715, + R6SUPER: 0o177716, + R6USER: 0o177717, + + /* + * This next group of registers is largely ignored; all accesses are routed to regsControl[] + */ + LAERR: 0o177740, // Low Address Error (11/70 only) + HAERR: 0o177742, // High Address Error (11/70 only) + MEMERR: 0o177744, // Memory System Error (11/70 only) + CACHEC: 0o177746, // Cache Control (11/70 only) + MAINT: 0o177750, // Maintenance (11/70 only) + HITMISS: 0o177752, // Hit/Miss (11/70 only) + UNDEF1: 0o177754, + UNDEF2: 0o177756, + + LSIZE: 0o177760, // Lower Size Register (last 32-word block) (11/70 only) + HSIZE: 0o177762, // Upper Size Register (always zero) (11/70 only) + SYSID: 0o177764, // System ID Register (11/70 only) + CPUERR: 0o177766, // CPU error (11/70 only) + MB: 0o177770, // Microprogram break PIR: 0o177772, // Program Interrupt Request SL: 0o177774, // Stack Limit Register PSW: 0o177776 // 777776 17777776 0x3FFFFE Processor Status Word diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index ac1d91c11..015d87043 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -42,13 +42,12 @@ if (NODE) { /** * DevicePDP11(parmsDevice) * - * The DevicePDP11 component supports the following (parmsDevice) properties: + * The Device component implements the following "default" devices: * - * name: the name of the device to be supported (eg, "unibus" for generic UNIBUS support) - * - * TODO: This is currently a "catch-all" device; ideally, each of the assorted devices emulated here - * (eg, DL11, KW11, RK11, RL11, etc) would be a separate component. But because we're in the middle of - * porting all this code from a common module (iopage.js), that's the way it is. + * KW11 + * DISPLAY Registers + * MMU Registers + * CPU Registers (eg, PSW) * * @constructor * @extends Component @@ -57,114 +56,55 @@ if (NODE) { function DevicePDP11(parmsDevice) { Component.call(this, "Device", parmsDevice, DevicePDP11); - this.sDeviceName = parmsDevice['name']; this.display = { - data: 0, - address: 0, - misc: 0x14, - switches: 0 + data: 0, + address: 0, + misc: 0x14, + switches: 0 }; this.kw11 = { - csr: 0, - timer: -1 // initBus() will initialize this timer ID - }; - - this.rk11 = { - rkds: 0x9C0, /*04700*/ // 017777400 Drive Status - rker: 0, // 017777402 Error Register - rkcs: 0x80, /*0200*/ // 017777404 Control Status - rkwc: 0, // 017777406 Word Count - rkba: 0, // 017777410 Bus Address - rkda: 0, // 017777412 Disk Address - rkdb: 0, // 017777416 Data Buffer - meta: [], - TRACKS: [406, 406, 406, 406], - SECTORS: [12, 12, 12, 12] - }; - - this.rl11 = { - csr: 0x81, // 017774400 Control status register - bar: 0, // 017774402 Bus address - dar: 0, // 017774404 Disk address - mpr: 0, // 017774406 Multi purpose - bae: 0, // 017774410 Bus address extension - DAR: 0, // internal disk address - meta: [], // sector cache - SECTORS: [40, 40, 40, 40], // sectors per track - TRACKS: [1024, 1024, 512, 512], // First two drives RL02 - last two RL01 - cylinders * 2 - STATUS: [0x9D /*0235*/, 0x9D /*0235*/, 0x1D /*035*/, 0x1D /*035*/] // First two drives RL02 - last two RL01 - }; - - this.rp11 = { - DTYPE: [0x2012 /*020022*/, 0x2010 /*020020*/, 0x2012 /*020022*/, 0x2022 /*020042*/], // Drive type rp04, rp06, rp07 - SECTORS: [22, 22, 22, 50], // sectors per track - SURFACES: [19, 19, 19, 32], // - CYLINDERS: [815, 411, 815, 630], - meta: [], //meta data for drive - rpcs1: 0x880, // Massbus 00 - actual register is a mix of controller and drive bits :-( - rpwc: 0, - rpba: 0, - rpda: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 05 - rpcs2: 0, - rpds: [0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0], // Massbus 01 Read only - rper1: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 02 - rpas: 0, // Massbus 04??? - rpla: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 07 Read only - rpdb: 0, - rpmr: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 03 - rpdt: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 06 Read only - rpsn: [1, 2, 3, 4, 5, 6, 7, 8], // Massbus 10 Read only - rpof: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 11 - rpdc: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 12 - rpcc: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 13 Read only - rper2: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 14 - rper3: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 15 - rpec1: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 16 Read only - rpec2: [0, 0, 0, 0, 0, 0, 0, 0], // Massbus 17 Read only - rpbae: 0, - rpcs3: 0 + csr: 0, + timer: -1 // initBus() will initialize this timer ID }; } Component.subclass(DevicePDP11); -DevicePDP11.UNIBUS_NAME = "unibus"; - DevicePDP11.M9312 = [ - 0x101F, /*0010037*/ 0x1C0, /*0000700*/ 0x105F, /*0010137*/ 0x1C2, /*0000702*/ 0x111F, /*0010437*/ 0x1C4, /*0000704*/ 0xA1F, /*0005037*/ 0x1C6, /*0000706*/ - 0x55DF, /*0052737*/ 0x8000, /*0100000*/ 0xFFFE, /*0177776*/ 0x35DF, /*0032737*/ 0x4000, /*0040000*/ 0xFFFE, /*0177776*/ 0x302, /*0001402*/ 0xA9F, /*0005237*/ - 0x1C6, /*0000706*/ 0xA1F, /*0005037*/ 0xFFFE, /*0177776*/ 0x101, /*0000401*/ 0x0, /*0000000*/ 0xA06, /*0005006*/ 0x8104, /*0100404*/ 0x8503, /*0102403*/ - 0x8202, /*0101002*/ 0x501, /*0002401*/ 0x8301, /*0101401*/ 0x0, /*0000000*/ 0xAC6, /*0005306*/ 0x8003, /*0100003*/ 0x302, /*0001402*/ 0x401, /*0002001*/ - 0x701, /*0003401*/ 0x0, /*0000000*/ 0xC06, /*0006006*/ 0x8402, /*0102002*/ 0x8601, /*0103001*/ 0x201, /*0001001*/ 0x0, /*0000000*/ 0x15C6, /*0012706*/ + 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*/ - 0x501, /*0002401*/ 0x301, /*0001401*/ 0x0, /*0000000*/ 0xC42, /*0006102*/ 0x8601, /*0103001*/ 0x501, /*0002401*/ 0x0, /*0000000*/ 0x6083, /*0060203*/ - 0xA83, /*0005203*/ 0xA43, /*0005103*/ 0x60C1, /*0060301*/ 0x8701, /*0103401*/ 0x701, /*0003401*/ 0x0, /*0000000*/ 0xC04, /*0006004*/ 0x5103, /*0050403*/ - 0x6143, /*0060503*/ 0xA83, /*0005203*/ 0x8702, /*0103402*/ 0xAC1, /*0005301*/ 0x501, /*0002401*/ 0x0, /*0000000*/ 0xA40, /*0005100*/ 0x8301, /*0101401*/ - 0x0, /*0000000*/ 0x4001, /*0040001*/ 0x6041, /*0060101*/ 0x601, /*0003001*/ 0x701, /*0003401*/ 0x0, /*0000000*/ 0xC1, /*0000301*/ 0x2057, /*0020127*/ - 0x5455, /*0052125*/ 0x204, /*0001004*/ 0x3105, /*0030405*/ 0x602, /*0003002*/ 0xA45, /*0005105*/ 0x201, /*0001001*/ 0x0, /*0000000*/ 0x95C0, /*0112700*/ - 0xFF01, /*0177401*/ 0x8001, /*0100001*/ 0x0, /*0000000*/ 0x7E02, /*0077002*/ 0xA01, /*0005001*/ 0xA81, /*0005201*/ 0x7E02, /*0077002*/ 0xBC0, /*0005700*/ - 0x202, /*0001002*/ 0xBC1, /*0005701*/ 0x301, /*0001401*/ 0x0, /*0000000*/ 0x15C6, /*0012706*/ 0x1FE, /*0000776*/ 0x9F7, /*0004767*/ 0x2, /*0000002*/ - 0x0, /*0000000*/ 0x25CE, /*0022716*/ 0xD0, /*0000320*/ 0x301, /*0001401*/ 0x0, /*0000000*/ 0x15CE, /*0012716*/ 0xE2, /*0000342*/ 0x87, /*0000207*/ - 0x0, /*0000000*/ 0xA26, /*0005046*/ 0x15E6, /*0012746*/ 0xEC, /*0000354*/ 0x2, /*0000002*/ 0x0, /*0000000*/ 0x5F, /*0000137*/ 0xF2, /*0000362*/ - 0x80, /*0000200*/ 0x15C5, /*0012705*/ 0xE000, /*0160000*/ 0xA1F, /*0005037*/ 0x6, /*0000006*/ 0x15DF, /*0012737*/ 0x100, /*0000400*/ 0x4, /*0000004*/ - 0x15C6, /*0012706*/ 0x1FE, /*0000776*/ 0xBE5, /*0005745*/ 0x15DF, /*0012737*/ 0x1CC, /*0000714*/ 0x4C, /*0000114*/ 0xA1F, /*0005037*/ 0x4E, /*0000116*/ - 0x15C3, /*0012703*/ 0xFFE6, /*0177746*/ 0x15CB, /*0012713*/ 0xC, /*0000014*/ 0x15C2, /*0012702*/ 0x200, /*0001000*/ 0x1080, /*0010200*/ 0x1008, /*0010010*/ - 0xBD0, /*0005720*/ 0x2005, /*0020005*/ 0x83FC, /*0101774*/ 0x1080, /*0010200*/ 0x1201, /*0011001*/ 0x2001, /*0020001*/ 0x301, /*0001401*/ 0x0, /*0000000*/ - 0xA50, /*0005120*/ 0x2005, /*0020005*/ 0x83F9, /*0101771*/ 0x1801, /*0014001*/ 0xA41, /*0005101*/ 0x2001, /*0020001*/ 0x301, /*0001401*/ 0x0, /*0000000*/ - 0x2002, /*0020002*/ 0x2F9, /*0001371*/ 0xA0E, /*0005016*/ 0x15C4, /*0012704*/ 0xAAAA, /*0125252*/ 0x15CB, /*0012713*/ 0x18, /*0000030*/ 0x15C0, /*0012700*/ - 0x800, /*0004000*/ 0x15C2, /*0012702*/ 0x200, /*0001000*/ 0xA44, /*0005104*/ 0x1108, /*0010410*/ 0xA48, /*0005110*/ 0xA48, /*0005110*/ 0x2204, /*0021004*/ - 0x301, /*0001401*/ 0x0, /*0000000*/ 0xC1F, /*0006037*/ 0xFFEA, /*0177752*/ 0x8702, /*0103402*/ 0x0, /*0000000*/ 0x131, /*0000461*/ 0x8A4E, /*0105116*/ - 0x2F2, /*0001362*/ 0x102, /*0000402*/ 0x77, /*0000167*/ 0xFE88, /*0177210*/ 0xBD0, /*0005720*/ 0x7E93, /*0077223*/ 0x15CB, /*0012713*/ 0x24, /*0000044*/ - 0x15C0, /*0012700*/ 0xC00, /*0006000*/ 0x8A76, /*0105166*/ 0x1, /*0000001*/ 0x2E4, /*0001344*/ 0x15C2, /*0012702*/ 0x200, /*0001000*/ 0x1080, /*0010200*/ - 0x1008, /*0010010*/ 0xBD0, /*0005720*/ 0x2005, /*0020005*/ 0x83FC, /*0101774*/ 0x15C1, /*0012701*/ 0x3, /*0000003*/ 0xA0E, /*0005016*/ 0xBDF, /*0005737*/ - 0x1C6, /*0000706*/ 0x210, /*0001020*/ 0x15CE, /*0012716*/ 0x18, /*0000030*/ 0x1080, /*0010200*/ 0xA48, /*0005110*/ 0xA48, /*0005110*/ 0x2008, /*0020010*/ - 0x301, /*0001401*/ 0x0, /*0000000*/ 0xBD0, /*0005720*/ 0xC1F, /*0006037*/ 0xFFEA, /*0177752*/ 0x8702, /*0103402*/ 0x0, /*0000000*/ 0x108, /*0000410*/ - 0x2005, /*0020005*/ 0x83F3, /*0101763*/ 0x138B, /*0011613*/ 0xA0E, /*0005016*/ 0x7E51, /*0077121*/ 0x104, /*0000404*/ 0x0, /*0000000*/ 0x102, /*0000402*/ - 0x15CB, /*0012713*/ 0xC, /*0000014*/ 0x17C0, /*0013700*/ 0x1C0, /*0000700*/ 0x17C1, /*0013701*/ 0x1C2, /*0000702*/ 0x17C4, /*0013704*/ 0x1C4, /*0000704*/ - 0x74, /*0000164*/ 0x2, /*0000002*/ 0x17C4, /*0013704*/ 0xFF78, /*0177570*/ 0x45C4, /*0042704*/ 0xFE00, /*0177000*/ 0x55C4, /*0052704*/ 0xF600, /*0173000*/ - 0x97C0, /*0113700*/ 0xFF79, /*0177571*/ 0xC80, /*0006200*/ 0xA1, /*0000241*/ 0x4C, /*0000114*/ 0x0, /*0000000*/ 0x4230, /*0041060*/ 0x2A2D /*0025055*/ + 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*/ ]; /** @@ -187,13 +127,9 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) device.kw11_interrupt(); }); - switch(this.sDeviceName) { - case DevicePDP11.UNIBUS_NAME: - default: - bus.addIOTable(this, DevicePDP11.UNIBUS_IOTABLE); - bus.addIODefaultHandlers(this.reset.bind(this), this.access.bind(this)); - break; - } + bus.addIOTable(this, DevicePDP11.UNIBUS_IOTABLE); + bus.addResetHandler(this.reset.bind(this)); + this.setReady(); }; @@ -247,16 +183,84 @@ DevicePDP11.prototype.readMMR0 = function(addr) * @param {number} addr (eg, PDP11.UNIBUS.MMR0 or 177572) */ DevicePDP11.prototype.writeMMR0 = function(data, addr) +{ + this.cpu.setMMR0(data); + this.updateDisplayMode(); +}; + +/** + * readMMR1(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.MMR1 or 177574) + * @return {number} + */ +DevicePDP11.prototype.readMMR1 = function(addr) +{ + return this.cpu.getMMR1(); +}; + +/** + * readMMR2(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.MMR2 or 177576) + * @return {number} + */ +DevicePDP11.prototype.readMMR2 = function(addr) +{ + return this.cpu.regMMR2; +}; + +/** + * writeMMR2(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.MMR2 or 177576) + */ +DevicePDP11.prototype.writeMMR2 = function(data, addr) +{ + this.cpu.regMMR2 = data; +}; + +/** + * readMMR3(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.MMR3 or 172516) + * @return {number} + */ +DevicePDP11.prototype.readMMR3 = function(addr) +{ + return this.cpu.regMMR3; +}; + +/** + * writeMMR3(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.MMR3 or 172516) + */ +DevicePDP11.prototype.writeMMR3 = function(data, addr) +{ + this.cpu.setMMR3(data); + this.updateDisplayMode(); +}; + +/** + * updateDisplayMode() + * + * @this {DevicePDP11} + */ +DevicePDP11.prototype.updateDisplayMode = function() { /* - * Set idx to 1 (22-bit), 2 (18-bit), or 4 (16-bit) + * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) */ - var idx = 4; - data = this.cpu.setMMR0(data); - if (data & PDP11.MMR0.ENABLED | PDP11.MMR0.DSTMODE) { - idx = (this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2; - } - this.display.misc = (this.display.misc & ~7) | idx; + var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; + this.display.misc = (this.display.misc & ~7) | bit; }; /** @@ -580,6 +584,377 @@ DevicePDP11.prototype.writeUDSAR = function(data, addr) this.cpu.mmuPDR[3][reg] &= 0xff0f; }; +/** + * readRSET0(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R0SET0--R5SET0 or 177700--177705) + * @return {number} + */ +DevicePDP11.prototype.readRSET0 = function(addr) +{ + var data; + var reg = addr & 7; + if (this.cpu.regPSW & PDP11.PSW.REGSET) { + data = this.cpu.regsAlt[reg]; + } else { + data = this.cpu.regsGen[reg]; + } + return data; +}; + +/** + * writeRSET0(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R0SET0--R5SET0 or 177700--177705) + */ +DevicePDP11.prototype.writeRSET0 = function(data, addr) +{ + var reg = addr & 7; + if (this.cpu.regPSW & PDP11.PSW.REGSET) { + this.cpu.regsAlt[reg] = data; + } else { + this.cpu.regsGen[reg] = data; + } +}; + +/** + * readR6KERNEL(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R6KERNEL or 177706) + * @return {number} + */ +DevicePDP11.prototype.readR6KERNEL = function(addr) +{ + var data; + if (!(this.cpu.regPSW & PDP11.PSW.CMODE)) { // Kernel Mode + data = this.cpu.regsGen[6]; + } else { + data = this.cpu.regsAltStack[0]; + } + return data; +}; + +/** + * writeR6KERNEL(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R6KERNEL or 177706) + */ +DevicePDP11.prototype.writeR6KERNEL = function(data, addr) +{ + if (!(this.cpu.regPSW & PDP11.PSW.CMODE)) { // Kernel Mode + this.cpu.regsGen[6] = data; + } else { + this.cpu.regsAltStack[0] = data; + } +}; + +/** + * readR7KERNEL(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R7KERNEL or 177707) + * @return {number} + */ +DevicePDP11.prototype.readR7KERNEL = function(addr) +{ + return this.cpu.regsGen[7]; +}; + +/** + * writeR7KERNEL(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R7KERNEL or 177707) + */ +DevicePDP11.prototype.writeR7KERNEL = function(data, addr) +{ + this.cpu.regsGen[7] = data; +}; + +/** + * readRSET1(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R0SET1--R5SET1 or 177710--177715) + * @return {number} + */ +DevicePDP11.prototype.readRSET1 = function(addr) +{ + var data; + var reg = addr & 7; + if (this.cpu.regPSW & PDP11.PSW.REGSET) { + data = this.cpu.regsGen[reg]; + } else { + data = this.cpu.regsAlt[reg]; + } + return data; +}; + +/** + * writeRSET1(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R0SET1--R5SET1 or 177710--177715) + */ +DevicePDP11.prototype.writeRSET1 = function(data, addr) +{ + var reg = addr & 7; + if (this.cpu.regPSW & PDP11.PSW.REGSET) { + this.cpu.regsGen[reg] = data; + } else { + this.cpu.regsAlt[reg] = data; + } +}; + +/** + * readR6SUPER(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R6SUPER or 177716) + * @return {number} + */ +DevicePDP11.prototype.readR6SUPER = function(addr) +{ + var data; + if (((this.cpu.regPSW & PDP11.PSW.CMODE) >> PDP11.PSW.SHIFT.CMODE) == PDP11.MODE.SUPER) { + data = this.cpu.regsGen[6]; + } else { + data = this.cpu.regsAltStack[1]; + } + return data; +}; + +/** + * writeR6SUPER(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R6SUPER or 177716) + */ +DevicePDP11.prototype.writeR6SUPER = function(data, addr) +{ + if (((this.cpu.regPSW & PDP11.PSW.CMODE) >> PDP11.PSW.SHIFT.CMODE) == PDP11.MODE.SUPER) { + this.cpu.regsGen[6] = data; + } else { + this.cpu.regsAltStack[1] = data; + } +}; + +/** + * readR6USER(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.R6USER or 177717) + * @return {number} + */ +DevicePDP11.prototype.readR6USER = function(addr) +{ + var data; + if (((this.cpu.regPSW & PDP11.PSW.CMODE) >> PDP11.PSW.SHIFT.CMODE) == PDP11.MODE.USER) { + data = this.cpu.regsGen[6]; + } else { + data = this.cpu.regsAltStack[3]; + } + return data; +}; + +/** + * writeR6USER(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.R6USER or 177717) + */ +DevicePDP11.prototype.writeR6USER = function(data, addr) +{ + if (((this.cpu.regPSW & PDP11.PSW.CMODE) >> PDP11.PSW.SHIFT.CMODE) == PDP11.MODE.USER) { + this.cpu.regsGen[6] = data; + } else { + this.cpu.regsAltStack[3] = data; + } +}; + +/** + * readCTRL(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.LAERR--UNDEF2 or 177740--177756) + * @return {number} + */ +DevicePDP11.prototype.readCTRL = function(addr) +{ + var reg = (addr - PDP11.UNIBUS.LAERR) >> 1; + return this.cpu.regsControl[reg]; +}; + +/** + * writeCTRL(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.LAERR--UNDEF2 or 177740--177756) + */ +DevicePDP11.prototype.writeCTRL = function(data, addr) +{ + var reg = (addr - PDP11.UNIBUS.LAERR) >> 1; + this.cpu.regsControl[reg] = data; +}; + +/** + * readSIZE(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.LSIZE--HSIZE or 177760--177762) + * @return {number} + */ +DevicePDP11.prototype.readSIZE = function(addr) +{ + return addr == PDP11.UNIBUS.LSIZE? ((BusPDP11.MAX_MEMORY >> 6) - 1) : 0; +}; + +/** + * writeSIZE(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.LSIZE--HSIZE or 177760--177762) + */ +DevicePDP11.prototype.writeSIZE = function(data, addr) +{ +}; + +/** + * readSYSID(addr) + * + * TODO: For SYSID, we currently ignore writes and return 1 on reads + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SYSID or 177764) + * @return {number} + */ +DevicePDP11.prototype.readSYSID = function(addr) +{ + return 1; +}; + +/** + * writeSYSID(data, addr) + * + * TODO: For SYSID, we currently ignore writes and return 1 on reads + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SYSID or 177764) + */ +DevicePDP11.prototype.writeSYSID = function(data, addr) +{ +}; + +/** + * readCPUERR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.CPUERR or 177766) + * @return {number} + */ +DevicePDP11.prototype.readCPUERR = function(addr) +{ + return this.cpu.regErr; +}; + +/** + * writeCPUERR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.CPUERR or 177766) + */ +DevicePDP11.prototype.writeCPUERR = function(data, addr) +{ + this.cpu.regErr = 0; // TODO: Confirm that writes always zero the register +}; + +/** + * readMB(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.MB or 177770) + * @return {number} + */ +DevicePDP11.prototype.readMB = function(addr) +{ + return this.cpu.regMB; +}; + +/** + * writeMB(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.MB or 177770) + */ +DevicePDP11.prototype.writeMB = function(data, addr) +{ + if (!(addr & 0x1)) data &= 0xff; // Required for KB11-CM without MFPT instruction + this.cpu.regMB = data; +}; + +/** + * readPIR(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.PIR or 177772) + * @return {number} + */ +DevicePDP11.prototype.readPIR = function(addr) +{ + return this.cpu.getPIR(); +}; + +/** + * writePIR(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.PIR or 177772) + */ +DevicePDP11.prototype.writePIR = function(data, addr) +{ + this.cpu.setPIR(data); +}; + +/** + * readSL(addr) + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.SL or 177774) + * @return {number} + */ +DevicePDP11.prototype.readSL = function(addr) +{ + return this.cpu.getSL(); +}; + +/** + * writeSL(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.SL or 177774) + */ +DevicePDP11.prototype.writeSL = function(data, addr) +{ + this.cpu.setSL(data); +}; + /** * readPSW(addr) * @@ -606,381 +981,6 @@ DevicePDP11.prototype.writePSW = function(data, addr) this.cpu.opFlags |= PDP11.OPFLAG.NO_FLAGS; }; -/** - * rk11_go() - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.rk11_go = function() -{ - var rk11 = this.rk11; - var sector, address, count; - var drive = (rk11.rkda >> 13) & 7; - if (typeof rk11.meta[drive] === "undefined") { - rk11.meta[drive] = { - "cache": [], - "postProcess": this.rk11_end, - "drive": drive, - "blocksize": 256, - "mapped": 0, - "maxblock": rk11.TRACKS[drive] * rk11.SECTORS[drive], - "url": "rk" + drive + ".dsk" - }; - } - rk11.rkcs &= ~0x80; // turn off done bit - switch ((rk11.rkcs >> 1) & 7) { // function code - case 0: // controller reset - rk11.rkds = 0x9C0; /*04700*/ // Set bits 6, 7, 8, 11 - rk11.rker = 0; // - rk11.rkcs = 0x80; /*0200*/ - rk11.rkda = 0; - break; - case 1: // write - if (((rk11.rkda >> 4) & 0x1ff) >= rk11.TRACKS[drive]) { - rk11.rker |= 0x8040; // NXC - rk11.rkcs |= 0xc000; // err - break; - } - if ((rk11.rkda & 0xf) >= rk11.SECTORS[drive]) { - rk11.rker |= 0x8020; // NXS - rk11.rkcs |= 0xc000; // err - break; - } - sector = (((rk11.rkda >> 4) & 0x1ff) * rk11.SECTORS[drive] + (rk11.rkda & 0xf)); - address = (((rk11.rkcs & 0x30)) << 12) | rk11.rkba; - count = (0x10000 - rk11.rkwc) & 0xffff; - this.writeData(rk11.meta[drive], sector, address, count); - return; - case 2: // read - if (((rk11.rkda >> 4) & 0x1ff) >= rk11.TRACKS[drive]) { - rk11.rker |= 0x8040; // NXC - rk11.rkcs |= 0xc000; // err - break; - } - if ((rk11.rkda & 0xf) >= rk11.SECTORS[drive]) { - rk11.rker |= 0x8020; // NXS - rk11.rkcs |= 0xc000; // err - break; - } - sector = (((rk11.rkda >> 4) & 0x1ff) * rk11.SECTORS[drive] + (rk11.rkda & 0xf)); - address = (((rk11.rkcs & 0x30)) << 12) | rk11.rkba; - count = (0x10000 - rk11.rkwc) & 0xffff; - this.readData(rk11.meta[drive], sector, address, count); - return; - case 3: // Write Check - break; - case 4: // Seek - complete immediately - break; - default: - break; - } - rk11.rkds = (drive << 13) | (rk11.rkds & 0x1ff0) | ((rk11.rkda % 9) & 0xf); - this.cpu.interrupt(20, 5, 0x90, /*0220*/ function() { - rk11.rkcs = (rk11.rkcs & 0xfffe) | 0x80; // turn off go & set done - return !!(rk11.rkcs & 0x40); - }); -}; - -/** - * rk11_end(err, meta, block, address, count) - * - * @this {DevicePDP11} - * @param {number} err - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.rk11_end = function(err, meta, block, address, count) -{ - var rk11 = this.rk11; - rk11.rkba = address & 0xffff; - rk11.rkcs = (rk11.rkcs & ~0x30) | ((address >> 12) & 0x30); - rk11.rkwc = (0x10000 - count) & 0xffff; - switch (err) { - case 1: // read error - rk11.rker |= 0x8100; // Report TE (Timing error) - rk11.rkcs |= 0xc000; // err - break; - case 2: // NXM - rk11.rker |= 0x8400; // NXM - rk11.rkcs |= 0xc000; // err - break; - } - this.cpu.interrupt(20, 5, 0x90, /*0220*/ function() { - rk11.rkcs = (rk11.rkcs & 0xfffe) | 0x80; // turn off go & set done - return !!(rk11.rkcs & 0x40); - }); -}; - -/** - * rl11_go() - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.rl11_go = function() -{ - var rl11 = this.rl11; - var sector, address, count; - var drive = (rl11.csr >> 8) & 3; - rl11.csr &= ~0x1; // ready bit (0!) - if (typeof rl11.meta[drive] === "undefined") { - rl11.meta[drive] = { - "cache": [], - "postProcess": this.rl11_end, - "drive": drive, - "blocksize": 128, - "mapped": 1, - "maxblock": rl11.TRACKS[drive] * rl11.SECTORS[drive], - "url": "rl" + drive + ".dsk" - }; - } - switch ((rl11.csr >> 1) & 7) { // function code - case 0: // no op - break; - case 1: // write check - break; - case 2: // get status - if (rl11.mpr & 8) rl11.csr &= 0x3f; - rl11.mpr = rl11.STATUS[drive] | (rl11.DAR & 0x40) /*0100*/; // bit 6 Head Select bit 7 Drive Type 1=rl02 - break; - case 3: // seek - if ((rl11.dar & 3) == 1) { - if (rl11.dar & 4) { - rl11.DAR = ((rl11.DAR + (rl11.dar & 0xff80)) & 0xff80) | ((rl11.dar << 2) & 0x40); - } else { - rl11.DAR = ((rl11.DAR - (rl11.dar & 0xff80)) & 0xff80) | ((rl11.dar << 2) & 0x40); - } - rl11.dar = rl11.DAR; - } - break; - case 4: // read header - rl11.mpr = rl11.DAR; - break; - case 5: // write - if ((rl11.dar >> 6) >= rl11.TRACKS[drive]) { - rl11.csr |= 0x9400; // HNF - break; - } - if ((rl11.dar & 0x3f) >= rl11.SECTORS[drive]) { - rl11.csr |= 0x9400; // HNF - break; - } - sector = ((rl11.dar >> 6) * rl11.SECTORS[drive]) + (rl11.dar & 0x3f); - address = (((rl11.bae & 0x3f)) << 16) | rl11.bar; // 22 bit mode - count = (0x10000 - rl11.mpr) & 0xffff; - this.writeData(rl11.meta[drive], sector, address, count); - return; - case 6: // read - if ((rl11.dar >> 6) >= rl11.TRACKS[drive]) { - rl11.csr |= 0x9400; // HNF - break; - } - if ((rl11.dar & 0x3f) >= rl11.SECTORS[drive]) { - rl11.csr |= 0x9400; // HNF - break; - } - sector = ((rl11.dar >> 6) * rl11.SECTORS[drive]) + (rl11.dar & 0x3f); - address = (((rl11.bae & 0x3f)) << 16) | rl11.bar; // 22 bit mode - count = (0x10000 - rl11.mpr) & 0xffff; - this.readData(rl11.meta[drive], sector, address, count); - return; - case 7: // Read data without header check - break; - } - this.cpu.interrupt(20, 5, 0x70, /*0160*/ function() { - rl11.csr |= 0x81; // turn off go & set ready - return !!(rl11.csr & 0x40); - }); -}; - -/** - * rl11_end(err, meta, block, address, count) - * - * @this {DevicePDP11} - * @param {number} err - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.rl11_end = function(err, meta, block, address, count) -{ - var rl11 = this.rl11; - var sector = block; - rl11.bar = address & 0xffff; - rl11.csr = (rl11.csr & ~0x30) | ((address >> 12) & 0x30); - rl11.bae = (address >> 16) & 0x3f; // 22 bit mode - rl11.dar = ((~~(sector / rl11.SECTORS[meta.drive])) << 6) | (sector % rl11.SECTORS[meta.drive]); - rl11.DAR = rl11.dar; - rl11.mpr = (0x10000 - count) & 0xffff; - switch (err) { - case 1: // read error - rl11.csr |= 0x8400; // Report operation incomplete - break; - case 2: // NXM - rl11.csr |= 0xa000; // NXM - break; - } - this.cpu.interrupt(20, 5, 0x70, /*0160*/ function() { - rl11.csr |= 0x81; // turn off go & set ready - return !!(rl11.csr & 0x40); - }); -}; - -/** - * rp11_init() - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.rp11_init = function() -{ - var rp11 = this.rp11; - rp11.rpcs1 = 0x880; - rp11.rpcs2 = 0; - rp11.rpds = [0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0, 0x11c0]; - rp11.rper1 = [0, 0, 0, 0, 0, 0, 0, 0]; - rp11.rpas = rp11.rpwc = rp11.rpba = rp11.rpbae = rp11.rpcs3 = 0; -}; - -/** - * rp11_init() - * - * @this {DevicePDP11} - * @param {number} drive - * @param {number} flags - */ -DevicePDP11.prototype.rp11_attention = function(drive, flags) -{ - var rp11= this.rp11; - rp11.rpas |= 1 << drive; - rp11.rpds[drive] |= 0x8080; - if (flags) { - rp11.rper1[drive] |= flags; - rp11.rpds[drive] |= 0x4000; - } -}; - -//optional increment :-( -// cs1 is half in drive and half in controller :-( - -/** - * rp11_go() - * - * @this {DevicePDP11} - * @param {number} drive - */ -DevicePDP11.prototype.rp11_go = function(drive) -{ - var rp11 = this.rp11; - var sector, address, count; - rp11.rpcs1 &= ~0x4080; // Turn TRE & ready off - rp11.rpcs2 &= ~0x800; // Turn off NEM (NXM) - rp11.rpds[drive] &= ~0x480; // Turn off LST & ATA - this.cpu.interrupt(-1, 0, 0xAC) /*0254*/; //remove pending interrupt - if (typeof rp11.meta[drive] === "undefined") { - rp11.meta[drive] = { - "cache": [], - "postProcess": this.rp11_end, - "drive": drive, - "blocksize": 256, - "mapped": 0, - "maxblock": rp11.CYLINDERS[0] * rp11.SURFACES[0] * rp11.SECTORS[0], - "url": "rp" + drive + ".dsk" - }; - } - switch (rp11.rpcs1 & 0x3f) { // function code - case 0x1: /*01*/ // NULL - break; - case 0x5: /*05*/ // seek - rp11.rpcc[drive] = rp11.rpdc[drive]; - rp11.rpcs1 |= 0x8080; - rp11.rpds[drive] |= 0x8080; // ATA - rp11.rpas |= 1 << drive; - break; - case 0x9: /*011*/ // init - this.rp11_init(); - break; - case 0x13: /*023*/ // pack ack - rp11.rpds[drive] |= 0x40; // set VV - break; - case 0x31: /*061*/ // write - if (rp11.rpdc[drive] >= rp11.CYLINDERS[0] || (rp11.rpda[drive] >> 8) >= rp11.SURFACES[0] || - (rp11.rpda[drive] & 0xff) >= rp11.SECTORS[0]) { - rp11.rper1[drive] |= 0x400; // invalid sector address - rp11.rpcs1 |= 0xc000; // set SC & TRE - break; - } - sector = (rp11.rpdc[drive] * rp11.SURFACES[0] + (rp11.rpda[drive] >> 8)) * rp11.SECTORS[0] + (rp11.rpda[drive] & 0xff); - address = ((rp11.rpbae & 0x3f) << 16) | rp11.rpba; // 22 bit mode - count = (0x10000 - rp11.rpwc) & 0xffff; - this.writeData(rp11.meta[drive], sector, address, count); - return; - case 0x39: /*071*/ // read - if (rp11.rpdc[drive] >= rp11.CYLINDERS[0] || (rp11.rpda[drive] >> 8) >= rp11.SURFACES[0] || - (rp11.rpda[drive] & 0xff) >= rp11.SECTORS[0]) { - rp11.rper1[drive] |= 0x400; // invalid sector address - rp11.rpcs1 |= 0xc000; // set SC & TRE - break; - } - sector = (rp11.rpdc[drive] * rp11.SURFACES[0] + (rp11.rpda[drive] >> 8)) * rp11.SECTORS[0] + (rp11.rpda[drive] & 0xff); - address = ((rp11.rpbae & 0x3f) << 16) | rp11.rpba; // 22 bit mode - count = (0x10000 - rp11.rpwc) & 0xffff; - this.readData(rp11.meta[drive], sector, address, count); - return; - default: - break; - } - this.cpu.interrupt(3, 5, 0xAC, /*0254*/ function() { - rp11.rpcs1 = (rp11.rpcs1 & 0xfffe) | 0x80; // Turn go off and ready on - rp11.rpds[drive] |= 0x80; // ATA - return !!(rp11.rpcs1 & 0x40); - }); -}; - -/** - * rp11_end() - * - * @this {DevicePDP11} - * @param {number} err - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.rp11_end = function(err, meta, block, address, count) -{ - var rp11 = this.rp11; - var surface, sector; - rp11.rpwc = (0x10000 - count) & 0xffff; - rp11.rpba = address & 0xffff; - rp11.rpcs1 = (rp11.rpcs1 & ~0x300) | ((address >> 8) & 0x300); - rp11.rpbae = (address >> 16) & 0x3f; // 22 bit mode - sector = ~~(block / rp11.SECTORS[0]); - surface = ~~(sector / rp11.SURFACES[0]); - rp11.rpda[meta.drive] = ((sector % rp11.SURFACES[0]) << 8) | (block % rp11.SECTORS[0]); - rp11.rpcc[meta.drive] = rp11.rpdc[meta.drive] = surface; - rp11.rpas |= 1 << meta.drive; - if (block >= meta.maxblock - 1) { - rp11.rpds[meta.drive] |= 0x400; // LST - } - switch (err) { - case 1: // read error - rp11.rpcs2 |= 0x200; // MXF Missed transfer - rp11.rpcs1 |= 0xc000; // set SC & TRE - break; - case 2: // NXM - rp11.rpcs2 |= 0x800; // NEM (NXM) - rp11.rpcs1 |= 0xc000; // set SC & TRE - break; - } - this.cpu.interrupt(20, 5, 0xAC, /*0254*/ function() { - rp11.rpds[meta.drive] |= 0x80; - rp11.rpcs1 = (rp11.rpcs1 & 0xfffe) | 0x80; // Turn go off and ready on - return !!(rp11.rpcs1 & 0x40); - }); -}; - /** * kw11_interrupt() * @@ -995,176 +995,6 @@ DevicePDP11.prototype.kw11_interrupt = function() } }; -/** - * getData(xhr, callback, meta, block, address, count) - * - * @this {DevicePDP11} - * @param {XMLHttpRequest} xhr - * @param {function(Object,number,number,number)} callback - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.getData = function(xhr, callback, meta, block, address, count) -{ - var arrayBuffer, byteArray, blockno, word, base; - arrayBuffer = /** @type {ArrayBuffer} */ (xhr.response); - if ((xhr.status != 0 && xhr.status != 206) || !arrayBuffer) { - meta.postProcess(1, meta, block, address, count); // NXD - read error? - } else { - byteArray = new Uint8Array(arrayBuffer); - blockno = block; - for (base = 0; base < byteArray.length;) { - if (typeof meta.cache[blockno] === "undefined") { - meta.cache[blockno] = []; - for (word = 0; word < meta.blocksize; word++) { - if (base < byteArray.length) { - meta.cache[blockno][word] = (byteArray[base] & 0xff) | ((byteArray[base + 1] << 8) & 0xff00); - } else { - meta.cache[blockno][word] = 0; - } - base += 2; - } - } else { - base += meta.blocksize << 1; - } - blockno++; - } - callback(meta, block, address, count); - } -}; - -/** - * getCache(callback, meta, block, address, count) - * - * @this {DevicePDP11} - * @param {function(Object,number,number,number)} callback - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.getCache = function(callback, meta, block, address, count) -{ - var device = this; - var sectors = ~~((count + meta.blocksize - 1) / meta.blocksize); - var xhr = new XMLHttpRequest(); - if (sectors < 2048 && block + 2048 < meta.maxblock) sectors = 2048; // make it a decent read - xhr.open("GET", meta.url, true); - xhr.setRequestHeader("Range", "bytes=" + ((block * meta.blocksize) << 1) + "-" + - ((((block + sectors) * meta.blocksize) << 1) - 1)); - xhr.responseType = "arraybuffer"; - xhr.onreadystatechange = function() { - if (xhr.readyState == 4 /* xhr.DONE */) { - device.getData(xhr, callback.bind(device), meta, block, address, count); - } - }; - xhr.send(null); -}; - -/** - * insertData(original, physicalAddress, data, byteFlag) - * - * @this {DevicePDP11} - * @param {number} original - * @param {number} physicalAddress - * @param {number} data - * @param {number} byteFlag - * @return {number} - */ -DevicePDP11.prototype.insertData = function(original, physicalAddress, data, byteFlag) -{ - if (physicalAddress & 1) { - if (!byteFlag) { - //log.push("TRAP 4 201 " + physicalAddress.toString(8) + " " + data.toString(8)); - this.cpu.trap(PDP11.TRAP.BUS_ERROR, 122); - } - else if (data >= 0) { - data = ((data << 8) & 0xff00) | (original & 0xff); - } else { - data = original; - } - } else { - if (data >= 0) { - if (byteFlag) { - data = (original & 0xff00) | (data & 0xff); - } - } else { - data = original; - } - } - return data; -}; - -/** - * readData(meta, block, address, count) - * - * @this {DevicePDP11} - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.readData = function(meta, block, address, count) -{ - var word; - while (count > 0) { - if (typeof meta.cache[block] === "undefined") { - this.getCache(this.readData, meta, block, address, count); - return; - } - for (word = 0; word < meta.blocksize && count > 0; word++) { - if (this.cpu.writeWordToPhysical((meta.mapped? this.cpu.mapUnibus(address) : address), meta.cache[block][word]) < 0) { - meta.postProcess(2, meta, block, address, count); // NXM - return; - } - //if (meta.increment) { - address += 2; - //} - --count; - } - block++; - } - meta.postProcess(0, meta, block, address, count); // success -}; - -/** - * writeData(meta, block, address, count) - * - * @this {DevicePDP11} - * @param {Object} meta - * @param {number} block - * @param {number} address - * @param {number} count - */ -DevicePDP11.prototype.writeData = function(meta, block, address, count) -{ - var word, data; - while (count > 0) { - if (typeof meta.cache[block] === "undefined") { - meta.cache[block] = []; - for (word = 0; word < meta.blocksize; word++) { - meta.cache[block][word] = 0; - } - } - for (word = 0; word < meta.blocksize && count > 0; word++) { - data = this.cpu.readWordFromPhysical((meta.mapped? this.cpu.mapUnibus(address) : address)); - if (data < 0) { - meta.postProcess(2, meta, block, address, count); // NXM - return; - } - meta.cache[block][word] = data; - //if (meta.increment) { - address += 2; - //} - --count; - } - block++; - } - meta.postProcess(0, meta, block, address, count); // success -}; - /** * reset() * @@ -1176,611 +1006,6 @@ DevicePDP11.prototype.reset = function() { this.display.misc = (this.display.misc & ~0x77) | 0x14; // kernel 16 bit this.kw11.lks = 0; - this.rk11.rkcs = 0x80; /*0200*/ - this.rl11.csr = 0x80; - this.rp11_init(); -}; - -/** - * access(physicalAddress, data, byteFlag) - * - * Formerly access_iopage(). - * - * @this {DevicePDP11} - * @param {number} physicalAddress - * @param {number} data (-1 if read) - * @param {number} byteFlag (zero if word, non-zero if byte) - * @return {number} - */ -DevicePDP11.prototype.access = function(physicalAddress, data, byteFlag) -{ - var result, idx; - var cpu = this.cpu; - switch (physicalAddress & ~0x3F) /*077*/ { - case 0x3FFFC0: /*017777700*/ // 017777700 - 017777777 - switch (physicalAddress & ~1) { - // - // Superseded by UNIBUS_IOTABLE (more of this code will be commented out - // as it is replaced by read/write handlers in UNIBUS_IOTABLE; stay tuned). - // - // case 0x3FFFFE: // 017777776 // PSW - // result = cpu.getPSW(); - // if (data >= 0) { - // if (physicalAddress & 1) { - // data = (data << 8) | (result & 0xff); - // } else { - // if (byteFlag) data = (result & 0xff00) | (data & 0xff); - // } - // data = (data & 0xf8ef) | (result & 0x0710); - // cpu.setPSW(data); - // return -1; // KLUDGE - no trap but abort any CC updates - // } - // break; - case 0x3FFFFC: /*017777774*/ // stack limit - if (data < 0) { - result = cpu.regSL & 0xff00; - } else { - if (physicalAddress & 1) { - data = data << 8; - } - cpu.regSL = data | 0xff; - result = 0; - } - //log.push("stack limit access "+cpu.regSL.toString(8)); - break; - case 0x3FFFFA: /*017777772*/ // PIR - if (data < 0) { - result = cpu.regPIR; - } else { - if (physicalAddress & 1) { - data = data << 8; - } - result = data & 0xfe00; - if (result) { - idx = result >> 9; - do { - result += 0x22; - } while (idx >>= 1); - } - cpu.regPIR = result; - cpu.opFlags |= PDP11.OPFLAG.INTQ; - } - break; - case 0x3FFFF6: /*017777766*/ // CPU error - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 222); - if (data < 0) { - result = cpu.regErr; - } else { - result = cpu.regErr = 0; // TODO: Always writes as zero? - } - break; - case 0x3FFFF4: /*017777764*/ // System I/D - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 224); - result = 1; - break; - case 0x3FFFF2: /*017777762*/ // Upper size - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 226); - result = 0; - break; - case 0x3FFFF0: /*017777760*/ // Lower size - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 228); - result = (BusPDP11.MAX_MEMORY >> 6) - 1; - break; - case 0x3FFFF8: /*017777770*/ // Microprogram break - if (data >= 0 && !(physicalAddress & 1)) data &= 0xff; // Required for KB11-CM without MFPT instruction - /* falls through */ - case 0x3FFFEE: /*017777756*/ // - case 0x3FFFEC: /*017777754*/ // - case 0x3FFFEA: /*017777752*/ // Hit/miss - case 0x3FFFE8: /*017777750*/ // Maintenance - case 0x3FFFE6: /*017777746*/ // Cache control - case 0x3FFFE4: /*017777744*/ // Memory system error - case 0x3FFFE2: /*017777742*/ // High error address - case 0x3FFFE0: /*017777740*/ // Low error address - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 232); - idx = (physicalAddress - 0x3FFFE0) /*017777740*/ >> 1; - if (data < 0) { - result = cpu.controlReg[idx]; - } else { - result = this.insertData(cpu.controlReg[idx], physicalAddress, data, byteFlag); - if (result >= 0) { - cpu.controlReg[idx] = result; - } - } - break; - case 0x3FFFCE: /*017777716*/ // User and Super SP - if (physicalAddress & 1) { - if ((cpu.regPSW >> 14) & 3 == 3) { // User Mode - if (data >= 0) cpu.regsGen[6] = data; - result = cpu.regsGen[6]; - } else { - if (data >= 0) cpu.regsAltStack[3] = data; - result = cpu.regsAltStack[3]; - } - } else { - if ((cpu.regPSW >> 14) & 3 == 1) { // Super Mode - if (data >= 0) cpu.regsGen[6] = data; - result = cpu.regsGen[6]; - } else { - if (data >= 0) cpu.regsAltStack[1] = data; - result = cpu.regsAltStack[1]; - } - } - return result; - case 0x3FFFCC: /*017777714*/ - case 0x3FFFCA: /*017777712*/ - case 0x3FFFC8: /*017777710*/ // Register set 1 - idx = physicalAddress & 7; - if (cpu.regPSW & 0x800) { - if (data >= 0) cpu.regsGen[idx] = data; - result = cpu.regsGen[idx]; - } else { - if (data >= 0) cpu.regsAlt[idx] = data; - result = cpu.regsAlt[idx]; - } - return result; - case 0x3FFFC6: /*017777706*/ // Kernel SP & PC - if (physicalAddress & 1) { - if (data >= 0) cpu.regsGen[7] = data; - result = cpu.regsGen[7]; - } else { - if ((cpu.regPSW >> 14) & 3 == 0) { // Kernel Mode - if (data >= 0) cpu.regsGen[6] = data; - result = cpu.regsGen[6]; - } else { - if (data >= 0) cpu.regsAltStack[0] = data; - result = cpu.regsAltStack[0]; - } - } - return result; - case 0x3FFFC4: /*017777704*/ - case 0x3FFFC2: /*017777702*/ - case 0x3FFFC0: /*017777700*/ // Register set 0 - idx = physicalAddress & 7; - if (cpu.regPSW & 0x800) { - if (data >= 0) cpu.regsAlt[idx] = data; - result = cpu.regsAlt[idx]; - } else { - if (data >= 0) cpu.regsGen[idx] = data; - result = cpu.regsGen[idx]; - } - return result; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 124); - } - break; - case 0x3FFF80: /*017777600*/ // 017777600 - 017777677 MMU user mode Map - idx = (physicalAddress >> 1) & 0x1F; /*037*/ - result = this.insertData(cpu.mmuMap[3][idx], physicalAddress, data, byteFlag); - if (result >= 0) { - cpu.mmuMap[3][idx] = result; - cpu.mmuMap[3][idx & 0xf] &= 0xff0f; - } - break; - case 0x3FFF40: /*017777500*/ // 017777500 - 017777577 - // var tty = this.tty; - var kw11 = this.kw11; - switch (physicalAddress & ~1) { - case 0x3FFF7E: /*017777576*/ // MMR2 - result = this.insertData(cpu.regMMR2, physicalAddress, data, byteFlag); - if (result >= 0) cpu.regMMR2 = result; - break; - case 0x3FFF7C: /*017777574*/ // MMR1 - result = cpu.regMMR1; - if (result & 0xff00) result = ((result << 8) | (result >> 8)) & 0xffff; - break; - // case 0x3FFF7A: /*017777572*/ // MMR0 - // cpu.regMMR0 = (cpu.regMMR0 & 0xf381) | (cpu.mmuLastMode << 5) | (cpu.mmuLastPage << 1); - // if (data < 0) { - // result = cpu.regMMR0; - // } else { - // result = this.insertData(cpu.regMMR0, physicalAddress, data, byteFlag); - // if (result >= 0) { - // cpu.regMMR0 = result &= 0xf381; - // cpu.mmuLastMode = (result >> 5) & 3; - // cpu.mmuLastPage = (result >> 1) & 0xf; - // if (result & 0x101) { - // idx = 2; // 18 bit - // if (cpu.regMMR3 & 0x10) idx = 1; // 22 bit - // if (result & 0x1) { - // cpu.mmuEnable = PDP11.ACCESS.READ | PDP11.ACCESS.WRITE; - // } else { - // cpu.mmuEnable = PDP11.ACCESS.WRITE; - // } - // } else { - // cpu.mmuEnable = 0; - // idx = 4; // 16 bit - // } - // this.display.misc = (this.display.misc & ~7) | idx; - // } - // } - // break; - case 0x3FFF78: /*017777570*/ // console display/switch; - if (data < 0) { - result = this.display.switches & 0xffff; - } else { - result = this.insertData(this.display.data, physicalAddress, data, byteFlag); - if (result >= 0) this.display.data = result; - } - break; - // case 0x3FFF76: /*017777566*/ // console xbuf - // if (data >= 0) { - // data &= 0x7f; - // if (data) { - // switch (data) { - // case 0: - // case 0xD: /*015*/ - // /* - // if (document.forms.console.line.value.length > 9000) { - // document.forms.console.line.value = document.forms.console.line.value.substring(document.forms.console.line.value.length - 8192); - // } - // */ - // break; - // case 0x8: /*010*/ - // /* - // if (!tty.del) { - // document.forms.console.line.value = document.forms.console.line.value.substring(0, document.forms.console.line.value.length - 1); - // } - // */ - // break; - // default: - // /* - // document.forms.console.line.value += String.fromCharCode(data); - // if (data == 0x0A) { - // document.forms.console.line.scrollTop = document.forms.console.line.scrollHeight; - // } - // */ - // } - // tty.del = 0; - // } - // tty.xcsr &= ~0x80; /*0200*/ - // cpu.interrupt(100, 4, 0x34, /*064*/ function() { - // tty.xcsr |= 0x80; /*0200*/ - // return !!(tty.xcsr & 0x40); /*0100*/ - // }); - // } - // result = 0; - // break; - // case 0x3FFF74: /*017777564*/ // console xcsr - // if (data < 0) { - // result = tty.xcsr; - // } else { - // result = this.insertData(tty.xcsr, physicalAddress, data, byteFlag); - // if (result >= 0) { - // if ((tty.xcsr & 0xC0) /*0300*/ == 0x80 /*0200*/&& (result & 0x40) /*0100*/) { - // cpu.interrupt(8, 4, 0x34, /*064*/ function() { - // tty.xcsr |= 0x80; /*0200*/ - // return !!(tty.xcsr & 0x40); /*0100*/ - // }); - // } - // tty.xcsr = (tty.xcsr & 0x80) /*0200*/ | (result & ~0x80) /*0200*/; - // } - // } - // break; - // case 0x3FFF72: /*017777562*/ // console rbuf - // result = 0; - // if (data < 0) { - // tty.rcsr &= ~0x80; /*0200*/ - // if (tty.rbuf.length > 0) { - // result = tty.rbuf.shift(); - // if (tty.rbuf.length > 0) { - // setTimeout(function() { - // tty.rcsr |= 0x80; /*0200*/ - // if (tty.rcsr & 0x40) /*0100*/ cpu.interrupt(40, 4, 0x30) /*060*/; - // }, 50); - // } - // } - // } - // break; - // case 0x3FFF70: /*017777560*/ // console rcsr - // if (data < 0) { - // result = tty.rcsr; - // } else { - // result = this.insertData(tty.rcsr, physicalAddress, data, byteFlag); - // if (result >= 0) tty.rcsr = (tty.rcsr & 0x80) /*0200*/ | (result & ~0x80) /*0200*/; - // } - // break; - // case 0x3FFF66: /*017777546*/ // kw11.lks - // if (data < 0) { - // result = kw11.lks; - // kw11.lks &= ~0x80; /*0200*/ - // } else { - // result = this.insertData(kw11.lks, physicalAddress, data, byteFlag); - // if (result >= 0) { - // if (result & 0x40) /*0100*/ { - // if (!kw11.init) { - // setInterval(this.kw11_interrupt.bind(this), 25); - // kw11.init = 1; - // } - // } - // kw11.lks = result & ~0x80; /*0200*/ - // } - // } - // break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 126); - } - break; - case 0x3FFF00: /*017777400*/ // 017777400 - 017777477 - var rk11 = this.rk11; - switch (physicalAddress & ~1) { - case 0x3FFF00: /*017777400*/ // rk11.rkds - result = this.insertData(rk11.rkds, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rkds = result; - break; - case 0x3FFF02: /*017777402*/ // rk11.rker - result = this.insertData(rk11.rker, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rker = result; - break; - case 0x3FFF04: /*017777404*/ // rk11.rkcs - result = this.insertData(rk11.rkcs, physicalAddress, data, byteFlag); - if (data >= 0 && result >= 0) { - rk11.rkcs = (result & ~0x9080) | (rk11.rkcs & 0x9080); // Bits 7 and 12 - 15 are read only - if (rk11.rkcs & 1) { - this.rk11_go(); - } - } - break; - case 0x3FFF06: /*017777406*/ // rk11.rkwc - result = this.insertData(rk11.rkwc, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rkwc = result; - break; - case 0x3FFF08: /*017777410*/ // rk11.rkba - result = this.insertData(rk11.rkba, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rkba = result; - break; - case 0x3FFF0A: /*017777412*/ // rk11.rkda - result = this.insertData(rk11.rkda, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rkda = result; - break; - case 0x3FFF0C: /*017777414*/ // rk11.unused - break; - case 0x3FFF0E: /*017777416*/ // rk11.rkdb - result = this.insertData(rk11.rkdb, physicalAddress, data, byteFlag); - if (result >= 0) rk11.rkdb = result; - break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 128); - } - break; - case 0x3FFDC0: /*017776700*/ // 017777600 - 017777677 rp11 controller - //if (physicalAddress != 017776700) console.log("RP11 register " + physicalAddress.toString(8) + " " + data.toString(8)); - var rp11 = this.rp11; - idx = rp11.rpcs2 & 7; - switch (physicalAddress & ~1) { - case 0x3FFDC0: /*017776700*/ // rp11.rpcs1 Control status 1 - result = this.insertData(rp11.rpcs1, physicalAddress, data, byteFlag); - if (data >= 0 && result >= 0) { - rp11.rpbae = (rp11.rpbae & 0x3c) | ((result >> 8) & 0x3); - rp11.rpcs1 = (result & 0x437f) | (rp11.rpcs1 & 0x8880) | 0x800; - if (result & 1 && (rp11.rpcs1 & 0x80)) { - this.rp11_go(idx); - } else { - if ((result & 0xc0) == 0xc0) { - cpu.interrupt(0, 5, 0xAC) /*0254*/; - } - } - } - break; - case 0x3FFDC2: /*017776702*/ // rp11.rpwc Word count - result = this.insertData(rp11.rpwc, physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpwc = result; - break; - case 0x3FFDC4: /*017776704*/ // rp11.rpba Memory address - result = this.insertData(rp11.rpba, physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpba = result & 0xfffe; // must be even - break; - case 0x3FFDC6: /*017776706*/ // rp11.rpda Disk address - result = this.insertData(rp11.rpda[idx], physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpda[idx] = result & 0x1f1f; - break; - case 0x3FFDC8: /*017776710*/ // rp11.rpcs2 Control status 2 - result = this.insertData(rp11.rpcs2, physicalAddress, data, byteFlag); - if (result >= 0) { - rp11.rpcs2 = (result & 0x3f) | (rp11.rpcs2 & 0xffc0); - if (result & 0x80) /*0200*/ this.rp11_init(); - } - break; - case 0x3FFDCA: /*017776712*/ // rp11.rpds drive status - result = rp11.rpds[idx]; - break; - case 0x3FFDCC: /*017776714*/ // rp11.rper1 Error 1 - result = rp11.rper1[idx]; - break; - case 0x3FFDCE: /*017776716*/ // rp11.rpas Attention summary - result = this.insertData(rp11.rpas, physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpas = result & 0xff; - break; - case 0x3FFDD0: /*017776720*/ // rp11.rpla Look ahead - result = rp11.rpla[idx]; - break; - case 0x3FFDD2: /*017776722*/ // rp11.rpdb Data buffer - result = this.insertData(rp11.rpdb, physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpdb = result; - break; - case 0x3FFDD4: /*017776724*/ // rp11.rpmr Maintenance - result = this.insertData(rp11.rpmr[idx], physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpmr[idx] = result & 0x3ff; - break; - case 0x3FFDD6: /*017776726*/ // rp11.rpdt drive type read only - result = 0x2012; /*020022*/ // rp11.rpdt[idx]; - break; - case 0x3FFDD8: /*017776730*/ // rp11.rpsn Serial number read only - result = rp11.rpsn[idx]; - break; - case 0x3FFDDA: /*017776732*/ // rp11.rpof Offset register - result = this.insertData(rp11.rpof[idx], physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpof[idx] = result; - break; - case 0x3FFDDC: /*017776734*/ // rp11.rpdc Desired cylinder - result = this.insertData(rp11.rpdc[idx], physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpdc[idx] = result & 0x1ff; - break; - case 0x3FFDDE: /*017776736*/ // rp11.rpcc Current cylinder read only - rp11.rpcc[idx] = rp11.rpdc[idx]; - result = rp11.rpcc[idx]; - break; - case 0x3FFDE0: /*017776740*/ // rp11.rper2 Error 2 - result = rp11.rper2[idx]; - break; - case 0x3FFDE2: /*017776742*/ // rp11.rper3 Error 3 - result = rp11.rper3[idx]; - break; - case 0x3FFDE4: /*017776744*/ // rp11.rpec1 Error correction 1 read only - result = rp11.rpec1[idx]; - break; - case 0x3FFDE6: /*017776746*/ // rp11.rpec2 Error correction 2 read only - result = rp11.rpec2[idx]; - break; - case 0x3FFDE8: /*017776750*/ // rp11.rpbae Bus address extension - result = this.insertData(rp11.rpbae, physicalAddress, data, byteFlag); - if (result >= 0) { - rp11.rpbae = result & 0x3f; - rp11.rpcs1 = (rp11.rpcs1 & ~0x300) | ((result & 0x3) << 8); - } - break; - case 0x3FFDEA: /*017776752*/ // rp11.rpcs3 Control status 3 - result = this.insertData(rp11.rpcs3, physicalAddress, data, byteFlag); - if (result >= 0) rp11.rpcs3 = result; - break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 132); - } - break; - case 0x3FF900: /*017774400*/ // 017774400 - 017774477 - var rl11 = this.rl11; - switch (physicalAddress & ~1) { - case 0x3FF900: /*017774400*/ // rl11.csr - result = this.insertData(rl11.csr, physicalAddress, data, byteFlag); - if (data >= 0 && result >= 0) { - rl11.bae = (rl11.bae & 0x3c) | ((result >> 4) & 0x3); - rl11.csr = (rl11.csr & ~0x3fe) | (result & 0x3fe); - if (!(rl11.csr & 0x80)) { - this.rl11_go(); - } - } - break; - case 0x3FF902: /*017774402*/ // rl11.bar - result = this.insertData(rl11.bar, physicalAddress, data, byteFlag); - if (result >= 0) { - rl11.bar = result & 0xfffe; - } - break; - case 0x3FF904: /*017774404*/ // rl11.dar - result = this.insertData(rl11.dar, physicalAddress, data, byteFlag); - if (result >= 0) rl11.dar = result; - break; - case 0x3FF906: /*017774406*/ // rl11.mpr - result = this.insertData(rl11.mpr, physicalAddress, data, byteFlag); - if (result >= 0) rl11.mpr = result; - break; - case 0x3FF908: /*017774410*/ // rl11.bae - result = this.insertData(rl11.bae, physicalAddress, data, byteFlag); - if (result >= 0) { - rl11.bae = result & 0x3f; - rl11.csr = (rl11.csr & ~0x30) | ((rl11.bae & 0x3) << 4); - } - break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 134); - } - break; - case 0x3FF540: /*017772500*/ // 017772500 - 017772577 - switch (physicalAddress & ~1) { - case 0x3FF54E: /*017772516*/ // MMR3 - UB 22 x K S U - if (data < 0) { - result = cpu.regMMR3; - } else { - result = this.insertData(cpu.regMMR3, physicalAddress, data, byteFlag); - if (result >= 0) { - if (cpu.cpuType !== 70) result &= ~0x30; // don't allow 11/45 to do 22 bit or use unibus map - cpu.regMMR3 = result; - cpu.mmuMask[0] = (result & 4 ? 0xf : 0x7); - cpu.mmuMask[1] = (result & 2 ? 0xf : 0x7); - cpu.mmuMask[3] = (result & 1 ? 0xf : 0x7); - if (cpu.mmuEnable) { - idx = 2; // 18 bit - if (cpu.regMMR3 & 0x10) idx = 1; // 22 bit - this.display.misc = (this.display.misc & ~7) | idx; - } - } - } - break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 136); - } - break; - case 0x3FF4C0: /*017772300*/ // 017772300 - 017772377 MMU kernel mode Map - idx = (physicalAddress >> 1) & 0x1F; /*037*/ - result = this.insertData(cpu.mmuMap[0][idx], physicalAddress, data, byteFlag); - if (result >= 0) { - cpu.mmuMap[0][idx] = result; - cpu.mmuMap[0][idx & 0xf] &= 0xff0f; - } - break; - case 0x3FF480: /*017772200*/ // 017772200 - 017772277 MMU super mode Map - idx = (physicalAddress >> 1) & 0x1F; /*037*/ - result = this.insertData(cpu.mmuMap[1][idx], physicalAddress, data, byteFlag); - if (result >= 0) { - cpu.mmuMap[1][idx] = result; - cpu.mmuMap[1][idx & 0xf] &= 0xff0f; - } - break; - case 0x3FF0C0: /*017770300*/ // 017770300 - 017770377 Unibus Map - case 0x3FF080: /*017770200*/ // 017770200 - 017770277 Unibus Map - if (cpu.cpuType !== 70) return cpu.trap(PDP11.TRAP.BUS_ERROR, 234); - idx = (physicalAddress >> 2) & 0x1f; - result = cpu.unibusMap[idx]; - if (physicalAddress & 0x2) /*02*/ result = result >> 16; - result &= 0xffff; - if (data >= 0) { - result = this.insertData(result, physicalAddress, data, byteFlag); - if (result >= 0) { - if (physicalAddress & 0x2) /*02*/ { - cpu.unibusMap[idx] = (result << 16) | (cpu.unibusMap[idx] & 0xffff); - } else { - cpu.unibusMap[idx] = (cpu.unibusMap[idx] & 0xffff0000) | (result & 0xfffe); - } - } - } - break; - case 0x3FEA00: /*017765000*/ // 017765000 - 017765777 Bootstrap diagnostic - case 0x3FEA40: /*017765100*/ - case 0x3FEA80: /*017765200*/ - case 0x3FEAC0: /*017765300*/ - case 0x3FEB00: /*017765400*/ - case 0x3FEB40: /*017765500*/ - case 0x3FEB80: /*017765600*/ - case 0x3FEBC0: /*017765700*/ - if (data < 0) { - idx = (physicalAddress >> 1) & 0xff; - result = DevicePDP11.M9312[idx]; - } else { - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 138); - } - break; - default: - cpu.regErr |= PDP11.CPUERR.TIMEOUT; - return cpu.trap(PDP11.TRAP.BUS_ERROR, 142); - } - if (byteFlag && result >= 0) { // make any required byte adjustment - if ((physicalAddress & 1)) { - result = result >> 8; - } else { - result &= 0xff; - } - } - if (typeof result === "undefined") { - cpu.panic(76); - } - return result; }; /* @@ -1795,13 +1020,40 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR"], [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR"], [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR"], + [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3"], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], + [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, null, "MMR1"], + [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, null, "MMR2"], [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR"], [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR"], [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR"], [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR"], - [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"], + [PDP11.UNIBUS.R0SET0]: /* 177700 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], + [PDP11.UNIBUS.R1SET0]: /* 177701 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], + [PDP11.UNIBUS.R2SET0]: /* 177702 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], + [PDP11.UNIBUS.R3SET0]: /* 177703 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R3SET0"], + [PDP11.UNIBUS.R4SET0]: /* 177704 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R4SET0"], + [PDP11.UNIBUS.R5SET0]: /* 177705 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R5SET0"], + [PDP11.UNIBUS.R6KERNEL]:/* 177706 */ [DevicePDP11.prototype.readR6KERNEL,DevicePDP11.prototype.writeR6KERNEL,DevicePDP11.prototype.readR6KERNEL, DevicePDP11.prototype.writeR6KERNEL,"R6KERNEL"], + [PDP11.UNIBUS.R7KERNEL]:/* 177707 */ [DevicePDP11.prototype.readR7KERNEL,DevicePDP11.prototype.writeR7KERNEL,DevicePDP11.prototype.readR7KERNEL, DevicePDP11.prototype.writeR7KERNEL,"R7KERNEL"], + [PDP11.UNIBUS.R0SET1]: /* 177710 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1"], + [PDP11.UNIBUS.R1SET1]: /* 177711 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1"], + [PDP11.UNIBUS.R2SET1]: /* 177712 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1"], + [PDP11.UNIBUS.R3SET1]: /* 177713 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1"], + [PDP11.UNIBUS.R4SET1]: /* 177714 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1"], + [PDP11.UNIBUS.R5SET1]: /* 177715 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1"], + [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER"], + [PDP11.UNIBUS.R6USER]: /* 177717 */ [DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER"], + [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", PDP11.MODEL_1170], + [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", PDP11.MODEL_1170], + [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", PDP11.MODEL_1170], + [PDP11.UNIBUS.SYSID]: /* 177764 */ [null, null, DevicePDP11.prototype.readSYSID, DevicePDP11.prototype.writeSYSID, "SYSID", PDP11.MODEL_1170], + [PDP11.UNIBUS.CPUERR]: /* 177766 */ [null, null, DevicePDP11.prototype.readCPUERR, DevicePDP11.prototype.writeCPUERR, "CPUERR", PDP11.MODEL_1170], + [PDP11.UNIBUS.MB]: /* 177770 */ [null, null, DevicePDP11.prototype.readMB, DevicePDP11.prototype.writeMB, "MB", PDP11.MODEL_1170], + [PDP11.UNIBUS.PIR]: /* 177772 */ [null, null, DevicePDP11.prototype.readPIR, DevicePDP11.prototype.writePIR, "PIR"], + [PDP11.UNIBUS.SL]: /* 177774 */ [null, null, DevicePDP11.prototype.readSL, DevicePDP11.prototype.writeSL, "SL"], + [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"] }; DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; @@ -1900,6 +1152,14 @@ DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.HAERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.MEMERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.CACHEC] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.MAINT] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.HITMISS]= DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UNDEF1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; +DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UNDEF2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; + /** * DevicePDP11.init() * @@ -1914,8 +1174,12 @@ DevicePDP11.init = function() for (var iDevice = 0; iDevice < aeDevice.length; iDevice++) { var eDevice = aeDevice[iDevice]; var parmsDevice = Component.getComponentParms(eDevice); - var device = new DevicePDP11(parmsDevice); - Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); + switch(parmsDevice['name']) { + case 'default': + var device = new DevicePDP11(parmsDevice); + Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); + break; + } } }; diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 71c2599e5..15c3af409 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -56,7 +56,7 @@ var littleEndian = (TYPEDARRAYS? (function() { })() : false); /** - * MemoryPDP11(addr, used, size, type, controller) + * MemoryPDP11(cpu, addr, used, size, type, controller) * * The Bus component allocates Memory objects so that each has a memory buffer with a * block-granular starting address and an address range equal to bus.nBlockSize; however, @@ -89,15 +89,17 @@ var littleEndian = (TYPEDARRAYS? (function() { * is available). * * @constructor + * @param {CPUStatePDP11} cpu * @param {number|null} [addr] of lowest used address in block * @param {number} [used] portion of block in bytes (0 for none); must be a multiple of 4 * @param {number} [size] of block's buffer in bytes (0 for none); must be a multiple of 4 * @param {number} [type] is one of the MemoryPDP11.TYPE constants (default is MemoryPDP11.TYPE.NONE) * @param {Object} [controller] is an optional memory controller component */ -function MemoryPDP11(addr, used, size, type, controller) +function MemoryPDP11(cpu, addr, used, size, type, controller) { var i; + this.cpu = cpu; this.id = (MemoryPDP11.idBlock += 2); this.adw = null; this.offset = 0; @@ -621,6 +623,9 @@ MemoryPDP11.prototype = { * @return {number} */ readWordMemory: function readWordMemory(off, addr) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } if (BYTEARRAYS) { return this.ab[off] | (this.ab[off + 1] << 8); } @@ -662,6 +667,9 @@ MemoryPDP11.prototype = { * @param {number} addr */ writeWordMemory: function writeWordMemory(off, w, addr) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } if (BYTEARRAYS) { this.ab[off] = (w & 0xff); this.ab[off + 1] = (w >> 8); @@ -769,6 +777,9 @@ MemoryPDP11.prototype = { * @return {number} */ readWordBE: function readWordBE(off, addr) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } return this.dv.getUint16(off, true); }, /** @@ -785,7 +796,10 @@ MemoryPDP11.prototype = { * for an aligned read vs. always reading the bytes separately. */ var w; - if (PDP11.WORDBUS || !(off & 0x1)) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } + if (!(off & 0x1)) { w = this.aw[off >> 1]; } else { w = this.ab[off] | (this.ab[off+1] << 8); @@ -831,6 +845,9 @@ MemoryPDP11.prototype = { * @param {number} w */ writeWordBE: function writeWordBE(off, w, addr) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } this.dv.setUint16(off, w, true); this.fDirty = true; }, @@ -847,7 +864,10 @@ MemoryPDP11.prototype = { * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset * for an aligned write vs. always writing the bytes separately. */ - if (PDP11.WORDBUS || !(off & 0x1)) { + if (PDP11.WORDBUS && (off & 0x1)) { + this.cpu.fault(addr); + } + if (!(off & 0x1)) { this.aw[off >> 1] = w; } else { this.ab[off] = w; diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js new file mode 100644 index 000000000..6f9ae4d1e --- /dev/null +++ b/modules/pdp11/lib/rk11.js @@ -0,0 +1,85 @@ +/** + * @fileoverview Implements RK11 device support. + * @author Jeff Parsons + * @copyright Jeff Parsons 2012-2016 + * + * This file is part of PCjs, a computer emulation software project at . + * + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code + * may be used freely provided the original author name is acknowledged in any modified source code. + * + * PCjs is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCjs. If not, + * see . + * + * You are required to include the above copyright notice in every source code file of every + * copy or modified version of this work, and to display that copyright notice on every screen + * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * + * Some PCjs files also attempt to load external resource files, such as character-image files, + * ROM files, and disk image files. Those external resource files are not considered part of PCjs + * for purposes of the GNU General Public License, and the author does not claim any copyright + * as to their contents. + */ + +"use strict"; + +if (NODE) { + var web = require("../../shared/lib/weblib"); + var Component = require("../../shared/lib/component"); + var State = require("../../shared/lib/state"); + var BusPDP11 = require("./bus"); +} + +/** + * RK11(parmsDevice) + * + * @constructor + * @extends Component + * @param {Object} parmsRK11 + */ +function RK11(parmsRK11) +{ + Component.call(this, "RK11", parmsRK11, RK11); + + this.rkds = 0x9C0;/*04700*/ // 017777400 Drive Status + this.rker = 0; // 017777402 Error Register + this.rkcs = 0x80; /*0200*/ // 017777404 Control Status + this.rkwc = 0; // 017777406 Word Count + this.rkba = 0; // 017777410 Bus Address + this.rkda = 0; // 017777412 Disk Address + this.rkdb = 0; // 017777416 Data Buffer + this.meta = []; + this.TRACKS = [406, 406, 406, 406]; + this.SECTORS = [12, 12, 12, 12]; +} + +Component.subclass(RK11); + +/** + * initBus(cmp, bus, cpu, dbg) + * + * @this {DevicePDP11} + * @param {ComputerPDP11} cmp + * @param {BusPDP11} bus + * @param {CPUStatePDP11} cpu + * @param {DebuggerPDP11} dbg + */ +RK11.prototype.initBus = function(cmp, bus, cpu, dbg) +{ + this.bus = bus; + this.cpu = cpu; + this.dbg = dbg; + + this.setReady(); +}; + +if (NODE) module.exports = RK11; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index fb1e12144..df044655d 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -683,239 +683,221 @@ */ var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ja(a){return a.replace(/[&<>"']/g,function(a){return ia[a]})}function oa(a,b){return(a+" ").slice(0,b)} -function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function ra(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function ua(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 m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}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 ha(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function q(a){window&&window.alert(a)}function wa(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}xa=a}return xa}function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function Da(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ea(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Fa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sb=this.id:(this.fc=this.id.substr(0,b),this.Sb=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Gb:!1,gc:!1,ja:!1,error:!1};this.Ub=null;this.v.error=!1;this.L={};this.j=null;this.ma=d||0;v.push(this)}var Va=void 0,Wa={}; -if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=u);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},v=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} +function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ua(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encodeURIComponent(b[p]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function m(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ya=this.id:(this.zb=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,xb:!1,fa:!1,error:!1};this.rb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Ua=void 0,Va={}; +if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=r);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},t=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ca&&(this.ca=10);15>2;this.f=this.Da-1;this.w=this.F/this.Da|0;this.Ua=[];this.D=null;this.Hb=this.Jd;a=new H;Cb(a,this.j);this.aa=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[5]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c));return c} -function Eb(a,b,c){var d=!1,e=this.controller,f=e.Ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[5]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b)))} -function Fb(a,b){var c=-1,d=this.controller;(a=d.Ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[5]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=d.Hb(b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c));return c} -function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[5]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(e.Hb(c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b)))}h=Bb.prototype;h.reset=function(){this.D&&this.D()}; -h.Jd=function(a,b,c){this.j&&F(this.j,64)&&D(this.j,"warning: unrecognized I/O access("+I(this.j,a)+","+I(this.j,b)+","+c+")");return 0};h.Ka=function(a,b){b||this.reset();return!0}; -function Hb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.ca;0g&&(p=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.A)return m.Rb+=m.A-f,m.A=f,!0;if(f>=m.A+m.Rb){p=m.size-(f-n);p>g&&(p=g);m.Rb=f-m.A+p;f=n+a.Da;g-=p;k++;continue}}return Jb(1,f,g)}f=new H(f,p,a.Da,d,e);Cb(f,a.j,m);a.aa[k++]=f;f=n+a.Da;g-=p}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Kb[d]+" at "+l(b,8,!0)),!0):Jb(2,b,c)} -h.mb=function(a){return this.aa[(a&this.g)>>>this.ca].Zb(a&this.f,a)};h.Ia=function(a){return this.aa[(a&this.g)>>>this.ca].Hc(a&this.f,a)};function Lb(a,b){return a.aa[(b&a.g)>>>a.ca].mc(b&a.f,b)}h.Ob=function(a,b){this.aa[(a&this.g)>>>this.ca].cc(a&this.f,b&255,a)};h.qc=function(a,b){this.aa[(a&this.g)>>>this.ca].Pc(a&this.f,b&65535,a)}; -function Mb(a){for(var b=0,c=[],d=0;d>5&3;c.Ca=a>>1&15;c.kc=a&257?a&1?6:4:0;Sb(c);a=c.G;a&1|256&&(b=this.b.bb&16?1:2);this.g.tb=this.g.tb&-8|b};h.rd=function(a){return this.b.W[1][a>>1&7]};h.Wd=function(a,b){this.b.W[1][b>>1&7]=a&65295};h.pd=function(a){return this.b.W[1][(a>>1&7)+8]};h.Ud=function(a,b){this.b.W[1][(b>>1&7)+8]=a&65295}; -h.qd=function(a){return this.b.wa[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.od=function(a){return this.b.wa[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.W[1][b]&=65295};h.hd=function(a){return this.b.W[0][a>>1&7]};h.Nd=function(a,b){this.b.W[0][b>>1&7]=a&65295};h.fd=function(a){return this.b.W[0][(a>>1&7)+8]};h.Ld=function(a,b){this.b.W[0][(b>>1&7)+8]=a&65295};h.gd=function(a){return this.b.wa[0][a>>1&7]}; -h.Md=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.ed=function(a){return this.b.wa[0][(a>>1&7)+8]};h.Kd=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.W[0][b]&=65295};h.vd=function(a){return this.b.W[3][a>>1&7]};h.$d=function(a,b){this.b.W[3][b>>1&7]=a&65295};h.td=function(a){return this.b.W[3][(a>>1&7)+8]};h.Yd=function(a,b){this.b.W[3][(b>>1&7)+8]=a&65295};h.ud=function(a){return this.b.wa[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.W[3][b]&=65295}; -h.sd=function(a){return this.b.wa[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.W[3][b]&=65295};h.ld=function(){return Tb(this.b)};h.Qd=function(a){Ub(this.b,a&-1809|Tb(this.b)&1808);this.b.C|=128}; -function Vb(a){var b=a.D,c,d,e,f=b.xa>>13&7;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.yd,drive:f,blocksize:256,mapped:0,maxblock:b.ib[f]*b.da[f],url:"rk"+f+".dsk"});b.P&=-129;switch(b.P>>1&7){case 0:b.Mb=2496;b.oa=0;b.P=128;b.xa=0;break;case 1:if((b.xa>>4&511)>=b.ib[f]){b.oa|=32832;b.P|=49152;break}if((b.xa&15)>=b.da[f]){b.oa|=32800;b.P|=49152;break}c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;Wb(a,b.sa[f],c,d,e);return;case 2:if((b.xa>>4&511)>=b.ib[f])b.oa|= -32832,b.P|=49152;else if((b.xa&15)>=b.da[f])b.oa|=32800,b.P|=49152;else{c=(b.xa>>4&511)*b.da[f]+(b.xa&15);d=(b.P&48)<<12|b.Lb;e=65536-b.Nb&65535;a.$b(b.sa[f],c,d,e);return}}b.Mb=f<<13|b.Mb&8176|b.xa%9&15;K(a.b,20,5,144,function(){b.P=b.P&65534|128;return!!(b.P&64)})}h.yd=function(a,b,c,d,e){var f=this.D;f.Lb=d&65535;f.P=f.P&-49|d>>12&48;f.Nb=65536-e&65535;switch(a){case 1:f.oa|=33024;f.P|=49152;break;case 2:f.oa|=33792,f.P|=49152}K(this.b,20,5,144,function(){f.P=f.P&65534|128;return!!(f.P&64)})}; -function fc(a){var b=a.w,c,d,e,f=b.M>>8&3;b.M&=-2;"undefined"===typeof b.sa[f]&&(b.sa[f]={cache:[],postProcess:a.zd,drive:f,blocksize:128,mapped:1,maxblock:b.ib[f]*b.da[f],url:"rl"+f+".dsk"});switch(b.M>>1&7){case 2:b.Za&8&&(b.M&=63);b.Za=b.Qc[f]|b.gb&64;break;case 3:1==(b.fa&3)&&(b.gb=b.fa&4?b.gb+(b.fa&65408)&65408|b.fa<<2&64:b.gb-(b.fa&65408)&65408|b.fa<<2&64,b.fa=b.gb);break;case 4:b.Za=b.gb;break;case 5:if(b.fa>>6>=b.ib[f]){b.M|=37888;break}if((b.fa&63)>=b.da[f]){b.M|=37888;break}c=(b.fa>>6)* -b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;Wb(a,b.sa[f],c,d,e);return;case 6:if(b.fa>>6>=b.ib[f])b.M|=37888;else if((b.fa&63)>=b.da[f])b.M|=37888;else{c=(b.fa>>6)*b.da[f]+(b.fa&63);d=(b.Va&63)<<16|b.Fb;e=65536-b.Za&65535;a.$b(b.sa[f],c,d,e);return}}K(a.b,20,5,112,function(){b.M|=129;return!!(b.M&64)})} -h.zd=function(a,b,c,d,e){var f=this.w;f.Fb=d&65535;f.M=f.M&-49|d>>12&48;f.Va=d>>16&63;f.fa=~~(c/f.da[b.Na])<<6|c%f.da[b.Na];f.gb=f.fa;f.Za=65536-e&65535;switch(a){case 1:f.M|=33792;break;case 2:f.M|=40960}K(this.b,20,5,112,function(){f.M|=129;return!!(f.M&64)})};function gc(a){a=a.B;a.T=2176;a.Ea=0;a.ua=[4544,4544,4544,4544,4544,4544,4544,4544];a.yb=[0,0,0,0,0,0,0,0];a.ob=a.zb=a.xb=a.eb=a.pc=0} -function hc(a,b){var c=a.B,d,e,f;c.T&=-16513;c.Ea&=-2049;c.ua[b]&=-1153;K(a.b,-1,0,172);"undefined"===typeof c.sa[b]&&(c.sa[b]={cache:[],postProcess:a.Ad,drive:b,blocksize:256,mapped:0,maxblock:c.ec[0]*c.hb[0]*c.da[0],url:"rp"+b+".dsk"});switch(c.T&63){case 5:c.bc[b]=c.Ra[b];c.T|=32896;c.ua[b]|=32896;c.ob|=1<=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0]){c.yb[b]|=1024;c.T|=49152;break}d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))* -c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;Wb(a,c.sa[b],d,e,f);return;case 57:if(c.Ra[b]>=c.ec[0]||c.Fa[b]>>8>=c.hb[0]||(c.Fa[b]&255)>=c.da[0])c.yb[b]|=1024,c.T|=49152;else{d=(c.Ra[b]*c.hb[0]+(c.Fa[b]>>8))*c.da[0]+(c.Fa[b]&255);e=(c.eb&63)<<16|c.xb;f=65536-c.zb&65535;a.$b(c.sa[b],d,e,f);return}}K(a.b,3,5,172,function(){c.T=c.T&65534|128;c.ua[b]|=128;return!!(c.T&64)})} -h.Ad=function(a,b,c,d,e){var f=this.B;f.zb=65536-e&65535;f.xb=d&65535;f.T=f.T&-769|d>>8&768;f.eb=d>>16&63;e=~~(c/f.da[0]);d=~~(e/f.hb[0]);f.Fa[b.Na]=e%f.hb[0]<<8|c%f.da[0];f.bc[b.Na]=f.Ra[b.Na]=d;f.ob|=1<=b.bd-1&&(f.ua[b.Na]|=1024);switch(a){case 1:f.Ea|=512;f.T|=49152;break;case 2:f.Ea|=2048,f.T|=49152}K(this.b,20,5,172,function(){f.ua[b.Na]|=128;f.T=f.T&65534|128;return!!(f.T&64)})}; -function ic(a,b,c,d,e,f){var g=~~((f+c.Wa-1)/c.Wa),k=new XMLHttpRequest;2048>g&&d+2048this.b.Cb(a.ad?jc(this.b,c):c,a.cache[b][e])){a.Yb(2,a,b,c,d);return}c+=2;--d}b++}a.Yb(0,a,b,c,d)}; -function Wb(a,b,c,d,e){for(var f,g;0g){b.Yb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.Yb(0,b,c,d,e)}h.reset=function(){this.g.tb=this.g.tb&-120|20;this.f.Ya=0;this.D.P=128;this.w.M=128;gc(this)}; -h.Sc=function(a,b,c){var d,e,f=this.b;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.cb&65280:(a&1&&(b<<=8),f.cb=b|255,d=0);break;case 4194298:if(0>b)d=f.oc;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.oc=d;f.C|=2}break;case 4194294:if(70!==f.lb)return f.K(4,222);0>b?d=f.I:d=f.I=0;break;case 4194292:if(70!==f.lb)return f.K(4,224);d=1;break;case 4194290:if(70!==f.lb)return f.K(4,226);d=0;break;case 4194288:if(70!==f.lb)return f.K(4,228);d=61183;break;case 4194296:0<= -b&&!(a&1)&&(b&=255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.lb)return f.K(4,232);e=a-4194272>>1;0>b?d=f.jc[e]:(d=M(this,f.jc[e],a,b,c),0<=d&&(f.jc[e]=d));break;case 4194254:return a&1?f.O>>14&1?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[3]=b),d=f.Aa[3]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[1]=b),d=f.Aa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.O&2048?(0<=b&&(f.u[e]=b),d=f.u[e]):(0<=b&&(f.Qa[e]= -b),d=f.Qa[e]),d;case 4194246:return a&1?(0<=b&&(f.u[7]=b),d=f.u[7]):f.O>>14&0?(0<=b&&(f.u[6]=b),d=f.u[6]):(0<=b&&(f.Aa[0]=b),d=f.Aa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.O&2048?(0<=b&&(f.Qa[e]=b),d=f.Qa[e]):(0<=b&&(f.u[e]=b),d=f.u[e]),d;default:return f.I|=16,f.K(4,124)}break;case 4194176:e=a>>1&31;d=M(this,f.za[3][e],a,b,c);0<=d&&(f.za[3][e]=d,f.za[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=M(this,f.ac,a,b,c);0<=d&&(f.ac=d);break;case 4194172:d=f.ab;d&65280&& -(d=(d<<8|d>>8)&65535);break;case 4194168:0>b?d=this.g.Id&65535:(d=M(this,this.g.data,a,b,c),0<=d&&(this.g.data=d));break;default:return f.I|=16,f.K(4,126)}break;case 4194048:e=this.D;switch(a&-2){case 4194048:d=M(this,e.Mb,a,b,c);0<=d&&(e.Mb=d);break;case 4194050:d=M(this,e.oa,a,b,c);0<=d&&(e.oa=d);break;case 4194052:d=M(this,e.P,a,b,c);0<=b&&0<=d&&(e.P=d&-36993|e.P&36992,e.P&1&&Vb(this));break;case 4194054:d=M(this,e.Nb,a,b,c);0<=d&&(e.Nb=d);break;case 4194056:d=M(this,e.Lb,a,b,c);0<=d&&(e.Lb=d); -break;case 4194058:d=M(this,e.xa,a,b,c);0<=d&&(e.xa=d);break;case 4194060:break;case 4194062:d=M(this,e.Jc,a,b,c);0<=d&&(e.Jc=d);break;default:return f.I|=16,f.K(4,128)}break;case 4193728:var g=this.B;e=g.Ea&7;switch(a&-2){case 4193728:d=M(this,g.T,a,b,c);0<=b&&0<=d&&(g.eb=g.eb&60|d>>8&3,g.T=d&17279|g.T&34944|2048,d&1&&g.T&128?hc(this,e):192==(d&192)&&K(f,0,5,172));break;case 4193730:d=M(this,g.zb,a,b,c);0<=d&&(g.zb=d);break;case 4193732:d=M(this,g.xb,a,b,c);0<=d&&(g.xb=d&65534);break;case 4193734:d= -M(this,g.Fa[e],a,b,c);0<=d&&(g.Fa[e]=d&7967);break;case 4193736:d=M(this,g.Ea,a,b,c);0<=d&&(g.Ea=d&63|g.Ea&65472,d&128&&gc(this));break;case 4193738:d=g.ua[e];break;case 4193740:d=g.yb[e];break;case 4193742:d=M(this,g.ob,a,b,c);0<=d&&(g.ob=d&255);break;case 4193744:d=g.Fd[e];break;case 4193746:d=M(this,g.Kc,a,b,c);0<=d&&(g.Kc=d);break;case 4193748:d=M(this,g.Lc[e],a,b,c);0<=d&&(g.Lc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Gd[e];break;case 4193754:d=M(this,g.Mc[e],a,b,c);0<=d&& -(g.Mc[e]=d);break;case 4193756:d=M(this,g.Ra[e],a,b,c);0<=d&&(g.Ra[e]=d&511);break;case 4193758:g.bc[e]=g.Ra[e];d=g.bc[e];break;case 4193760:d=g.Dd[e];break;case 4193762:d=g.Ed[e];break;case 4193764:d=g.Bd[e];break;case 4193766:d=g.Cd[e];break;case 4193768:d=M(this,g.eb,a,b,c);0<=d&&(g.eb=d&63,g.T=g.T&-769|(d&3)<<8);break;case 4193770:d=M(this,g.pc,a,b,c);0<=d&&(g.pc=d);break;default:return f.I|=16,f.K(4,132)}break;case 4192512:e=this.w;switch(a&-2){case 4192512:d=M(this,e.M,a,b,c);0<=b&&0<=d&&(e.Va= -e.Va&60|d>>4&3,e.M=e.M&-1023|d&1022,e.M&128||fc(this));break;case 4192514:d=M(this,e.Fb,a,b,c);0<=d&&(e.Fb=d&65534);break;case 4192516:d=M(this,e.fa,a,b,c);0<=d&&(e.fa=d);break;case 4192518:d=M(this,e.Za,a,b,c);0<=d&&(e.Za=d);break;case 4192520:d=M(this,e.Va,a,b,c);0<=d&&(e.Va=d&63,e.M=e.M&-49|(e.Va&3)<<4);break;default:return f.I|=16,f.K(4,134)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.bb:(d=M(this,f.bb,a,b,c),0<=d&&(70!==f.lb&&(d&=-49),f.bb=d,f.Xb[0]=d&4?15:7,f.Xb[1]=d&2?15:7,f.Xb[3]= -d&1?15:7,f.kc&&(e=2,f.bb&16&&(e=1),this.g.tb=this.g.tb&-8|e)));break;default:return f.I|=16,f.K(4,136)}break;case 4191424:e=a>>1&31;d=M(this,f.za[0][e],a,b,c);0<=d&&(f.za[0][e]=d,f.za[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=M(this,f.za[1][e],a,b,c);0<=d&&(f.za[1][e]=d,f.za[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.lb)return f.K(4,234);e=a>>2&31;d=f.Pb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=M(this,d,a,b,c),0<=d&&(f.Pb[e]=a&2?d<<16|f.Pb[e]&65535:f.Pb[e]&4294901760|d&65534));break; -case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0>b)d=Pb[a>>1&255];else return f.I|=16,f.K(4,138);break;default:return f.I|=16,f.K(4,142)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; -var N={},L=(N[62592]=[null,null,J.prototype.rd,J.prototype.Wd,"SISDR"],N[62608]=[null,null,J.prototype.pd,J.prototype.Ud,"SDSDR"],N[62624]=[null,null,J.prototype.qd,J.prototype.Vd,"SISAR"],N[62640]=[null,null,J.prototype.od,J.prototype.Td,"SDSAR"],N[62656]=[null,null,J.prototype.hd,J.prototype.Nd,"KISDR"],N[62672]=[null,null,J.prototype.fd,J.prototype.Ld,"KDSDR"],N[62688]=[null,null,J.prototype.gd,J.prototype.Md,"KISAR"],N[62704]=[null,null,J.prototype.ed,J.prototype.Kd,"KDSAR"],N[65382]=[null,null, -J.prototype.jd,J.prototype.Od,"LKS"],N[65402]=[null,null,J.prototype.kd,J.prototype.Pd,"MMR0"],N[65408]=[null,null,J.prototype.vd,J.prototype.$d,"UISDR"],N[65424]=[null,null,J.prototype.td,J.prototype.Yd,"UDSDR"],N[65440]=[null,null,J.prototype.ud,J.prototype.Zd,"UISAR"],N[65456]=[null,null,J.prototype.sd,J.prototype.Xd,"UDSAR"],N[65534]=[null,null,J.prototype.ld,J.prototype.Qd,"PSW"],N);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592]; -L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656]; -L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408]; -L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; -Ma(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.D,0,c>>2),qc(this,mc?rc:sc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Z:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ka:function(a){var 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},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<< -a)|b<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Xa=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,1,c.S)&&c.ia(!0)}return this.lc(a,b)},ea:function(a,b){if(this.j&&null!=this.A){var c=this.j;xc(c,this.A+a,2,c.S)&&c.ia(!0)}return this.mc(a,b)},na:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,1,d.G)&&d.ia(!0)}this.f?this.L(a, -b,c):this.dc(a,b,c)},ya:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;xc(d,this.A+a,2,d.G)&&d.ia(!0)}this.f?this.L(a,b,c):this.tc(a,b,c)},R:function(a){return this.w[a]},X:function(a,b){a=this.w[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},$:function(a){return this.B.getUint16(a,!0)},ha:function(a,b){a=this.H[a>>1];this.j&&F(this.j,128)&&D(this.j,"Memory.readWord("+I(this.j,b)+"): "+I(this.j,a),!0);return a},la:function(a,b){this.w[a]=b; -this.Xa=!0},qa:function(a,b,c){this.w[a]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},va:function(a,b){this.B.setUint16(a,b,!0);this.Xa=!0},Ba:function(a,b,c){this.H[a>>1]=b;this.Xa=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}};function Cb(a,b,c){a.j=b;a.g=a.F=0;c&&((a.g=c.g)&&wc(a,vc,!1),(a.F=c.F)&&uc(a,vc,!1))} -function yc(a,b){b?--a.F||(a.cc=a.f?a.L:a.dc,a.Pc=a.f?a.G:a.tc):--a.g||(a.Zb=a.lc,a.Hc=a.mc)}function uc(a,b,c){c&&a.F||(a.cc=!a.f&&b[1]||a.L,a.Pc=!a.f&&b[3]||a.G);if(c||void 0===c)a.dc=b[1]||a.L,a.tc=b[3]||a.G}function wc(a,b,c){c&&a.g||(a.Zb=b[0]||a.J,a.Hc=b[2]||a.N);if(c||void 0===c)a.lc=b[0]||a.J,a.mc=b[2]||a.N}function qc(a,b){b||(b=zc);wc(a,b,void 0);uc(a,b,void 0)}var zc=[],tc=[H.prototype.Z,H.prototype.ra,H.prototype.ka,H.prototype.Ca],vc=[H.prototype.S,H.prototype.na,H.prototype.ea,H.prototype.ya]; -if(xb)var sc=[H.prototype.R,H.prototype.la,H.prototype.$,H.prototype.va],rc=[H.prototype.X,H.prototype.qa,H.prototype.ha,H.prototype.Ba];function Ac(a,b){u.call(this,"CPU",a,Ac,1);var c=a.multiplier||1;this.Ta=a.cycles||b;this.$a=c;this.qb=Math.round(this.Ta/1E4)/100;this.nb=this.qb*this.$a;this.v.ga=!1;this.v.rc=!1;this.v.Eb=a.autoStart;this.v.wc=!1;this.v.rb=!1;this.Ib=this.na=0;this.Jb=a.csStart;this.ub=a.csInterval;this.vb=a.csStop;this.N=[];this.Ec=this.Hd.bind(this);G(this)}y(Ac); -var Bc=["power","reset"];h=Ac.prototype;h.Pa=function(a,b,c,d){this.D=a;this.F=b;this.j=d;for(b=0;b=a.na&&(a.na+=a.ub,c=!0);0<=a.vb&&a.vb<=Hc(a)&&(a.ub=a.vb=-1,Ec(a),a.ia(),c=!0);c&&a.i(Hc(a)+" cycles: checksum="+l(a.Ib))}} -function Ic(a,b,c,d){if(a.L[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ia());var e=a.j&&a.j.na||8;c=!a.v.ga||a.v.wc?8==e?ca(c,d):l(c,d):"--------".substr(0,d||4);a.L[b].textContent!=c&&(a.L[b].textContent=c)}} -h.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.L[b]=c;a=!0;break;case "run":this.L[b]=c;c.onclick=function(){var a;if(a=d.D)if(a=d.D,a.v.ja)a=!0;else{var b=null,c,k=cb(a.id);for(c=0;ca.ha/a.nb?b=1:d=!0;a.$a=b;b=a.qb*a.$a;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.L.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.D&&a.D.Qb()}Kc(a,a.$);a.$=0;a.Z=sa();a.ka=0;Lc(a);return d}function Qb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.Ta*a.$a/1E3,a.N[b][0]=c)}function ed(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function fd(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -h.Hd=function(){if(this.v.ga){this.sb>=this.Ta&&Lc(this,!0);this.ya=0;this.Sa=sa();if(this.ka){var a=this.Sa-this.ka;a>this.Wb&&(this.Z+=a,this.Z>this.Sa&&(this.Z=this.Sa))}try{do{var b=ed(this,this.v.rb?1:this.fb);try{this.Bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.S-this.b;fd(this,c);this.ya+=c;this.$+=c;Kc(this,0,!0);Gc(this,c);this.qa-=c;if(0>=this.qa){this.qa+=this.fb;15<=++this.Cc&&(this.D&&this.D.Ga(),this.Cc=0);break}}while(this.v.ga)}catch(e){this.ia();O(this);this.D&&this.D.stop(sa(), -Hc(this));kb(this,e.stack||e.message);return}if(this.v.ga){a=setTimeout;b=this.Ec;this.ka=sa();c=this.Wb;this.ya&&(c=Math.round(c*this.ya/this.fb));var c=c-(this.ka-this.Sa),d=this.ka-this.Z;d&&(this.ha=Math.round(this.$/(10*d))/100,864E5<=d&&(this.la=0,Jc(this)));if(0>c||this.hac&&(this.Z-=c),c=0;this.sb+=this.ya;this.ka+=c;a(b,c)}}}; -h.Ab=function(a){if(jb(this))return!1;if(this.v.ga)return this.i(this.toString()+" busy"),!1;Jc(this);this.v.ga=!0;this.v.rc=!0;this.va&&this.va.start();var b=this.L.run;b&&(b.textContent="Halt");this.D&&(a&&this.D.Qb(!0),this.D.start(this.Z,Hc(this)));O(this,!0);setTimeout(this.Ec,0);return!0};h.Bb=function(){return 0}; -h.ia=function(a){if(this.v.ga){this.S-=this.b;this.b=0;Kc(this,this.$);this.$=0;this.v.ga=!1;this.va&&this.va.stop();var b=this.L.run;b&&(b.textContent="Run");this.D&&this.D.stop(sa(),Hc(this));O(this)}this.v.complete=a};function O(a,b){a.D&&a.D.Ga(b)} -function gd(a){this.cd=+a.model||1170;this.dd=a.resetAddr||0;Ac.call(this,a,6666667);this.Tb=0;this.decode=hd.bind(this);this.U=65536;this.V=32768;this.ba=65535;this.Y=32768;this.O=15;this.u=[0,0,0,0,0,0,0,this.dd];this.Qa=[0,0,0,0,0,0];this.Aa=[0,0,0,0];this.Ca=this.B=0;this.Yc=[4,2,0,1];this.W=[[0,0,0,0,0,0,0,0,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]];this.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.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],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Pb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.jc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.g=this.f=this.pb=this.H=this.J=this.C=0;this.lb=70;this.ra=-1;id(this);this.v.complete=this.v.Uc=!1}y(gd,Ac);h=gd.prototype;h.reset=function(){this.v.ga&&this.ia();id(this);Dc(this);this.v.error=!1;this.parent.reset.call(this)};function id(a){a.cb=255;a.I=0;a.oc=0;a.G=0;a.ab=0;a.ac=0;a.bb=0;a.kc=0;a.Ba=0;a.Xb=262143;a.Vb=253952;a.w=[];a.C|=2;Sb(a)} -function Sb(a){a.kc?(a.ea=65536,a.R=a.Xc,a.X=a.Ic,a.Fc=a.ae):(a.ea=0,a.R=a.Wc,a.X=a.wb,a.Fc=a.Cb)}h.zc=function(){return 0};h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.la,this.$a]);a.set(2,Mb(this.F));return a.data()}; -h.restore=function(a){var b=a[1];this.la=b[1];Jc(this,b[3]);a:{b=this.F;a=a[2];var c;for(c=0;cb){a.w[f].Ma-=b;break}b-=a.w[f].Ma}a.w.splice(f+1,0,{Ma:b,Gc:c<<5&224,Oc:d,ic:e})}a.C|=2}function Tb(a){return a.O=a.O&63728|a.Oa()|ld(a)|kd(a)|jd(a)} -function Ub(a,b){a.Y=b<<12;a.ba=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.O)&2048)for(var c=a.Qa.length;0<=--c;){var d=a.u[c];a.u[c]=a.Qa[c];a.Qa[c]=d}a.B=b>>14&3;c=a.O>>14&3;a.B!=c&&(a.Aa[c]=a.u[6],a.u[6]=a.Aa[a.B]);a.C|=2;a.O=b}function Q(a,b){a.C&128||(a.Y=a.ba=b,a.V=0)}function od(a,b,c){a.C&128||(a.Y=a.ba=a.U=b,a.V=c||0)}function pd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^b)&(d^b))}function qd(a,b){a.C&128||(a.Y=a.ba=a.U=b,a.V=a.Y^a.U>>1)} -function rd(a,b,c,d){a.C&128||(a.Y=a.ba=a.U=b,a.V=(c^d)&(d^b))}h.K=function(a){var b=!1;0>this.ra?this.ra=Tb(this):this.B||(a=4,b=!0);this.G&57344||(this.ab=63222,this.ac=a);this.B=0;var c=this.X(a|this.ea),d=this.X(a+2&65535|this.ea);Ub(this,d&-12289|this.ra>>2&12288);b&&(this.I|=4,this.u[6]=4);sd(this,this.ra);sd(this,this.u[7]);nd(this,c);this.C&=-113;this.ra=-1;throw a;};function td(a){var b=ud(a),c=ud(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);nd(a,b);Ub(a,c);a.C&=-17} -function jc(a,b){var c=b>>13&31;31>c?a.bb&32&&(b=a.Pb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function vd(a,b,c){var d,e,f,g=0;d=b>>13;a.bb&a.Yc[a.B]||(d&=7);e=a.W[a.B][d];f=(a.wa[a.B][d]<<6)+(b&8191)&a.Xb;ff&&(3932160<=f&&(f=jc(a,f&262143)),f>=a.Vb&&4186112>f&&(a.I|=32,a.K(4,12))));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.W[a.B][d]=e;if(4194170!==f||a.B)a.Ba=a.B,a.Ca=d;g&&(g&57344&&(0<=a.ra&&(g|=128),a.G&57344||(a.G=a.G|g|a.Ba<<5|a.Ca<<1),a.K(168,16)),a.G&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.X(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.X(e)|g;a.b-= -8;break;case 6:return e=md(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=md(a),e=e+a.u[c]&65535,e=a.X(e|a.ea)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.ab=a.ab<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.u[6]<=a.cb||65534<=a.u[6])&&(a.u[6]<=a.cb-32?(a.I|=4,a.u[6]=4,a.K(4,24)):(a.I|=8,a.C|=64));return e}h.Wc=function(a,b,c){return wd(this,a,b,c)};h.Xc=function(a,b,c){return vd(this,wd(this,a,b,c),c)};h.wb=function(a){a&1&&(this.I|=64,this.K(4,10));return this.F.Ia(a)}; -h.Ic=function(a){return this.wb(vd(this,a,2))};h.Cb=function(a,b){a&1&&(this.I|=64,this.K(4,10));this.F.qc(a,b&65535)};h.ae=function(a,b){this.Cb(vd(this,a|65536,4),b)};function xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=wd(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.X(d|c&a.ea),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.Aa[a.O>>12&3];return c} -function yd(a,b,c,d){a.G&57344||(a.ab=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=wd(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=vd(a,e|c&65536,4),a.B=a.O>>14&3,a.Cb(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.Aa[a.O>>12&3]=d}function zd(a,b){b>>=6;var c=a.J=b&7;(b=a.H=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Ad(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.H=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function Bd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return wd(a,b,c,8)} -function Cd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.R(b,c,3),a=a.F.mb(c)):a=a.u[c]&255;return a}function Dd(a,b){var c,d=a.f=b&7;(b=a.g=(b&56)>>3)?c=a.wb(a.R(b,d,2)):c=a.u[d];return c}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.pb=a.R(b,e,7),c=d.call(a,c,a.F.mb(e)),e&1&&a.b--,a.F.Ob(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.R(b,e,6),a.Cb(e,d.call(a,c,a.wb(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Ed(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.R(b,e,5),d&1&&a.b--,a.F.Ob(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Fd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.Cb(a.R(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(nd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.Bb=function(a){this.v.complete=!0;var b=this.v.Uc=this.j&&Gd(this.j),c=a?this.v.rc?0:1:-1;this.v.rc=!1;this.S=this.b=a;do{if(b){if(Hd(this.j,this.u[7],c)){this.ia();break}c=1}if(this.C&&(this.C&112&&(this.C&32?this.K(168,28):this.C&64?this.K(4,30):this.C&16&&this.K(12,32),this.C&=-113),this.C&7))if(this.C&2){this.C&=-3;a=null;for(var d=this.oc&224,e=this.w.length;0<=--e;){if(0d&&(d=this.w[e].Gc,a=this.w[e],this.w.splice(e,1))}d>(this.O&224)&&(this.C&4&&(this.u[7]=this.u[7]+2&65535,this.C&=-5),a?this.K(a.Oc,26):this.K(160,26))}else this.C&1&&this.C++;this.G&57344||(this.ab=0,this.ac=this.u[7]);this.C=this.C&7|this.O&16;this.decode(md(this))}while(0>1|b<<16;qd(this,a);return a&65535}function Nd(a,b){a=b&2048|b>>1|b<<8;qd(this,a<<8);return a&255}function Od(a,b){a=b&~a;Q(this,a);return a}function Pd(a,b){a=b&~a;Q(this,a<<8);return a}function Qd(a,b){a|=b;Q(this,a);return a} -function Rd(a,b){a|=b;Q(this,a<<8);return a}function Sd(a,b){a=~b|65536;od(this,a);return a&65535}function Td(a,b){a=~b|256;od(this,a<<8);return a&255}function Ud(a,b){a=b-a;this.C&128||(this.Y=this.ba=a,this.V=b&(b^a));return a&65535}function Vd(a,b){a=b-a;var c=a<<8;b<<=8;this.C&128||(this.Y=this.ba=c,this.V=b&(b^c));return a&255}function Wd(a,b){a=b+a;this.C&128||(this.Y=this.ba=a,this.V=a&(b^a));return a&65535} -function Xd(a,b){a=b+a;var c=a<<8;this.C&128||(this.Y=this.ba=c,this.V=c&(b<<8^c));return a&255}function Yd(a,b){a=-b;od(this,a,a&b&32768);return a&65535}function Zd(a,b){a=-b;od(this,a<<8,(a&b&128)<<8);return a&255}function $d(a,b){a=b<<1|this.U>>16&1;qd(this,a);return a&65535}function ae(a,b){a=b<<1|this.U>>16&1;qd(this,a<<8);return a&255}function be(a,b){a=(this.U&65536|b)>>1|b<<16;qd(this,a);return a&65535}function ce(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;qd(this,a<<8);return a&255} -function de(a,b){var c=b-a;rd(this,c,a,b);return c&65535}function ee(a,b){var c=b-a;rd(this,c<<8,a<<8,b<<8);return c&255}function fe(a,b){this.C&128||(this.Y=this.ba=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function ge(a,b){a^=b;Q(this,a);return a&65535} -function he(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.Y=this.ba=c;this.b-=(this.g?6:7)+b} -function ie(a){var b=Dd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function U(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.ba=1);a&8&&(this.Y=0);this.b-=5} -function je(a){var b=Dd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.Y=d>>16):(this.V=32768,this.ba=d>>15|d,this.Y=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.Y=0,this.V=32768,this.U=65536,this.b-=7}var ke=[0,7,7,10,7,11,9,13];function le(a){var b=this.b;nd(this,Bd(this,a));this.b=b-ke[this.g]} -var me=[0,14,14,17,14,18,16,20];function ne(a){var b=this.b,c=Bd(this,a);a=a>>6&7;sd(this,this.u[a]);this.u[a]=this.u[7];nd(this,c);this.b=b-me[this.g]}var oe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],pe=[7,13,13,17,14,18,17,21];function qe(a){var b=Dd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.C&128||(this.Y=b>>16,this.ba=this.Y|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)nd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){S(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Oe(a){S(this,a,Ad(this,a),ge);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.K(8,6)}function hd(a){Pe[a>>12].call(this,a)} -var Pe=[function(a){Qe[a>>8&15].call(this,a)},function(a){var b=Ad(this,a),c=this.b;Q(this,Fd(this,a,b));this.b=c-oe[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=Ad(this,a);a=Dd(this,a);rd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,Ad(this,a)&Dd(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Od);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){S(this,a,Ad(this,a),Qd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),Id);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=zd(this,a);Q(this,Ed(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=zd(this,a)<<8;a=Cd(this,a)<<8;rd(this,b-a,a,b);this.b-=this.g? -4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,(zd(this,a)&Cd(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Pd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,zd(this,a),Rd);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){S(this,a,Ad(this,a),de);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],Qe= -[function(a){Te[a>>4&15].call(this,a)},function(a){T(this,a,!0)},function(a){T(this,a,!ld(this))},function(a){T(this,a,ld(this))},function(a){T(this,a,!this.Oa()==!kd(this))},function(a){T(this,a,!this.Oa()!=!kd(this))},function(a){T(this,a,!ld(this)&&!this.Oa()==!kd(this))},function(a){T(this,a,ld(this)||!this.Oa()!=!kd(this))},ne,ne,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){od(this, -Fd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ud);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){S(this,a,0,Yd);this.b-=this.g?11:6},function(a){S(this,a,jd(this)?1:0,Id);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,jd(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);od(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],We=[function(a){S(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Kd);this.b-=this.g?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Ic(a|65536);nd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xd(this,a,0);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a, -0,b);Q(this,b);this.b=c-pe[this.g]},function(a){Q(this,Fd(this,a,this.Oa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,le,le,le,le,function(a){if(a&8)this.K(8,6);else{var b=ud(this);a&=7;nd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.C|=1),this.b-=5):this.K(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.O&49152?(this.I|=128,this.K(4, -3)):this.ia();this.b-=7},function(){this.C|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){td(this);this.C|=this.O&16;this.b-=13},function(){this.K(12,1);this.b-=5},function(){this.K(16,4);this.b-=25},function(){this.O&49152||(id(this),this.F.reset());this.b-=667},function(){td(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[re,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},U,function(){this.ba=1;this.b-=5},U,U,U,function(){this.Y=0;this.b-=5},U,U,U,U,U,U,U],$e=[re,function(){this.U= -65536;this.b-=5},function(){this.V=32768;this.b-=5},se,function(){this.ba=0;this.b-=5},se,se,se,function(){this.Y=32768;this.b-=5},se,se,se,se,se,se,se],Re=[qe,qe,je,je,he,he,ie,ie,Oe,Oe,V,V,V,V,te,te],Se=[function(a){T(this,a,!this.Oa())},function(a){T(this,a,this.Oa())},function(a){T(this,a,!jd(this)&&!ld(this))},function(a){T(this,a,jd(this)||ld(this))},function(a){T(this,a,!kd(this))},function(a){T(this,a,kd(this))},function(a){T(this,a,!jd(this))},function(a){T(this,a,jd(this))},function(){this.K(24, -2);this.b-=25},function(){this.K(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){od(this,Ed(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Td);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Vd);this.b-=this.g?9:3+(7==this.f?2:0)}],bf=[function(a){R(this,a,0,Zd);this.b-= -this.g?11:6},function(a){R(this,a,jd(this)?1:0,Jd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,jd(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Cd(this,a);od(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],cf=[function(a){R(this,a,0,ce);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.g?9+(this.pb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ld);this.b-=this.g?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=xd(this,a,65536);sd(this,a);Q(this,a);this.b-=11},function(a){var b=ud(this),c=this.b;yd(this,a,65536,b);Q(this,b);this.b=c-pe[this.g]},V];function ef(a){u.call(this,"ROM",a,ef);this.f=null;this.B=a.addr;this.g=a.size;this.G=a.writable;this.D=a.alias;this.w=a.file;this.H=da(this.w);if(this.w){a=this.w;var b=fa(this.H);"json"!=b&&"hex"!=b&&(a=ha()+"/api/v1/dump?file="+this.w+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Pa=function(a,b,c,d){this.F=b;this.b=c;this.j=d;gf(this)};ef.prototype.Ka=function(){if(this.La){if(this.j){var a=this.j,b=this.id,c=this.B,d=this.g,e=this.La,f=[],g;for(g in e){var k=e[g];"number"==typeof k&&(e[g]=k={o:k});var m=k.o,n=k.a;if(void 0!==m){var p=f,m=[m>>>0,g],t=ra(p,m,a.vc);0>t&&p.splice(-(t+1),0,m)}n&&(k.a=n.replace(/''/g,'"'))}a.H.push({ee:b,A:c,Zc:d,La:e,uc:f})}delete this.La}return!0};ef.prototype.Ja=function(){return!0}; -function ff(a,b,c,d){if(d)a.ta("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.fc,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,k=eval("("+c+")");if(f=k.bytes)a.f=f;else if(f=k.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=k.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=k;a.La=k.symbols;if(!a.f.length){q("Empty ROM: "+ -b);return}if(1==a.f.length){q(a.f[0]);return}}catch(m){a.ta("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.ca].dc(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.D?b.push(a.D):null!=a.D&&a.D.length&&(b=a.D);for(c=0;c>>e.ca;0>>=e.ca;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=pa(b[0]);if(c!=this.Sb)return;b=pa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.N=d.receiveData){this.status(this.fc+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ka=function(a,b){if(!b)if(this.Dc(),!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(){mf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.X=0;a.f=0;a.g=128;a.B=[];return!0}h.nc=function(a){if("number"==typeof a)this.B.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.Z||8,c=a-this.H%a,this.Z&&(b=oa("",c)));this.R&&!this.H&&c&&(b=String.fromCharCode(this.R)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;K(this.b,100,4,52,this.S)}};var nf={},lf=(nf[65392]=[null,null,X.prototype.nd,X.prototype.Sd,"RCSR"],nf[65394]=[null,null,X.prototype.md,X.prototype.Rd,"RBUF"],nf[65396]=[null,null,X.prototype.xd,X.prototype.ce,"XCSR"],nf[65398]=[null,null,X.prototype.wd,X.prototype.be,"XBUF"],nf);Ma(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ac=function(){return-1};of.prototype.Bc=function(){}; -function qf(a,b,c,d){if(c)if(b){0>a.B&&a.w.length&&(a.B=0);if(0>a.B||b!=a.w[a.B])a.w.splice(0,0,b),a.B=0;a.B--}else a.$?b="end":b=a.w[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(pa(b.substring(c,f))),c=f+1}}return a} -function rf(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; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,bus:64,mem:128,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function yb(a){r.call(this,"Panel",a,yb)}y(yb);h=yb.prototype;h.ja=function(a,b,c,d){return this.F&&this.F.ja(a,b,c,d)||this.b&&this.b.ja(a,b,c,d)||this.j&&this.j.ja(a,b,c,d)?!0:this.parent.ja.call(this,a,b,c,d)};h.Ga=function(a,b,c,d){this.F=a;this.B=b;this.b=c;this.j=d}; +h.Ca=function(a,b){b||zb();return!0};h.Ba=function(){return!0};h.za=function(){};function zb(){for(var a=!1,b=A(document,"pdp11","panel"),c=0;c>1)+2;10>this.Z&&(this.Z=10);15>2;this.f=this.ya-1;this.A=this.B/this.ya|0;this.Ka=[];this.F=[];a=new H(this.b);Bb(a,this.j);this.X=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Db(a,b,c){var d=!1,e=this.controller,f=e.Ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} +function Eb(a,b){var c=-1,d=this.controller;(a=d.Ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Fb(a,b,c){var d=!1,e=this.controller;if(a=e.Ka[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))}h=Ab.prototype;h.reset=function(){for(var a=0;a>>a.Z;0g&&(q=g);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+g<=n.w)return n.qb+=n.w-f,n.w=f,!0;if(f>=n.w+n.qb){q=n.size-(f-p);q>g&&(q=g);n.qb=f-n.w+q;f=p+a.ya;g-=q;l++;continue}}return Jb(1,f,g)}f=new H(a.b,f,q,a.ya,d,e);Bb(f,a.j,n);a.X[l++]=f;f=p+a.ya;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Kb[d]+" at "+k(b,8,!0)),!0):Jb(2,b,c)} +h.Ua=function(a){return this.X[(a&this.g)>>>this.Z].ub(a&this.f,a)};h.ma=function(a){return this.X[(a&this.g)>>>this.Z].dc(a&this.f,a)};function Lb(a,b){return a.X[(b&a.g)>>>a.Z].Db(b&a.f,b)}h.ob=function(a,b){this.X[(a&this.g)>>>this.Z].vb(a&this.f,b&255,a)};h.Xa=function(a,b){this.X[(a&this.g)>>>this.Z].oc(a&this.f,b&65535,a)}; +function Mb(a){for(var b=0,c=[],d=0;da.b.Xb))for(var f=e[0]?e[0].bind(b):null,g=e[1]?e[1].bind(b):null,l=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,p=a,q=+d,e=e[4],v=+d;v<=q;v+=2){var u=v&8191;void 0!==p.Ka[u]?m("I/O address already registered: "+k(v,8,!0)):p.Ka[u]=[f,g,l,n,e||"unknown",!1]}}}function Ob(a,b){a.F.push(b)}function Jb(a,b,c){m("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1} +function J(a){r.call(this,"Device",a,J);this.g={data:0,Gd:0,tb:20,Jd:0};this.f={Hd:0,Ib:-1}}y(J);h=J.prototype;h.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;var e=this;this.f.Ib=Pb(this.b,function(){e.f.Ma|=128;e.f.Ma&64&&(Qb(e.b,0,6,64),Rb(e.b,e.f.Ib,1E3/60))});Nb(b,this,K);Ob(b,this.reset.bind(this));G(this)};h.Gc=function(){var a=this.f.Ma;this.f.Ma&=-129;return a};h.kd=function(a){this.f.Ma=a;a&64&&Rb(this.b,this.f.Ib,1E3/60);this.f.Ma=a&-129}; +h.Ic=function(){var a=this.b;return a.G&62337|a.wa<<5|a.xa<<1};h.md=function(a){var b=this.b;b.G=a&=62337;b.wa=a>>5&3;b.xa=a>>1&15;b.Bb=a&257?a&1?6:4:0;Sb(b);Tb(this)};h.Jc=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Kc=function(){return this.b.Fb};h.Lc=function(){return this.b.Wa};h.nd=function(a){var b=this.b;b.Wa=a;b.Wa&16?(b.jb=4194303,b.Ia=3915776):(b.jb=262143,b.Ia=253952);Tb(this)};function Tb(a){a.g.tb=a.g.tb&-8|(a.b.Bb?a.b.Wa&16?1:2:4)} +h.Tc=function(a){return this.b.S[1][a>>1&7]};h.vd=function(a,b){this.b.S[1][b>>1&7]=a&65295};h.Rc=function(a){return this.b.S[1][(a>>1&7)+8]};h.td=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};h.Sc=function(a){return this.b.pa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.S[1][b]&=65295};h.Qc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.S[1][b]&=65295};h.Fc=function(a){return this.b.S[0][a>>1&7]}; +h.jd=function(a,b){this.b.S[0][b>>1&7]=a&65295};h.Dc=function(a){return this.b.S[0][(a>>1&7)+8]};h.gd=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};h.Ec=function(a){return this.b.pa[0][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.S[0][b]&=65295};h.Cc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.S[0][b]&=65295};h.Zc=function(a){return this.b.S[3][a>>1&7]};h.Bd=function(a,b){this.b.S[3][b>>1&7]=a&65295}; +h.Xc=function(a){return this.b.S[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.b.pa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.S[3][b]&=65295};h.Wc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.S[3][b]&=65295};h.ra=function(a){a&=7;return this.b.K&2048?this.b.Ha[a]:this.b.u[a]};h.ua=function(a,b){b&=7;this.b.K&2048?this.b.Ha[b]=a:this.b.u[b]=a}; +h.Zb=function(){return this.b.K&49152?this.b.ta[0]:this.b.u[6]};h.jc=function(a){this.b.K&49152?this.b.ta[0]=a:this.b.u[6]=a};h.bc=function(){return this.b.u[7]};h.mc=function(a){this.b.u[7]=a};h.sa=function(a){a&=7;return this.b.K&2048?this.b.u[a]:this.b.Ha[a]};h.va=function(a,b){b&=7;this.b.K&2048?this.b.u[b]=a:this.b.Ha[b]=a};h.$b=function(){return 1==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[1]};h.kc=function(a){1==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a}; +h.ac=function(){return 3==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[3]};h.lc=function(a){3==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.Bc=function(a){return this.b.gc[a-65504>>1]};h.ed=function(a,b){this.b.gc[b-65504>>1]=a};h.cc=function(a){return 65520==a?61183:0};h.nc=function(){};h.Vc=function(){return 1};h.xd=function(){};h.Ac=function(){return this.b.$};h.dd=function(){this.b.$=0};h.Hc=function(){return this.b.fc};h.ld=function(a,b){b&1||(a&=255);this.b.fc=a};h.Mc=function(){return this.b.Gb}; +h.od=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Gb=a;b.D|=2};h.Uc=function(){return this.b.Pa&65280};h.wd=function(a){this.b.Pa=a|255};h.Nc=function(){return Ub(this.b)};h.pd=function(a){Vb(this.b,a&-1809|Ub(this.b)&1808);this.b.D|=128};h.reset=function(){this.g.tb=this.g.tb&-120|20;this.f.Ma=0}; +var L={},K=(L[62592]=[null,null,J.prototype.Tc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Rc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Sc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Qc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.Fc,J.prototype.jd,"KISDR"],L[62672]=[null,null,J.prototype.Dc,J.prototype.gd,"KDSDR"],L[62688]=[null,null,J.prototype.Ec,J.prototype.hd,"KISAR"],L[62704]=[null,null,J.prototype.Cc,J.prototype.fd,"KDSAR"],L[62798]=[null,null, +J.prototype.Lc,J.prototype.nd,"MMR3"],L[65382]=[null,null,J.prototype.Gc,J.prototype.kd,"LKS"],L[65402]=[null,null,J.prototype.Ic,J.prototype.md,"MMR0"],L[65404]=[null,null,J.prototype.Jc,null,"MMR1"],L[65406]=[null,null,J.prototype.Kc,null,"MMR2"],L[65408]=[null,null,J.prototype.Zc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Xc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Yc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Wc,J.prototype.yd,"UDSAR"],L[65472]=[J.prototype.ra, +J.prototype.ua,J.prototype.ra,J.prototype.ua,"R0SET0"],L[65473]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R1SET0"],L[65474]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R2SET0"],L[65475]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R3SET0"],L[65476]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R4SET0"],L[65477]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R5SET0"],L[65478]=[J.prototype.Zb,J.prototype.jc,J.prototype.Zb, +J.prototype.jc,"R6KERNEL"],L[65479]=[J.prototype.bc,J.prototype.mc,J.prototype.bc,J.prototype.mc,"R7KERNEL"],L[65480]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R0SET1"],L[65481]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R1SET1"],L[65482]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R2SET1"],L[65483]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R3SET1"],L[65484]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R4SET1"], +L[65485]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R5SET1"],L[65486]=[J.prototype.$b,J.prototype.kc,J.prototype.$b,J.prototype.kc,"R6SUPER"],L[65487]=[J.prototype.ac,J.prototype.lc,J.prototype.ac,J.prototype.lc,"R6USER"],L[65504]=[null,null,J.prototype.Bc,J.prototype.ed,"CTRL",1170],L[65520]=[null,null,J.prototype.cc,J.prototype.nc,"LSIZE",1170],L[65522]=[null,null,J.prototype.cc,J.prototype.nc,"HSIZE",1170],L[65524]=[null,null,J.prototype.Vc,J.prototype.xd,"SYSID",1170],L[65526]= +[null,null,J.prototype.Ac,J.prototype.dd,"CPUERR",1170],L[65528]=[null,null,J.prototype.Hc,J.prototype.ld,"MB",1170],L[65530]=[null,null,J.prototype.Mc,J.prototype.od,"PIR"],L[65532]=[null,null,J.prototype.Uc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Nc,J.prototype.pd,"PSW"],L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608]; +K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640];K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672]; +K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704];K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424]; +K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456];K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504]; +La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.f=new Int32Array(this.C,0,d>>2),kc(this,gc?lc:mc);else{this.f=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.f[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&this.b.O(4,b);b=a>>2;a=(a&3)<<3;var c=this.f[b]>>a;return 24>a?c&65535:c&255|(this.f[b+1]&255)<<8},oa:function(a,b){var c=a>>2;a=(a&3)<<3;this.f[c]= +this.f[c]&~(255<>2;a=(a&3)<<3;24>a?this.f[c]=this.f[c]&~(65535<>8);this.La=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;rc(c,this.w+a,1,c.N)&&c.ea(!0)}return this.Cb(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;rc(c,this.w+a,2,c.N)&&c.ea(!0)}return this.Db(a,b)},ka:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;rc(d,this.w+a, +1,d.G)&&d.ea(!0)}this.B?this.A(a,b,c):this.wb(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;rc(d,this.w+a,2,d.G)&&d.ea(!0)}this.B?this.A(a,b,c):this.Jb(a,b,c)},N:function(a){return this.g[a]},V:function(a,b){a=this.g[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},aa:function(a,b){a&1&&this.b.O(4,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&this.b.O(4,b);a=a&1?this.g[a]|this.g[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&& +D(this.j,"Memory.readWord("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ia:function(a,b){this.g[a]=b;this.La=!0},la:function(a,b,c){this.g[a]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},qa:function(a,b,c){a&1&&this.b.O(4,c);this.G.setUint16(a,b,!0);this.La=!0},xa:function(a,b,c){a&1&&this.b.O(4,c);a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.I[a>>1]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")", +!0)}};function Bb(a,b,c){a.j=b;a.J=a.F=0;c&&((a.J=c.J)&&qc(a,pc,!1),(a.F=c.F)&&oc(a,pc,!1))}function sc(a,b){b?--a.F||(a.vb=a.B?a.A:a.wb,a.oc=a.B?a.H:a.Jb):--a.J||(a.ub=a.Cb,a.dc=a.Db)}function oc(a,b,c){c&&a.F||(a.vb=!a.B&&b[1]||a.A,a.oc=!a.B&&b[3]||a.H);if(c||void 0===c)a.wb=b[1]||a.A,a.Jb=b[3]||a.H}function qc(a,b,c){c&&a.J||(a.ub=b[0]||a.L,a.dc=b[2]||a.M);if(c||void 0===c)a.Cb=b[0]||a.L,a.Db=b[2]||a.M}function kc(a,b){b||(b=tc);qc(a,b,void 0);oc(a,b,void 0)} +var tc=[],nc=[H.prototype.W,H.prototype.oa,H.prototype.ga,H.prototype.Ya],pc=[H.prototype.T,H.prototype.ka,H.prototype.ca,H.prototype.wa];if(wb)var mc=[H.prototype.N,H.prototype.ia,H.prototype.aa,H.prototype.qa],lc=[H.prototype.V,H.prototype.la,H.prototype.da,H.prototype.xa]; +function uc(a,b){r.call(this,"CPU",a,uc,1);var c=a.multiplier||1;this.Qa=a.cycles||b;this.Na=c;this.ab=Math.round(this.Qa/1E4)/100;this.Va=this.ab*this.Na;this.v.ba=!1;this.v.Hb=!1;this.v.hb=a.autoStart;this.v.Mb=!1;this.v.$a=!1;this.lb=this.ia=0;this.mb=a.csStart;this.bb=a.csInterval;this.cb=a.csStop;this.L=[];this.Vb=this.cd.bind(this);G(this)}y(uc);var vc=["power","reset"];h=uc.prototype; +h.Ga=function(a,b,c,d){this.F=a;this.B=b;this.j=d;for(b=0;b=a.ia&&(a.ia+=a.bb,c=!0);0<=a.cb&&a.cb<=Bc(a)&&(a.bb=a.cb=-1,yc(a),a.ea(),c=!0);c&&a.i(Bc(a)+" cycles: checksum="+k(a.lb))}} +function Cc(a,b,c,d){if(a.J[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ia||8;c=!a.v.ba||a.v.Mb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} +h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=bb(a.id);for(c=0;ca.ca/a.Va?b=1:d=!0;a.Na=b;b=a.ab*a.Na;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.F&&a.F.pb()}Ec(a,a.W);a.W=0;a.V=ra();a.da=0;Fc(a);return d}function Pb(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.L[b][0]&&(c*=a.Qa*a.Na/1E3,a.L[b][0]=c)}function Gc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function Hc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +h.cd=function(){if(this.v.ba){this.kb>=this.Qa&&Fc(this,!0);this.qa=0;this.Ja=ra();if(this.da){var a=this.Ja-this.da;a>this.Sb&&(this.V+=a,this.V>this.Ja&&(this.V=this.Ja))}try{do{var b=Gc(this,this.v.$a?1:this.Ra);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Hc(this,c);this.qa+=c;this.W+=c;Ec(this,0,!0);Ac(this,c);this.ka-=c;if(0>=this.ka){this.ka+=this.Ra;15<=++this.Ub&&(this.F&&this.F.za(),this.Ub=0);break}}while(this.v.ba)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), +Bc(this));vb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Vb;this.da=ra();c=this.Sb;this.qa&&(c=Math.round(c*this.qa/this.Ra));var c=c-(this.da-this.Ja),d=this.da-this.V;d&&(this.ca=Math.round(this.W/(10*d))/100,864E5<=d&&(this.ga=0,Dc(this)));if(0>c||this.cac&&(this.V-=c),c=0;this.kb+=this.qa;this.da+=c;a(b,c)}}}; +h.eb=function(a){if(ib(this))return!1;if(this.v.ba)return this.i(this.toString()+" busy"),!1;Dc(this);this.v.ba=!0;this.v.Hb=!0;this.oa&&this.oa.start();var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.pb(!0),this.F.start(this.V,Bc(this)));M(this,!0);setTimeout(this.Vb,0);return!0};h.fb=function(){return 0}; +h.ea=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Ec(this,this.W);this.W=0;this.v.ba=!1;this.oa&&this.oa.stop();var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Bc(this));M(this)}this.v.complete=a};function M(a,b){a.F&&a.F.za(b)} +function Ic(a){this.Xb=+a.model||1170;this.yc=a.resetAddr||0;uc.call(this,a,6666667);this.sb=0;this.decode=bd.bind(this);this.P=65536;this.R=32768;this.Y=65535;this.U=32768;this.K=15;this.u=[0,0,0,0,0,0,0,this.yc];this.Ha=[0,0,0,0,0,0];this.ta=[0,0,0,0];this.xa=this.C=0;this.wc=[4,2,0,1];this.S=[[0,0,0,0,0,0,0,0,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]];this.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.zc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.gc=[0,0,0,0,0,0,0,0];this.g=this.f=this.Za=this.H=this.I=this.D=this.fc=0;this.la=-1;cd(this);this.v.complete=this.v.rc=!1}y(Ic,uc);h=Ic.prototype;h.reset=function(){this.v.ba&&this.ea();cd(this);xc(this);this.v.error=!1;this.parent.reset.call(this)}; +function cd(a){a.Pa=255;a.$=0;a.Gb=0;a.G=0;a.Oa=0;a.Fb=0;a.Wa=0;a.Bb=0;a.wa=0;a.jb=262143;a.Ia=253952;a.A=[];a.D|=2;Sb(a)}function Sb(a){a.Bb?(a.aa=65536,a.M=a.uc,a.T=a.ec,a.Wb=a.Dd):(a.aa=0,a.M=a.tc,a.T=a.$c,a.Wb=a.Cd)}h.Ob=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Na]);a.set(2,Mb(this.B));return a.data()}; +h.restore=function(a){var b=a[1];this.ga=b[1];Dc(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.A[f].Ea-=b;break}b-=a.A[f].Ea}a.A.splice(f+1,0,{Ea:b,Yb:c<<5&224,ic:d,Ab:e})}a.D|=2}function Ub(a){return a.K=a.K&63728|a.Fa()|fd(a)|ed(a)|dd(a)} +function Vb(a,b){a.U=b<<12;a.Y=~b&4;a.R=b<<14;a.P=b<<16;if((b^a.K)&2048)for(var c=a.Ha.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ha[c];a.Ha[c]=d}a.C=b>>14&3;c=a.K>>14&3;a.C!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.C]);a.D|=2;a.K=b}function O(a,b){a.D&128||(a.U=a.Y=b,a.R=0)}function id(a,b,c){a.D&128||(a.U=a.Y=a.P=b,a.R=c||0)}function jd(a,b,c,d){a.D&128||(a.U=a.Y=a.P=b,a.R=(c^b)&(d^b))}function kd(a,b){a.D&128||(a.U=a.Y=a.P=b,a.R=a.U^a.P>>1)}function ld(a,b,c,d){a.D&128||(a.U=a.Y=a.P=b,a.R=(c^d)&(d^b))} +h.O=function(a){var b=!1;0>this.la?this.la=Ub(this):this.C||(a=4,b=!0);this.G&57344||(this.Oa=63222,this.Fb=a);this.C=0;var c=this.T(a|this.aa),d=this.T(a+2&65535|this.aa);Vb(this,d&-12289|this.la>>2&12288);b&&(this.$|=4,this.u[6]=4);md(this,this.la);md(this,this.u[7]);hd(this,c);this.D&=-113;this.la=-1;throw a;};function nd(a){var b=od(a),c=od(a)&-1793;a.K&49152&&(c=c&-225|a.K&63712);hd(a,b);Vb(a,c);a.D&=-17} +function pd(a,b,c){var d,e,f,g=0;d=b>>13;a.Wa&a.wc[a.C]||(d&=7);e=a.S[a.C][d];f=(a.pa[a.C][d]<<6)+(b&8191)&a.jb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Wa&32&&(f=a.zc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ia&&4186112>f&&(a.$|=32,a.O(4,12))}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.S[a.C][d]=e;if(4194170!==f||a.C)a.wa=a.C,a.xa=d;g&&(g&57344&&(0<=a.la&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.O(168,16)),a.G&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.T(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.T(e)|g;a.b-= +8;break;case 6:return e=gd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=gd(a),e=e+a.u[c]&65535,e=a.T(e|a.aa)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Pa||65534<=a.u[6])&&(a.u[6]<=a.Pa-32?(a.$|=4,a.u[6]=4,a.O(4,24)):(a.$|=8,a.D|=64));return e}h.tc=function(a,b,c){return qd(this,a,b,c)};h.uc=function(a,b,c){return pd(this,qd(this,a,b,c),c)};h.$c=function(a){return this.B.ma(a)};h.ec=function(a){return this.B.ma(pd(this,a,2))}; +h.Cd=function(a,b){this.B.Xa(a,b&65535)};h.Dd=function(a,b){this.B.Xa(pd(this,a,4),b)};function rd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=qd(a,b,d,2),c&65536||61440!==(a.K&61440)&&(d&=65535),a.C=a.K>>12&3,c=a.T(d|c&a.aa),a.C=a.K>>14&3):c=6!=d||(a.K>>2&12288)===(a.K&12288)?a.u[d]:a.ta[a.K>>12&3];return c} +function sd(a,b,c,d){a.G&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=qd(a,b,e,4),c&65536||(e&=65535),a.C=a.K>>12&3,e=pd(a,e|c&65536,4),a.C=a.K>>14&3,a.B.Xa(e,d)):6!=e||(a.K>>2&12288)===(a.K&12288)?a.u[e]=d:a.ta[a.K>>12&3]=d}function td(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function vd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return qd(a,b,c,8)} +function wd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Za=a.M(b,e,7),c=d.call(a,c,a.B.Ua(e)),e&1&&a.b--,a.B.ob(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.M(b,e,6),a.B.Xa(e,d.call(a,c,a.B.ma(e)))):a.u[e]=d.call(a,c,a.u[e])} +function yd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.B.ob(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function zd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.B.Xa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(hd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.fb=function(a){this.v.complete=!0;var b=this.v.rc=this.j&&Ad(this.j),c=a?this.v.Hb?0:1:-1;this.v.Hb=!1;this.N=this.b=a;do{if(b){if(Bd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.O(168,28):this.D&64?this.O(4,30):this.D&16&&this.O(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Gb&224,e=this.A.length;0<=--e;){if(0d&&(d=this.A[e].Yb,a=this.A[e],this.A.splice(e,1))}d>(this.K&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.O(a.ic,26):this.O(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Oa=0,this.Fb=this.u[7]);this.D=this.D&7|this.K&16;this.decode(gd(this))}while(0>1|b<<16;kd(this,a);return a&65535}function Hd(a,b){a=b&2048|b>>1|b<<8;kd(this,a<<8);return a&255}function Id(a,b){a=b&~a;O(this,a);return a}function Jd(a,b){a=b&~a;O(this,a<<8);return a}function Kd(a,b){a|=b;O(this,a);return a} +function Ld(a,b){a|=b;O(this,a<<8);return a}function Md(a,b){a=~b|65536;id(this,a);return a&65535}function Nd(a,b){a=~b|256;id(this,a<<8);return a&255}function Od(a,b){a=b-a;this.D&128||(this.U=this.Y=a,this.R=b&(b^a));return a&65535}function Pd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.U=this.Y=c,this.R=b&(b^c));return a&255}function Qd(a,b){a=b+a;this.D&128||(this.U=this.Y=a,this.R=a&(b^a));return a&65535} +function Rd(a,b){a=b+a;var c=a<<8;this.D&128||(this.U=this.Y=c,this.R=c&(b<<8^c));return a&255}function Sd(a,b){a=-b;id(this,a,a&b&32768);return a&65535}function Td(a,b){a=-b;id(this,a<<8,(a&b&128)<<8);return a&255}function Ud(a,b){a=b<<1|this.P>>16&1;kd(this,a);return a&65535}function Vd(a,b){a=b<<1|this.P>>16&1;kd(this,a<<8);return a&255}function Wd(a,b){a=(this.P&65536|b)>>1|b<<16;kd(this,a);return a&65535}function Xd(a,b){a=((this.P&65536)>>8|b)>>1|b<<8;kd(this,a<<8);return a&255} +function Yd(a,b){var c=b-a;ld(this,c,a,b);return c&65535}function Zd(a,b){var c=b-a;ld(this,c<<8,a<<8,b<<8);return c&255}function $d(a,b){this.D&128||(this.U=this.Y=b&65280,this.R=this.P=0);return(b<<8|b>>8)&65535}function ae(a,b){a^=b;O(this,a);return a&65535} +function be(a){var b=xd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.P=this.R=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.R=32768)}this.u[a]=c&65535;this.U=this.Y=c;this.b-=(this.g?6:7)+b} +function ce(a){var b=xd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.P=this.R=0;b&=63;if(b&32){b=64-b;32>b-1;this.P=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.U=d>>16;this.Y=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.P=0);a&2&&(this.R=0);a&4&&(this.Y=1);a&8&&(this.U=0);this.b-=5} +function de(a){var b=xd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.P=this.R=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Y=d>>16|d,this.U=d>>16):(this.R=32768,this.Y=d>>15|d,this.U=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Y=this.U=0,this.R=32768,this.P=65536,this.b-=7}var ee=[0,7,7,10,7,11,9,13];function fe(a){var b=this.b;hd(this,vd(this,a));this.b=b-ee[this.g]} +var ge=[0,14,14,17,14,18,16,20];function he(a){var b=this.b,c=vd(this,a);a=a>>6&7;md(this,this.u[a]);this.u[a]=this.u[7];hd(this,c);this.b=b-ge[this.g]}var ie=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],je=[7,13,13,17,14,18,17,21];function ke(a){var b=xd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.U=b>>16,this.Y=this.U|b,this.R=0,this.P=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)hd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ne(a){Q(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)}function oe(a){Q(this,a,ud(this,a),ae);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.O(8,6)}function bd(a){pe[a>>12].call(this,a)} +var pe=[function(a){qe[a>>8&15].call(this,a)},function(a){var b=ud(this,a),c=this.b;O(this,zd(this,a,b));this.b=c-ie[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=ud(this,a);a=xd(this,a);ld(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,ud(this,a)&xd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Id);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,ud(this,a),Kd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Cd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){re[a>>8&15].call(this,a)},function(a){se[a>>8&15].call(this,a)},function(a){var b=td(this,a);O(this,yd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=td(this,a)<<8;a=wd(this,a)<<8;ld(this,b-a,a,b);this.b-=this.g? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(td(this,a)&wd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,td(this,a),Jd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,td(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Yd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],qe= +[function(a){Me[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!fd(this))},function(a){R(this,a,fd(this))},function(a){R(this,a,!this.Fa()==!ed(this))},function(a){R(this,a,!this.Fa()!=!ed(this))},function(a){R(this,a,!fd(this)&&!this.Fa()==!ed(this))},function(a){R(this,a,fd(this)||!this.Fa()!=!ed(this))},he,he,function(a){Ne[a>>6&3].call(this,a)},function(a){Oe[a>>6&3].call(this,a)},function(a){Pe[a>>6&3].call(this,a)},function(a){Qe[a>>6&3].call(this,a)},V,V],Ne=[function(a){id(this, +zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Qd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Od);this.b-=this.g?9:3+(7==this.f?2:0)}],Oe=[function(a){Q(this,a,0,Sd);this.b-=this.g?11:6},function(a){Q(this,a,dd(this)?1:0,Cd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,dd(this)?1:0,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=xd(this,a);id(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],Pe=[function(a){Q(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Gd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ed);this.b-=this.g?9:3+(7==this.f?2:0)}],Qe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ec(a|65536);hd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=rd(this,a,0);md(this,a);O(this,a);this.b-=11},function(a){var b=od(this),c=this.b;sd(this,a, +0,b);O(this,b);this.b=c-je[this.g]},function(a){O(this,zd(this,a,this.Fa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Me=[function(a){Re[a&15].call(this,a)},V,V,V,fe,fe,fe,fe,function(a){if(a&8)this.O(8,6);else{var b=od(this);a&=7;hd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.K&49152||(this.K=this.K&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.O(8,6)},function(a){Se[a&15].call(this,a)},function(a){Te[a&15].call(this,a)},ne,ne,ne,ne],Re=[function(){this.K&49152?(this.$|=128,this.O(4, +3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){nd(this);this.D|=this.K&16;this.b-=13},function(){this.O(12,1);this.b-=5},function(){this.O(16,4);this.b-=25},function(){this.K&49152||(cd(this),this.B.reset());this.b-=667},function(){nd(this);this.b-=13},V,V,V,V,V,V,V,V,V],Se=[le,function(){this.P=0;this.b-=5},function(){this.R=0;this.b-=5},S,function(){this.Y=1;this.b-=5},S,S,S,function(){this.U=0;this.b-=5},S,S,S,S,S,S,S],Te=[le,function(){this.P= +65536;this.b-=5},function(){this.R=32768;this.b-=5},T,function(){this.Y=0;this.b-=5},T,T,T,function(){this.U=32768;this.b-=5},T,T,T,T,T,T,T],re=[ke,ke,de,de,be,be,ce,ce,oe,oe,V,V,V,V,me,me],se=[function(a){R(this,a,!this.Fa())},function(a){R(this,a,this.Fa())},function(a){R(this,a,!dd(this)&&!fd(this))},function(a){R(this,a,dd(this)||fd(this))},function(a){R(this,a,!ed(this))},function(a){R(this,a,ed(this))},function(a){R(this,a,!dd(this))},function(a){R(this,a,dd(this))},function(){this.O(24,2); +this.b-=25},function(){this.O(28,5);this.b-=5},function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){id(this,yd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Rd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Pd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){P(this,a,0,Td);this.b-= +this.g?11:6},function(a){P(this,a,dd(this)?1:0,Dd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,dd(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=wd(this,a);id(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],We=[function(a){P(this,a,0,Xd);this.b-=this.g?9+(this.Za&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Hd);this.b-=this.g?9+(this.Za&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Fd);this.b-=this.g?9:3+(7== +this.f?2:0)}],Xe=[V,function(a){a=rd(this,a,65536);md(this,a);O(this,a);this.b-=11},function(a){var b=od(this),c=this.b;sd(this,a,65536,b);O(this,b);this.b=c-je[this.g]},V];function Ye(a){r.call(this,"ROM",a,Ye);this.f=null;this.C=a.addr;this.g=a.size;this.G=a.writable;this.F=a.alias;this.A=a.file;this.H=da(this.A);if(this.A){a=this.A;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){Ze(c,a,b,f)})}}y(Ye); +Ye.prototype.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;$e(this)};Ye.prototype.Ca=function(){if(this.Da){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.g,e=this.Da,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var n=l.o,p=l.a;if(void 0!==n){var q=f,n=[n>>>0,g],v=qa(q,n,a.Lb);0>v&&q.splice(-(v+1),0,n)}p&&(l.a=p.replace(/''/g,'"'))}a.H.push({Id:b,w:c,vc:d,Da:e,Kb:f})}delete this.Da}return!0};Ye.prototype.Ba=function(){return!0}; +function Ze(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.zb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Da=l.symbols;if(!a.f.length){m("Empty ROM: "+ +b);return}if(1==a.f.length){m(a.f[0]);return}}catch(n){a.na("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.Z].wb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c>> +e.Z;0>>=e.Z;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ya)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.zb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ca=function(a,b){if(!b)if(this.Tb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.Ba=function(a){return a?this.save():!0};h.reset=function(){ef(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return ef(this)};function ef(a){a.T=0;a.f=0;a.g=128;a.C=[];return!0}h.Eb=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.V||8,c=a-this.H%a,this.V&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;Qb(this.b,100,4,52,this.N)}};var ff={},df=(ff[65392]=[null,null,W.prototype.Pc,W.prototype.rd,"RCSR"],ff[65394]=[null,null,W.prototype.Oc,W.prototype.qd,"RBUF"],ff[65396]=[null,null,W.prototype.bd,W.prototype.Fd,"XCSR"],ff[65398]=[null,null,W.prototype.ad,W.prototype.Ed,"XBUF"],ff);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};gf.prototype.Pb=function(){return-1};gf.prototype.Qb=function(){}; +function jf(a,b,c,d){if(c)if(b){0>a.C&&a.A.length&&(a.C=0);if(0>a.C||b!=a.A[a.C])a.A.splice(0,0,b),a.C=0;a.C--}else a.W?b="end":b=a.A[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(oa(b.substring(c,f))),c=f+1}}return a} +function kf(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 sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,k=[],m=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=l(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ha[b]);var c=0;for(b in a.ha)vf(a,b,a.ha[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function pf(a,b){if(b)return of(a,b,a.ca[b]);var c=0;for(b in a.ca)of(a,b,a.ca[b]),c++;return 0>>d.F.ca;m=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var p=b[e];p.type==c?n++||d.i("..."):(c=p.type,n=Kb[c],p&&d.i(l(p.id,8)+" %"+l(e<>>c.ca].lc(d&c.f,d),this.g--,b&&Gf(a,b));return c};h.Ia=function(a,b){var c=65535,d=Z(a);-1!==d&&(this.g++,c=Lb(this.F,d),this.g--,b&&Gf(a,b));return c}; -h.Ob=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].dc(d&e.f,b&255,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};h.qc=function(a,b,c){var d=Z(a);if(-1!==d){this.g++;var e=this.F;e.aa[(d&e.g)>>>e.ca].tc(d&e.f,b&65535,d);this.g--;c&&Gf(a,c);O(this.b,!0)}};function Y(a){return{A:a,Ha:!1}}function Hf(a){return[a.A,a.Ha]}function If(a){return{A:a[0],Ha:a[1]}} -function Ff(a,b,c){var d;c=(c?a.R:a.fb).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Bc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Qa[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Tb(this.b)));return b}; -h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,Y(this.b.u[7]).A)),this.ma&1073741824?this.ya.push(a):this.va&&a==this.va||(this.va=a,this.ma&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.S-=a.b,a.b=0,a.qa=0,O(a))))}; -function zf(a){var b;if(Gd(a)){if(!a.N||!a.N.length){a.N=Array(1E3);for(b=0;b>>d.ca],!1)}a.S=["br"];if(a.G)for(b=1;b>>d.ca],!0);a.G=["bw"];a.pb=0} -h.jb=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.i("invalid address: "+I(this,b.A)),d=!1;else{var f=this.F;f.aa[e>>>f.ca].jb(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Ha=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.ca],b==a.G));k.Ha||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,x=I(w,r);else if(8192==C)r=r.A-((f&63)<<1)&65535,x=I(w,r);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Kf(B);break;case 8:x="@"+Kf(B);break;case 16:7>B?x="("+Kf(B)+ -")+":(C=w.Ia(r,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Kf(B)+")+":(C=w.Ia(r,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Kf(B)+")";break;case 40:x="@-("+Kf(B)+")";break;case 48:C=w.Ia(r,2);x=I(w,C,0,!0)+"("+Kf(B)+")";7==B&&(x=[x,I(w,C+r.A&65535)]);break;case 56:C=w.Ia(r,2),x="@"+I(w,C)+"("+Kf(B)+")",7==B&&(x=[x,I(w,C+r.A&65535)])}w=x;if(!w||!w.length){k="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Qa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.Aa[b-16]):20==b&&(c="PS="+I(a,Tb(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.vc=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,k=f.Zc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}O(d);a.i("updated registers:")}a.i(Wf(a));c&&(a.R=Y(d.u[7]),Nf(a,I(a,a.R.A)))}}function ag(a,b){b=pa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var n=k[0]+":";k[2]&&(n+=" "+k[2]);a.i(n)}k[3]&&(g=k[3],f=null);f=Tf(a,b,g,f);a.i(f);a.R=b;e-=b.A-m;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.$&&(a.i("ended assemble at "+I(a,a.Z.A)),a.R=a.Z,a.$=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.va=null;if(ib(a)&&0p||"z"la.length&&(a.i("note: only "+la.length+" available"),ba=la.length);ea-=ba;0>ea&&(null==la[la.length-1].A?(ba=ea+ba,ea=0):ea+=la.length);var Pc=[];"call"==Ae&&(lb=1E5,Pc=["CALL"]);for(void 0!==ze&&a.i(ba+" instructions earlier:");0=la.length&&(ea=0);a.qb=ba;Ce++;lb--}}Ce||(a.i("no "+Be+"history available"),a.qb=void 0)}else{var Xb=Ff(a,ka);if(Xb){var Yb=0;Ba&&("l"==Ba.charAt(0)&&(Ba=Ba.substr(1)||ug),Yb=uf(a,Ba)>>>0,65536>4||1;wg--&&0ac?String.fromCharCode(ac):".";Zb--}nb&&(nb+="\n");nb+=ka+" "+Rc+(0==pb?" "+Fe:"")}nb&&a.i(nb);a.fb=Xb}}}}break;case "e":if("else"==g[0])break;var Ta,Sc,Tc,Uc,Vc=g[0],Wc=g[1];"eb"==Vc?(Ta=1,Sc=255,Tc=a.mb,Uc=a.Ob):"e"==Vc||"ew"==Vc?(Ta=2,Sc=65535,Tc=a.Ia,Uc=a.qc):Wc=null;if(null==Wc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var bc=Ff(a,Wc);if(bc)for(var cc=2;ccZc;){for(var Ca=null,Ag=256;65536>sb.A>>>0;){$c.A=a.Ia(sb,2);if(null==sb.A||!Ag--)break;if(!($c.A&1)){for(var Bg=a,dc=$c,He=null,tb=dc.A, -Ie=tb,ad=1;6>=ad&&tb;ad++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.J)){this.B=new P(this,"1.30.1","failsafe");hg(this.B)&&(mg(this,d),a=2,ng(this.B));this.B.set("timestamp",ta());og(this.B);var e=this.f&&!this.G;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== -f&&"no machine state"!=g?(this.ta("Error: "+g),"unable to verify user"==g&&(Da("user",""),this.g=null)):this.i(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.J;delete this.N}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.v.ja=!0;var d=this.L.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.Eb());this.X&&(mg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.D=0}; -function mg(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new P(a,"1.30.1"),g=new P(a,"1.30.1","validate"),k=ta();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ia(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ja=!1,!1===d&&(e=null)));for(var k=cb(a.id),m=0;mf.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+"...");ua(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 m=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} -function Ig(a,b,c,d){function e(a){if(void 0===k){var b=g&&A(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=ja(a))}function f(a){e("Error: "+a);m&&(--tg||Oa(!0));m=!1}var g,k,m=!0;tg++;ab[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|| -(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,k){k?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--tg||Oa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Oa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,n):Gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(r){f(r.message)}return m}window.embedPDP11=function(a,b,c,d){Oa(!1);return Ig(a,b,c,d)};window.enableEvents=Oa;window.sendEvent=Ua;})(); +63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};h=qf.prototype; +h.Ga=function(a,b,c,d){this.B=b;this.b=c;this.F=a;(a=wc(a,"messages"))&&tf(this,a);this.ab=wf;xf(this,function(a){a:{var b=d.B.X,c=a[0],e=a=0,n=b.length;if(c){a=Y(yf(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.B.Z;n=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;n--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=Kb[c],q&&d.i(k(q.id,8)+" %"+k(e<>>c.Z].Cb(d&c.f,d),this.g--,b&&zf(a,b));return c};h.ma=function(a,b){var c=65535,d=Y(a);-1!==d&&(this.g++,c=Lb(this.B,d),this.g--,b&&zf(a,b));return c}; +h.ob=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.X[(d&e.g)>>>e.Z].wb(d&e.f,b&255,d);this.g--;c&&zf(a,c);M(this.b,!0)}};h.Xa=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.X[(d&e.g)>>>e.Z].Jb(d&e.f,b&65535,d);this.g--;c&&zf(a,c);M(this.b,!0)}};function X(a){return{w:a,Aa:!1}}function Af(a){return[a.w,a.Aa]}function Bf(a){return{w:a[0],Aa:a[1]}} +function yf(a,b,c){var d;c=(c?a.M:a.Qa).w;if(void 0!==b){d=b=mf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Qb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ha[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Ub(this.b)));return b}; +h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,X(this.b.u[7]).w)),this.ha&1073741824?this.qa.push(a):this.oa&&a==this.oa||(this.oa=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.ka=0,M(a))))}; +function sf(a){var b;if(Ad(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.Z],!1)}a.N=["br"];if(a.G)for(b=1;b>>d.Z],!0);a.G=["bw"];a.Ra=0} +h.Sa=function(a,b,c){var d=!0;c||If(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.i("invalid address: "+I(this,b.w)),d=!1;else{var f=this.B;f.X[e>>>f.Z].Sa(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Aa=!0:(Jf(this,a,a.length-1,"set"),sf(this)));return d};function If(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Z],b==a.G));l.Aa||sf(a);break}}return f} +function Kf(a,b){for(var c=1;c>23)&65535,x=I(w,u);else if(8192==C)u=u.w-((f&63)<<1)&65535,x=I(w,u);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Df(B);break;case 8:x="@"+Df(B);break;case 16:7>B?x="("+Df(B)+ +")+":(C=w.ma(u,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Df(B)+")+":(C=w.ma(u,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Df(B)+")";break;case 40:x="@-("+Df(B)+")";break;case 48:C=w.ma(u,2);x=I(w,C,0,!0)+"("+Df(B)+")";7==B&&(x=[x,I(w,C+u.w&65535)]);break;case 56:C=w.ma(u,2),x="@"+I(w,C)+"("+Df(B)+")",7==B&&(x=[x,I(w,C+u.w&65535)])}w=x;if(!w||!w.length){l="INVALID";break}"string"!=typeof w&&(n=w[1],w=w[0]);0b?(c=Df(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Ha[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.ta[b-16]):20==b&&(c="PS="+I(a,Ub(d)));c&&(c+=" ");return c}function Pf(a){var b,c="";for(b=0;6>b;b++)c+=Of(a,b);c=c+"\n"+(Of(a,6)+Of(a,7)+Of(a,20));return c+=Nf(a,"T")+Nf(a,"N")+Nf(a,"Z")+Nf(a,"V")+Nf(a,"C")}h.Lb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Pf(a));c&&(a.M=X(d.u[7]),Gf(a,I(a,a.M.w)))}}function Uf(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=Mf(a,b,g,f);a.i(f);a.M=b;e-=b.w-n;c++}}} +function Lf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.W&&(a.i("ended assemble at "+I(a,a.V.w)),a.M=a.V,a.W=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(hb(a)&&0q||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].w?(Z=ca+Z,ca=0):ca+=ja.length);var Mc=[];"call"==ye&&(jb=1E5,Mc=["CALL"]);for(void 0!==xe&&a.i(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Za=Z;Ae++;jb--}}Ae||(a.i("no "+ze+"history available"),a.Za=void 0)}else{var Xb=yf(a,ia);if(Xb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ng),Yb=nf(a,za)>>>0,65536>4||1;pg--&&0ac?String.fromCharCode(ac):".";Zb--}lb&&(lb+="\n");lb+=ia+" "+Oc+(0==nb?" "+De:"")}lb&&a.i(lb);a.Qa=Xb}}}}break;case "e":if("else"==g[0])break;var Ra,Pc,Qc,Rc,Sc=g[0],Tc=g[1];"eb"==Sc?(Ra=1,Pc=255,Qc=a.Ua,Rc=a.ob):"e"==Sc||"ew"==Sc?(Ra=2,Pc=65535,Qc=a.ma,Rc=a.Xa):Tc=null;if(null==Tc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var bc=yf(a,Tc);if(bc)for(var cc=2;ccWc;){for(var Aa=null,tg=256;65536>qb.w>>>0;){Xc.w=a.ma(qb,2);if(null==qb.w||!tg--)break;if(!(Xc.w&1)){for(var ug=a,dc=Xc,Fe=null,rb=dc.w,Ge=rb,Yc=1;6>=Yc&& +rb;Yc++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bZf){if(ag(d,this.I)){this.C=new N(this,"1.30.1","failsafe");ag(this.C)&&(fg(this,d),a=2,gg(this.C));this.C.set("timestamp",sa());hg(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=eg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ag(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),gg(d),ag(d)?(c=eg(d),e=!0):c=!1))}e&&dg(this,c?d:null)}else 2==a&&d.clear()}else dg(this);delete this.I;delete this.L}e=bb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(ig(this,this.b,b,c,a),this.b.hb());this.T&&(fg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; +function fg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function Wf(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ba&&(c&&a.b.ea(),d=a.b.Ba(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=bb(a.id),n=0;nf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(g=g.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Ag(a,b,c)}})}else c(a,null)} +function Bg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);n&&(--mg||Sa(!0));n=!1}var g,l,n=!0;mg++;$a[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?yg(c,null,null,!1,e,function(d,n){n?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(g.outerHTML=n,--mg||Sa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(n,g),--mg||Sa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?yg(b,a,d,!0,e,p):zg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return n}window.embedPDP11=function(a,b,c,d){Sa(!1);return Bg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 6432a8d2d..b44677083 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -681,170 +681,152 @@ for purposes of the GNU General Public License, and the author does not claim any copyright as to their contents. */ -var h; +var g; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function p(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function q(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function l(a,b,c,d){var e=0,f=null,k=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)}),k;var m=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(m.onreadystatechange=function(){4===m.readyState&&(f=m.responseText,200==m.status||!m.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=m.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");m.open("POST",a,!!c);m.setRequestHeader("Content-type","application/x-www-form-urlencoded");m.send(n)}else m.open("GET",a,!!c),"bytes"==b&&m.overrideMimeType("text/plain; charset=x-user-defined"),m.send();c||(f=m.responseText,200!=m.status&&(e=m.status||-1),d&&d(a,f,e),k=[f,e]);return k}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function p(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} -function va(a){if(ta)try{for(var b=0;bb?this.jb=this.id:(this.Eb=this.id.substr(0,b),this.jb=this.id.substr(b+1));this[a]=c;this.i={ready:!1,td:!1,ud:!1,R:!1,error:!1};this.rb=null;this.i.error=!1;this.A={};this.L=null;w.push(this)}var ya=void 0,za={}; -if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ba=/\+/g,Ca=/([^&=]+)=?([^&]*)/g;Aa=Ca.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ba," "))]=decodeURIComponent(Aa[2].replace(Ba," "))}function Da(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 x(a,b){b||(b=v);a.prototype=Da(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ea=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Ea={},w=[];function Fa(a,b,c){Ea[a]&&b&&(Ea[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Fa=this.id:(this.Va=this.id.substr(0,b),this.Fa=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Oa=null;this.i.error=!1;this.w={};this.I=null;w.push(this)}var ya=void 0,za={}; +if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Aa=Da.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ca," "))]=decodeURIComponent(Aa[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.h=this.g-1;this.o=this.l/this.g|0;this.ua=[];this.m=null;this.bb=this.H;a=new E;Na(a,this.L);this.b=Array(this.o);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=d.bb(b|4186112,-1,1)}function Pa(a,b,c){var d=!1,e=this.controller,f=e.ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||e.bb(c|4186112,b,1)} -function Qa(a,b){var c=-1,d=this.controller;(a=d.ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=d.bb(b|4186112,-1,0)}function Ra(a,b,c){var d=!1,e=this.controller;if(a=e.ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||e.bb(c|4186112,b,0)}Ma.prototype.reset=function(){this.m&&this.m()};Ma.prototype.H=function(){return 0};Ma.prototype.pa=function(a,b){b||this.reset();return!0}; -function Sa(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.c;0g&&(t=g);if(m&&m.size){if(m.type==d&&m.controller==e){if(f+g<=m.Ya)return m.xb+=m.Ya-f,m.Ya=f,!0;if(f>=m.Ya+m.xb){t=m.size-(f-n);t>g&&(t=g);m.xb=f-m.Ya+t;f=n+a.g;g-=t;l++;continue}}return Ua(1,f,g)}f=new E(f,t,a.g,d,e);Na(f,a.L,m);a.b[l++]=f;f=n+a.g;g-=t}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+k(b,8,!0)),!0):Ua(2,b,c)}function Wa(a,b){return a.b[(b&a.u)>>>a.c].Ib(b&a.h,b)} -function Xa(a){for(var b=0,c=[],d=0;d>5&3;c.lb=a>>1&15;c.Hb=a&257?a&1?6:4:0;cb(c);a=c.H;a&1|256&&(b=this.a.Da&16?1:2);this.c.Oa=this.c.Oa&-8|b};h.Ec=function(a){return this.a.G[1][a>>1&7]};h.jd=function(a,b){this.a.G[1][b>>1&7]=a&65295};h.Cc=function(a){return this.a.G[1][(a>>1&7)+8]};h.gd=function(a,b){this.a.G[1][(b>>1&7)+8]=a&65295}; -h.Dc=function(a){return this.a.X[1][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.Bc=function(a){return this.a.X[1][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.G[1][b]&=65295};h.vc=function(a){return this.a.G[0][a>>1&7]};h.$c=function(a,b){this.a.G[0][b>>1&7]=a&65295};h.tc=function(a){return this.a.G[0][(a>>1&7)+8]};h.Yc=function(a,b){this.a.G[0][(b>>1&7)+8]=a&65295};h.uc=function(a){return this.a.X[0][a>>1&7]}; -h.Zc=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.sc=function(a){return this.a.X[0][(a>>1&7)+8]};h.Xc=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.G[0][b]&=65295};h.Ic=function(a){return this.a.G[3][a>>1&7]};h.nd=function(a,b){this.a.G[3][b>>1&7]=a&65295};h.Gc=function(a){return this.a.G[3][(a>>1&7)+8]};h.ld=function(a,b){this.a.G[3][(b>>1&7)+8]=a&65295};h.Hc=function(a){return this.a.X[3][a>>1&7]};h.md=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.G[3][b]&=65295}; -h.Fc=function(a){return this.a.X[3][(a>>1&7)+8]};h.kd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.G[3][b]&=65295};h.yc=function(){return db(this.a)};h.cd=function(a){eb(this.a,a&-1809|db(this.a)&1808);this.a.j|=128}; -function fb(a){var b=a.g,c,d,e,f=b.Y>>13&7;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Mc,drive:f,blocksize:256,mapped:0,maxblock:b.Ka[f]*b.K[f],url:"rk"+f+".dsk"});b.D&=-129;switch(b.D>>1&7){case 0:b.fb=2496;b.S=0;b.D=128;b.Y=0;break;case 1:if((b.Y>>4&511)>=b.Ka[f]){b.S|=32832;b.D|=49152;break}if((b.Y&15)>=b.K[f]){b.S|=32800;b.D|=49152;break}c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;gb(a,b.T[f],c,d,e);return;case 2:if((b.Y>>4&511)>=b.Ka[f])b.S|=32832, -b.D|=49152;else if((b.Y&15)>=b.K[f])b.S|=32800,b.D|=49152;else{c=(b.Y>>4&511)*b.K[f]+(b.Y&15);d=(b.D&48)<<12|b.eb;e=65536-b.gb&65535;a.ub(b.T[f],c,d,e);return}}b.fb=f<<13|b.fb&8176|b.Y%9&15;G(a.a,20,5,144,function(){b.D=b.D&65534|128;return!!(b.D&64)})}h.Mc=function(a,b,c,d,e){var f=this.g;f.eb=d&65535;f.D=f.D&-49|d>>12&48;f.gb=65536-e&65535;switch(a){case 1:f.S|=33024;f.D|=49152;break;case 2:f.S|=33792,f.D|=49152}G(this.a,20,5,144,function(){f.D=f.D&65534|128;return!!(f.D&64)})}; -function hb(a){var b=a.h,c,d,e,f=b.v>>8&3;b.v&=-2;"undefined"===typeof b.T[f]&&(b.T[f]={cache:[],postProcess:a.Nc,drive:f,blocksize:128,mapped:1,maxblock:b.Ka[f]*b.K[f],url:"rl"+f+".dsk"});switch(b.v>>1&7){case 2:b.Ba&8&&(b.v&=63);b.Ba=b.hc[f]|b.Ga&64;break;case 3:1==(b.M&3)&&(b.Ga=b.M&4?b.Ga+(b.M&65408)&65408|b.M<<2&64:b.Ga-(b.M&65408)&65408|b.M<<2&64,b.M=b.Ga);break;case 4:b.Ba=b.Ga;break;case 5:if(b.M>>6>=b.Ka[f]){b.v|=37888;break}if((b.M&63)>=b.K[f]){b.v|=37888;break}c=(b.M>>6)*b.K[f]+(b.M&63); -d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;gb(a,b.T[f],c,d,e);return;case 6:if(b.M>>6>=b.Ka[f])b.v|=37888;else if((b.M&63)>=b.K[f])b.v|=37888;else{c=(b.M>>6)*b.K[f]+(b.M&63);d=(b.va&63)<<16|b.ab;e=65536-b.Ba&65535;a.ub(b.T[f],c,d,e);return}}G(a.a,20,5,112,function(){b.v|=129;return!!(b.v&64)})} -h.Nc=function(a,b,c,d,e){var f=this.h;f.ab=d&65535;f.v=f.v&-49|d>>12&48;f.va=d>>16&63;f.M=~~(c/f.K[b.na])<<6|c%f.K[b.na];f.Ga=f.M;f.Ba=65536-e&65535;switch(a){case 1:f.v|=33792;break;case 2:f.v|=40960}G(this.a,20,5,112,function(){f.v|=129;return!!(f.v&64)})};function ib(a){a=a.l;a.F=2176;a.ca=0;a.V=[4544,4544,4544,4544,4544,4544,4544,4544];a.Ra=[0,0,0,0,0,0,0,0];a.Na=a.Sa=a.Qa=a.Fa=a.Lb=0} -function jb(a,b){var c=a.l,d,e,f;c.F&=-16513;c.ca&=-2049;c.V[b]&=-1153;G(a.a,-1,0,172);"undefined"===typeof c.T[b]&&(c.T[b]={cache:[],postProcess:a.Oc,drive:b,blocksize:256,mapped:0,maxblock:c.zb[0]*c.Ja[0]*c.K[0],url:"rp"+b+".dsk"});switch(c.F&63){case 5:c.wb[b]=c.qa[b];c.F|=32896;c.V[b]|=32896;c.Na|=1<=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0]){c.Ra[b]|=1024;c.F|=49152;break}d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+ -(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;gb(a,c.T[b],d,e,f);return;case 57:if(c.qa[b]>=c.zb[0]||c.da[b]>>8>=c.Ja[0]||(c.da[b]&255)>=c.K[0])c.Ra[b]|=1024,c.F|=49152;else{d=(c.qa[b]*c.Ja[0]+(c.da[b]>>8))*c.K[0]+(c.da[b]&255);e=(c.Fa&63)<<16|c.Qa;f=65536-c.Sa&65535;a.ub(c.T[b],d,e,f);return}}G(a.a,3,5,172,function(){c.F=c.F&65534|128;c.V[b]|=128;return!!(c.F&64)})} -h.Oc=function(a,b,c,d,e){var f=this.l;f.Sa=65536-e&65535;f.Qa=d&65535;f.F=f.F&-769|d>>8&768;f.Fa=d>>16&63;e=~~(c/f.K[0]);d=~~(e/f.Ja[0]);f.da[b.na]=e%f.Ja[0]<<8|c%f.K[0];f.wb[b.na]=f.qa[b.na]=d;f.Na|=1<=b.oc-1&&(f.V[b.na]|=1024);switch(a){case 1:f.ca|=512;f.F|=49152;break;case 2:f.ca|=2048,f.F|=49152}G(this.a,20,5,172,function(){f.V[b.na]|=128;f.F=f.F&65534|128;return!!(f.F&64)})}; -function kb(a,b,c,d,e,f){var g=~~((f+c.wa-1)/c.wa),l=new XMLHttpRequest;2048>g&&d+2048this.a.Ua(a.nc?lb(this.a,c):c,a.cache[b][e])){a.tb(2,a,b,c,d);return}c+=2;--d}b++}a.tb(0,a,b,c,d)}; -function gb(a,b,c,d,e){for(var f,g;0g){b.tb(2,b,c,d,e);return}b.cache[c][f]=g;d+=2;--e}c++}b.tb(0,b,c,d,e)}h.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.Aa=0;this.g.D=128;this.h.v=128;ib(this)}; -h.ic=function(a,b,c){var d,e,f=this.a;switch(a&-64){case 4194240:switch(a&-2){case 4194300:0>b?d=f.Ea&65280:(a&1&&(b<<=8),f.Ea=b|255,d=0);break;case 4194298:if(0>b)d=f.Kb;else{a&1&&(b<<=8);if(d=b&65024){e=d>>9;do d+=34;while(e>>=1)}f.Kb=d;f.j|=2}break;case 4194294:if(70!==f.La)return K(f,4);0>b?d=f.s:d=f.s=0;break;case 4194292:if(70!==f.La)return K(f,4);d=1;break;case 4194290:if(70!==f.La)return K(f,4);d=0;break;case 4194288:if(70!==f.La)return K(f,4);d=61183;break;case 4194296:0<=b&&!(a&1)&&(b&= -255);case 4194286:case 4194284:case 4194282:case 4194280:case 4194278:case 4194276:case 4194274:case 4194272:if(70!==f.La)return K(f,4);e=a-4194272>>1;0>b?d=f.Cb[e]:(d=J(this,f.Cb[e],a,b,c),0<=d&&(f.Cb[e]=d));break;case 4194254:return a&1?f.C>>14&1?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[3]=b),d=f.fa[3]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[1]=b),d=f.fa[1]),d;case 4194252:case 4194250:case 4194248:return e=a&7,f.C&2048?(0<=b&&(f.f[e]=b),d=f.f[e]):(0<=b&&(f.Ma[e]=b),d=f.Ma[e]),d;case 4194246:return a& -1?(0<=b&&(f.f[7]=b),d=f.f[7]):f.C>>14&0?(0<=b&&(f.f[6]=b),d=f.f[6]):(0<=b&&(f.fa[0]=b),d=f.fa[0]),d;case 4194244:case 4194242:case 4194240:return e=a&7,f.C&2048?(0<=b&&(f.Ma[e]=b),d=f.Ma[e]):(0<=b&&(f.f[e]=b),d=f.f[e]),d;default:return f.s|=16,K(f,4)}break;case 4194176:e=a>>1&31;d=J(this,f.aa[3][e],a,b,c);0<=d&&(f.aa[3][e]=d,f.aa[3][e&15]&=65295);break;case 4194112:switch(a&-2){case 4194174:d=J(this,f.vb,a,b,c);0<=d&&(f.vb=d);break;case 4194172:d=f.Ca;d&65280&&(d=(d<<8|d>>8)&65535);break;case 4194168:0> -b?d=this.c.Wc&65535:(d=J(this,this.c.data,a,b,c),0<=d&&(this.c.data=d));break;default:return f.s|=16,K(f,4)}break;case 4194048:e=this.g;switch(a&-2){case 4194048:d=J(this,e.fb,a,b,c);0<=d&&(e.fb=d);break;case 4194050:d=J(this,e.S,a,b,c);0<=d&&(e.S=d);break;case 4194052:d=J(this,e.D,a,b,c);0<=b&&0<=d&&(e.D=d&-36993|e.D&36992,e.D&1&&fb(this));break;case 4194054:d=J(this,e.gb,a,b,c);0<=d&&(e.gb=d);break;case 4194056:d=J(this,e.eb,a,b,c);0<=d&&(e.eb=d);break;case 4194058:d=J(this,e.Y,a,b,c);0<=d&&(e.Y= -d);break;case 4194060:break;case 4194062:d=J(this,e.$b,a,b,c);0<=d&&(e.$b=d);break;default:return f.s|=16,K(f,4)}break;case 4193728:var g=this.l;e=g.ca&7;switch(a&-2){case 4193728:d=J(this,g.F,a,b,c);0<=b&&0<=d&&(g.Fa=g.Fa&60|d>>8&3,g.F=d&17279|g.F&34944|2048,d&1&&g.F&128?jb(this,e):192==(d&192)&&G(f,0,5,172));break;case 4193730:d=J(this,g.Sa,a,b,c);0<=d&&(g.Sa=d);break;case 4193732:d=J(this,g.Qa,a,b,c);0<=d&&(g.Qa=d&65534);break;case 4193734:d=J(this,g.da[e],a,b,c);0<=d&&(g.da[e]=d&7967);break;case 4193736:d= -J(this,g.ca,a,b,c);0<=d&&(g.ca=d&63|g.ca&65472,d&128&&ib(this));break;case 4193738:d=g.V[e];break;case 4193740:d=g.Ra[e];break;case 4193742:d=J(this,g.Na,a,b,c);0<=d&&(g.Na=d&255);break;case 4193744:d=g.Tc[e];break;case 4193746:d=J(this,g.ac,a,b,c);0<=d&&(g.ac=d);break;case 4193748:d=J(this,g.bc[e],a,b,c);0<=d&&(g.bc[e]=d&1023);break;case 4193750:d=8210;break;case 4193752:d=g.Uc[e];break;case 4193754:d=J(this,g.cc[e],a,b,c);0<=d&&(g.cc[e]=d);break;case 4193756:d=J(this,g.qa[e],a,b,c);0<=d&&(g.qa[e]= -d&511);break;case 4193758:g.wb[e]=g.qa[e];d=g.wb[e];break;case 4193760:d=g.Rc[e];break;case 4193762:d=g.Sc[e];break;case 4193764:d=g.Pc[e];break;case 4193766:d=g.Qc[e];break;case 4193768:d=J(this,g.Fa,a,b,c);0<=d&&(g.Fa=d&63,g.F=g.F&-769|(d&3)<<8);break;case 4193770:d=J(this,g.Lb,a,b,c);0<=d&&(g.Lb=d);break;default:return f.s|=16,K(f,4)}break;case 4192512:e=this.h;switch(a&-2){case 4192512:d=J(this,e.v,a,b,c);0<=b&&0<=d&&(e.va=e.va&60|d>>4&3,e.v=e.v&-1023|d&1022,e.v&128||hb(this));break;case 4192514:d= -J(this,e.ab,a,b,c);0<=d&&(e.ab=d&65534);break;case 4192516:d=J(this,e.M,a,b,c);0<=d&&(e.M=d);break;case 4192518:d=J(this,e.Ba,a,b,c);0<=d&&(e.Ba=d);break;case 4192520:d=J(this,e.va,a,b,c);0<=d&&(e.va=d&63,e.v=e.v&-49|(e.va&3)<<4);break;default:return f.s|=16,K(f,4)}break;case 4191552:switch(a&-2){case 4191566:0>b?d=f.Da:(d=J(this,f.Da,a,b,c),0<=d&&(70!==f.La&&(d&=-49),f.Da=d,f.sb[0]=d&4?15:7,f.sb[1]=d&2?15:7,f.sb[3]=d&1?15:7,f.Hb&&(e=2,f.Da&16&&(e=1),this.c.Oa=this.c.Oa&-8|e)));break;default:return f.s|= -16,K(f,4)}break;case 4191424:e=a>>1&31;d=J(this,f.aa[0][e],a,b,c);0<=d&&(f.aa[0][e]=d,f.aa[0][e&15]&=65295);break;case 4191360:e=a>>1&31;d=J(this,f.aa[1][e],a,b,c);0<=d&&(f.aa[1][e]=d,f.aa[1][e&15]&=65295);break;case 4190400:case 4190336:if(70!==f.La)return K(f,4);e=a>>2&31;d=f.hb[e];a&2&&(d>>=16);d&=65535;0<=b&&(d=J(this,d,a,b,c),0<=d&&(f.hb[e]=a&2?d<<16|f.hb[e]&65535:f.hb[e]&4294901760|d&65534));break;case 4188672:case 4188736:case 4188800:case 4188864:case 4188928:case 4188992:case 4189056:case 4189120:if(0> -b)d=$a[a>>1&255];else return f.s|=16,K(f,4);break;default:return f.s|=16,K(f,4)}c&&0<=d&&(a&1?d>>=8:d&=255);"undefined"===typeof d&&console.log("panic(76)");return d}; -var L={},I=(L[62592]=[null,null,F.prototype.Ec,F.prototype.jd,"SISDR"],L[62608]=[null,null,F.prototype.Cc,F.prototype.gd,"SDSDR"],L[62624]=[null,null,F.prototype.Dc,F.prototype.hd,"SISAR"],L[62640]=[null,null,F.prototype.Bc,F.prototype.fd,"SDSAR"],L[62656]=[null,null,F.prototype.vc,F.prototype.$c,"KISDR"],L[62672]=[null,null,F.prototype.tc,F.prototype.Yc,"KDSDR"],L[62688]=[null,null,F.prototype.uc,F.prototype.Zc,"KISAR"],L[62704]=[null,null,F.prototype.sc,F.prototype.Xc,"KDSAR"],L[65382]=[null,null, -F.prototype.wc,F.prototype.ad,"LKS"],L[65402]=[null,null,F.prototype.xc,F.prototype.bd,"MMR0"],L[65408]=[null,null,F.prototype.Ic,F.prototype.nd,"UISDR"],L[65424]=[null,null,F.prototype.Gc,F.prototype.ld,"UDSDR"],L[65440]=[null,null,F.prototype.Hc,F.prototype.md,"UISAR"],L[65456]=[null,null,F.prototype.Fc,F.prototype.kd,"UDSAR"],L[65534]=[null,null,F.prototype.yc,F.prototype.cd,"PSW"],L);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592]; -I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640];I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656]; -I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704];I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408]; -I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; -u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,c>>2),sb(this,ob?tb:ub);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},O:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ha:function(a){var 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},la: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.xa=!0},I:function(a,b){return this.J(a,b)},$:function(a,b){return this.ea(a, -b)},ja:function(a,b,c){this.A||this.gc(a,b,c)},sa:function(a,b,c){this.A||this.ta(a,b,c)},H:function(a){return this.c[a]},N:function(a){return this.c[a]},W:function(a){return this.g.getUint16(a,!0)},ga:function(a){return this.l[a>>1]},ia:function(a,b){this.c[a]=b;this.xa=!0},ka:function(a,b){this.c[a]=b;this.xa=!0},ra:function(a,b){this.g.setUint16(a,b,!0);this.xa=!0},Ha:function(a,b){this.l[a>>1]=b;this.xa=!0}}; -function Na(a,b,c){a.L=b;a.h=a.u=0;c&&((a.h=c.h)&&wb(a,xb,!1),(a.u=c.u)&&yb(a,xb,!1))}function yb(a,b,c){c&&a.u||(a.yb=!a.A&&b[1]||a.B,a.od=!a.A&&b[3]||a.w);if(c||void 0===c)a.gc=b[1]||a.B,a.ta=b[3]||a.w}function wb(a,b,c){c&&a.h||(a.Ib=b[0]||a.m,a.Jc=b[2]||a.o);if(c||void 0===c)a.J=b[0]||a.m,a.ea=b[2]||a.o}function sb(a,b){b||(b=zb);wb(a,b,void 0);yb(a,b,void 0)}var zb=[],vb=[E.prototype.O,E.prototype.la,E.prototype.ha,E.prototype.Ia],xb=[E.prototype.I,E.prototype.ja,E.prototype.$,E.prototype.sa]; -if(Ja)var ub=[E.prototype.H,E.prototype.ia,E.prototype.W,E.prototype.ra],tb=[E.prototype.N,E.prototype.ka,E.prototype.ga,E.prototype.Ha];function Ab(a,b){v.call(this,"CPU",a,Ab);var c=a.multiplier||1;this.ob=a.cycles||b;this.ka=c;this.Fb=Math.round(this.ob/1E4)/100;this.ra=this.Fb*this.ka;this.i.ba=!1;this.i.dc=!1;this.i.$a=a.autoStart;this.i.Nb=!1;this.i.qb=!1;this.ib=this.sa=0;this.nb=a.csStart;this.Ia=a.csInterval;this.Va=a.csStop;this.N=[];this.Wb=this.Vc.bind(this);D(this)}x(Ab); -var Bb=["power","reset"];h=Ab.prototype;h.za=function(a,b,c,d){this.B=a;this.u=b;this.L=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.A[b].textContent!=d&&(a.A[b].textContent=d)}} -h.Z=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.A[b]=c;a=!0;break;case "run":this.A[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.R)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.ha/a.ra&&(b=1),a.ka=b,b=a.Fb*a.ka,a.ra!=b)){a.ra=b;b=a.ra.toFixed(2)+"Mhz";var c=a.A.setSpeed;c&&(c.textContent=b);a.U("target speed: "+b)}Jb(a,a.ea);a.ea=0;a.$=ja();a.ia=0;Kb(a)}function ab(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function bb(a,b,c){0<=b&&ba.N[b][0]&&(c*=a.ob*a.ka/1E3,a.N[b][0]=c)} -h.Vc=function(){if(this.i.ba){this.Gb>=this.ob&&Kb(this,!0);this.Xa=0;this.mb=ja();if(this.ia){var a=this.mb-this.ia;a>this.Ub&&(this.$+=a,this.$>this.mb&&(this.$=this.mb))}try{do{for(var b,c=this.i.qb?1:this.pb,d=this.N.length-1;0<=d;d--){var e=this.N[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ec(b)}catch(n){if("number"!=typeof n)throw n;}for(var f=this.ja-this.a,a=f,g=this.N.length-1;0<=g;g--){var l=this.N[g];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Xa+=f;this.ea+=f;Jb(this,0,!0);a=f;if(this.i.qb){var m= -!1;this.ib=this.ib+this.Pb()|0;this.sa-=a;0>=this.sa&&(this.sa+=this.Ia,m=!0);0<=this.Va&&this.Va<=Lb(this)&&(this.Ia=this.Va=-1,Eb(this),M(this),m=!0);m&&this.U(Lb(this)+" cycles: checksum="+k(this.ib))}this.Wa-=f;if(0>=this.Wa){this.Wa+=this.pb;15<=++this.Vb&&(this.B&&this.B.Ta(),this.Vb=0);break}}while(this.i.ba)}catch(n){M(this);Fb(this);this.B&&this.B.stop(ja(),Lb(this));b=n.stack||n.message;this.i.error=!0;this.P(b);return}if(this.i.ba){b=setTimeout;c=this.Wb;this.ia=ja();d=this.Ub;this.Xa&& -(d=Math.round(d*this.Xa/this.pb));d-=this.ia-this.mb;if(e=this.ia-this.$)this.ha=Math.round(this.ea/(10*e))/100,864E5<=e&&(this.la=0,Ib(this));if(0>d||this.had&&(this.$-=d),d=0;this.Gb+=this.Xa;this.ia+=d;b(c,d)}}};function Gb(a){var b;a.i.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.ba)a.U(a.toString()+" busy");else{Ib(a);a.i.ba=!0;a.i.dc=!0;a.Ha&&a.Ha.start();if(b=a.A.run)b.textContent="Halt";a.B&&a.B.start(a.$,Lb(a));Fb(a,!0);setTimeout(a.Wb,0)}}h.ec=function(){return 0}; -function M(a){if(a.i.ba){a.ja-=a.a;a.a=0;Jb(a,a.ea);a.ea=0;a.i.ba=!1;a.Ha&&a.Ha.stop();var b=a.A.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Lb(a));Fb(a)}a.i.complete=void 0}function Fb(a,b){a.B&&a.B.Ta(b)} -function Mb(a){this.rc=a.resetAddr||0;Ab.call(this,a,6666667);this.Qb=0;this.decode=Nb.bind(this);this.l=65536;this.g=32768;this.h=65535;this.m=32768;this.C=15;this.f=[0,0,0,0,0,0,0,this.rc];this.Ma=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.lb=this.w=0;this.pc=[4,2,0,1];this.G=[[0,0,0,0,0,0,0,0,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]];this.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], -[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.aa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.hb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0];this.Cb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.c=this.b=this.Db=this.I=this.J=this.j=0;this.La=70;this.ta=-1;Ob(this);this.i.complete=this.i.jc=!1}x(Mb,Ab);h=Mb.prototype;h.reset=function(){this.i.ba&&M(this);Ob(this);Db(this);this.i.error=!1;this.parent.reset.call(this)};function Ob(a){a.Ea=255;a.s=0;a.Kb=0;a.H=0;a.Ca=0;a.vb=0;a.Da=0;a.Hb=0;a.kb=0;a.sb=262143;a.Tb=253952;a.o=[];a.j|=2;cb(a)} -function cb(a){a.Hb?(a.ga=65536,a.O=a.mc,a.W=a.Zb,a.Xb=a.pd):(a.ga=0,a.O=a.lc,a.W=a.Pa,a.Xb=a.Ua)}h.Pb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.la,this.ka]);a.set(2,Xa(this.u));return a.data()}; -h.restore=function(a){var b=a[1];this.la=b[1];Ib(this,b[3]);a:{b=this.u;a=a[2];var c;for(c=0;cb){a.o[f].ma-=b;break}b-=a.o[f].ma}a.o.splice(f+1,0,{ma:b,Yb:c<<5&224,fc:d,Ab:e})}a.j|=2}function db(a){return a.C=a.C&63728|a.ya()|(a.h&65535?0:4)|(a.g&32768?2:0)|O(a)} -function eb(a,b){a.m=b<<12;a.h=~b&4;a.g=b<<14;a.l=b<<16;if((b^a.C)&2048)for(var c=a.Ma.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ma[c];a.Ma[c]=d}a.w=b>>14&3;c=a.C>>14&3;a.w!=c&&(a.fa[c]=a.f[6],a.f[6]=a.fa[a.w]);a.j|=2;a.C=b}function P(a,b){a.j&128||(a.m=a.h=b,a.g=0)}function Q(a,b,c){a.j&128||(a.m=a.h=a.l=b,a.g=c||0)}function Qb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^b)&(d^b))}function R(a,b){a.j&128||(a.m=a.h=a.l=b,a.g=a.m^a.l>>1)}function Rb(a,b,c,d){a.j&128||(a.m=a.h=a.l=b,a.g=(c^d)&(d^b))} -function K(a,b){var c=!1;0>a.ta?a.ta=db(a):a.w||(b=4,c=!0);a.H&57344||(a.Ca=63222,a.vb=b);a.w=0;var d=a.W(b|a.ga),e=a.W(b+2&65535|a.ga);eb(a,e&-12289|a.ta>>2&12288);c&&(a.s|=4,a.f[6]=4);Sb(a,a.ta);Sb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ta=-1;throw b;}function Tb(a){var b=Ub(a),c=Ub(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);a.f[7]=b&65535;eb(a,c);a.j&=-17} -function lb(a,b){var c=b>>13&31;31>c?a.Da&32&&(b=a.hb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Vb(a,b,c){var d,e,f,g=0;d=b>>13;a.Da&a.pc[a.w]||(d&=7);e=a.G[a.w][d];f=(a.X[a.w][d]<<6)+(b&8191)&a.sb;ff&&(3932160<=f&&(f=lb(a,f&262143)),f>=a.Tb&&4186112>f&&(a.s|=32,K(a,4))));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.G[a.w][d]=e;if(4194170!==f||a.w)a.kb=a.w,a.lb=d;g&&(g&57344&&(0<=a.ta&&(g|=128),a.H&57344||(a.H=a.H|g|a.kb<<5|a.lb<<1),K(a,168)),a.H&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[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.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-=8;break; -case 6:return e=Pb(a),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=Pb(a),e=e+a.f[c]&65535,e=a.W(e|a.ga)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.H&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.Ea||65534<=a.f[6])&&(a.f[6]<=a.Ea-32?(a.s|=4,a.f[6]=4,K(a,4)):(a.s|=8,a.j|=64));return e}h.lc=function(a,b,c){return Wb(this,a,b,c)};h.mc=function(a,b,c){return Vb(this,Wb(this,a,b,c),c)};h.Pa=function(a){a&1&&(this.s|=64,K(this,4));var b=this.u;return b.b[(a&b.u)>>>b.c].Jc(a&b.h,a)}; -h.Zb=function(a){return this.Pa(Vb(this,a,2))};h.Ua=function(a,b){a&1&&(this.s|=64,K(this,4));var c=this.u;c.b[(a&c.u)>>>c.c].od(a&c.h,b&65535,a)};h.pd=function(a,b){this.Ua(Vb(this,a|65536,4),b)};function Xb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Wb(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.w=a.C>>12&3,c=a.W(d|c&a.ga),a.w=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.fa[a.C>>12&3];return c} -function Yb(a,b,c,d){a.H&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Wb(a,b,e,4),c&65536||(e&=65535),a.w=a.C>>12&3,e=Vb(a,e|c&65536,4),a.w=a.C>>14&3,a.Ua(e,d)):6!=e||(a.C>>2&12288)===(a.C&12288)?a.f[e]=d:a.fa[a.C>>12&3]=d}function Zb(a,b){b>>=6;var c=a.J=b&7;(b=a.I=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function S(a,b){var c;b>>=6;var d=a.J=b&7;(b=a.I=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function $b(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Wb(a,b,c,8)} -function ac(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.O(b,c,3),a=Wa(a.u,c)):a=a.f[c]&255;return a}function bc(a,b){var c,d=a.b=b&7;(b=a.c=(b&56)>>3)?c=a.Pa(a.O(b,d,2)):c=a.f[d];return c}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Db=a.O(b,e,7),c=d.call(a,c,Wa(a.u,e)),e&1&&a.a--,a=a.u,a.b[(e&a.u)>>>a.c].yb(e&a.h,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.O(b,e,6),a.Ua(e,d.call(a,c,a.Pa(e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.O(b,e,5),d&1&&a.a--,a=a.u,a.b[(d&a.u)>>>a.c].yb(d&a.h,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?a.Ua(a.O(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -h.ec=function(a){this.i.complete=!0;this.i.jc=!1;this.i.dc=!1;this.ja=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?K(this,168):this.j&64?K(this,4):this.j&16&&K(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.Kb&224,c=this.o.length;0<=--c;){if(0b&&(b=this.o[c].Yb,a=this.o[c],this.o.splice(c,1))}b>(this.C&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?K(this,a.fc):K(this,160))}else this.j&1&&this.j++;this.H&57344||(this.Ca=0,this.vb=this.f[7]);this.j=this.j&7|this.C&16;this.decode(Pb(this))}while(0>1|b<<16;R(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;R(this,a<<8);return a&255}function kc(a,b){a=b&~a;P(this,a);return a}function lc(a,b){a=b&~a;P(this,a<<8);return a}function mc(a,b){a|=b;P(this,a);return a}function nc(a,b){a|=b;P(this,a<<8);return a}function oc(a,b){a=~b|65536;Q(this,a);return a&65535} -function pc(a,b){a=~b|256;Q(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.m=this.h=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.m=this.h=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.m=this.h=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.m=this.h=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;Q(this,a,a&b&32768);return a&65535} -function vc(a,b){a=-b;Q(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.l>>16&1;R(this,a);return a&65535}function xc(a,b){a=b<<1|this.l>>16&1;R(this,a<<8);return a&255}function yc(a,b){a=(this.l&65536|b)>>1|b<<16;R(this,a);return a&65535}function zc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;R(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Rb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Rb(this,c<<8,a<<8,b<<8);return c&255} -function Cc(a,b){this.j&128||(this.m=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;P(this,a);return a&65535}function Ec(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.m=this.h=c;this.a-=(this.c?6:7)+b} -function Fc(a){var b=bc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.m=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.m=0);this.a-=5} -function Gc(a){var b=bc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.m=d>>16):(this.g=32768,this.h=d>>15|d,this.m=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.m=0,this.g=32768,this.l=65536,this.a-=7}var Hc=[0,7,7,10,7,11,9,13];function Ic(a){var b=this.a;a=$b(this,a);this.f[7]=a&65535;this.a=b-Hc[this.c]} -var Jc=[0,14,14,17,14,18,16,20];function Kc(a){var b=this.a,c=$b(this,a);a=a>>6&7;Sb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Jc[this.c]}var Lc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Mc=[7,13,13,17,14,18,17,21];function Nc(a){var b=bc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.m=b>>16,this.h=this.m|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Qc(a){U(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rc(a){U(this,a,S(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8)}function Nb(a){Sc[a>>12].call(this,a)} -var Sc=[function(a){Tc[a>>8&15].call(this,a)},function(a){var b=S(this,a),c=this.a;P(this,dc(this,a,b));this.a=c-Lc[(this.I?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=S(this,a);a=bc(this,a);Rb(this,b-a,a,b);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,S(this,a)&bc(this,a));this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),kc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b? -2:0)},function(a){U(this,a,S(this,a),mc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),ec);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){Uc[a>>8&15].call(this,a)},function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Zb(this,a);P(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){var b=Zb(this,a)<<8;a=ac(this,a)<<8;Rb(this,b-a,a,b);this.a-=this.c?4+ -(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){P(this,(Zb(this,a)&ac(this,a))<<8);this.a-=this.c?4+(this.J&&6<=this.b?1:0):(this.I?4:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),lc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){T(this,a,Zb(this,a),nc);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},function(a){U(this,a,S(this,a),Ac);this.a-=this.c?9+(this.J&&6<=this.b?1:0):(this.I?5:3)+(7==this.b?2:0)},Y],Tc=[function(a){Wc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.h&65535))},function(a){V(this,a,this.h&65535?0:4)},function(a){V(this,a,!this.ya()==!(this.g&32768))},function(a){V(this,a,!this.ya()!=!(this.g&32768))},function(a){V(this,a,!!(this.h&65535)&&!this.ya()==!(this.g&32768))},function(a){V(this,a,(this.h&65535?0:4)||!this.ya()!=!(this.g&32768))},Kc,Kc,function(a){Xc[a>>6&3].call(this,a)},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>> -6&3].call(this,a)},Y,Y],Xc=[function(a){Q(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){U(this,a,0,uc);this.a-=this.c?11:6},function(a){U(this,a,O(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,O(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this, -a);Q(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Zc=[function(a){U(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Xb(this,a,0);Sb(this,a);P(this,a);this.a-= -11},function(a){var b=Ub(this),c=this.a;Yb(this,a,0,b);P(this,b);this.a=c-Mc[this.c]},function(a){P(this,dc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Wc=[function(a){ad[a&15].call(this,a)},Y,Y,Y,Ic,Ic,Ic,Ic,function(a){if(a&8)K(this,8);else{var b=Ub(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.C&49152||(this.C=this.C&-2017|(a&7)<<5,this.j|=1),this.a-=5):K(this,8)},function(a){bd[a&15].call(this,a)},function(a){cd[a&15].call(this,a)},Qc,Qc, -Qc,Qc],ad=[function(){this.C&49152?(this.s|=128,K(this,4)):M(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Tb(this);this.j|=this.C&16;this.a-=13},function(){K(this,12);this.a-=5},function(){K(this,16);this.a-=25},function(){this.C&49152||(Ob(this),this.u.reset());this.a-=667},function(){Tb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],bd=[Oc,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.m=0;this.a-= -5},W,W,W,W,W,W,W],cd=[Oc,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.m=32768;this.a-=5},X,X,X,X,X,X,X],Uc=[Nc,Nc,Gc,Gc,Ec,Ec,Fc,Fc,Rc,Rc,Y,Y,Y,Y,Pc,Pc],Vc=[function(a){V(this,a,!this.ya())},function(a){V(this,a,this.ya())},function(a){V(this,a,!O(this)&&!!(this.h&65535))},function(a){V(this,a,O(this)||(this.h&65535?0:4))},function(a){V(this,a,!(this.g&32768))},function(a){V(this,a,this.g&32768?2:0)},function(a){V(this, -a,!O(this))},function(a){V(this,a,O(this))},function(){K(this,24);this.a-=25},function(){K(this,28);this.a-=5},function(a){dd[a>>6&3].call(this,a)},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},Y,Y],dd=[function(a){Q(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c? -9:3+(7==this.b?2:0)}],ed=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,O(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,O(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ac(this,a);Q(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fd=[function(a){T(this,a,0,zc);this.a-=this.c?9+(this.Db&1):3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9+(this.Db&1):3+(7==this.b? -2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[Y,function(a){a=Xb(this,a,65536);Sb(this,a);P(this,a);this.a-=11},function(a){var b=Ub(this),c=this.a;Yb(this,a,65536,b);P(this,b);this.a=c-Mc[this.c]},Y]; -function hd(a){v.call(this,"ROM",a,hd);this.b=null;this.m=a.addr;this.c=a.size;this.o=a.writable;this.g=a.alias;this.h=a.file;this.B=ba(this.h);if(this.h){a=this.h;var b=ca(this.B);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;p(a,null,!0,function(a,b,f){id(c,a,b,f)})}}x(hd);hd.prototype.za=function(a,b,c,d){this.u=b;this.a=c;this.L=d;jd(this)};hd.prototype.pa=function(){this.l&&(this.L&&this.L.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; -hd.prototype.oa=function(){return!0}; -function id(a,b,c,d){if(d)a.P("Unable to load system ROM (error "+d+": "+b+")");else{Fa(a.Eb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),g=e=0;e>8&255,a.b[g++]=f[e]>>16&255,a.b[g++]=f[e]>>24&255;else a.b=l;a.l=l.symbols;if(!a.b.length){q("Empty ROM: "+b); -return}if(1==a.b.length){q(a.b[0]);return}}catch(m){a.P("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].gc(e&d.h,a.b[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.jb)return;b=ha(b[1]);if(this.o=Ga(b)){var d=this.o.exports;if(d){var e=d.connect;e&&e.call(this.o);if(this.w=d.receiveData){this.status(this.Eb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.pa=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.oa=function(a){return a?this.save():!0};h.reset=function(){od(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return od(this)};function od(a){a.J=0;a.b=0;a.c=128;a.h=[];return!0}h.Jb=function(a){if("number"==typeof a)this.h.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.N||8,c=a-this.m%a,this.N&&(b=" ".slice(0,c)));this.H&&!this.m&&c&&(b=String.fromCharCode(this.H)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.U(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;G(this.a,100,4,52,this.I)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Ac,Z.prototype.ed,"RCSR"],pd[65394]=[null,null,Z.prototype.zc,Z.prototype.dd,"RBUF"],pd[65396]=[null,null,Z.prototype.Lc,Z.prototype.rd,"XCSR"],pd[65398]=[null,null,Z.prototype.Kc,Z.prototype.qd,"XBUF"],pd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.B)){this.l=new N(this,"1.30.1","failsafe");ud(this.l)&&(zd(this,d),a=2,Ad(this.l));this.l.set("timestamp",ka());Bd(this.l);var e=this.b&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ud(d,g):("error"== -f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(pa("user",""),this.c=null)):this.U(f+": "+g),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.B;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.$=!0;this.i.R=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.$a());this.J&&(zd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; -function zd(a,b){if(la("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.1"};d.url=a.url;d.user=c;d.type="bug";d.data=b;p("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ka();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.oa&&(c&&M(a.a),d=a.a.oa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.R=!1,!1===d&&(e=null)));for(var l=y(a.id),m=0;mf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");p(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],n,t=/( [a-z]+=)(['"])(.*?)\2/g;n=t.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Kd(a,b,c)}})}else c(a,null)} -function Ld(a,b,c,d){function e(a){if(void 0===l){var b=g&&C(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);m&&(--Hd||wa(!0));m=!1}var g,l,m=!0;Hd++;Ea[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=n:z.appendChild(document.createTextNode(n));t.appendChild(z)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");n=function(d,l){l?Id(c,null,null,!1,e,function(d,m){m?(Fa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Hd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Hd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,n):Jd(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return m}window.embedPDP11=function(a,b,c,d){wa(!1);return Ld(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ja="undefined"!==typeof ArrayBuffer;function Ka(a){v.call(this,"Panel",a,Ka)}x(Ka);g=Ka.prototype; +g.R=function(a,b,c,d){return this.A&&this.A.R(a,b,c,d)||this.b&&this.b.R(a,b,c,d)?!0:this.parent.R.call(this,a,b,c,d)};g.oa=function(a,b,c,d){this.A=a;this.o=b;this.b=c;this.I=d};g.ha=function(a,b){b||La();return!0};g.ga=function(){return!0};g.wa=function(){};function La(){for(var a=!1,b=C(document,"pdp11","panel"),c=0;c>1)+2;10>this.c&&(this.c=10);15>2;this.o=this.g-1;this.s=this.l/this.g|0;this.la=[];this.m=[];a=new E(this.b);Na(a,this.I);this.a=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.la[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;F(d.b,4)}function Pa(a,b,c){var d=!1,e=this.controller,f=e.la[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.la[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||F(e.b,4)} +function Qa(a,b){var c=-1,d=this.controller;(a=d.la[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;F(d.b,4)}function Ra(a,b,c){var d=!1,e=this.controller;if(a=e.la[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||F(e.b,4)}Ma.prototype.reset=function(){for(var a=0;a>>a.c;0k&&(t=k);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+k<=n.Aa)return n.Qa+=n.Aa-f,n.Aa=f,!0;if(f>=n.Aa+n.Qa){t=n.size-(f-q);t>k&&(t=k);n.Qa=f-n.Aa+t;f=q+a.g;k-=t;m++;continue}}return Ua(1,f,k)}f=new E(a.b,f,t,a.g,d,e);Na(f,a.I,n);a.a[m++]=f;f=q+a.g;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+h(b,8,!0)),!0):Ua(2,b,c)} +function Wa(a,b){return a.a[(b&a.h)>>>a.c].$a(b&a.o,b)}function Xa(a,b){return a.a[(b&a.h)>>>a.c].nc(b&a.o,b)}function Ya(a,b,c){a.a[(b&a.h)>>>a.c].Sc(b&a.o,c&65535,b)}function Za(a){for(var b=0,c=[],d=0;da.b.Mb))for(var f=e[0]?e[0].bind(b):null,k=e[1]?e[1].bind(b):null,m=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,q=a,t=+d,e=e[4],J=+d;J<=t;J+=2){var Ba=J&8191;void 0!==q.la[Ba]?p("I/O address already registered: "+h(J,8,!0)):q.la[Ba]=[f,k,m,n,e||"unknown",!1]}}}function ab(a,b){a.m.push(b)}function Ua(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1} +function G(a){v.call(this,"Device",a,G);this.c={data:0,Xc:0,Pa:20,ad:0};this.a={$c:0,eb:-1}}x(G);g=G.prototype;g.oa=function(a,b,c,d){this.o=b;this.b=c;this.I=d;var e=this;this.a.eb=bb(this.b,function(){e.a.pa|=128;e.a.pa&64&&(cb(e.b,0,6,64),db(e.b,e.a.eb,1E3/60))});$a(b,this,H);ab(b,this.reset.bind(this));D(this)};g.Ub=function(){var a=this.a.pa;this.a.pa&=-129;return a};g.Ac=function(a){this.a.pa=a;a&64&&db(this.b,this.a.eb,1E3/60);this.a.pa=a&-129}; +g.Wb=function(){var a=this.b;return a.D&62337|a.Ga<<5|a.Ha<<1};g.Cc=function(a){var b=this.b;b.D=a&=62337;b.Ga=a>>5&3;b.Ha=a>>1&15;b.Za=a&257?a&1?6:4:0;eb(b);fb(this)};g.Xb=function(){var a=this.b.qa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Yb=function(){return this.b.bb};g.Zb=function(){return this.b.ua};g.Dc=function(a){var b=this.b;b.ua=a;b.ua&16?(b.Xa=4194303,b.Ia=3915776):(b.Xa=262143,b.Ia=253952);fb(this)};function fb(a){a.c.Pa=a.c.Pa&-8|(a.b.Za?a.b.ua&16?1:2:4)} +g.gc=function(a){return this.b.C[1][a>>1&7]};g.Lc=function(a,b){this.b.C[1][b>>1&7]=a&65295};g.ec=function(a){return this.b.C[1][(a>>1&7)+8]};g.Jc=function(a,b){this.b.C[1][(b>>1&7)+8]=a&65295};g.fc=function(a){return this.b.P[1][a>>1&7]};g.Kc=function(a,b){b=b>>1&7;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.dc=function(a){return this.b.P[1][(a>>1&7)+8]};g.Ic=function(a,b){b=(b>>1&7)+8;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.Tb=function(a){return this.b.C[0][a>>1&7]}; +g.zc=function(a,b){this.b.C[0][b>>1&7]=a&65295};g.Rb=function(a){return this.b.C[0][(a>>1&7)+8]};g.xc=function(a,b){this.b.C[0][(b>>1&7)+8]=a&65295};g.Sb=function(a){return this.b.P[0][a>>1&7]};g.yc=function(a,b){b=b>>1&7;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.Qb=function(a){return this.b.P[0][(a>>1&7)+8]};g.wc=function(a,b){b=(b>>1&7)+8;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.mc=function(a){return this.b.C[3][a>>1&7]};g.Rc=function(a,b){this.b.C[3][b>>1&7]=a&65295}; +g.kc=function(a){return this.b.C[3][(a>>1&7)+8]};g.Pc=function(a,b){this.b.C[3][(b>>1&7)+8]=a&65295};g.lc=function(a){return this.b.P[3][a>>1&7]};g.Qc=function(a,b){b=b>>1&7;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.jc=function(a){return this.b.P[3][(a>>1&7)+8]};g.Oc=function(a,b){b=(b>>1&7)+8;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.T=function(a){a&=7;return this.b.v&2048?this.b.va[a]:this.b.f[a]};g.W=function(a,b){b&=7;this.b.v&2048?this.b.va[b]=a:this.b.f[b]=a}; +g.qb=function(){return this.b.v&49152?this.b.Z[0]:this.b.f[6]};g.Cb=function(a){this.b.v&49152?this.b.Z[0]=a:this.b.f[6]=a};g.tb=function(){return this.b.f[7]};g.Fb=function(a){this.b.f[7]=a};g.U=function(a){a&=7;return this.b.v&2048?this.b.f[a]:this.b.va[a]};g.X=function(a,b){b&=7;this.b.v&2048?this.b.f[b]=a:this.b.va[b]=a};g.rb=function(){return 1==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[1]};g.Db=function(a){1==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[1]=a}; +g.sb=function(){return 3==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[3]};g.Eb=function(a){3==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[3]=a};g.Pb=function(a){return this.b.xb[a-65504>>1]};g.vc=function(a,b){this.b.xb[b-65504>>1]=a};g.ub=function(a){return 65520==a?61183:0};g.Gb=function(){};g.ic=function(){return 1};g.Nc=function(){};g.Ob=function(){return this.b.F};g.uc=function(){this.b.F=0};g.Vb=function(){return this.b.wb};g.Bc=function(a,b){b&1||(a&=255);this.b.wb=a};g.$b=function(){return this.b.cb}; +g.Ec=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.cb=a;b.j|=2};g.hc=function(){return this.b.ra&65280};g.Mc=function(a){this.b.ra=a|255};g.ac=function(){return gb(this.b)};g.Fc=function(a){hb(this.b,a&-1809|gb(this.b)&1808);this.b.j|=128};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.a.pa=0}; +var I={},H=(I[62592]=[null,null,G.prototype.gc,G.prototype.Lc,"SISDR"],I[62608]=[null,null,G.prototype.ec,G.prototype.Jc,"SDSDR"],I[62624]=[null,null,G.prototype.fc,G.prototype.Kc,"SISAR"],I[62640]=[null,null,G.prototype.dc,G.prototype.Ic,"SDSAR"],I[62656]=[null,null,G.prototype.Tb,G.prototype.zc,"KISDR"],I[62672]=[null,null,G.prototype.Rb,G.prototype.xc,"KDSDR"],I[62688]=[null,null,G.prototype.Sb,G.prototype.yc,"KISAR"],I[62704]=[null,null,G.prototype.Qb,G.prototype.wc,"KDSAR"],I[62798]=[null,null, +G.prototype.Zb,G.prototype.Dc,"MMR3"],I[65382]=[null,null,G.prototype.Ub,G.prototype.Ac,"LKS"],I[65402]=[null,null,G.prototype.Wb,G.prototype.Cc,"MMR0"],I[65404]=[null,null,G.prototype.Xb,null,"MMR1"],I[65406]=[null,null,G.prototype.Yb,null,"MMR2"],I[65408]=[null,null,G.prototype.mc,G.prototype.Rc,"UISDR"],I[65424]=[null,null,G.prototype.kc,G.prototype.Pc,"UDSDR"],I[65440]=[null,null,G.prototype.lc,G.prototype.Qc,"UISAR"],I[65456]=[null,null,G.prototype.jc,G.prototype.Oc,"UDSAR"],I[65472]=[G.prototype.T, +G.prototype.W,G.prototype.T,G.prototype.W,"R0SET0"],I[65473]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R1SET0"],I[65474]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R2SET0"],I[65475]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R3SET0"],I[65476]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R4SET0"],I[65477]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R5SET0"],I[65478]=[G.prototype.qb,G.prototype.Cb,G.prototype.qb,G.prototype.Cb, +"R6KERNEL"],I[65479]=[G.prototype.tb,G.prototype.Fb,G.prototype.tb,G.prototype.Fb,"R7KERNEL"],I[65480]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R0SET1"],I[65481]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R1SET1"],I[65482]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R2SET1"],I[65483]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R3SET1"],I[65484]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R4SET1"],I[65485]=[G.prototype.U,G.prototype.X, +G.prototype.U,G.prototype.X,"R5SET1"],I[65486]=[G.prototype.rb,G.prototype.Db,G.prototype.rb,G.prototype.Db,"R6SUPER"],I[65487]=[G.prototype.sb,G.prototype.Eb,G.prototype.sb,G.prototype.Eb,"R6USER"],I[65504]=[null,null,G.prototype.Pb,G.prototype.vc,"CTRL",1170],I[65520]=[null,null,G.prototype.ub,G.prototype.Gb,"LSIZE",1170],I[65522]=[null,null,G.prototype.ub,G.prototype.Gb,"HSIZE",1170],I[65524]=[null,null,G.prototype.ic,G.prototype.Nc,"SYSID",1170],I[65526]=[null,null,G.prototype.Ob,G.prototype.uc, +"CPUERR",1170],I[65528]=[null,null,G.prototype.Vb,G.prototype.Bc,"MB",1170],I[65530]=[null,null,G.prototype.$b,G.prototype.Ec,"PIR"],I[65532]=[null,null,G.prototype.hc,G.prototype.Mc,"SL"],I[65534]=[null,null,G.prototype.ac,G.prototype.Fc,"PSW"],I);H[62594]=H[62592];H[62596]=H[62592];H[62598]=H[62592];H[62600]=H[62592];H[62602]=H[62592];H[62604]=H[62592];H[62606]=H[62592];H[62610]=H[62608];H[62612]=H[62608];H[62614]=H[62608];H[62616]=H[62608];H[62618]=H[62608];H[62620]=H[62608];H[62622]=H[62608]; +H[62626]=H[62624];H[62628]=H[62624];H[62630]=H[62624];H[62632]=H[62624];H[62634]=H[62624];H[62636]=H[62624];H[62638]=H[62624];H[62642]=H[62640];H[62644]=H[62640];H[62646]=H[62640];H[62648]=H[62640];H[62650]=H[62640];H[62652]=H[62640];H[62654]=H[62640];H[62658]=H[62656];H[62660]=H[62656];H[62662]=H[62656];H[62664]=H[62656];H[62666]=H[62656];H[62668]=H[62656];H[62670]=H[62656];H[62674]=H[62672];H[62676]=H[62672];H[62678]=H[62672];H[62680]=H[62672];H[62682]=H[62672];H[62684]=H[62672];H[62686]=H[62672]; +H[62690]=H[62688];H[62692]=H[62688];H[62694]=H[62688];H[62696]=H[62688];H[62698]=H[62688];H[62700]=H[62688];H[62702]=H[62688];H[62706]=H[62704];H[62708]=H[62704];H[62710]=H[62704];H[62712]=H[62704];H[62714]=H[62704];H[62716]=H[62704];H[62718]=H[62704];H[65410]=H[65408];H[65412]=H[65408];H[65414]=H[65408];H[65416]=H[65408];H[65418]=H[65408];H[65420]=H[65408];H[65422]=H[65408];H[65426]=H[65424];H[65428]=H[65424];H[65430]=H[65424];H[65432]=H[65424];H[65434]=H[65424];H[65436]=H[65424];H[65438]=H[65424]; +H[65442]=H[65440];H[65444]=H[65440];H[65446]=H[65440];H[65448]=H[65440];H[65450]=H[65440];H[65452]=H[65440];H[65454]=H[65440];H[65458]=H[65456];H[65460]=H[65456];H[65462]=H[65456];H[65464]=H[65456];H[65466]=H[65456];H[65468]=H[65456];H[65470]=H[65456];H[65506]=H[65504];H[65508]=H[65504];H[65510]=H[65504];H[65512]=H[65504];H[65514]=H[65504];H[65516]=H[65504];H[65518]=H[65504]; +u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.g,0,d>>2),ob(this,kb?pb:qb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a){a&1&&F(this.b,4);var 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},ea: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.ma=!0},G:function(a,b){return this.H(a, +b)},S:function(a,b){return this.Y(a,b)},ca:function(a,b,c){this.h||this.Bb(a,b,c)},ja:function(a,b,c){this.h||this.ka(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},O:function(a){a&1&&F(this.b,4);return this.o.getUint16(a,!0)},$:function(a){a&1&&F(this.b,4);return a&1?this.c[a]|this.c[a+1]<<8:this.m[a>>1]},ba:function(a,b){this.c[a]=b;this.ma=!0},da:function(a,b){this.c[a]=b;this.ma=!0},ia:function(a,b){a&1&&F(this.b,4);this.o.setUint16(a,b,!0);this.ma=!0},sa:function(a,b){a& +1&&F(this.b,4);a&1?(this.c[a]=b,this.c[a+1]=b>>8):this.m[a>>1]=b;this.ma=!0}};function Na(a,b,c){a.I=b;a.w=a.l=0;c&&((a.w=c.w)&&sb(a,tb,!1),(a.l=c.l)&&ub(a,tb,!1))}function ub(a,b,c){c&&a.l||(a.Ra=!a.h&&b[1]||a.A,a.Sc=!a.h&&b[3]||a.B);if(c||void 0===c)a.Bb=b[1]||a.A,a.ka=b[3]||a.B}function sb(a,b,c){c&&a.w||(a.$a=b[0]||a.s,a.nc=b[2]||a.u);if(c||void 0===c)a.H=b[0]||a.s,a.Y=b[2]||a.u}function ob(a,b){b||(b=vb);sb(a,b,void 0);ub(a,b,void 0)} +var vb=[],rb=[E.prototype.N,E.prototype.ea,E.prototype.aa,E.prototype.ta],tb=[E.prototype.G,E.prototype.ca,E.prototype.S,E.prototype.ja];if(Ja)var qb=[E.prototype.D,E.prototype.ba,E.prototype.O,E.prototype.ia],pb=[E.prototype.J,E.prototype.da,E.prototype.$,E.prototype.sa]; +function wb(a,b){v.call(this,"CPU",a,wb);var c=a.multiplier||1;this.La=a.cycles||b;this.da=c;this.Wa=Math.round(this.La/1E4)/100;this.ia=this.Wa*this.da;this.i.V=!1;this.i.yb=!1;this.i.Ca=a.autoStart;this.i.fb=!1;this.i.Ma=!1;this.Ja=this.ja=0;this.Ka=a.csStart;this.ta=a.csInterval;this.xa=a.csStop;this.J=[];this.nb=this.rc.bind(this);D(this)}x(wb);var xb=["power","reset"];g=wb.prototype; +g.oa=function(a,b,c,d){this.A=a;this.o=b;this.I=d;for(b=0;b>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} +g.R=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.L)a=!0;else{var b=null,c,m=y(a.id);for(c=0;ca.aa/a.ia&&(b=1),a.da=b,b=a.Wa*a.da,a.ia!=b)){a.ia=b;b=a.ia.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Eb(a,a.Y);a.Y=0;a.S=ja();a.ba=0;Fb(a)}function bb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function db(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.La*a.da/1E3,a.J[b][0]=c)} +g.rc=function(){if(this.i.V){this.Ya>=this.La&&Fb(this,!0);this.za=0;this.Ea=ja();if(this.ba){var a=this.Ea-this.ba;a>this.lb&&(this.S+=a,this.S>this.Ea&&(this.S=this.Ea))}try{do{for(var b,c=this.i.Ma?1:this.Na,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(q){if("number"!=typeof q)throw q;}for(var f=this.ca-this.a,a=f,k=this.J.length-1;0<=k;k--){var m=this.J[k];0>m[0]||(m[0]-=a,0>=m[0]&&(m[0]=-1,m[1]()))}this.za+=f;this.Y+=f;Eb(this,0,!0);a=f;if(this.i.Ma){var n= +!1;this.Ja=this.Ja+this.hb()|0;this.ja-=a;0>=this.ja&&(this.ja+=this.ta,n=!0);0<=this.xa&&this.xa<=Gb(this)&&(this.ta=this.xa=-1,Ab(this),L(this),n=!0);n&&this.M(Gb(this)+" cycles: checksum="+h(this.Ja))}this.ya-=f;if(0>=this.ya){this.ya+=this.Na;15<=++this.mb&&(this.A&&this.A.wa(),this.mb=0);break}}while(this.i.V)}catch(q){L(this);Bb(this);this.A&&this.A.stop(ja(),Gb(this));b=q.stack||q.message;this.i.error=!0;this.K(b);return}if(this.i.V){b=setTimeout;c=this.nb;this.ba=ja();d=this.lb;this.za&&(d= +Math.round(d*this.za/this.Na));d-=this.ba-this.Ea;if(e=this.ba-this.S)this.aa=Math.round(this.Y/(10*e))/100,864E5<=e&&(this.ea=0,Db(this));if(0>d||this.aad&&(this.S-=d),d=0;this.Ya+=this.za;this.ba+=d;b(c,d)}}};function Cb(a){var b;a.i.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.V)a.M(a.toString()+" busy");else{Db(a);a.i.V=!0;a.i.yb=!0;a.sa&&a.sa.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.S,Gb(a));Bb(a,!0);setTimeout(a.nb,0)}}g.zb=function(){return 0}; +function L(a){if(a.i.V){a.ca-=a.a;a.a=0;Eb(a,a.Y);a.Y=0;a.i.V=!1;a.sa&&a.sa.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ja(),Gb(a));Bb(a)}a.i.complete=void 0}function Bb(a,b){a.A&&a.A.wa(b)} +function Hb(a){this.Mb=+a.model||1170;this.sc=a.resetAddr||0;wb.call(this,a,6666667);this.jb=0;this.decode=Ib.bind(this);this.m=65536;this.h=32768;this.l=65535;this.s=32768;this.v=15;this.f=[0,0,0,0,0,0,0,this.sc];this.va=[0,0,0,0,0,0];this.Z=[0,0,0,0];this.Ha=this.B=0;this.Lb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.tc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.xb=[0,0,0,0,0,0,0,0];this.g=this.c=this.Ua=this.G=this.H=this.j=this.wb=0;this.ka=-1;Jb(this);this.i.complete=this.i.Hb=!1}x(Hb,wb);g=Hb.prototype;g.reset=function(){this.i.V&&L(this);Jb(this);zb(this);this.i.error=!1;this.parent.reset.call(this)}; +function Jb(a){a.ra=255;a.F=0;a.cb=0;a.D=0;a.qa=0;a.bb=0;a.ua=0;a.Za=0;a.Ga=0;a.Xa=262143;a.Ia=253952;a.u=[];a.j|=2;eb(a)}function eb(a){a.Za?(a.$=65536,a.N=a.Kb,a.O=a.vb,a.ob=a.Uc):(a.$=0,a.N=a.Jb,a.O=a.oc,a.ob=a.Tc)}g.hb=function(){return 0};g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ea,this.da]);a.set(2,Za(this.o));return a.data()}; +g.restore=function(a){var b=a[1];this.ea=b[1];Db(this,b[3]);a:{b=this.o;a=a[2];var c;for(c=0;cb){a.u[f].fa-=b;break}b-=a.u[f].fa}a.u.splice(f+1,0,{fa:b,pb:c<<5&224,Ab:d,Sa:e})}a.j|=2}function gb(a){return a.v=a.v&63728|a.na()|(a.l&65535?0:4)|(a.h&32768?2:0)|N(a)} +function hb(a,b){a.s=b<<12;a.l=~b&4;a.h=b<<14;a.m=b<<16;if((b^a.v)&2048)for(var c=a.va.length;0<=--c;){var d=a.f[c];a.f[c]=a.va[c];a.va[c]=d}a.B=b>>14&3;c=a.v>>14&3;a.B!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.B]);a.j|=2;a.v=b}function O(a,b){a.j&128||(a.s=a.l=b,a.h=0)}function P(a,b,c){a.j&128||(a.s=a.l=a.m=b,a.h=c||0)}function Lb(a,b,c,d){a.j&128||(a.s=a.l=a.m=b,a.h=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.s=a.l=a.m=b,a.h=a.s^a.m>>1)}function Mb(a,b,c,d){a.j&128||(a.s=a.l=a.m=b,a.h=(c^d)&(d^b))} +function F(a,b){var c=!1;0>a.ka?a.ka=gb(a):a.B||(b=4,c=!0);a.D&57344||(a.qa=63222,a.bb=b);a.B=0;var d=a.O(b|a.$),e=a.O(b+2&65535|a.$);hb(a,e&-12289|a.ka>>2&12288);c&&(a.F|=4,a.f[6]=4);Nb(a,a.ka);Nb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ka=-1;throw b;}function Ob(a){var b=Pb(a),c=Pb(a)&-1793;a.v&49152&&(c=c&-225|a.v&63712);a.f[7]=b&65535;hb(a,c);a.j&=-17} +function Qb(a,b,c){var d,e,f,k=0;d=b>>13;a.ua&a.Lb[a.B]||(d&=7);e=a.C[a.B][d];f=(a.P[a.B][d]<<6)+(b&8191)&a.Xa;if(ff){if(3932160<=f){f&=262143;var m=f>>13&31;31>m?a.ua&32&&(f=a.tc[m]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ia&&4186112>f&&(a.F|=32,F(a,4))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192:128;break; +default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.B][d]=e;if(4194170!==f||a.B)a.Ga=a.B,a.Ha=d;k&&(k&57344&&(0<=a.ka&&(k|=128),a.D&57344||(a.D=a.D|k|a.Ga<<5|a.Ha<<1),F(a,168)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.O(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.O(e)|k;a.a-=8;break; +case 6:return e=Kb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Kb(a),e=e+a.f[c]&65535,e=a.O(e|a.$)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.D&57344||(a.qa=a.qa<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.f[6]<=a.ra||65534<=a.f[6])&&(a.f[6]<=a.ra-32?(a.F|=4,a.f[6]=4,F(a,4)):(a.F|=8,a.j|=64));return e}g.Jb=function(a,b,c){return Rb(this,a,b,c)};g.Kb=function(a,b,c){return Qb(this,Rb(this,a,b,c),c)};g.oc=function(a){return Xa(this.o,a)};g.vb=function(a){return Xa(this.o,Qb(this,a,2))}; +g.Tc=function(a,b){Ya(this.o,a,b&65535)};g.Uc=function(a,b){Ya(this.o,Qb(this,a,4),b)};function Sb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?(d=Rb(a,b,d,2),c&65536||61440!==(a.v&61440)&&(d&=65535),a.B=a.v>>12&3,c=a.O(d|c&a.$),a.B=a.v>>14&3):c=6!=d||(a.v>>2&12288)===(a.v&12288)?a.f[d]:a.Z[a.v>>12&3];return c} +function Tb(a,b,c,d){a.D&57344||(a.qa=22);var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=Rb(a,b,e,4),c&65536||(e&=65535),a.B=a.v>>12&3,e=Qb(a,e|c&65536,4),a.B=a.v>>14&3,Ya(a.o,e,d)):6!=e||(a.v>>2&12288)===(a.v&12288)?a.f[e]=d:a.Z[a.v>>12&3]=d}function Ub(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.N(b,c,3),a=Wa(a.o,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?Xa(a.o,a.N(b,c,2)):a.f[c]}function Vb(a,b){var c=a.c=b&7;b=a.g=(b&56)>>3;return Rb(a,b,c,8)} +function Wb(a,b){var c=a.c=b&7;(b=a.g=(b&56)>>3)?(c=a.N(b,c,3),a=Wa(a.o,c)):a=a.f[c]&255;return a}function S(a,b){var c=a.c=b&7;return(b=a.g=(b&56)>>3)?Xa(a.o,a.N(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.Ua=a.N(b,e,7),c=d.call(a,c,Wa(a.o,e)),e&1&&a.a--,a=a.o,a.a[(e&a.h)>>>a.c].Ra(e&a.o,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.N(b,e,6),Ya(a.o,e,d.call(a,c,Xa(a.o,e)))):a.f[e]=d.call(a,c,a.f[e])} +function Xb(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.o,a.a[(d&a.h)>>>a.c].Ra(d&a.o,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Yb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?Ya(a.o,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.zb=function(a){this.i.complete=!0;this.i.Hb=!1;this.i.yb=!1;this.ca=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.cb&224,c=this.u.length;0<=--c;){if(0b&&(b=this.u[c].pb,a=this.u[c],this.u.splice(c,1))}b>(this.v&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?F(this,a.Ab):F(this,160))}else this.j&1&&this.j++;this.D&57344||(this.qa=0,this.bb=this.f[7]);this.j=this.j&7|this.v&16;this.decode(Kb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function dc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function ec(a,b){a=b&~a;O(this,a);return a}function fc(a,b){a=b&~a;O(this,a<<8);return a}function gc(a,b){a|=b;O(this,a);return a}function hc(a,b){a|=b;O(this,a<<8);return a}function ic(a,b){a=~b|65536;P(this,a);return a&65535} +function jc(a,b){a=~b|256;P(this,a<<8);return a&255}function kc(a,b){a=b-a;this.j&128||(this.s=this.l=a,this.h=b&(b^a));return a&65535}function lc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.s=this.l=c,this.h=b&(b^c));return a&255}function mc(a,b){a=b+a;this.j&128||(this.s=this.l=a,this.h=a&(b^a));return a&65535}function nc(a,b){a=b+a;var c=a<<8;this.j&128||(this.s=this.l=c,this.h=c&(b<<8^c));return a&255}function oc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function pc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function qc(a,b){a=b<<1|this.m>>16&1;Q(this,a);return a&65535}function rc(a,b){a=b<<1|this.m>>16&1;Q(this,a<<8);return a&255}function sc(a,b){a=(this.m&65536|b)>>1|b<<16;Q(this,a);return a&65535}function tc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function uc(a,b){var c=b-a;Mb(this,c,a,b);return c&65535}function vc(a,b){var c=b-a;Mb(this,c<<8,a<<8,b<<8);return c&255} +function wc(a,b){this.j&128||(this.s=this.l=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function xc(a,b){a^=b;O(this,a);return a&65535}function yc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.l=c;this.a-=(this.g?6:7)+b} +function zc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=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.f[a|1]=d&65535;this.s=d>>16;this.l=d>>16|d;this.a-=(this.g?6:7)+b}function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.l=1);a&8&&(this.s=0);this.a-=5} +function Ac(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.l=d>>16|d,this.s=d>>16):(this.h=32768,this.l=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.l=this.s=0,this.h=32768,this.m=65536,this.a-=7}var Bc=[0,7,7,10,7,11,9,13];function Cc(a){var b=this.a;a=Vb(this,a);this.f[7]=a&65535;this.a=b-Bc[this.g]} +var Dc=[0,14,14,17,14,18,16,20];function Ec(a){var b=this.a,c=Vb(this,a);a=a>>6&7;Nb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Dc[this.g]}var Fc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Gc=[7,13,13,17,14,18,17,21];function Hc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.s=b>>16,this.l=this.s|b,this.h=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Kc(a){U(this,a,0,wc);this.a-=this.g?9:3+(7==this.c?2:0)}function Lc(a){U(this,a,R(this,a),xc);this.a-=this.g?9:3+(7==this.c?2:0)}function Y(){F(this,8)}function Ib(a){Mc[a>>12].call(this,a)} +var Mc=[function(a){Nc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,Yb(this,a,b));this.a=c-Fc[(this.G?8:0)+this.g]+(7!=this.c||this.g?0:2)},function(a){var b=R(this,a);a=S(this,a);Mb(this,b-a,a,b);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c? +2:0)},function(a){U(this,a,R(this,a),gc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),Zb);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){Oc[a>>8&15].call(this,a)},function(a){Pc[a>>8&15].call(this,a)},function(a){var b=Ub(this,a);O(this,Xb(this,a,b,1)<<8);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){var b=Ub(this,a)<<8;a=Wb(this,a)<<8;Mb(this,b-a,a,b);this.a-=this.g?4+ +(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,(Ub(this,a)&Wb(this,a))<<8);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){T(this,a,Ub(this,a),fc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){T(this,a,Ub(this,a),hc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),uc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},Y],Nc=[function(a){Qc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.l&65535))},function(a){V(this,a,this.l&65535?0:4)},function(a){V(this,a,!this.na()==!(this.h&32768))},function(a){V(this,a,!this.na()!=!(this.h&32768))},function(a){V(this,a,!!(this.l&65535)&&!this.na()==!(this.h&32768))},function(a){V(this,a,(this.l&65535?0:4)||!this.na()!=!(this.h&32768))},Ec,Ec,function(a){Rc[a>>6&3].call(this,a)},function(a){Sc[a>>6&3].call(this,a)},function(a){Tc[a>>6&3].call(this,a)},function(a){Uc[a>> +6&3].call(this,a)},Y,Y],Rc=[function(a){P(this,Yb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,ic);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,mc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,kc);this.a-=this.g?9:3+(7==this.c?2:0)}],Sc=[function(a){U(this,a,0,oc);this.a-=this.g?11:6},function(a){U(this,a,N(this)?1:0,Zb);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,N(this)?1:0,uc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=S(this, +a);P(this,a);this.a-=this.g?4:3+(7==this.c?2:0)}],Tc=[function(a){U(this,a,0,sc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,qc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,cc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,ac);this.a-=this.g?9:3+(7==this.c?2:0)}],Uc=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.vb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Sb(this,a,0);Nb(this,a);O(this,a);this.a-= +11},function(a){var b=Pb(this),c=this.a;Tb(this,a,0,b);O(this,b);this.a=c-Gc[this.g]},function(a){O(this,Yb(this,a,this.na?65535:0));this.a-=this.g?9:3+(7==this.c?2:0)}],Qc=[function(a){Vc[a&15].call(this,a)},Y,Y,Y,Cc,Cc,Cc,Cc,function(a){if(a&8)F(this,8);else{var b=Pb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.v&49152||(this.v=this.v&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){Wc[a&15].call(this,a)},function(a){Xc[a&15].call(this,a)},Kc,Kc, +Kc,Kc],Vc=[function(){this.v&49152?(this.F|=128,F(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ob(this);this.j|=this.v&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.v&49152||(Jb(this),this.o.reset());this.a-=667},function(){Ob(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Wc=[Ic,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.l=1;this.a-=5},W,W,W,function(){this.s=0;this.a-= +5},W,W,W,W,W,W,W],Xc=[Ic,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.l=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Oc=[Hc,Hc,Ac,Ac,yc,yc,zc,zc,Lc,Lc,Y,Y,Y,Y,Jc,Jc],Pc=[function(a){V(this,a,!this.na())},function(a){V(this,a,this.na())},function(a){V(this,a,!N(this)&&!!(this.l&65535))},function(a){V(this,a,N(this)||(this.l&65535?0:4))},function(a){V(this,a,!(this.h&32768))},function(a){V(this,a,this.h&32768?2:0)},function(a){V(this, +a,!N(this))},function(a){V(this,a,N(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},Y,Y],Yc=[function(a){P(this,Xb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,jc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,nc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,lc);this.a-=this.g? +9:3+(7==this.c?2:0)}],Zc=[function(a){T(this,a,0,pc);this.a-=this.g?11:6},function(a){T(this,a,N(this)?1:0,$b);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,N(this)?1:0,vc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=Wb(this,a);P(this,a<<8);this.a-=this.g?4:3+(7==this.c?2:0)}],$c=[function(a){T(this,a,0,tc);this.a-=this.g?9+(this.Ua&1):3+(7==this.c?2:0)},function(a){T(this,a,0,rc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,dc);this.a-=this.g?9+(this.Ua&1):3+(7==this.c? +2:0)},function(a){T(this,a,0,bc);this.a-=this.g?9:3+(7==this.c?2:0)}],ad=[Y,function(a){a=Sb(this,a,65536);Nb(this,a);O(this,a);this.a-=11},function(a){var b=Pb(this),c=this.a;Tb(this,a,65536,b);O(this,b);this.a=c-Gc[this.g]},Y]; +function bd(a){v.call(this,"ROM",a,bd);this.a=null;this.m=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.h=a.file;this.u=ba(this.h);if(this.h){a=this.h;var b=ca(this.u);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;l(a,null,!0,function(a,b,f){cd(c,a,b,f)})}}x(bd);bd.prototype.oa=function(a,b,c,d){this.o=b;this.b=c;this.I=d;dd(this)};bd.prototype.ha=function(){this.l&&(this.I&&this.I.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; +bd.prototype.ga=function(){return!0}; +function cd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Va,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,m=eval("("+c+")");if(f=m.bytes)a.a=f;else if(f=m.words)for(a.a=Array(2*f.length),k=e=0;e>8&255;else if(f=m.data)for(a.a=Array(4*f.length),k=e=0;e>8&255,a.a[k++]=f[e]>>16&255,a.a[k++]=f[e]>>24&255;else a.a=m;a.l=m.symbols;if(!a.a.length){p("Empty ROM: "+b); +return}if(1==a.a.length){p(a.a[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.a=Array(b.length),e=0;e>>d.c].Bb(e&d.o,a.a[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Fa)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.u=d.receiveData){this.status(this.Va+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ha=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ga=function(a){return a?this.save():!0};g.reset=function(){id(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return id(this)};function id(a){a.G=0;a.a=0;a.c=128;a.h=[];return!0}g.ab=function(a){if("number"==typeof a)this.h.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.H||8,c=a-this.m%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.m&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.M(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;cb(this.b,100,4,52,this.D)}};var jd={},hd=(jd[65392]=[null,null,Z.prototype.cc,Z.prototype.Hc,"RCSR"],jd[65394]=[null,null,Z.prototype.bc,Z.prototype.Gc,"RBUF"],jd[65396]=[null,null,Z.prototype.qc,Z.prototype.Wc,"XCSR"],jd[65398]=[null,null,Z.prototype.pc,Z.prototype.Vc,"XBUF"],jd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bmd){if(od(d,this.u)){this.l=new M(this,"1.30.1","failsafe");od(this.l)&&(td(this,d),a=2,ud(this.l));this.l.set("timestamp",ka());vd(this.l);var e=this.a&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=sd(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?od(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(pa("user",""),this.c=null)):this.M(f+": "+k),ud(d),od(d)?(c=sd(d),e=!0):c=!1))}e&&rd(this,c?d:null)}else 2==a&&d.clear()}else rd(this);delete this.u;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.i.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.b&&(wd(this,this.b,b,c,a),this.b.Ca());this.G&&(td(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +function td(a,b){if(la("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.1"};d.url=a.O;d.user=c;d.type="bug";d.data=b;l("http://www.pcjs.org/api/v1/report",d,!0)}} +function xd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),k=new M(a,"1.30.1","validate"),m=ka();k.set("timestamp",m);f.set("timestamp",m);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ga&&(c&&L(a.b),d=a.b.ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.i.L=!1,!1===d&&(e=null)));for(var m=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");l(e,null,!0,function(f,k,m){if(m||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+m+")");else{if(f=d[3])if(m=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=m[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);m[0]!=n&&(k=k.replace(m[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);Ed(a,b,c)}})}else c(a,null)} +function Fd(a,b,c,d){function e(a){if(void 0===m){var b=k&&C(k,"machine-warning");m=b&&b[0]||k}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Bd||wa(!0));n=!1}var k,m,n=!0;Bd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],J=document.createElement("style");J.type="text/css";J.styleSheet?J.styleSheet.cssText=q:J.appendChild(document.createTextNode(q));t.appendChild(J)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");q=function(d,m){m?Cd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=m.transformNode(n))?(k.outerHTML=n,--Bd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(m,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Bd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Cd(b,a,d,!0,e,q):Dd(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ba){f(Ba.message)}return n}window.embedPDP11=function(a,b,c,d){wa(!1);return Fd(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); From ae4fbeb48973c190614f6f7f998c9e657da6e364 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 8 Oct 2016 11:09:14 -0700 Subject: [PATCH 08/36] Improved IOPAGE management --- modules/pdp11/lib/bus.js | 72 ++++-- modules/pdp11/lib/cpu.js | 60 ++--- modules/pdp11/lib/cpustate.js | 77 +++--- modules/pdp11/lib/defines.js | 25 +- modules/pdp11/lib/memory.js | 26 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 376 ++++++++++++++--------------- versions/pdpjs/1.30.1/pdp11.js | 255 +++++++++---------- 7 files changed, 469 insertions(+), 422 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 707bcc0c9..423de801f 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -42,7 +42,7 @@ if (NODE) { } /** - * BusPDP11(cpu, dbg) + * BusPDP11(parmsBus, cpu, dbg) * * The BusPDP11 component manages physical memory and I/O address spaces. * @@ -69,8 +69,18 @@ function BusPDP11(parmsBus, cpu, dbg) this.cpu = cpu; this.dbg = dbg; + /* + * Supported values for nBusWidth are 16 (default), 18, and 22. This represents the maximum size + * of the bus for the life of the machine, regardless what memory management mode the CPU has enabled. + */ this.nBusWidth = parmsBus['busWidth'] || 16; + /* + * This controls the location of the IOPAGE (ie, at the top of 16-bit, 18-bit, or 22-bit address range). + * It is managed by setIOPageRange(). initMemory() establishes the default (16). + */ + this.nIOPageRange = 0; // zero means no IOPAGE access (yet) + /* * Compute all BusPDP11 memory block parameters, based on the width of the bus. The entire * address space is divided into blocks, using a block size that is (hopefully) appropriate to @@ -130,10 +140,26 @@ function BusPDP11(parmsBus, cpu, dbg) */ this.aIOHandlers = []; this.fIOBreakAll = false; + + /* + * Array of RESET notification handlers registered by Device components. + */ this.afnReset = []; /* - * Allocate empty Memory blocks to span the entire physical address space. + * Before we can add any memory blocks that declare our component as a custom memory controller, + * we must initialize the array that the getControllerAccess() method supplies to the Memory component. + */ + this.afnIOPage = [ + BusPDP11.IOController.readByte, + BusPDP11.IOController.writeByte, + BusPDP11.IOController.readWord, + BusPDP11.IOController.writeWord + ]; + + /* + * We're ready to allocate empty Memory blocks to span the entire physical address space, including the + * initial location of the IOPAGE. */ this.initMemory(); @@ -142,7 +168,7 @@ function BusPDP11(parmsBus, cpu, dbg) Component.subclass(BusPDP11); -BusPDP11.IOPAGE_VIRT = 0xE000; /*000160000*/ +BusPDP11.IOPAGE_16BIT = 0xE000; /*000160000*/ // eg, PDP-11/20 BusPDP11.IOPAGE_18BIT = 0x3E000; /*000760000*/ // eg, PDP-11/45 BusPDP11.IOPAGE_UNIBUS = 0x3C0000; /*017000000*/ BusPDP11.IOPAGE_22BIT = 0x3FE000; /*017760000*/ // eg, PDP-11/70 @@ -365,18 +391,31 @@ BusPDP11.prototype.initMemory = function() for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) { this.aMemBlocks[iBlock] = block; } - this.afnIOPage = new Array(4); - this.afnIOPage[0] = BusPDP11.IOController.readByte; - this.afnIOPage[1] = BusPDP11.IOController.writeByte; - this.afnIOPage[2] = BusPDP11.IOController.readWord; - this.afnIOPage[3] = BusPDP11.IOController.writeWord; - /* - * Map IOPAGE at the top of the address space (as determined by nBusWidth), as well as at IOPAGE_VIRT - * (which is the only place that 16-bit code can reach the IOPAGE when memory management is not enabled). - */ - var addr = this.addrTotal - BusPDP11.IOPAGE_LENGTH; - this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this); - this.addMemory(BusPDP11.IOPAGE_VIRT, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this); + this.setIOPageRange(16); +}; + +/** + * setIOPageRange(nRange) + * + * We can define the IOPAGE address range with a single number, because the size of the IOPAGE is fixed at 8Kb. + * The bottom of the range is (2 ^ nRange) - IOPAGE_LENGTH, and the top is (2 ^ nRange) - 1. + * + * @this {BusPDP11} + * @param {number} nRange (16, 18 or 22) + */ +BusPDP11.prototype.setIOPageRange = function(nRange) +{ + if (nRange != this.nIOPageRange) { + var addr; + if (this.nIOPageRange) { + addr = (1 << this.nIOPageRange) - BusPDP11.IOPAGE_LENGTH; + if (!this.removeMemory(addr, BusPDP11.IOPAGE_LENGTH)) return; + this.nIOPageRange = 0; + } + addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH; + if (!this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this)) return; + this.nIOPageRange = nRange; + } }; /** @@ -390,6 +429,9 @@ BusPDP11.prototype.initMemory = function() */ BusPDP11.prototype.getControllerBuffer = function(addr) { + /* + * No buffer is required; all accesses go to a registered I/O handler or the bit-bucket. + */ return [null, 0]; }; diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index a3381ddeb..354fda36f 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -197,11 +197,6 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) if (control) this.cmp.setBinding(null, CPUPDP11.BUTTONS[i], control); } - /* - * Attach the ChipSet component to the CPU so that it can be notified whenever the CPU stops and starts. - */ - this.chipset = null; // /** @type {ChipSetPDP11} */ (cmp.getMachineComponent("ChipSet")); - /* * We've already saved the parmsCPU 'autoStart' setting, but there may be a machine (or URL) override. */ @@ -210,12 +205,27 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.flags.autoStart = (sAutoStart == "true"? true : (sAutoStart == "false"? false : !!sAutoStart)); } + this.initBusComplete(); + this.setReady(); }; +/** + * initBusComplete() + * + * Stub for Bus finalization (overridden by the CPUStatePDP11 component). + * + * @this {CPUPDP11} + */ +CPUPDP11.prototype.initBusComplete = function() +{ +}; + /** * reset() * + * Stub for reset notification (overridden by the CPUStatePDP11 component). + * * @this {CPUPDP11} */ CPUPDP11.prototype.reset = function() @@ -225,7 +235,7 @@ CPUPDP11.prototype.reset = function() /** * save() * - * This is a placeholder for save support (overridden by the CPUStatePDP11 component). + * Stub for save support (overridden by the CPUStatePDP11 component). * * @this {CPUPDP11} * @return {Object|null} @@ -238,7 +248,7 @@ CPUPDP11.prototype.save = function() /** * restore(data) * - * This is a placeholder for restore support (overridden by the CPUStatePDP11 component). + * Stub for restore support (overridden by the CPUStatePDP11 component). * * @this {CPUPDP11} * @param {Object} data @@ -552,40 +562,6 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) return fBound; }; -/** - * setBurstCycles(nCycles) - * - * This function is used by the ChipSet component whenever a very low timer count is set, - * in anticipation of the timer requiring an update sooner than the normal nCyclesPerYield - * period in runCPU() would normally provide. - * - * NOTE: In this context, "timer" refers to a timer chip (eg, an Intel 8253) being emulated by - * by the ChipSet component, not the timers managed by the CPU (eg, addTimer(), setTimer(), etc). - * - * @this {CPUPDP11} - * @param {number} nCycles is the target number of cycles to drop the current burst to - * @return {boolean} - */ -CPUPDP11.prototype.setBurstCycles = function(nCycles) -{ - if (this.flags.running) { - var nDelta = this.nStepCycles - nCycles; - /* - * NOTE: If nDelta is negative, we will actually be increasing nStepCycles and nBurstCycles. - * Which is OK, but if we're also taking snapshots of the cycle counts, to make sure that instruction - * costs are being properly assessed, then we need to update nSnapCycles as well. - * - * TODO: If the delta is negative, we could simply ignore the request, but we must first carefully - * consider the impact on the ChipSet timers, if any. - */ - // if (DEBUG) this.nSnapCycles -= nDelta; - this.nStepCycles -= nDelta; - this.nBurstCycles -= nDelta; - return true; - } - return false; -}; - /** * addCycles(nCycles, fEndStep) * @@ -1183,7 +1159,6 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus) this.setSpeed(); this.flags.running = true; this.flags.starting = true; - if (this.chipset) this.chipset.start(); var controlRun = this.bindings["run"]; if (controlRun) controlRun.textContent = "Halt"; if (this.cmp) { @@ -1227,7 +1202,6 @@ CPUPDP11.prototype.stopCPU = function(fComplete) this.addCycles(this.nRunCycles); this.nRunCycles = 0; this.flags.running = false; - if (this.chipset) this.chipset.stop(); var controlRun = this.bindings["run"]; if (controlRun) controlRun.textContent = "Run"; if (this.cmp) { diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 0e465f0da..c7f1324a5 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -98,6 +98,17 @@ Component.subclass(CPUStatePDP11, CPUPDP11); */ var InterruptEvent; +/** + * initBusComplete() + * + * @this {CPUStatePDP11} + */ +CPUStatePDP11.prototype.initBusComplete = function() +{ + this.assert(this.bus); + this.setMemoryAccess(); +}; + /** * initProcessor() * @@ -216,11 +227,12 @@ CPUStatePDP11.prototype.resetRegs = function() /** @type {Array.} */ this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; - this.initMemoryAccess(); + + if (this.bus) this.setMemoryAccess(); }; /** - * initMemoryAccess() + * setMemoryAccess() * * Define handlers and DSPACE setting appropriate for the current MMU mode, in order to eliminate * unnecessary calls to mapVirtualToPhysical(). @@ -231,18 +243,20 @@ CPUStatePDP11.prototype.resetRegs = function() * * @this {CPUStatePDP11} */ -CPUStatePDP11.prototype.initMemoryAccess = function() +CPUStatePDP11.prototype.setMemoryAccess = function() { if (this.mmuEnable) { this.addrDSpace = PDP11.ACCESS.DSPACE; this.getAddrByMode = this.getVirtualAddrByMode; this.readWordFromAddr = this.readWordFromVirtual; this.writeWordToAddr = this.writeWordToVirtual; + this.bus.setIOPageRange((this.regMMR3 & PDP11.MMR3.MMU_22BIT)? 22 : 18); } else { this.addrDSpace = 0; this.getAddrByMode = this.getPhysicalAddrByMode; this.readWordFromAddr = this.readWordFromPhysical; this.writeWordToAddr = this.writeWordToPhysical; + this.bus.setIOPageRange(16); } }; @@ -265,19 +279,23 @@ CPUStatePDP11.prototype.getMMR0 = function() */ CPUStatePDP11.prototype.setMMR0 = function(newMMR0) { - this.regMMR0 = newMMR0 &= 0xf381; - this.mmuLastMode = (newMMR0 >> 5) & 3; - this.mmuLastPage = (newMMR0 >> 1) & 0xf; - if (newMMR0 & 0x101) { - if (newMMR0 & 0x1) { - this.mmuEnable = PDP11.ACCESS.READ | PDP11.ACCESS.WRITE; - } else { - this.mmuEnable = PDP11.ACCESS.WRITE; + newMMR0 &= 0xf381; + if (this.regMMR0 != newMMR0) { + this.regMMR0 = newMMR0; + this.mmuLastMode = (newMMR0 >> 5) & 3; + this.mmuLastPage = (newMMR0 >> 1) & 0xf; + var mmuEnable = 0; + if (newMMR0 & 0x101) { + mmuEnable = PDP11.ACCESS.WRITE; + if (newMMR0 & 0x1) { + mmuEnable |= PDP11.ACCESS.READ; + } + } + if (this.mmuEnable != mmuEnable) { + this.mmuEnable = mmuEnable; + this.setMemoryAccess(); } - } else { - this.mmuEnable = 0; } - this.initMemoryAccess(); }; /** @@ -309,13 +327,16 @@ CPUStatePDP11.prototype.setMMR3 = function(newMMR3) if (this.cpuType !== 70) { newMMR3 &= ~(PDP11.MMR3.MMU_22BIT | PDP11.MMR3.UNIBUS_MAP); } - this.regMMR3 = newMMR3; - if (this.regMMR3 & PDP11.MMR3.MMU_22BIT) { - this.mmuMask = 0x3fffff; - this.mmuMemorySize = BusPDP11.MAX_MEMORY; - } else { - this.mmuMask = 0x3ffff; - this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; + if (this.regMMR3 != newMMR3) { + this.regMMR3 = newMMR3; + if (newMMR3 & PDP11.MMR3.MMU_22BIT) { + this.mmuMask = 0x3fffff; + this.mmuMemorySize = BusPDP11.MAX_MEMORY; + } else { + this.mmuMask = 0x3ffff; + this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; + } + this.setMemoryAccess(); } }; @@ -1515,7 +1536,7 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) /** * getPhysicalAddrByMode(mode, reg, accessFlags) * - * This is a handler set up by initMemoryAccess(). All calls should go through getAddrByMode(). + * This is a handler set up by setMemoryAccess(). All calls should go through getAddrByMode(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1531,7 +1552,7 @@ CPUStatePDP11.prototype.getPhysicalAddrByMode = function(mode, reg, accessFlags) /** * getVirtualAddrByMode(mode, reg, accessFlags) * - * This is a handler set up by initMemoryAccess(). All calls should go through getAddrByMode(). + * This is a handler set up by setMemoryAccess(). All calls should go through getAddrByMode(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1547,7 +1568,7 @@ CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, accessFlags) /** * readWordFromPhysical(physicalAddress) * - * This is a handler set up by initMemoryAccess(). All calls should go through readWordFromAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through readWordFromAddr(). * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1561,7 +1582,7 @@ CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) /** * readWordFromVirtual(virtualAddress) * - * This is a handler set up by initMemoryAccess(). All calls should go through readWordFromAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through readWordFromAddr(). * * @this {CPUStatePDP11} * @param {number} virtualAddress (input address is 17 bit (I&D)) @@ -1575,7 +1596,7 @@ CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) /** * writeWordToPhysical(physicalAddress, data) * - * This is a handler set up by initMemoryAccess(). All calls should go through writeWordToAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through writeWordToAddr(). * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1589,7 +1610,7 @@ CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) /** * writeWordToVirtual(virtualAddress, data) * - * This is a handler set up by initMemoryAccess(). All calls should go through writeWordToAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through writeWordToAddr(). * * @this {CPUStatePDP11} * @param {number} virtualAddress (input address is 17 bit (I&D)) @@ -1659,7 +1680,7 @@ CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, accessFlags, dat * TODO: Consider replacing the following code with writeWordToAddr(), by adding optional mmuMode * parameters for each of the discrete mapVirtualToPhysical() and bus.setWord() operations, because * as it stands, this is the only remaining call to mapVirtualToPhysical() outside of our - * initMemoryAccess() handlers. + * setMemoryAccess() handlers. */ this.mmuMode = (this.regPSW >> 12) & 3; addr = this.mapVirtualToPhysical(addr | (accessFlags & PDP11.ACCESS.DSPACE), PDP11.ACCESS.WRITE); diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index a29d9ae67..76cf2211b 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -79,16 +79,24 @@ var BYTEARRAYS = false; var TYPEDARRAYS = (typeof ArrayBuffer !== 'undefined'); /** - * WORDBUS forces the Bus and Memory interfaces to assume even addresses when accessing words. Since PDPjs inherited - * its Bus component from PCx86, it originally supported both aligned and unaligned word accesses by default, but since - * the PDP-11 requires aligned (even) word addresses, we can turn off support for unaligned accesses and get some - * performance gains. + * MEMFAULT forces the Memory interfaces to signal a CPU fault when a word is accessed using an odd (unaligned) address. * - * When WORDBUS is true, the Bus and Memory components simply ignore the low bit of word addresses, because it is the - * CPU, not the Bus, that's responsible for validating addresses and generating the appropriate traps. + * Since PDPjs inherited its Bus component from PCx86, it included support for both aligned and unaligned word accesses + * by default. However, the PDP-11 adds a wrinkle: when an odd address is used to access a memory word, a BUS_ERROR trap + * must be generated. Note that odd IOPAGE word accesses are fine; this only affects the Memory component. * - * Don't worry that the source code looks MORE complicated rather than LESS with the additional WORDBUS checks, because - * the Closure Compiler eliminates those checks and throws away the (unreachable) code blocks that deal with unaligned + * When the MMU is enabled, these checks may also be performed at a higher level, eliminating the need for them at the + * physical memory level. + */ +var MEMFAULT = true; + +/** + * WORDBUS turns off support for unaligned memory words. Whereas MEMFAULT necessarily slows down memory word accesses + * slightly, WORDBUS is able to speed them up slightly, by assuming that all word accesses (which didn't fault) must be + * aligned. This affects all word accesses, even IOPAGE accesses, because it also eliminates cross-block boundary checks. + * + * Don't worry that the source code looks MORE complicated rather than LESS with the additional MEMFAULT and WORDBUS checks, + * because the Closure Compiler eliminates those checks and throws away the (unreachable) code blocks that deal with unaligned * accesses. */ var WORDBUS = true; @@ -109,6 +117,7 @@ var PDP11 = { MAXDEBUG: MAXDEBUG, // shared PRIVATE: PRIVATE, // shared TYPEDARRAYS:TYPEDARRAYS, + MEMFAULT: MEMFAULT, WORDBUS: WORDBUS, SITEHOST: SITEHOST, // shared XMLVERSION: XMLVERSION, // shared diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 15c3af409..a2ed951cb 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -623,7 +623,7 @@ MemoryPDP11.prototype = { * @return {number} */ readWordMemory: function readWordMemory(off, addr) { - if (PDP11.WORDBUS && (off & 0x1)) { + if (PDP11.MEMFAULT && (off & 0x1)) { this.cpu.fault(addr); } if (BYTEARRAYS) { @@ -667,7 +667,7 @@ MemoryPDP11.prototype = { * @param {number} addr */ writeWordMemory: function writeWordMemory(off, w, addr) { - if (PDP11.WORDBUS && (off & 0x1)) { + if (PDP11.MEMFAULT && (off & 0x1)) { this.cpu.fault(addr); } if (BYTEARRAYS) { @@ -777,7 +777,7 @@ MemoryPDP11.prototype = { * @return {number} */ readWordBE: function readWordBE(off, addr) { - if (PDP11.WORDBUS && (off & 0x1)) { + if (PDP11.MEMFAULT && (off & 0x1)) { this.cpu.fault(addr); } return this.dv.getUint16(off, true); @@ -791,15 +791,15 @@ MemoryPDP11.prototype = { * @return {number} */ readWordLE: function readWordLE(off, addr) { + var w; + if (PDP11.MEMFAULT && (off & 0x1)) { + this.cpu.fault(addr); + } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset * for an aligned read vs. always reading the bytes separately. */ - var w; - if (PDP11.WORDBUS && (off & 0x1)) { - this.cpu.fault(addr); - } - if (!(off & 0x1)) { + if (PDP11.WORDBUS || !(off & 0x1)) { w = this.aw[off >> 1]; } else { w = this.ab[off] | (this.ab[off+1] << 8); @@ -845,7 +845,7 @@ MemoryPDP11.prototype = { * @param {number} w */ writeWordBE: function writeWordBE(off, w, addr) { - if (PDP11.WORDBUS && (off & 0x1)) { + if (PDP11.MEMFAULT && (off & 0x1)) { this.cpu.fault(addr); } this.dv.setUint16(off, w, true); @@ -860,14 +860,14 @@ MemoryPDP11.prototype = { * @param {number} w */ writeWordLE: function writeWordLE(off, w, addr) { + if (PDP11.MEMFAULT && (off & 0x1)) { + this.cpu.fault(addr); + } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset * for an aligned write vs. always writing the bytes separately. */ - if (PDP11.WORDBUS && (off & 0x1)) { - this.cpu.fault(addr); - } - if (!(off & 0x1)) { + if (PDP11.WORDBUS || !(off & 0x1)) { this.aw[off >> 1] = w; } else { this.ab[off] = w; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index df044655d..6e1eac17b 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -693,211 +693,211 @@ function m(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window. function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ya=this.id:(this.zb=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,xb:!1,fa:!1,error:!1};this.rb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Ua=void 0,Va={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Nb=b.comment;this.xc=b;b=this.id.indexOf(".");0>b?this.Xa=this.id:(this.xb=this.id.substr(0,b),this.Xa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,hb:!1,yb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Ua=void 0,Va={}; if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=r);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},t=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Z&&(this.Z=10);15>2;this.f=this.ya-1;this.A=this.B/this.ya|0;this.Ka=[];this.F=[];a=new H(this.b);Bb(a,this.j);this.X=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Db(a,b,c){var d=!1,e=this.controller,f=e.Ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Eb(a,b){var c=-1,d=this.controller;(a=d.Ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Fb(a,b,c){var d=!1,e=this.controller;if(a=e.Ka[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))}h=Ab.prototype;h.reset=function(){for(var a=0;a>>a.Z;0g&&(q=g);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+g<=n.w)return n.qb+=n.w-f,n.w=f,!0;if(f>=n.w+n.qb){q=n.size-(f-p);q>g&&(q=g);n.qb=f-n.w+q;f=p+a.ya;g-=q;l++;continue}}return Jb(1,f,g)}f=new H(a.b,f,q,a.ya,d,e);Bb(f,a.j,n);a.X[l++]=f;f=p+a.ya;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Kb[d]+" at "+k(b,8,!0)),!0):Jb(2,b,c)} -h.Ua=function(a){return this.X[(a&this.g)>>>this.Z].ub(a&this.f,a)};h.ma=function(a){return this.X[(a&this.g)>>>this.Z].dc(a&this.f,a)};function Lb(a,b){return a.X[(b&a.g)>>>a.Z].Db(b&a.f,b)}h.ob=function(a,b){this.X[(a&this.g)>>>this.Z].vb(a&this.f,b&255,a)};h.Xa=function(a,b){this.X[(a&this.g)>>>this.Z].oc(a&this.f,b&65535,a)}; -function Mb(a){for(var b=0,c=[],d=0;da.b.Xb))for(var f=e[0]?e[0].bind(b):null,g=e[1]?e[1].bind(b):null,l=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,p=a,q=+d,e=e[4],v=+d;v<=q;v+=2){var u=v&8191;void 0!==p.Ka[u]?m("I/O address already registered: "+k(v,8,!0)):p.Ka[u]=[f,g,l,n,e||"unknown",!1]}}}function Ob(a,b){a.F.push(b)}function Jb(a,b,c){m("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1} -function J(a){r.call(this,"Device",a,J);this.g={data:0,Gd:0,tb:20,Jd:0};this.f={Hd:0,Ib:-1}}y(J);h=J.prototype;h.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;var e=this;this.f.Ib=Pb(this.b,function(){e.f.Ma|=128;e.f.Ma&64&&(Qb(e.b,0,6,64),Rb(e.b,e.f.Ib,1E3/60))});Nb(b,this,K);Ob(b,this.reset.bind(this));G(this)};h.Gc=function(){var a=this.f.Ma;this.f.Ma&=-129;return a};h.kd=function(a){this.f.Ma=a;a&64&&Rb(this.b,this.f.Ib,1E3/60);this.f.Ma=a&-129}; -h.Ic=function(){var a=this.b;return a.G&62337|a.wa<<5|a.xa<<1};h.md=function(a){var b=this.b;b.G=a&=62337;b.wa=a>>5&3;b.xa=a>>1&15;b.Bb=a&257?a&1?6:4:0;Sb(b);Tb(this)};h.Jc=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Kc=function(){return this.b.Fb};h.Lc=function(){return this.b.Wa};h.nd=function(a){var b=this.b;b.Wa=a;b.Wa&16?(b.jb=4194303,b.Ia=3915776):(b.jb=262143,b.Ia=253952);Tb(this)};function Tb(a){a.g.tb=a.g.tb&-8|(a.b.Bb?a.b.Wa&16?1:2:4)} -h.Tc=function(a){return this.b.S[1][a>>1&7]};h.vd=function(a,b){this.b.S[1][b>>1&7]=a&65295};h.Rc=function(a){return this.b.S[1][(a>>1&7)+8]};h.td=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};h.Sc=function(a){return this.b.pa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.S[1][b]&=65295};h.Qc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.S[1][b]&=65295};h.Fc=function(a){return this.b.S[0][a>>1&7]}; -h.jd=function(a,b){this.b.S[0][b>>1&7]=a&65295};h.Dc=function(a){return this.b.S[0][(a>>1&7)+8]};h.gd=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};h.Ec=function(a){return this.b.pa[0][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.S[0][b]&=65295};h.Cc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.S[0][b]&=65295};h.Zc=function(a){return this.b.S[3][a>>1&7]};h.Bd=function(a,b){this.b.S[3][b>>1&7]=a&65295}; -h.Xc=function(a){return this.b.S[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.b.pa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.S[3][b]&=65295};h.Wc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.S[3][b]&=65295};h.ra=function(a){a&=7;return this.b.K&2048?this.b.Ha[a]:this.b.u[a]};h.ua=function(a,b){b&=7;this.b.K&2048?this.b.Ha[b]=a:this.b.u[b]=a}; -h.Zb=function(){return this.b.K&49152?this.b.ta[0]:this.b.u[6]};h.jc=function(a){this.b.K&49152?this.b.ta[0]=a:this.b.u[6]=a};h.bc=function(){return this.b.u[7]};h.mc=function(a){this.b.u[7]=a};h.sa=function(a){a&=7;return this.b.K&2048?this.b.u[a]:this.b.Ha[a]};h.va=function(a,b){b&=7;this.b.K&2048?this.b.u[b]=a:this.b.Ha[b]=a};h.$b=function(){return 1==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[1]};h.kc=function(a){1==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a}; -h.ac=function(){return 3==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[3]};h.lc=function(a){3==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.Bc=function(a){return this.b.gc[a-65504>>1]};h.ed=function(a,b){this.b.gc[b-65504>>1]=a};h.cc=function(a){return 65520==a?61183:0};h.nc=function(){};h.Vc=function(){return 1};h.xd=function(){};h.Ac=function(){return this.b.$};h.dd=function(){this.b.$=0};h.Hc=function(){return this.b.fc};h.ld=function(a,b){b&1||(a&=255);this.b.fc=a};h.Mc=function(){return this.b.Gb}; -h.od=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Gb=a;b.D|=2};h.Uc=function(){return this.b.Pa&65280};h.wd=function(a){this.b.Pa=a|255};h.Nc=function(){return Ub(this.b)};h.pd=function(a){Vb(this.b,a&-1809|Ub(this.b)&1808);this.b.D|=128};h.reset=function(){this.g.tb=this.g.tb&-120|20;this.f.Ma=0}; +function Ab(a,b,c){r.call(this,"Bus",a,Ab,64);this.b=b;this.j=c;this.C=a.busWidth||16;this.B=0;this.G=Math.pow(2,this.C);this.g=this.G-1|0;this.Y=(this.C>>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.qa-1;this.A=this.G/this.qa|0;this.Ka=[];this.F=[];this.pc=[Bb,Cb,Db,Eb];a=new H(this.b);Fb(a,this.j);this.P=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Hb(d,b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Cb(a,b,c){var d=!1,e=this.controller,f=e.Ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Hb(e,c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} +function Db(a,b){var c=-1,d=this.controller;(a=d.Ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Hb(d,b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Ka[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Hb(e,c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} +function Gb(a,b){if(b!=a.B){var c;if(a.B){c=(1<>>a.Y;0>>a.Y;0g&&(q=g);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+g<=n.w)return n.ob+=n.w-f,n.w=f,!0;if(f>=n.w+n.ob){q=n.size-(f-p);q>g&&(q=g);n.ob=f-n.w+q;f=p+a.qa;g-=q;l++;continue}}return Ib(1,f,g)}f=new H(a.b,f,q,a.qa,d,e);Fb(f,a.j,n);a.P[l++]=f;f=p+a.qa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Lb[d]+" at "+k(b,8,!0)),!0):Ib(2,b,c)} +h.Ua=function(a){return this.P[(a&this.g)>>>this.Y].ub(a&this.f,a)};h.ma=function(a){return this.P[(a&this.g)>>>this.Y].cc(a&this.f,a)};function Mb(a,b){return a.P[(b&a.g)>>>a.Y].Cb(b&a.f,b)}h.mb=function(a,b){this.P[(a&this.g)>>>this.Y].vb(a&this.f,b&255,a)};h.Wa=function(a,b){this.P[(a&this.g)>>>this.Y].nc(a&this.f,b&65535,a)}; +function Nb(a){for(var b=0,c=[],d=0;da.b.Wb))for(var f=e[0]?e[0].bind(b):null,g=e[1]?e[1].bind(b):null,l=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,p=a,q=+d,e=e[4],v=+d;v<=q;v+=2){var u=v&8191;void 0!==p.Ka[u]?m("I/O address already registered: "+k(v,8,!0)):p.Ka[u]=[f,g,l,n,e||"unknown",!1]}}}function Pb(a,b){a.F.push(b)}function Ib(a,b,c){m("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1} +function J(a){r.call(this,"Device",a,J);this.g={data:0,Gd:0,sb:20,Jd:0};this.f={Hd:0,Hb:-1}}y(J);h=J.prototype;h.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;var e=this;this.f.Hb=Qb(this.b,function(){e.f.Ma|=128;e.f.Ma&64&&(Rb(e.b,0,6,64),Sb(e.b,e.f.Hb,1E3/60))});Ob(b,this,K);Pb(b,this.reset.bind(this));G(this)};h.Gc=function(){var a=this.f.Ma;this.f.Ma&=-129;return a};h.kd=function(a){this.f.Ma=a;a&64&&Sb(this.b,this.f.Hb,1E3/60);this.f.Ma=a&-129}; +h.Ic=function(){var a=this.b;return a.G&62337|a.wa<<5|a.xa<<1};h.md=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.wa=a>>5&3;b.xa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.tb!=c&&(b.tb=c,Tb(b))}Ub(this)};h.Jc=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Kc=function(){return this.b.Eb};h.Lc=function(){return this.b.Pa};h.nd=function(a){var b=this.b;b.Pa!=a&&(b.Pa=a,a&16?(b.ab=4194303,b.ya=3915776):(b.ab=262143,b.ya=253952),Tb(b));Ub(this)}; +function Ub(a){a.g.sb=a.g.sb&-8|(a.b.tb?a.b.Pa&16?1:2:4)}h.Tc=function(a){return this.b.T[1][a>>1&7]};h.vd=function(a,b){this.b.T[1][b>>1&7]=a&65295};h.Rc=function(a){return this.b.T[1][(a>>1&7)+8]};h.td=function(a,b){this.b.T[1][(b>>1&7)+8]=a&65295};h.Sc=function(a){return this.b.pa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.T[1][b]&=65295};h.Qc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.T[1][b]&=65295}; +h.Fc=function(a){return this.b.T[0][a>>1&7]};h.jd=function(a,b){this.b.T[0][b>>1&7]=a&65295};h.Dc=function(a){return this.b.T[0][(a>>1&7)+8]};h.gd=function(a,b){this.b.T[0][(b>>1&7)+8]=a&65295};h.Ec=function(a){return this.b.pa[0][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.T[0][b]&=65295};h.Cc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.T[0][b]&=65295};h.Zc=function(a){return this.b.T[3][a>>1&7]}; +h.Bd=function(a,b){this.b.T[3][b>>1&7]=a&65295};h.Xc=function(a){return this.b.T[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.T[3][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.b.pa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.T[3][b]&=65295};h.Wc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.T[3][b]&=65295};h.ra=function(a){a&=7;return this.b.K&2048?this.b.Ha[a]:this.b.u[a]}; +h.ua=function(a,b){b&=7;this.b.K&2048?this.b.Ha[b]=a:this.b.u[b]=a};h.Yb=function(){return this.b.K&49152?this.b.ta[0]:this.b.u[6]};h.ic=function(a){this.b.K&49152?this.b.ta[0]=a:this.b.u[6]=a};h.ac=function(){return this.b.u[7]};h.lc=function(a){this.b.u[7]=a};h.sa=function(a){a&=7;return this.b.K&2048?this.b.u[a]:this.b.Ha[a]};h.va=function(a,b){b&=7;this.b.K&2048?this.b.u[b]=a:this.b.Ha[b]=a};h.Zb=function(){return 1==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[1]}; +h.jc=function(a){1==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.$b=function(){return 3==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[3]};h.kc=function(a){3==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.Bc=function(a){return this.b.fc[a-65504>>1]};h.ed=function(a,b){this.b.fc[b-65504>>1]=a};h.bc=function(a){return 65520==a?61183:0};h.mc=function(){};h.Vc=function(){return 1};h.xd=function(){};h.Ac=function(){return this.b.$};h.dd=function(){this.b.$=0};h.Hc=function(){return this.b.ec}; +h.ld=function(a,b){b&1||(a&=255);this.b.ec=a};h.Mc=function(){return this.b.Fb};h.od=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Fb=a;b.D|=2};h.Uc=function(){return this.b.Qa&65280};h.wd=function(a){this.b.Qa=a|255};h.Nc=function(){return Vb(this.b)};h.pd=function(a){Wb(this.b,a&-1809|Vb(this.b)&1808);this.b.D|=128};h.reset=function(){this.g.sb=this.g.sb&-120|20;this.f.Ma=0}; var L={},K=(L[62592]=[null,null,J.prototype.Tc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Rc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Sc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Qc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.Fc,J.prototype.jd,"KISDR"],L[62672]=[null,null,J.prototype.Dc,J.prototype.gd,"KDSDR"],L[62688]=[null,null,J.prototype.Ec,J.prototype.hd,"KISAR"],L[62704]=[null,null,J.prototype.Cc,J.prototype.fd,"KDSAR"],L[62798]=[null,null, J.prototype.Lc,J.prototype.nd,"MMR3"],L[65382]=[null,null,J.prototype.Gc,J.prototype.kd,"LKS"],L[65402]=[null,null,J.prototype.Ic,J.prototype.md,"MMR0"],L[65404]=[null,null,J.prototype.Jc,null,"MMR1"],L[65406]=[null,null,J.prototype.Kc,null,"MMR2"],L[65408]=[null,null,J.prototype.Zc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Xc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Yc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Wc,J.prototype.yd,"UDSAR"],L[65472]=[J.prototype.ra, -J.prototype.ua,J.prototype.ra,J.prototype.ua,"R0SET0"],L[65473]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R1SET0"],L[65474]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R2SET0"],L[65475]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R3SET0"],L[65476]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R4SET0"],L[65477]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R5SET0"],L[65478]=[J.prototype.Zb,J.prototype.jc,J.prototype.Zb, -J.prototype.jc,"R6KERNEL"],L[65479]=[J.prototype.bc,J.prototype.mc,J.prototype.bc,J.prototype.mc,"R7KERNEL"],L[65480]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R0SET1"],L[65481]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R1SET1"],L[65482]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R2SET1"],L[65483]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R3SET1"],L[65484]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R4SET1"], -L[65485]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R5SET1"],L[65486]=[J.prototype.$b,J.prototype.kc,J.prototype.$b,J.prototype.kc,"R6SUPER"],L[65487]=[J.prototype.ac,J.prototype.lc,J.prototype.ac,J.prototype.lc,"R6USER"],L[65504]=[null,null,J.prototype.Bc,J.prototype.ed,"CTRL",1170],L[65520]=[null,null,J.prototype.cc,J.prototype.nc,"LSIZE",1170],L[65522]=[null,null,J.prototype.cc,J.prototype.nc,"HSIZE",1170],L[65524]=[null,null,J.prototype.Vc,J.prototype.xd,"SYSID",1170],L[65526]= +J.prototype.ua,J.prototype.ra,J.prototype.ua,"R0SET0"],L[65473]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R1SET0"],L[65474]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R2SET0"],L[65475]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R3SET0"],L[65476]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R4SET0"],L[65477]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R5SET0"],L[65478]=[J.prototype.Yb,J.prototype.ic,J.prototype.Yb, +J.prototype.ic,"R6KERNEL"],L[65479]=[J.prototype.ac,J.prototype.lc,J.prototype.ac,J.prototype.lc,"R7KERNEL"],L[65480]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R0SET1"],L[65481]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R1SET1"],L[65482]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R2SET1"],L[65483]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R3SET1"],L[65484]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R4SET1"], +L[65485]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R5SET1"],L[65486]=[J.prototype.Zb,J.prototype.jc,J.prototype.Zb,J.prototype.jc,"R6SUPER"],L[65487]=[J.prototype.$b,J.prototype.kc,J.prototype.$b,J.prototype.kc,"R6USER"],L[65504]=[null,null,J.prototype.Bc,J.prototype.ed,"CTRL",1170],L[65520]=[null,null,J.prototype.bc,J.prototype.mc,"LSIZE",1170],L[65522]=[null,null,J.prototype.bc,J.prototype.mc,"HSIZE",1170],L[65524]=[null,null,J.prototype.Vc,J.prototype.xd,"SYSID",1170],L[65526]= [null,null,J.prototype.Ac,J.prototype.dd,"CPUERR",1170],L[65528]=[null,null,J.prototype.Hc,J.prototype.ld,"MB",1170],L[65530]=[null,null,J.prototype.Mc,J.prototype.od,"PIR"],L[65532]=[null,null,J.prototype.Uc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Nc,J.prototype.pd,"PSW"],L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608]; K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640];K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672]; K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704];K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424]; K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456];K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504]; -La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.f=new Int32Array(this.C,0,d>>2),kc(this,gc?lc:mc);else{this.f=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},W:function(a){return this.f[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&this.b.O(4,b);b=a>>2;a=(a&3)<<3;var c=this.f[b]>>a;return 24>a?c&65535:c&255|(this.f[b+1]&255)<<8},oa:function(a,b){var c=a>>2;a=(a&3)<<3;this.f[c]= -this.f[c]&~(255<>2;a=(a&3)<<3;24>a?this.f[c]=this.f[c]&~(65535<>8);this.La=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;rc(c,this.w+a,1,c.N)&&c.ea(!0)}return this.Cb(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;rc(c,this.w+a,2,c.N)&&c.ea(!0)}return this.Db(a,b)},ka:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;rc(d,this.w+a, -1,d.G)&&d.ea(!0)}this.B?this.A(a,b,c):this.wb(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;rc(d,this.w+a,2,d.G)&&d.ea(!0)}this.B?this.A(a,b,c):this.Jb(a,b,c)},N:function(a){return this.g[a]},V:function(a,b){a=this.g[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},aa:function(a,b){a&1&&this.b.O(4,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&this.b.O(4,b);a=a&1?this.g[a]|this.g[a+1]<<8:this.I[a>>1];this.j&&F(this.j,128)&& -D(this.j,"Memory.readWord("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ia:function(a,b){this.g[a]=b;this.La=!0},la:function(a,b,c){this.g[a]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},qa:function(a,b,c){a&1&&this.b.O(4,c);this.G.setUint16(a,b,!0);this.La=!0},xa:function(a,b,c){a&1&&this.b.O(4,c);a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.I[a>>1]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")", -!0)}};function Bb(a,b,c){a.j=b;a.J=a.F=0;c&&((a.J=c.J)&&qc(a,pc,!1),(a.F=c.F)&&oc(a,pc,!1))}function sc(a,b){b?--a.F||(a.vb=a.B?a.A:a.wb,a.oc=a.B?a.H:a.Jb):--a.J||(a.ub=a.Cb,a.dc=a.Db)}function oc(a,b,c){c&&a.F||(a.vb=!a.B&&b[1]||a.A,a.oc=!a.B&&b[3]||a.H);if(c||void 0===c)a.wb=b[1]||a.A,a.Jb=b[3]||a.H}function qc(a,b,c){c&&a.J||(a.ub=b[0]||a.L,a.dc=b[2]||a.M);if(c||void 0===c)a.Cb=b[0]||a.L,a.Db=b[2]||a.M}function kc(a,b){b||(b=tc);qc(a,b,void 0);oc(a,b,void 0)} -var tc=[],nc=[H.prototype.W,H.prototype.oa,H.prototype.ga,H.prototype.Ya],pc=[H.prototype.T,H.prototype.ka,H.prototype.ca,H.prototype.wa];if(wb)var mc=[H.prototype.N,H.prototype.ia,H.prototype.aa,H.prototype.qa],lc=[H.prototype.V,H.prototype.la,H.prototype.da,H.prototype.xa]; -function uc(a,b){r.call(this,"CPU",a,uc,1);var c=a.multiplier||1;this.Qa=a.cycles||b;this.Na=c;this.ab=Math.round(this.Qa/1E4)/100;this.Va=this.ab*this.Na;this.v.ba=!1;this.v.Hb=!1;this.v.hb=a.autoStart;this.v.Mb=!1;this.v.$a=!1;this.lb=this.ia=0;this.mb=a.csStart;this.bb=a.csInterval;this.cb=a.csStop;this.L=[];this.Vb=this.cd.bind(this);G(this)}y(uc);var vc=["power","reset"];h=uc.prototype; -h.Ga=function(a,b,c,d){this.F=a;this.B=b;this.j=d;for(b=0;b=a.ia&&(a.ia+=a.bb,c=!0);0<=a.cb&&a.cb<=Bc(a)&&(a.bb=a.cb=-1,yc(a),a.ea(),c=!0);c&&a.i(Bc(a)+" cycles: checksum="+k(a.lb))}} -function Cc(a,b,c,d){if(a.J[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ia||8;c=!a.v.ba||a.v.Mb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} -h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=bb(a.id);for(c=0;ca.ca/a.Va?b=1:d=!0;a.Na=b;b=a.ab*a.Na;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.F&&a.F.pb()}Ec(a,a.W);a.W=0;a.V=ra();a.da=0;Fc(a);return d}function Pb(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.L[b][0]&&(c*=a.Qa*a.Na/1E3,a.L[b][0]=c)}function Gc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function Hc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -h.cd=function(){if(this.v.ba){this.kb>=this.Qa&&Fc(this,!0);this.qa=0;this.Ja=ra();if(this.da){var a=this.Ja-this.da;a>this.Sb&&(this.V+=a,this.V>this.Ja&&(this.V=this.Ja))}try{do{var b=Gc(this,this.v.$a?1:this.Ra);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Hc(this,c);this.qa+=c;this.W+=c;Ec(this,0,!0);Ac(this,c);this.ka-=c;if(0>=this.ka){this.ka+=this.Ra;15<=++this.Ub&&(this.F&&this.F.za(),this.Ub=0);break}}while(this.v.ba)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), -Bc(this));vb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Vb;this.da=ra();c=this.Sb;this.qa&&(c=Math.round(c*this.qa/this.Ra));var c=c-(this.da-this.Ja),d=this.da-this.V;d&&(this.ca=Math.round(this.W/(10*d))/100,864E5<=d&&(this.ga=0,Dc(this)));if(0>c||this.cac&&(this.V-=c),c=0;this.kb+=this.qa;this.da+=c;a(b,c)}}}; -h.eb=function(a){if(ib(this))return!1;if(this.v.ba)return this.i(this.toString()+" busy"),!1;Dc(this);this.v.ba=!0;this.v.Hb=!0;this.oa&&this.oa.start();var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.pb(!0),this.F.start(this.V,Bc(this)));M(this,!0);setTimeout(this.Vb,0);return!0};h.fb=function(){return 0}; -h.ea=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Ec(this,this.W);this.W=0;this.v.ba=!1;this.oa&&this.oa.stop();var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Bc(this));M(this)}this.v.complete=a};function M(a,b){a.F&&a.F.za(b)} -function Ic(a){this.Xb=+a.model||1170;this.yc=a.resetAddr||0;uc.call(this,a,6666667);this.sb=0;this.decode=bd.bind(this);this.P=65536;this.R=32768;this.Y=65535;this.U=32768;this.K=15;this.u=[0,0,0,0,0,0,0,this.yc];this.Ha=[0,0,0,0,0,0];this.ta=[0,0,0,0];this.xa=this.C=0;this.wc=[4,2,0,1];this.S=[[0,0,0,0,0,0,0,0,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]];this.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.zc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.gc=[0,0,0,0,0,0,0,0];this.g=this.f=this.Za=this.H=this.I=this.D=this.fc=0;this.la=-1;cd(this);this.v.complete=this.v.rc=!1}y(Ic,uc);h=Ic.prototype;h.reset=function(){this.v.ba&&this.ea();cd(this);xc(this);this.v.error=!1;this.parent.reset.call(this)}; -function cd(a){a.Pa=255;a.$=0;a.Gb=0;a.G=0;a.Oa=0;a.Fb=0;a.Wa=0;a.Bb=0;a.wa=0;a.jb=262143;a.Ia=253952;a.A=[];a.D|=2;Sb(a)}function Sb(a){a.Bb?(a.aa=65536,a.M=a.uc,a.T=a.ec,a.Wb=a.Dd):(a.aa=0,a.M=a.tc,a.T=a.$c,a.Wb=a.Cd)}h.Ob=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Na]);a.set(2,Mb(this.B));return a.data()}; -h.restore=function(a){var b=a[1];this.ga=b[1];Dc(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.A[f].Ea-=b;break}b-=a.A[f].Ea}a.A.splice(f+1,0,{Ea:b,Yb:c<<5&224,ic:d,Ab:e})}a.D|=2}function Ub(a){return a.K=a.K&63728|a.Fa()|fd(a)|ed(a)|dd(a)} -function Vb(a,b){a.U=b<<12;a.Y=~b&4;a.R=b<<14;a.P=b<<16;if((b^a.K)&2048)for(var c=a.Ha.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ha[c];a.Ha[c]=d}a.C=b>>14&3;c=a.K>>14&3;a.C!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.C]);a.D|=2;a.K=b}function O(a,b){a.D&128||(a.U=a.Y=b,a.R=0)}function id(a,b,c){a.D&128||(a.U=a.Y=a.P=b,a.R=c||0)}function jd(a,b,c,d){a.D&128||(a.U=a.Y=a.P=b,a.R=(c^b)&(d^b))}function kd(a,b){a.D&128||(a.U=a.Y=a.P=b,a.R=a.U^a.P>>1)}function ld(a,b,c,d){a.D&128||(a.U=a.Y=a.P=b,a.R=(c^d)&(d^b))} -h.O=function(a){var b=!1;0>this.la?this.la=Ub(this):this.C||(a=4,b=!0);this.G&57344||(this.Oa=63222,this.Fb=a);this.C=0;var c=this.T(a|this.aa),d=this.T(a+2&65535|this.aa);Vb(this,d&-12289|this.la>>2&12288);b&&(this.$|=4,this.u[6]=4);md(this,this.la);md(this,this.u[7]);hd(this,c);this.D&=-113;this.la=-1;throw a;};function nd(a){var b=od(a),c=od(a)&-1793;a.K&49152&&(c=c&-225|a.K&63712);hd(a,b);Vb(a,c);a.D&=-17} -function pd(a,b,c){var d,e,f,g=0;d=b>>13;a.Wa&a.wc[a.C]||(d&=7);e=a.S[a.C][d];f=(a.pa[a.C][d]<<6)+(b&8191)&a.jb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Wa&32&&(f=a.zc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ia&&4186112>f&&(a.$|=32,a.O(4,12))}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.S[a.C][d]=e;if(4194170!==f||a.C)a.wa=a.C,a.xa=d;g&&(g&57344&&(0<=a.la&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.O(168,16)),a.G&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.T(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.T(e)|g;a.b-= -8;break;case 6:return e=gd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=gd(a),e=e+a.u[c]&65535,e=a.T(e|a.aa)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Pa||65534<=a.u[6])&&(a.u[6]<=a.Pa-32?(a.$|=4,a.u[6]=4,a.O(4,24)):(a.$|=8,a.D|=64));return e}h.tc=function(a,b,c){return qd(this,a,b,c)};h.uc=function(a,b,c){return pd(this,qd(this,a,b,c),c)};h.$c=function(a){return this.B.ma(a)};h.ec=function(a){return this.B.ma(pd(this,a,2))}; -h.Cd=function(a,b){this.B.Xa(a,b&65535)};h.Dd=function(a,b){this.B.Xa(pd(this,a,4),b)};function rd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=qd(a,b,d,2),c&65536||61440!==(a.K&61440)&&(d&=65535),a.C=a.K>>12&3,c=a.T(d|c&a.aa),a.C=a.K>>14&3):c=6!=d||(a.K>>2&12288)===(a.K&12288)?a.u[d]:a.ta[a.K>>12&3];return c} -function sd(a,b,c,d){a.G&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=qd(a,b,e,4),c&65536||(e&=65535),a.C=a.K>>12&3,e=pd(a,e|c&65536,4),a.C=a.K>>14&3,a.B.Xa(e,d)):6!=e||(a.K>>2&12288)===(a.K&12288)?a.u[e]=d:a.ta[a.K>>12&3]=d}function td(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function vd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return qd(a,b,c,8)} -function wd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Za=a.M(b,e,7),c=d.call(a,c,a.B.Ua(e)),e&1&&a.b--,a.B.ob(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.M(b,e,6),a.B.Xa(e,d.call(a,c,a.B.ma(e)))):a.u[e]=d.call(a,c,a.u[e])} -function yd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.B.ob(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function zd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.B.Xa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(hd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.fb=function(a){this.v.complete=!0;var b=this.v.rc=this.j&&Ad(this.j),c=a?this.v.Hb?0:1:-1;this.v.Hb=!1;this.N=this.b=a;do{if(b){if(Bd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.O(168,28):this.D&64?this.O(4,30):this.D&16&&this.O(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Gb&224,e=this.A.length;0<=--e;){if(0d&&(d=this.A[e].Yb,a=this.A[e],this.A.splice(e,1))}d>(this.K&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.O(a.ic,26):this.O(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Oa=0,this.Fb=this.u[7]);this.D=this.D&7|this.K&16;this.decode(gd(this))}while(0>1|b<<16;kd(this,a);return a&65535}function Hd(a,b){a=b&2048|b>>1|b<<8;kd(this,a<<8);return a&255}function Id(a,b){a=b&~a;O(this,a);return a}function Jd(a,b){a=b&~a;O(this,a<<8);return a}function Kd(a,b){a|=b;O(this,a);return a} -function Ld(a,b){a|=b;O(this,a<<8);return a}function Md(a,b){a=~b|65536;id(this,a);return a&65535}function Nd(a,b){a=~b|256;id(this,a<<8);return a&255}function Od(a,b){a=b-a;this.D&128||(this.U=this.Y=a,this.R=b&(b^a));return a&65535}function Pd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.U=this.Y=c,this.R=b&(b^c));return a&255}function Qd(a,b){a=b+a;this.D&128||(this.U=this.Y=a,this.R=a&(b^a));return a&65535} -function Rd(a,b){a=b+a;var c=a<<8;this.D&128||(this.U=this.Y=c,this.R=c&(b<<8^c));return a&255}function Sd(a,b){a=-b;id(this,a,a&b&32768);return a&65535}function Td(a,b){a=-b;id(this,a<<8,(a&b&128)<<8);return a&255}function Ud(a,b){a=b<<1|this.P>>16&1;kd(this,a);return a&65535}function Vd(a,b){a=b<<1|this.P>>16&1;kd(this,a<<8);return a&255}function Wd(a,b){a=(this.P&65536|b)>>1|b<<16;kd(this,a);return a&65535}function Xd(a,b){a=((this.P&65536)>>8|b)>>1|b<<8;kd(this,a<<8);return a&255} -function Yd(a,b){var c=b-a;ld(this,c,a,b);return c&65535}function Zd(a,b){var c=b-a;ld(this,c<<8,a<<8,b<<8);return c&255}function $d(a,b){this.D&128||(this.U=this.Y=b&65280,this.R=this.P=0);return(b<<8|b>>8)&65535}function ae(a,b){a^=b;O(this,a);return a&65535} -function be(a){var b=xd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.P=this.R=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.R=32768)}this.u[a]=c&65535;this.U=this.Y=c;this.b-=(this.g?6:7)+b} -function ce(a){var b=xd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.P=this.R=0;b&=63;if(b&32){b=64-b;32>b-1;this.P=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.U=d>>16;this.Y=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.P=0);a&2&&(this.R=0);a&4&&(this.Y=1);a&8&&(this.U=0);this.b-=5} -function de(a){var b=xd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.P=this.R=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Y=d>>16|d,this.U=d>>16):(this.R=32768,this.Y=d>>15|d,this.U=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Y=this.U=0,this.R=32768,this.P=65536,this.b-=7}var ee=[0,7,7,10,7,11,9,13];function fe(a){var b=this.b;hd(this,vd(this,a));this.b=b-ee[this.g]} -var ge=[0,14,14,17,14,18,16,20];function he(a){var b=this.b,c=vd(this,a);a=a>>6&7;md(this,this.u[a]);this.u[a]=this.u[7];hd(this,c);this.b=b-ge[this.g]}var ie=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],je=[7,13,13,17,14,18,17,21];function ke(a){var b=xd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.U=b>>16,this.Y=this.U|b,this.R=0,this.P=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)hd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ne(a){Q(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)}function oe(a){Q(this,a,ud(this,a),ae);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.O(8,6)}function bd(a){pe[a>>12].call(this,a)} -var pe=[function(a){qe[a>>8&15].call(this,a)},function(a){var b=ud(this,a),c=this.b;O(this,zd(this,a,b));this.b=c-ie[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=ud(this,a);a=xd(this,a);ld(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,ud(this,a)&xd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Id);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,ud(this,a),Kd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Cd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){re[a>>8&15].call(this,a)},function(a){se[a>>8&15].call(this,a)},function(a){var b=td(this,a);O(this,yd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=td(this,a)<<8;a=wd(this,a)<<8;ld(this,b-a,a,b);this.b-=this.g? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(td(this,a)&wd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,td(this,a),Jd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,td(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,ud(this,a),Yd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],qe= -[function(a){Me[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!fd(this))},function(a){R(this,a,fd(this))},function(a){R(this,a,!this.Fa()==!ed(this))},function(a){R(this,a,!this.Fa()!=!ed(this))},function(a){R(this,a,!fd(this)&&!this.Fa()==!ed(this))},function(a){R(this,a,fd(this)||!this.Fa()!=!ed(this))},he,he,function(a){Ne[a>>6&3].call(this,a)},function(a){Oe[a>>6&3].call(this,a)},function(a){Pe[a>>6&3].call(this,a)},function(a){Qe[a>>6&3].call(this,a)},V,V],Ne=[function(a){id(this, -zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Md);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Qd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Od);this.b-=this.g?9:3+(7==this.f?2:0)}],Oe=[function(a){Q(this,a,0,Sd);this.b-=this.g?11:6},function(a){Q(this,a,dd(this)?1:0,Cd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,dd(this)?1:0,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=xd(this,a);id(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],Pe=[function(a){Q(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ud);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Gd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ed);this.b-=this.g?9:3+(7==this.f?2:0)}],Qe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ec(a|65536);hd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=rd(this,a,0);md(this,a);O(this,a);this.b-=11},function(a){var b=od(this),c=this.b;sd(this,a, -0,b);O(this,b);this.b=c-je[this.g]},function(a){O(this,zd(this,a,this.Fa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Me=[function(a){Re[a&15].call(this,a)},V,V,V,fe,fe,fe,fe,function(a){if(a&8)this.O(8,6);else{var b=od(this);a&=7;hd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.K&49152||(this.K=this.K&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.O(8,6)},function(a){Se[a&15].call(this,a)},function(a){Te[a&15].call(this,a)},ne,ne,ne,ne],Re=[function(){this.K&49152?(this.$|=128,this.O(4, -3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){nd(this);this.D|=this.K&16;this.b-=13},function(){this.O(12,1);this.b-=5},function(){this.O(16,4);this.b-=25},function(){this.K&49152||(cd(this),this.B.reset());this.b-=667},function(){nd(this);this.b-=13},V,V,V,V,V,V,V,V,V],Se=[le,function(){this.P=0;this.b-=5},function(){this.R=0;this.b-=5},S,function(){this.Y=1;this.b-=5},S,S,S,function(){this.U=0;this.b-=5},S,S,S,S,S,S,S],Te=[le,function(){this.P= -65536;this.b-=5},function(){this.R=32768;this.b-=5},T,function(){this.Y=0;this.b-=5},T,T,T,function(){this.U=32768;this.b-=5},T,T,T,T,T,T,T],re=[ke,ke,de,de,be,be,ce,ce,oe,oe,V,V,V,V,me,me],se=[function(a){R(this,a,!this.Fa())},function(a){R(this,a,this.Fa())},function(a){R(this,a,!dd(this)&&!fd(this))},function(a){R(this,a,dd(this)||fd(this))},function(a){R(this,a,!ed(this))},function(a){R(this,a,ed(this))},function(a){R(this,a,!dd(this))},function(a){R(this,a,dd(this))},function(){this.O(24,2); -this.b-=25},function(){this.O(28,5);this.b-=5},function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){id(this,yd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Rd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Pd);this.b-=this.g?9:3+(7==this.f?2:0)}],Ve=[function(a){P(this,a,0,Td);this.b-= -this.g?11:6},function(a){P(this,a,dd(this)?1:0,Dd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,dd(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=wd(this,a);id(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],We=[function(a){P(this,a,0,Xd);this.b-=this.g?9+(this.Za&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Hd);this.b-=this.g?9+(this.Za&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Fd);this.b-=this.g?9:3+(7== -this.f?2:0)}],Xe=[V,function(a){a=rd(this,a,65536);md(this,a);O(this,a);this.b-=11},function(a){var b=od(this),c=this.b;sd(this,a,65536,b);O(this,b);this.b=c-je[this.g]},V];function Ye(a){r.call(this,"ROM",a,Ye);this.f=null;this.C=a.addr;this.g=a.size;this.G=a.writable;this.F=a.alias;this.A=a.file;this.H=da(this.A);if(this.A){a=this.A;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){Ze(c,a,b,f)})}}y(Ye); -Ye.prototype.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;$e(this)};Ye.prototype.Ca=function(){if(this.Da){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.g,e=this.Da,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var n=l.o,p=l.a;if(void 0!==n){var q=f,n=[n>>>0,g],v=qa(q,n,a.Lb);0>v&&q.splice(-(v+1),0,n)}p&&(l.a=p.replace(/''/g,'"'))}a.H.push({Id:b,w:c,vc:d,Da:e,Kb:f})}delete this.Da}return!0};Ye.prototype.Ba=function(){return!0}; -function Ze(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.zb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Da=l.symbols;if(!a.f.length){m("Empty ROM: "+ -b);return}if(1==a.f.length){m(a.f[0]);return}}catch(n){a.na("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.Z].wb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c>> -e.Z;0>>=e.Z;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ya)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.zb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ca=function(a,b){if(!b)if(this.Tb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.Ba=function(a){return a?this.save():!0};h.reset=function(){ef(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return ef(this)};function ef(a){a.T=0;a.f=0;a.g=128;a.C=[];return!0}h.Eb=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.V||8,c=a-this.H%a,this.V&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;Qb(this.b,100,4,52,this.N)}};var ff={},df=(ff[65392]=[null,null,W.prototype.Pc,W.prototype.rd,"RCSR"],ff[65394]=[null,null,W.prototype.Oc,W.prototype.qd,"RBUF"],ff[65396]=[null,null,W.prototype.bd,W.prototype.Fd,"XCSR"],ff[65398]=[null,null,W.prototype.ad,W.prototype.Ed,"XBUF"],ff);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};gf.prototype.Pb=function(){return-1};gf.prototype.Qb=function(){}; -function jf(a,b,c,d){if(c)if(b){0>a.C&&a.A.length&&(a.C=0);if(0>a.C||b!=a.A[a.C])a.A.splice(0,0,b),a.C=0;a.C--}else a.W?b="end":b=a.A[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(oa(b.substring(c,f))),c=f+1}}return a} -function kf(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; +La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.f=new Int32Array(this.A,0,d>>2),lc(this,hc?mc:nc);else{this.f=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},X:function(a){return this.f[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&this.b.O(4,b);b=a>>2;a=(a&3)<<3;var c=this.f[b]>>a;return 24>a?c&65535:c&255|(this.f[b+1]&255)<<8},oa:function(a,b){var c=a>>2;a=(a&3)<<3;this.f[c]= +this.f[c]&~(255<>2;a=(a&3)<<3;24>a?this.f[c]=this.f[c]&~(65535<>8);this.La=!0},U:function(a,b){if(this.j&&null!=this.w){var c=this.j;sc(c,this.w+a,1,c.N)&&c.ea(!0)}return this.Bb(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;sc(c,this.w+a,2,c.N)&&c.ea(!0)}return this.Cb(a,b)},ka:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;sc(d,this.w+a, +1,d.G)&&d.ea(!0)}this.g?this.F(a,b,c):this.wb(a,b,c)},xa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;sc(d,this.w+a,2,d.G)&&d.ea(!0)}this.g?this.F(a,b,c):this.Ib(a,b,c)},N:function(a){return this.C[a]},W:function(a,b){a=this.C[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},aa:function(a,b){a&1&&this.b.O(4,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&this.b.O(4,b);a=this.I[a>>1];this.j&&F(this.j,128)&&D(this.j,"Memory.readWord("+ +I(this.j,b)+"): "+I(this.j,a),!0);return a},ia:function(a,b){this.C[a]=b;this.La=!0},la:function(a,b,c){this.C[a]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},wa:function(a,b,c){a&1&&this.b.O(4,c);this.G.setUint16(a,b,!0);this.La=!0},ya:function(a,b,c){a&1&&this.b.O(4,c);this.I[a>>1]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}}; +function Fb(a,b,c){a.j=b;a.B=a.J=0;c&&((a.B=c.B)&&rc(a,qc,!1),(a.J=c.J)&&pc(a,qc,!1))}function tc(a,b){b?--a.J||(a.vb=a.g?a.F:a.wb,a.nc=a.g?a.H:a.Ib):--a.B||(a.ub=a.Bb,a.cc=a.Cb)}function pc(a,b,c){c&&a.J||(a.vb=!a.g&&b[1]||a.F,a.nc=!a.g&&b[3]||a.H);if(c||void 0===c)a.wb=b[1]||a.F,a.Ib=b[3]||a.H}function rc(a,b,c){c&&a.B||(a.ub=b[0]||a.L,a.cc=b[2]||a.M);if(c||void 0===c)a.Bb=b[0]||a.L,a.Cb=b[2]||a.M}function lc(a,b){b||(b=uc);rc(a,b,void 0);pc(a,b,void 0)} +var uc=[],oc=[H.prototype.X,H.prototype.oa,H.prototype.ga,H.prototype.Xa],qc=[H.prototype.U,H.prototype.ka,H.prototype.ca,H.prototype.xa];if(wb)var nc=[H.prototype.N,H.prototype.ia,H.prototype.aa,H.prototype.wa],mc=[H.prototype.W,H.prototype.la,H.prototype.da,H.prototype.ya]; +function vc(a,b){r.call(this,"CPU",a,vc,1);var c=a.multiplier||1;this.Ja=a.cycles||b;this.Na=c;this.Za=Math.round(this.Ja/1E4)/100;this.Va=this.Za*this.Na;this.v.ba=!1;this.v.Gb=!1;this.v.gb=a.autoStart;this.v.Lb=!1;this.v.$a=!1;this.jb=this.ia=0;this.kb=a.csStart;this.bb=a.csInterval;this.cb=a.csStop;this.L=[];this.Ub=this.cd.bind(this);G(this)}y(vc);var wc=["power","reset"];h=vc.prototype; +h.Ga=function(a,b,c,d){this.F=a;this.B=b;this.j=d;for(b=0;b=a.ia&&(a.ia+=a.bb,c=!0);0<=a.cb&&a.cb<=Cc(a)&&(a.bb=a.cb=-1,zc(a),a.ea(),c=!0);c&&a.i(Cc(a)+" cycles: checksum="+k(a.jb))}} +function Dc(a,b,c,d){if(a.J[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ia||8;c=!a.v.ba||a.v.Lb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} +h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=bb(a.id);for(c=0;ca.ca/a.Va?b=1:d=!0;a.Na=b;b=a.Za*a.Na;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.F&&a.F.nb()}Fc(a,a.X);a.X=0;a.W=ra();a.da=0;Gc(a);return d}function Qb(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.L[b][0]&&(c*=a.Ja*a.Na/1E3,a.L[b][0]=c)}function Hc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b} +function Ic(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +h.cd=function(){if(this.v.ba){this.ib>=this.Ja&&Gc(this,!0);this.oa=0;this.Ia=ra();if(this.da){var a=this.Ia-this.da;a>this.rb&&(this.W+=a,this.W>this.Ia&&(this.W=this.Ia))}try{do{var b=Hc(this,this.v.$a?1:this.Ra);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Ic(this,c);this.oa+=c;this.X+=c;Fc(this,0,!0);Bc(this,c);this.ka-=c;if(0>=this.ka){this.ka+=this.Ra;15<=++this.Rb&&(this.F&&this.F.za(),this.Rb=0);break}}while(this.v.ba)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), +Cc(this));vb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Ub;this.da=ra();c=this.rb;this.oa&&(c=Math.round(c*this.oa/this.Ra));var c=c-(this.da-this.Ia),d=this.da-this.W;d&&(this.ca=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ga=0,Ec(this)));if(0>c||this.cac&&(this.W-=c),c=0;this.ib+=this.oa;this.da+=c;a(b,c)}}}; +h.eb=function(a){if(ib(this))return!1;if(this.v.ba)return this.i(this.toString()+" busy"),!1;Ec(this);this.v.ba=!0;this.v.Gb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.W,Cc(this)));M(this,!0);setTimeout(this.Ub,0);return!0};h.fb=function(){return 0};h.ea=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Fc(this,this.X);this.X=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Cc(this));M(this)}this.v.complete=a}; +function M(a,b){a.F&&a.F.za(b)} +function Jc(a){this.Wb=+a.model||1170;this.yc=a.resetAddr||0;vc.call(this,a,6666667);this.pb=0;this.decode=Kc.bind(this);this.R=65536;this.S=32768;this.Z=65535;this.V=32768;this.K=15;this.u=[0,0,0,0,0,0,0,this.yc];this.Ha=[0,0,0,0,0,0];this.ta=[0,0,0,0];this.xa=this.C=0;this.vc=[4,2,0,1];this.T=[[0,0,0,0,0,0,0,0,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]];this.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.zc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.fc=[0,0,0,0,0,0,0,0];this.g=this.f=this.Ya=this.H=this.I=this.D=this.ec=0;this.la=-1;Lc(this);this.v.complete=this.v.rc=!1}y(Jc,vc);h=Jc.prototype;h.Sb=function(){Tb(this)};h.reset=function(){this.v.ba&&this.ea();Lc(this);yc(this);this.v.error=!1;this.parent.reset.call(this)}; +function Lc(a){a.Qa=255;a.$=0;a.Fb=0;a.G=0;a.Oa=0;a.Eb=0;a.Pa=0;a.tb=0;a.wa=0;a.ab=262143;a.ya=253952;a.A=[];a.D|=2;a.B&&Tb(a)}function Tb(a){a.tb?(a.aa=65536,a.M=a.uc,a.U=a.dc,a.Vb=a.Dd,Gb(a.B,a.Pa&16?22:18)):(a.aa=0,a.M=a.tc,a.U=a.$c,a.Vb=a.Cd,Gb(a.B,16))}h.Ob=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Na]);a.set(2,Nb(this.B));return a.data()}; +h.restore=function(a){var b=a[1];this.ga=b[1];Ec(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;cb){a.A[f].Ea-=b;break}b-=a.A[f].Ea}a.A.splice(f+1,0,{Ea:b,Xb:c<<5&224,hc:d,Ab:e})}a.D|=2}function Vb(a){return a.K=a.K&63728|a.Fa()|gd(a)|fd(a)|ed(a)} +function Wb(a,b){a.V=b<<12;a.Z=~b&4;a.S=b<<14;a.R=b<<16;if((b^a.K)&2048)for(var c=a.Ha.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ha[c];a.Ha[c]=d}a.C=b>>14&3;c=a.K>>14&3;a.C!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.C]);a.D|=2;a.K=b}function O(a,b){a.D&128||(a.V=a.Z=b,a.S=0)}function jd(a,b,c){a.D&128||(a.V=a.Z=a.R=b,a.S=c||0)}function kd(a,b,c,d){a.D&128||(a.V=a.Z=a.R=b,a.S=(c^b)&(d^b))}function ld(a,b){a.D&128||(a.V=a.Z=a.R=b,a.S=a.V^a.R>>1)}function md(a,b,c,d){a.D&128||(a.V=a.Z=a.R=b,a.S=(c^d)&(d^b))} +h.O=function(a){var b=!1;0>this.la?this.la=Vb(this):this.C||(a=4,b=!0);this.G&57344||(this.Oa=63222,this.Eb=a);this.C=0;var c=this.U(a|this.aa),d=this.U(a+2&65535|this.aa);Wb(this,d&-12289|this.la>>2&12288);b&&(this.$|=4,this.u[6]=4);nd(this,this.la);nd(this,this.u[7]);id(this,c);this.D&=-113;this.la=-1;throw a;};function od(a){var b=pd(a),c=pd(a)&-1793;a.K&49152&&(c=c&-225|a.K&63712);id(a,b);Wb(a,c);a.D&=-17} +function qd(a,b,c){var d,e,f,g=0;d=b>>13;a.Pa&a.vc[a.C]||(d&=7);e=a.T[a.C][d];f=(a.pa[a.C][d]<<6)+(b&8191)&a.ab;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Pa&32&&(f=a.zc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.ya&&4186112>f&&(a.$|=32,a.O(4,12))}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.T[a.C][d]=e;if(4194170!==f||a.C)a.wa=a.C,a.xa=d;g&&(g&57344&&(0<=a.la&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.O(168,16)),a.G&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.U(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.U(e)|g;a.b-= +8;break;case 6:return e=hd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=hd(a),e=e+a.u[c]&65535,e=a.U(e|a.aa)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Qa||65534<=a.u[6])&&(a.u[6]<=a.Qa-32?(a.$|=4,a.u[6]=4,a.O(4,24)):(a.$|=8,a.D|=64));return e}h.tc=function(a,b,c){return rd(this,a,b,c)};h.uc=function(a,b,c){return qd(this,rd(this,a,b,c),c)};h.$c=function(a){return this.B.ma(a)};h.dc=function(a){return this.B.ma(qd(this,a,2))}; +h.Cd=function(a,b){this.B.Wa(a,b&65535)};h.Dd=function(a,b){this.B.Wa(qd(this,a,4),b)};function sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=rd(a,b,d,2),c&65536||61440!==(a.K&61440)&&(d&=65535),a.C=a.K>>12&3,c=a.U(d|c&a.aa),a.C=a.K>>14&3):c=6!=d||(a.K>>2&12288)===(a.K&12288)?a.u[d]:a.ta[a.K>>12&3];return c} +function td(a,b,c,d){a.G&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=rd(a,b,e,4),c&65536||(e&=65535),a.C=a.K>>12&3,e=qd(a,e|c&65536,4),a.C=a.K>>14&3,a.B.Wa(e,d)):6!=e||(a.K>>2&12288)===(a.K&12288)?a.u[e]=d:a.ta[a.K>>12&3]=d}function ud(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return rd(a,b,c,8)} +function xd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ya=a.M(b,e,7),c=d.call(a,c,a.B.Ua(e)),e&1&&a.b--,a.B.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.M(b,e,6),a.B.Wa(e,d.call(a,c,a.B.ma(e)))):a.u[e]=d.call(a,c,a.u[e])} +function zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.B.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Ad(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.B.Wa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(id(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.fb=function(a){this.v.complete=!0;var b=this.v.rc=this.j&&Bd(this.j),c=a?this.v.Gb?0:1:-1;this.v.Gb=!1;this.N=this.b=a;do{if(b){if(Cd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.O(168,28):this.D&64?this.O(4,30):this.D&16&&this.O(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Fb&224,e=this.A.length;0<=--e;){if(0d&&(d=this.A[e].Xb,a=this.A[e],this.A.splice(e,1))}d>(this.K&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.O(a.hc,26):this.O(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Oa=0,this.Eb=this.u[7]);this.D=this.D&7|this.K&16;this.decode(hd(this))}while(0>1|b<<16;ld(this,a);return a&65535}function Id(a,b){a=b&2048|b>>1|b<<8;ld(this,a<<8);return a&255}function Jd(a,b){a=b&~a;O(this,a);return a}function Kd(a,b){a=b&~a;O(this,a<<8);return a}function Ld(a,b){a|=b;O(this,a);return a} +function Md(a,b){a|=b;O(this,a<<8);return a}function Nd(a,b){a=~b|65536;jd(this,a);return a&65535}function Od(a,b){a=~b|256;jd(this,a<<8);return a&255}function Pd(a,b){a=b-a;this.D&128||(this.V=this.Z=a,this.S=b&(b^a));return a&65535}function Qd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.V=this.Z=c,this.S=b&(b^c));return a&255}function Rd(a,b){a=b+a;this.D&128||(this.V=this.Z=a,this.S=a&(b^a));return a&65535} +function Sd(a,b){a=b+a;var c=a<<8;this.D&128||(this.V=this.Z=c,this.S=c&(b<<8^c));return a&255}function Td(a,b){a=-b;jd(this,a,a&b&32768);return a&65535}function Ud(a,b){a=-b;jd(this,a<<8,(a&b&128)<<8);return a&255}function Vd(a,b){a=b<<1|this.R>>16&1;ld(this,a);return a&65535}function Wd(a,b){a=b<<1|this.R>>16&1;ld(this,a<<8);return a&255}function Xd(a,b){a=(this.R&65536|b)>>1|b<<16;ld(this,a);return a&65535}function Yd(a,b){a=((this.R&65536)>>8|b)>>1|b<<8;ld(this,a<<8);return a&255} +function Zd(a,b){var c=b-a;md(this,c,a,b);return c&65535}function $d(a,b){var c=b-a;md(this,c<<8,a<<8,b<<8);return c&255}function ae(a,b){this.D&128||(this.V=this.Z=b&65280,this.S=this.R=0);return(b<<8|b>>8)&65535}function be(a,b){a^=b;O(this,a);return a&65535} +function ce(a){var b=yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.R=this.S=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.S=32768)}this.u[a]=c&65535;this.V=this.Z=c;this.b-=(this.g?6:7)+b} +function de(a){var b=yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=0;b&=63;if(b&32){b=64-b;32>b-1;this.R=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.V=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.R=0);a&2&&(this.S=0);a&4&&(this.Z=1);a&8&&(this.V=0);this.b-=5} +function ee(a){var b=yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Z=d>>16|d,this.V=d>>16):(this.S=32768,this.Z=d>>15|d,this.V=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.V=0,this.S=32768,this.R=65536,this.b-=7}var fe=[0,7,7,10,7,11,9,13];function ge(a){var b=this.b;id(this,wd(this,a));this.b=b-fe[this.g]} +var he=[0,14,14,17,14,18,16,20];function ie(a){var b=this.b,c=wd(this,a);a=a>>6&7;nd(this,this.u[a]);this.u[a]=this.u[7];id(this,c);this.b=b-he[this.g]}var je=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],ke=[7,13,13,17,14,18,17,21];function le(a){var b=yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.V=b>>16,this.Z=this.V|b,this.S=0,this.R=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)id(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function oe(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)}function pe(a){Q(this,a,vd(this,a),be);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.O(8,6)}function Kc(a){qe[a>>12].call(this,a)} +var qe=[function(a){re[a>>8&15].call(this,a)},function(a){var b=vd(this,a),c=this.b;O(this,Ad(this,a,b));this.b=c-je[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=vd(this,a);a=yd(this,a);md(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,vd(this,a)&yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Jd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,vd(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Dd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){se[a>>8&15].call(this,a)},function(a){Me[a>>8&15].call(this,a)},function(a){var b=ud(this,a);O(this,zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=ud(this,a)<<8;a=xd(this,a)<<8;md(this,b-a,a,b);this.b-=this.g? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(ud(this,a)&xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,ud(this,a),Kd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,ud(this,a),Md);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Zd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],re= +[function(a){Ne[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!gd(this))},function(a){R(this,a,gd(this))},function(a){R(this,a,!this.Fa()==!fd(this))},function(a){R(this,a,!this.Fa()!=!fd(this))},function(a){R(this,a,!gd(this)&&!this.Fa()==!fd(this))},function(a){R(this,a,gd(this)||!this.Fa()!=!fd(this))},ie,ie,function(a){Oe[a>>6&3].call(this,a)},function(a){Pe[a>>6&3].call(this,a)},function(a){Qe[a>>6&3].call(this,a)},function(a){Re[a>>6&3].call(this,a)},V,V],Oe=[function(a){jd(this, +Ad(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Rd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Pd);this.b-=this.g?9:3+(7==this.f?2:0)}],Pe=[function(a){Q(this,a,0,Td);this.b-=this.g?11:6},function(a){Q(this,a,ed(this)?1:0,Dd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,ed(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=yd(this,a);jd(this,a);this.b-=this.g?4:3+(7==this.f? +2:0)}],Qe=[function(a){Q(this,a,0,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Hd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Fd);this.b-=this.g?9:3+(7==this.f?2:0)}],Re=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.dc(a|65536);id(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=sd(this,a,0);nd(this,a);O(this,a);this.b-=11},function(a){var b=pd(this),c=this.b;td(this,a, +0,b);O(this,b);this.b=c-ke[this.g]},function(a){O(this,Ad(this,a,this.Fa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ne=[function(a){Se[a&15].call(this,a)},V,V,V,ge,ge,ge,ge,function(a){if(a&8)this.O(8,6);else{var b=pd(this);a&=7;id(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.K&49152||(this.K=this.K&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.O(8,6)},function(a){Te[a&15].call(this,a)},function(a){Ue[a&15].call(this,a)},oe,oe,oe,oe],Se=[function(){this.K&49152?(this.$|=128,this.O(4, +3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){od(this);this.D|=this.K&16;this.b-=13},function(){this.O(12,1);this.b-=5},function(){this.O(16,4);this.b-=25},function(){this.K&49152||(Lc(this),this.B.reset());this.b-=667},function(){od(this);this.b-=13},V,V,V,V,V,V,V,V,V],Te=[me,function(){this.R=0;this.b-=5},function(){this.S=0;this.b-=5},S,function(){this.Z=1;this.b-=5},S,S,S,function(){this.V=0;this.b-=5},S,S,S,S,S,S,S],Ue=[me,function(){this.R= +65536;this.b-=5},function(){this.S=32768;this.b-=5},T,function(){this.Z=0;this.b-=5},T,T,T,function(){this.V=32768;this.b-=5},T,T,T,T,T,T,T],se=[le,le,ee,ee,ce,ce,de,de,pe,pe,V,V,V,V,ne,ne],Me=[function(a){R(this,a,!this.Fa())},function(a){R(this,a,this.Fa())},function(a){R(this,a,!ed(this)&&!gd(this))},function(a){R(this,a,ed(this)||gd(this))},function(a){R(this,a,!fd(this))},function(a){R(this,a,fd(this))},function(a){R(this,a,!ed(this))},function(a){R(this,a,ed(this))},function(){this.O(24,2); +this.b-=25},function(){this.O(28,5);this.b-=5},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},V,V],Ve=[function(a){jd(this,zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Qd);this.b-=this.g?9:3+(7==this.f?2:0)}],We=[function(a){P(this,a,0,Ud);this.b-= +this.g?11:6},function(a){P(this,a,ed(this)?1:0,Ed);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,ed(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=xd(this,a);jd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Xe=[function(a){P(this,a,0,Yd);this.b-=this.g?9+(this.Ya&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Id);this.b-=this.g?9+(this.Ya&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Gd);this.b-=this.g?9:3+(7== +this.f?2:0)}],Ye=[V,function(a){a=sd(this,a,65536);nd(this,a);O(this,a);this.b-=11},function(a){var b=pd(this),c=this.b;td(this,a,65536,b);O(this,b);this.b=c-ke[this.g]},V];function Ze(a){r.call(this,"ROM",a,Ze);this.f=null;this.C=a.addr;this.g=a.size;this.G=a.writable;this.F=a.alias;this.A=a.file;this.H=da(this.A);if(this.A){a=this.A;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){$e(c,a,b,f)})}}y(Ze); +Ze.prototype.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;af(this)};Ze.prototype.Ca=function(){if(this.Da){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.g,e=this.Da,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var n=l.o,p=l.a;if(void 0!==n){var q=f,n=[n>>>0,g],v=qa(q,n,a.Kb);0>v&&q.splice(-(v+1),0,n)}p&&(l.a=p.replace(/''/g,'"'))}a.H.push({Id:b,w:c,wc:d,Da:e,Jb:f})}delete this.Da}return!0};Ze.prototype.Ba=function(){return!0}; +function $e(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.xb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Da=l.symbols;if(!a.f.length){m("Empty ROM: "+ +b);return}if(1==a.f.length){m(a.f[0]);return}}catch(n){a.na("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.Y].wb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c>> +e.Y;0>>=e.Y;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Xa)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.xb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ca=function(a,b){if(!b)if(this.Tb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.Ba=function(a){return a?this.save():!0};h.reset=function(){ff(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return ff(this)};function ff(a){a.U=0;a.f=0;a.g=128;a.C=[];return!0}h.Db=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.W||8,c=a-this.H%a,this.W&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;Rb(this.b,100,4,52,this.N)}};var gf={},ef=(gf[65392]=[null,null,W.prototype.Pc,W.prototype.rd,"RCSR"],gf[65394]=[null,null,W.prototype.Oc,W.prototype.qd,"RBUF"],gf[65396]=[null,null,W.prototype.bd,W.prototype.Fd,"XCSR"],gf[65398]=[null,null,W.prototype.ad,W.prototype.Ed,"XBUF"],gf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};hf.prototype.Pb=function(){return-1};hf.prototype.Qb=function(){}; +function kf(a,b,c,d){if(c)if(b){0>a.C&&a.A.length&&(a.C=0);if(0>a.C||b!=a.A[a.C])a.A.splice(0,0,b),a.C=0;a.C--}else a.X?b="end":b=a.A[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(oa(b.substring(c,f))),c=f+1}}return a} +function lf(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 lf(a,b,c){var d;if(b){b=mf(a,b);for(var e=0,f=!1,g=b,l=[],n=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function pf(a,b){if(b)return of(a,b,a.ca[b]);var c=0;for(b in a.ca)of(a,b,a.ca[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function qf(a,b){if(b)return pf(a,b,a.ca[b]);var c=0;for(b in a.ca)pf(a,b,a.ca[b]),c++;return 0>>d.B.Z;n=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;n--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=Kb[c],q&&d.i(k(q.id,8)+" %"+k(e<>>c.Z].Cb(d&c.f,d),this.g--,b&&zf(a,b));return c};h.ma=function(a,b){var c=65535,d=Y(a);-1!==d&&(this.g++,c=Lb(this.B,d),this.g--,b&&zf(a,b));return c}; -h.ob=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.X[(d&e.g)>>>e.Z].wb(d&e.f,b&255,d);this.g--;c&&zf(a,c);M(this.b,!0)}};h.Xa=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.X[(d&e.g)>>>e.Z].Jb(d&e.f,b&65535,d);this.g--;c&&zf(a,c);M(this.b,!0)}};function X(a){return{w:a,Aa:!1}}function Af(a){return[a.w,a.Aa]}function Bf(a){return{w:a[0],Aa:a[1]}} -function yf(a,b,c){var d;c=(c?a.M:a.Qa).w;if(void 0!==b){d=b=mf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Qb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ha[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Ub(this.b)));return b}; -h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,X(this.b.u[7]).w)),this.ha&1073741824?this.qa.push(a):this.oa&&a==this.oa||(this.oa=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.ka=0,M(a))))}; -function sf(a){var b;if(Ad(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.Z],!1)}a.N=["br"];if(a.G)for(b=1;b>>d.Z],!0);a.G=["bw"];a.Ra=0} -h.Sa=function(a,b,c){var d=!0;c||If(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.i("invalid address: "+I(this,b.w)),d=!1;else{var f=this.B;f.X[e>>>f.Z].Sa(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Aa=!0:(Jf(this,a,a.length-1,"set"),sf(this)));return d};function If(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Z],b==a.G));l.Aa||sf(a);break}}return f} -function Kf(a,b){for(var c=1;c>23)&65535,x=I(w,u);else if(8192==C)u=u.w-((f&63)<<1)&65535,x=I(w,u);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Df(B);break;case 8:x="@"+Df(B);break;case 16:7>B?x="("+Df(B)+ -")+":(C=w.ma(u,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Df(B)+")+":(C=w.ma(u,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Df(B)+")";break;case 40:x="@-("+Df(B)+")";break;case 48:C=w.ma(u,2);x=I(w,C,0,!0)+"("+Df(B)+")";7==B&&(x=[x,I(w,C+u.w&65535)]);break;case 56:C=w.ma(u,2),x="@"+I(w,C)+"("+Df(B)+")",7==B&&(x=[x,I(w,C+u.w&65535)])}w=x;if(!w||!w.length){l="INVALID";break}"string"!=typeof w&&(n=w[1],w=w[0]);0b?(c=Df(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Ha[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.ta[b-16]):20==b&&(c="PS="+I(a,Ub(d)));c&&(c+=" ");return c}function Pf(a){var b,c="";for(b=0;6>b;b++)c+=Of(a,b);c=c+"\n"+(Of(a,6)+Of(a,7)+Of(a,20));return c+=Nf(a,"T")+Nf(a,"N")+Nf(a,"Z")+Nf(a,"V")+Nf(a,"C")}h.Lb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Pf(a));c&&(a.M=X(d.u[7]),Gf(a,I(a,a.M.w)))}}function Uf(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=Mf(a,b,g,f);a.i(f);a.M=b;e-=b.w-n;c++}}} -function Lf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.W&&(a.i("ended assemble at "+I(a,a.V.w)),a.M=a.V,a.W=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(hb(a)&&0q||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].w?(Z=ca+Z,ca=0):ca+=ja.length);var Mc=[];"call"==ye&&(jb=1E5,Mc=["CALL"]);for(void 0!==xe&&a.i(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Za=Z;Ae++;jb--}}Ae||(a.i("no "+ze+"history available"),a.Za=void 0)}else{var Xb=yf(a,ia);if(Xb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ng),Yb=nf(a,za)>>>0,65536>4||1;pg--&&0ac?String.fromCharCode(ac):".";Zb--}lb&&(lb+="\n");lb+=ia+" "+Oc+(0==nb?" "+De:"")}lb&&a.i(lb);a.Qa=Xb}}}}break;case "e":if("else"==g[0])break;var Ra,Pc,Qc,Rc,Sc=g[0],Tc=g[1];"eb"==Sc?(Ra=1,Pc=255,Qc=a.Ua,Rc=a.ob):"e"==Sc||"ew"==Sc?(Ra=2,Pc=65535,Qc=a.ma,Rc=a.Xa):Tc=null;if(null==Tc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var bc=yf(a,Tc);if(bc)for(var cc=2;ccWc;){for(var Aa=null,tg=256;65536>qb.w>>>0;){Xc.w=a.ma(qb,2);if(null==qb.w||!tg--)break;if(!(Xc.w&1)){for(var ug=a,dc=Xc,Fe=null,rb=dc.w,Ge=rb,Yc=1;6>=Yc&& -rb;Yc++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bZf){if(ag(d,this.I)){this.C=new N(this,"1.30.1","failsafe");ag(this.C)&&(fg(this,d),a=2,gg(this.C));this.C.set("timestamp",sa());hg(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=eg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ag(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),gg(d),ag(d)?(c=eg(d),e=!0):c=!1))}e&&dg(this,c?d:null)}else 2==a&&d.clear()}else dg(this);delete this.I;delete this.L}e=bb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(ig(this,this.b,b,c,a),this.b.hb());this.T&&(fg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; -function fg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function Wf(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ba&&(c&&a.b.ea(),d=a.b.Ba(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=bb(a.id),n=0;n>>d.B.Y;n=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;n--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=Lb[c],q&&d.i(k(q.id,8)+" %"+k(e<>>c.Y].Bb(d&c.f,d),this.g--,b&&Af(a,b));return c};h.ma=function(a,b){var c=65535,d=Y(a);-1!==d&&(this.g++,c=Mb(this.B,d),this.g--,b&&Af(a,b));return c}; +h.mb=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.P[(d&e.g)>>>e.Y].wb(d&e.f,b&255,d);this.g--;c&&Af(a,c);M(this.b,!0)}};h.Wa=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.P[(d&e.g)>>>e.Y].Ib(d&e.f,b&65535,d);this.g--;c&&Af(a,c);M(this.b,!0)}};function X(a){return{w:a,Aa:!1}}function Bf(a){return[a.w,a.Aa]}function Cf(a){return{w:a[0],Aa:a[1]}} +function zf(a,b,c){var d;c=(c?a.M:a.Ra).w;if(void 0!==b){d=b=nf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Qb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ha[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Vb(this.b)));return b}; +h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,X(this.b.u[7]).w)),this.ha&1073741824?this.wa.push(a):this.oa&&a==this.oa||(this.oa=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.ka=0,M(a))))}; +function tf(a){var b;if(Bd(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.Y],!1)}a.N=["br"];if(a.G)for(b=1;b>>d.Y],!0);a.G=["bw"];a.Ya=0} +h.Sa=function(a,b,c){var d=!0;c||Jf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.i("invalid address: "+I(this,b.w)),d=!1;else{var f=this.B;f.P[e>>>f.Y].Sa(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Aa=!0:(Kf(this,a,a.length-1,"set"),tf(this)));return d};function Jf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Y],b==a.G));l.Aa||tf(a);break}}return f} +function Lf(a,b){for(var c=1;c>23)&65535,x=I(w,u);else if(8192==C)u=u.w-((f&63)<<1)&65535,x=I(w,u);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Ef(B);break;case 8:x="@"+Ef(B);break;case 16:7>B?x="("+Ef(B)+ +")+":(C=w.ma(u,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Ef(B)+")+":(C=w.ma(u,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Ef(B)+")";break;case 40:x="@-("+Ef(B)+")";break;case 48:C=w.ma(u,2);x=I(w,C,0,!0)+"("+Ef(B)+")";7==B&&(x=[x,I(w,C+u.w&65535)]);break;case 56:C=w.ma(u,2),x="@"+I(w,C)+"("+Ef(B)+")",7==B&&(x=[x,I(w,C+u.w&65535)])}w=x;if(!w||!w.length){l="INVALID";break}"string"!=typeof w&&(n=w[1],w=w[0]);0b?(c=Ef(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Ha[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.ta[b-16]):20==b&&(c="PS="+I(a,Vb(d)));c&&(c+=" ");return c}function Qf(a){var b,c="";for(b=0;6>b;b++)c+=Pf(a,b);c=c+"\n"+(Pf(a,6)+Pf(a,7)+Pf(a,20));return c+=Of(a,"T")+Of(a,"N")+Of(a,"Z")+Of(a,"V")+Of(a,"C")}h.Kb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.wc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Qf(a));c&&(a.M=X(d.u[7]),Hf(a,I(a,a.M.w)))}}function Vf(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=Nf(a,b,g,f);a.i(f);a.M=b;e-=b.w-n;c++}}} +function Mf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.X&&(a.i("ended assemble at "+I(a,a.W.w)),a.M=a.W,a.X=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(hb(a)&&0q||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].w?(Z=ca+Z,ca=0):ca+=ja.length);var Pc=[];"call"==ye&&(jb=1E5,Pc=["CALL"]);for(void 0!==xe&&a.i(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Za=Z;Ae++;jb--}}Ae||(a.i("no "+ze+"history available"),a.Za=void 0)}else{var Yb=zf(a,ia);if(Yb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||og),Zb=of(a,za)>>>0,65536>4||1;qg--&&0<$b;){var ac=0,Qc=0,nb,Rc="",De="",ia=I(a,Yb.w);for(nb=4==mb?16:a.ia;0bc?String.fromCharCode(bc):".";$b--}lb&&(lb+="\n");lb+=ia+" "+Rc+(0==nb?" "+De:"")}lb&&a.i(lb);a.Ra=Yb}}}}break;case "e":if("else"==g[0])break;var Ra,Sc,Tc,Uc,Vc=g[0],Wc=g[1];"eb"==Vc?(Ra=1,Sc=255,Tc=a.Ua,Uc=a.mb):"e"==Vc||"ew"==Vc?(Ra=2,Sc=65535,Tc=a.ma,Uc=a.Wa):Wc=null;if(null==Wc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=zf(a,Wc);if(cc)for(var dc=2;dcZc;){for(var Aa=null,ug=256;65536>qb.w>>>0;){$c.w=a.ma(qb,2);if(null==qb.w||!ug--)break;if(!($c.w&1)){for(var vg=a,ec=$c,Fe=null,rb=ec.w,Ge=rb,ad=1;6>=ad&& +rb;ad++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b$f){if(bg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");bg(this.C)&&(gg(this,d),a=2,hg(this.C));this.C.set("timestamp",sa());ig(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=fg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?bg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),hg(d),bg(d)?(c=fg(d),e=!0):c=!1))}e&&eg(this,c?d:null)}else 2==a&&d.clear()}else eg(this);delete this.I;delete this.L}e=bb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(jg(this,this.b,b,c,a),this.b.gb());this.U&&(gg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; +function gg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function Xf(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ba&&(c&&a.b.ea(),d=a.b.Ba(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=bb(a.id),n=0;nf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(g=g.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Ag(a,b,c)}})}else c(a,null)} -function Bg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);n&&(--mg||Sa(!0));n=!1}var g,l,n=!0;mg++;$a[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?yg(c,null,null,!1,e,function(d,n){n?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(g.outerHTML=n,--mg||Sa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(n,g),--mg||Sa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?yg(b,a,d,!0,e,p):zg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return n}window.embedPDP11=function(a,b,c,d){Sa(!1);return Bg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); +h.ja=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.F||(d.v.fa?Xf(d,!1,!0):dg(d,d.lb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.fa&&!d.F)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Xf(d,a,!0);!a&&d.N?window&&window.location.reload():d.lb($f)}else d.reset(),d.b&&d.b.gb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.J[b]= +c,c.onclick=function(){var a=ag(d,!0);if(a){var b=!!(d.f&&!d.H||d.N),c=Xf(d,b);b?kg(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function ag(a,b){var c=a.g;c||((c=Ba("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=lg(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function lg(a,b){a.g=null;b=ua(ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ca("user",b.data),a.g=b.data)}catch(d){m(d.message+" ("+c+")")}return a.g}function cg(a){var b=null;a.g&&(b=ga()+"/api/v1/user?req=load&user="+a.g+"&state="+mg(a,"1.30.1"));return b} +function kg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=mg(a,"1.30.1");d.data=c;b=ua(ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(g=g.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Bg(a,b,c)}})}else c(a,null)} +function Cg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);n&&(--ng||Sa(!0));n=!1}var g,l,n=!0;ng++;$a[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?zg(c,null,null,!1,e,function(d,n){n?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(g.outerHTML=n,--ng||Sa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(n,g),--ng||Sa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?zg(b,a,d,!0,e,p):Ag(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return n}window.embedPDP11=function(a,b,c,d){Sa(!1);return Cg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index b44677083..903f8be0d 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -692,141 +692,142 @@ typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encod function p(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} function va(a){if(ta)try{for(var b=0;bb?this.Fa=this.id:(this.Va=this.id.substr(0,b),this.Fa=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Oa=null;this.i.error=!1;this.w={};this.I=null;w.push(this)}var ya=void 0,za={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.jb=b.comment;this.Nb=b;b=this.id.indexOf(".");0>b?this.Da=this.id:(this.Ua=this.id.substr(0,b),this.Da=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Ma=null;this.i.error=!1;this.w={};this.I=null;w.push(this)}var ya=void 0,za={}; if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Aa=Da.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ca," "))]=decodeURIComponent(Aa[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.o=this.g-1;this.s=this.l/this.g|0;this.la=[];this.m=[];a=new E(this.b);Na(a,this.I);this.a=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.la[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;F(d.b,4)}function Pa(a,b,c){var d=!1,e=this.controller,f=e.la[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.la[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||F(e.b,4)} -function Qa(a,b){var c=-1,d=this.controller;(a=d.la[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;F(d.b,4)}function Ra(a,b,c){var d=!1,e=this.controller;if(a=e.la[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||F(e.b,4)}Ma.prototype.reset=function(){for(var a=0;a>>a.c;0k&&(t=k);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+k<=n.Aa)return n.Qa+=n.Aa-f,n.Aa=f,!0;if(f>=n.Aa+n.Qa){t=n.size-(f-q);t>k&&(t=k);n.Qa=f-n.Aa+t;f=q+a.g;k-=t;m++;continue}}return Ua(1,f,k)}f=new E(a.b,f,t,a.g,d,e);Na(f,a.I,n);a.a[m++]=f;f=q+a.g;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+Va[d]+" at "+h(b,8,!0)),!0):Ua(2,b,c)} -function Wa(a,b){return a.a[(b&a.h)>>>a.c].$a(b&a.o,b)}function Xa(a,b){return a.a[(b&a.h)>>>a.c].nc(b&a.o,b)}function Ya(a,b,c){a.a[(b&a.h)>>>a.c].Sc(b&a.o,c&65535,b)}function Za(a){for(var b=0,c=[],d=0;da.b.Mb))for(var f=e[0]?e[0].bind(b):null,k=e[1]?e[1].bind(b):null,m=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,q=a,t=+d,e=e[4],J=+d;J<=t;J+=2){var Ba=J&8191;void 0!==q.la[Ba]?p("I/O address already registered: "+h(J,8,!0)):q.la[Ba]=[f,k,m,n,e||"unknown",!1]}}}function ab(a,b){a.m.push(b)}function Ua(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1} -function G(a){v.call(this,"Device",a,G);this.c={data:0,Xc:0,Pa:20,ad:0};this.a={$c:0,eb:-1}}x(G);g=G.prototype;g.oa=function(a,b,c,d){this.o=b;this.b=c;this.I=d;var e=this;this.a.eb=bb(this.b,function(){e.a.pa|=128;e.a.pa&64&&(cb(e.b,0,6,64),db(e.b,e.a.eb,1E3/60))});$a(b,this,H);ab(b,this.reset.bind(this));D(this)};g.Ub=function(){var a=this.a.pa;this.a.pa&=-129;return a};g.Ac=function(a){this.a.pa=a;a&64&&db(this.b,this.a.eb,1E3/60);this.a.pa=a&-129}; -g.Wb=function(){var a=this.b;return a.D&62337|a.Ga<<5|a.Ha<<1};g.Cc=function(a){var b=this.b;b.D=a&=62337;b.Ga=a>>5&3;b.Ha=a>>1&15;b.Za=a&257?a&1?6:4:0;eb(b);fb(this)};g.Xb=function(){var a=this.b.qa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Yb=function(){return this.b.bb};g.Zb=function(){return this.b.ua};g.Dc=function(a){var b=this.b;b.ua=a;b.ua&16?(b.Xa=4194303,b.Ia=3915776):(b.Xa=262143,b.Ia=253952);fb(this)};function fb(a){a.c.Pa=a.c.Pa&-8|(a.b.Za?a.b.ua&16?1:2:4)} -g.gc=function(a){return this.b.C[1][a>>1&7]};g.Lc=function(a,b){this.b.C[1][b>>1&7]=a&65295};g.ec=function(a){return this.b.C[1][(a>>1&7)+8]};g.Jc=function(a,b){this.b.C[1][(b>>1&7)+8]=a&65295};g.fc=function(a){return this.b.P[1][a>>1&7]};g.Kc=function(a,b){b=b>>1&7;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.dc=function(a){return this.b.P[1][(a>>1&7)+8]};g.Ic=function(a,b){b=(b>>1&7)+8;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.Tb=function(a){return this.b.C[0][a>>1&7]}; -g.zc=function(a,b){this.b.C[0][b>>1&7]=a&65295};g.Rb=function(a){return this.b.C[0][(a>>1&7)+8]};g.xc=function(a,b){this.b.C[0][(b>>1&7)+8]=a&65295};g.Sb=function(a){return this.b.P[0][a>>1&7]};g.yc=function(a,b){b=b>>1&7;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.Qb=function(a){return this.b.P[0][(a>>1&7)+8]};g.wc=function(a,b){b=(b>>1&7)+8;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.mc=function(a){return this.b.C[3][a>>1&7]};g.Rc=function(a,b){this.b.C[3][b>>1&7]=a&65295}; -g.kc=function(a){return this.b.C[3][(a>>1&7)+8]};g.Pc=function(a,b){this.b.C[3][(b>>1&7)+8]=a&65295};g.lc=function(a){return this.b.P[3][a>>1&7]};g.Qc=function(a,b){b=b>>1&7;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.jc=function(a){return this.b.P[3][(a>>1&7)+8]};g.Oc=function(a,b){b=(b>>1&7)+8;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.T=function(a){a&=7;return this.b.v&2048?this.b.va[a]:this.b.f[a]};g.W=function(a,b){b&=7;this.b.v&2048?this.b.va[b]=a:this.b.f[b]=a}; -g.qb=function(){return this.b.v&49152?this.b.Z[0]:this.b.f[6]};g.Cb=function(a){this.b.v&49152?this.b.Z[0]=a:this.b.f[6]=a};g.tb=function(){return this.b.f[7]};g.Fb=function(a){this.b.f[7]=a};g.U=function(a){a&=7;return this.b.v&2048?this.b.f[a]:this.b.va[a]};g.X=function(a,b){b&=7;this.b.v&2048?this.b.f[b]=a:this.b.va[b]=a};g.rb=function(){return 1==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[1]};g.Db=function(a){1==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[1]=a}; -g.sb=function(){return 3==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[3]};g.Eb=function(a){3==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[3]=a};g.Pb=function(a){return this.b.xb[a-65504>>1]};g.vc=function(a,b){this.b.xb[b-65504>>1]=a};g.ub=function(a){return 65520==a?61183:0};g.Gb=function(){};g.ic=function(){return 1};g.Nc=function(){};g.Ob=function(){return this.b.F};g.uc=function(){this.b.F=0};g.Vb=function(){return this.b.wb};g.Bc=function(a,b){b&1||(a&=255);this.b.wb=a};g.$b=function(){return this.b.cb}; -g.Ec=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.cb=a;b.j|=2};g.hc=function(){return this.b.ra&65280};g.Mc=function(a){this.b.ra=a|255};g.ac=function(){return gb(this.b)};g.Fc=function(a){hb(this.b,a&-1809|gb(this.b)&1808);this.b.j|=128};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.a.pa=0}; -var I={},H=(I[62592]=[null,null,G.prototype.gc,G.prototype.Lc,"SISDR"],I[62608]=[null,null,G.prototype.ec,G.prototype.Jc,"SDSDR"],I[62624]=[null,null,G.prototype.fc,G.prototype.Kc,"SISAR"],I[62640]=[null,null,G.prototype.dc,G.prototype.Ic,"SDSAR"],I[62656]=[null,null,G.prototype.Tb,G.prototype.zc,"KISDR"],I[62672]=[null,null,G.prototype.Rb,G.prototype.xc,"KDSDR"],I[62688]=[null,null,G.prototype.Sb,G.prototype.yc,"KISAR"],I[62704]=[null,null,G.prototype.Qb,G.prototype.wc,"KDSAR"],I[62798]=[null,null, -G.prototype.Zb,G.prototype.Dc,"MMR3"],I[65382]=[null,null,G.prototype.Ub,G.prototype.Ac,"LKS"],I[65402]=[null,null,G.prototype.Wb,G.prototype.Cc,"MMR0"],I[65404]=[null,null,G.prototype.Xb,null,"MMR1"],I[65406]=[null,null,G.prototype.Yb,null,"MMR2"],I[65408]=[null,null,G.prototype.mc,G.prototype.Rc,"UISDR"],I[65424]=[null,null,G.prototype.kc,G.prototype.Pc,"UDSDR"],I[65440]=[null,null,G.prototype.lc,G.prototype.Qc,"UISAR"],I[65456]=[null,null,G.prototype.jc,G.prototype.Oc,"UDSAR"],I[65472]=[G.prototype.T, -G.prototype.W,G.prototype.T,G.prototype.W,"R0SET0"],I[65473]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R1SET0"],I[65474]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R2SET0"],I[65475]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R3SET0"],I[65476]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R4SET0"],I[65477]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R5SET0"],I[65478]=[G.prototype.qb,G.prototype.Cb,G.prototype.qb,G.prototype.Cb, -"R6KERNEL"],I[65479]=[G.prototype.tb,G.prototype.Fb,G.prototype.tb,G.prototype.Fb,"R7KERNEL"],I[65480]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R0SET1"],I[65481]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R1SET1"],I[65482]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R2SET1"],I[65483]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R3SET1"],I[65484]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R4SET1"],I[65485]=[G.prototype.U,G.prototype.X, -G.prototype.U,G.prototype.X,"R5SET1"],I[65486]=[G.prototype.rb,G.prototype.Db,G.prototype.rb,G.prototype.Db,"R6SUPER"],I[65487]=[G.prototype.sb,G.prototype.Eb,G.prototype.sb,G.prototype.Eb,"R6USER"],I[65504]=[null,null,G.prototype.Pb,G.prototype.vc,"CTRL",1170],I[65520]=[null,null,G.prototype.ub,G.prototype.Gb,"LSIZE",1170],I[65522]=[null,null,G.prototype.ub,G.prototype.Gb,"HSIZE",1170],I[65524]=[null,null,G.prototype.ic,G.prototype.Nc,"SYSID",1170],I[65526]=[null,null,G.prototype.Ob,G.prototype.uc, -"CPUERR",1170],I[65528]=[null,null,G.prototype.Vb,G.prototype.Bc,"MB",1170],I[65530]=[null,null,G.prototype.$b,G.prototype.Ec,"PIR"],I[65532]=[null,null,G.prototype.hc,G.prototype.Mc,"SL"],I[65534]=[null,null,G.prototype.ac,G.prototype.Fc,"PSW"],I);H[62594]=H[62592];H[62596]=H[62592];H[62598]=H[62592];H[62600]=H[62592];H[62602]=H[62592];H[62604]=H[62592];H[62606]=H[62592];H[62610]=H[62608];H[62612]=H[62608];H[62614]=H[62608];H[62616]=H[62608];H[62618]=H[62608];H[62620]=H[62608];H[62622]=H[62608]; +g.R=function(a,b,c,d){return this.B&&this.B.R(a,b,c,d)||this.b&&this.b.R(a,b,c,d)?!0:this.parent.R.call(this,a,b,c,d)};g.oa=function(a,b,c,d){this.B=a;this.m=b;this.b=c;this.I=d};g.ha=function(a,b){b||La();return!0};g.ga=function(){return!0};g.wa=function(){};function La(){for(var a=!1,b=C(document,"pdp11","panel"),c=0;c>1)+2;10>this.c&&(this.c=10);15>2;this.m=this.g-1;this.s=this.B/this.g|0;this.la=[];this.o=[];this.Gb=[Na,Oa,Pa,Qa];a=new E(this.b);Ra(a,this.I);this.a=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.la[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;F(d.b,4)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.la[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.la[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||F(e.b,4)} +function Pa(a,b){var c=-1,d=this.controller;(a=d.la[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;F(d.b,4)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.la[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||F(e.b,4)} +function Sa(a,b){if(b!=a.l){var c;if(a.l){c=(1<>>a.c;0>>a.c;0k&&(t=k);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+k<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>k&&(t=k);n.Pa=f-n.za+t;f=q+a.g;k-=t;m++;continue}}return Ta(1,f,k)}f=new E(a.b,f,t,a.g,d,e);Ra(f,a.I,n);a.a[m++]=f;f=q+a.g;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+Wa[d]+" at "+h(b,8,!0)),!0):Ta(2,b,c)} +function Xa(a,b){return a.a[(b&a.h)>>>a.c].Ya(b&a.m,b)}function Ya(a,b){return a.a[(b&a.h)>>>a.c].oc(b&a.m,b)}function Za(a,b,c){a.a[(b&a.h)>>>a.c].Sc(b&a.m,c&65535,b)}function $a(a){for(var b=0,c=[],d=0;da.b.Mb))for(var f=e[0]?e[0].bind(b):null,k=e[1]?e[1].bind(b):null,m=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,q=a,t=+d,e=e[4],J=+d;J<=t;J+=2){var Ba=J&8191;void 0!==q.la[Ba]?p("I/O address already registered: "+h(J,8,!0)):q.la[Ba]=[f,k,m,n,e||"unknown",!1]}}}function bb(a,b){a.o.push(b)}function Ta(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1} +function G(a){v.call(this,"Device",a,G);this.c={data:0,Xc:0,Na:20,ad:0};this.a={$c:0,bb:-1}}x(G);g=G.prototype;g.oa=function(a,b,c,d){this.m=b;this.b=c;this.I=d;var e=this;this.a.bb=cb(this.b,function(){e.a.pa|=128;e.a.pa&64&&(db(e.b,0,6,64),eb(e.b,e.a.bb,1E3/60))});ab(b,this,H);bb(b,this.reset.bind(this));D(this)};g.Vb=function(){var a=this.a.pa;this.a.pa&=-129;return a};g.Ac=function(a){this.a.pa=a;a&64&&eb(this.b,this.a.bb,1E3/60);this.a.pa=a&-129}; +g.Xb=function(){var a=this.b;return a.D&62337|a.Ea<<5|a.Fa<<1};g.Cc=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.Ea=a>>5&3;b.Fa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Oa!=c&&(b.Oa=c,fb(b))}gb(this)};g.Yb=function(){var a=this.b.qa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Zb=function(){return this.b.$a};g.$b=function(){return this.b.ra};g.Dc=function(a){var b=this.b;b.ra!=a&&(b.ra=a,a&16?(b.Wa=4194303,b.Ga=3915776):(b.Wa=262143,b.Ga=253952),fb(b));gb(this)}; +function gb(a){a.c.Na=a.c.Na&-8|(a.b.Oa?a.b.ra&16?1:2:4)}g.hc=function(a){return this.b.C[1][a>>1&7]};g.Lc=function(a,b){this.b.C[1][b>>1&7]=a&65295};g.fc=function(a){return this.b.C[1][(a>>1&7)+8]};g.Jc=function(a,b){this.b.C[1][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.b.P[1][a>>1&7]};g.Kc=function(a,b){b=b>>1&7;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.ec=function(a){return this.b.P[1][(a>>1&7)+8]};g.Ic=function(a,b){b=(b>>1&7)+8;this.b.P[1][b]=a;this.b.C[1][b]&=65295}; +g.Ub=function(a){return this.b.C[0][a>>1&7]};g.zc=function(a,b){this.b.C[0][b>>1&7]=a&65295};g.Sb=function(a){return this.b.C[0][(a>>1&7)+8]};g.xc=function(a,b){this.b.C[0][(b>>1&7)+8]=a&65295};g.Tb=function(a){return this.b.P[0][a>>1&7]};g.yc=function(a,b){b=b>>1&7;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.Rb=function(a){return this.b.P[0][(a>>1&7)+8]};g.wc=function(a,b){b=(b>>1&7)+8;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.nc=function(a){return this.b.C[3][a>>1&7]}; +g.Rc=function(a,b){this.b.C[3][b>>1&7]=a&65295};g.lc=function(a){return this.b.C[3][(a>>1&7)+8]};g.Pc=function(a,b){this.b.C[3][(b>>1&7)+8]=a&65295};g.mc=function(a){return this.b.P[3][a>>1&7]};g.Qc=function(a,b){b=b>>1&7;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.kc=function(a){return this.b.P[3][(a>>1&7)+8]};g.Oc=function(a,b){b=(b>>1&7)+8;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.T=function(a){a&=7;return this.b.v&2048?this.b.va[a]:this.b.f[a]}; +g.W=function(a,b){b&=7;this.b.v&2048?this.b.va[b]=a:this.b.f[b]=a};g.pb=function(){return this.b.v&49152?this.b.Z[0]:this.b.f[6]};g.Bb=function(a){this.b.v&49152?this.b.Z[0]=a:this.b.f[6]=a};g.sb=function(){return this.b.f[7]};g.Eb=function(a){this.b.f[7]=a};g.U=function(a){a&=7;return this.b.v&2048?this.b.f[a]:this.b.va[a]};g.X=function(a,b){b&=7;this.b.v&2048?this.b.f[b]=a:this.b.va[b]=a};g.qb=function(){return 1==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[1]}; +g.Cb=function(a){1==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[1]=a};g.rb=function(){return 3==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[3]};g.Db=function(a){3==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[3]=a};g.Qb=function(a){return this.b.wb[a-65504>>1]};g.vc=function(a,b){this.b.wb[b-65504>>1]=a};g.tb=function(a){return 65520==a?61183:0};g.Fb=function(){};g.jc=function(){return 1};g.Nc=function(){};g.Pb=function(){return this.b.F};g.uc=function(){this.b.F=0};g.Wb=function(){return this.b.vb}; +g.Bc=function(a,b){b&1||(a&=255);this.b.vb=a};g.ac=function(){return this.b.ab};g.Ec=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.ic=function(){return this.b.sa&65280};g.Mc=function(a){this.b.sa=a|255};g.bc=function(){return hb(this.b)};g.Fc=function(a){ib(this.b,a&-1809|hb(this.b)&1808);this.b.j|=128};g.reset=function(){this.c.Na=this.c.Na&-120|20;this.a.pa=0}; +var I={},H=(I[62592]=[null,null,G.prototype.hc,G.prototype.Lc,"SISDR"],I[62608]=[null,null,G.prototype.fc,G.prototype.Jc,"SDSDR"],I[62624]=[null,null,G.prototype.gc,G.prototype.Kc,"SISAR"],I[62640]=[null,null,G.prototype.ec,G.prototype.Ic,"SDSAR"],I[62656]=[null,null,G.prototype.Ub,G.prototype.zc,"KISDR"],I[62672]=[null,null,G.prototype.Sb,G.prototype.xc,"KDSDR"],I[62688]=[null,null,G.prototype.Tb,G.prototype.yc,"KISAR"],I[62704]=[null,null,G.prototype.Rb,G.prototype.wc,"KDSAR"],I[62798]=[null,null, +G.prototype.$b,G.prototype.Dc,"MMR3"],I[65382]=[null,null,G.prototype.Vb,G.prototype.Ac,"LKS"],I[65402]=[null,null,G.prototype.Xb,G.prototype.Cc,"MMR0"],I[65404]=[null,null,G.prototype.Yb,null,"MMR1"],I[65406]=[null,null,G.prototype.Zb,null,"MMR2"],I[65408]=[null,null,G.prototype.nc,G.prototype.Rc,"UISDR"],I[65424]=[null,null,G.prototype.lc,G.prototype.Pc,"UDSDR"],I[65440]=[null,null,G.prototype.mc,G.prototype.Qc,"UISAR"],I[65456]=[null,null,G.prototype.kc,G.prototype.Oc,"UDSAR"],I[65472]=[G.prototype.T, +G.prototype.W,G.prototype.T,G.prototype.W,"R0SET0"],I[65473]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R1SET0"],I[65474]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R2SET0"],I[65475]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R3SET0"],I[65476]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R4SET0"],I[65477]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R5SET0"],I[65478]=[G.prototype.pb,G.prototype.Bb,G.prototype.pb,G.prototype.Bb, +"R6KERNEL"],I[65479]=[G.prototype.sb,G.prototype.Eb,G.prototype.sb,G.prototype.Eb,"R7KERNEL"],I[65480]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R0SET1"],I[65481]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R1SET1"],I[65482]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R2SET1"],I[65483]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R3SET1"],I[65484]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R4SET1"],I[65485]=[G.prototype.U,G.prototype.X, +G.prototype.U,G.prototype.X,"R5SET1"],I[65486]=[G.prototype.qb,G.prototype.Cb,G.prototype.qb,G.prototype.Cb,"R6SUPER"],I[65487]=[G.prototype.rb,G.prototype.Db,G.prototype.rb,G.prototype.Db,"R6USER"],I[65504]=[null,null,G.prototype.Qb,G.prototype.vc,"CTRL",1170],I[65520]=[null,null,G.prototype.tb,G.prototype.Fb,"LSIZE",1170],I[65522]=[null,null,G.prototype.tb,G.prototype.Fb,"HSIZE",1170],I[65524]=[null,null,G.prototype.jc,G.prototype.Nc,"SYSID",1170],I[65526]=[null,null,G.prototype.Pb,G.prototype.uc, +"CPUERR",1170],I[65528]=[null,null,G.prototype.Wb,G.prototype.Bc,"MB",1170],I[65530]=[null,null,G.prototype.ac,G.prototype.Ec,"PIR"],I[65532]=[null,null,G.prototype.ic,G.prototype.Mc,"SL"],I[65534]=[null,null,G.prototype.bc,G.prototype.Fc,"PSW"],I);H[62594]=H[62592];H[62596]=H[62592];H[62598]=H[62592];H[62600]=H[62592];H[62602]=H[62592];H[62604]=H[62592];H[62606]=H[62592];H[62610]=H[62608];H[62612]=H[62608];H[62614]=H[62608];H[62616]=H[62608];H[62618]=H[62608];H[62620]=H[62608];H[62622]=H[62608]; H[62626]=H[62624];H[62628]=H[62624];H[62630]=H[62624];H[62632]=H[62624];H[62634]=H[62624];H[62636]=H[62624];H[62638]=H[62624];H[62642]=H[62640];H[62644]=H[62640];H[62646]=H[62640];H[62648]=H[62640];H[62650]=H[62640];H[62652]=H[62640];H[62654]=H[62640];H[62658]=H[62656];H[62660]=H[62656];H[62662]=H[62656];H[62664]=H[62656];H[62666]=H[62656];H[62668]=H[62656];H[62670]=H[62656];H[62674]=H[62672];H[62676]=H[62672];H[62678]=H[62672];H[62680]=H[62672];H[62682]=H[62672];H[62684]=H[62672];H[62686]=H[62672]; H[62690]=H[62688];H[62692]=H[62688];H[62694]=H[62688];H[62696]=H[62688];H[62698]=H[62688];H[62700]=H[62688];H[62702]=H[62688];H[62706]=H[62704];H[62708]=H[62704];H[62710]=H[62704];H[62712]=H[62704];H[62714]=H[62704];H[62716]=H[62704];H[62718]=H[62704];H[65410]=H[65408];H[65412]=H[65408];H[65414]=H[65408];H[65416]=H[65408];H[65418]=H[65408];H[65420]=H[65408];H[65422]=H[65408];H[65426]=H[65424];H[65428]=H[65424];H[65430]=H[65424];H[65432]=H[65424];H[65434]=H[65424];H[65436]=H[65424];H[65438]=H[65424]; H[65442]=H[65440];H[65444]=H[65440];H[65446]=H[65440];H[65448]=H[65440];H[65450]=H[65440];H[65452]=H[65440];H[65454]=H[65440];H[65458]=H[65456];H[65460]=H[65456];H[65462]=H[65456];H[65464]=H[65456];H[65466]=H[65456];H[65468]=H[65456];H[65470]=H[65456];H[65506]=H[65504];H[65508]=H[65504];H[65510]=H[65504];H[65512]=H[65504];H[65514]=H[65504];H[65516]=H[65504];H[65518]=H[65504]; -u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.g,0,d>>2),ob(this,kb?pb:qb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a){a&1&&F(this.b,4);var 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},ea: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.ma=!0},G:function(a,b){return this.H(a, -b)},S:function(a,b){return this.Y(a,b)},ca:function(a,b,c){this.h||this.Bb(a,b,c)},ja:function(a,b,c){this.h||this.ka(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},O:function(a){a&1&&F(this.b,4);return this.o.getUint16(a,!0)},$:function(a){a&1&&F(this.b,4);return a&1?this.c[a]|this.c[a+1]<<8:this.m[a>>1]},ba:function(a,b){this.c[a]=b;this.ma=!0},da:function(a,b){this.c[a]=b;this.ma=!0},ia:function(a,b){a&1&&F(this.b,4);this.o.setUint16(a,b,!0);this.ma=!0},sa:function(a,b){a& -1&&F(this.b,4);a&1?(this.c[a]=b,this.c[a+1]=b>>8):this.m[a>>1]=b;this.ma=!0}};function Na(a,b,c){a.I=b;a.w=a.l=0;c&&((a.w=c.w)&&sb(a,tb,!1),(a.l=c.l)&&ub(a,tb,!1))}function ub(a,b,c){c&&a.l||(a.Ra=!a.h&&b[1]||a.A,a.Sc=!a.h&&b[3]||a.B);if(c||void 0===c)a.Bb=b[1]||a.A,a.ka=b[3]||a.B}function sb(a,b,c){c&&a.w||(a.$a=b[0]||a.s,a.nc=b[2]||a.u);if(c||void 0===c)a.H=b[0]||a.s,a.Y=b[2]||a.u}function ob(a,b){b||(b=vb);sb(a,b,void 0);ub(a,b,void 0)} -var vb=[],rb=[E.prototype.N,E.prototype.ea,E.prototype.aa,E.prototype.ta],tb=[E.prototype.G,E.prototype.ca,E.prototype.S,E.prototype.ja];if(Ja)var qb=[E.prototype.D,E.prototype.ba,E.prototype.O,E.prototype.ia],pb=[E.prototype.J,E.prototype.da,E.prototype.$,E.prototype.sa]; -function wb(a,b){v.call(this,"CPU",a,wb);var c=a.multiplier||1;this.La=a.cycles||b;this.da=c;this.Wa=Math.round(this.La/1E4)/100;this.ia=this.Wa*this.da;this.i.V=!1;this.i.yb=!1;this.i.Ca=a.autoStart;this.i.fb=!1;this.i.Ma=!1;this.Ja=this.ja=0;this.Ka=a.csStart;this.ta=a.csInterval;this.xa=a.csStop;this.J=[];this.nb=this.rc.bind(this);D(this)}x(wb);var xb=["power","reset"];g=wb.prototype; -g.oa=function(a,b,c,d){this.A=a;this.o=b;this.I=d;for(b=0;b>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -g.R=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.i.L)a=!0;else{var b=null,c,m=y(a.id);for(c=0;ca.aa/a.ia&&(b=1),a.da=b,b=a.Wa*a.da,a.ia!=b)){a.ia=b;b=a.ia.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Eb(a,a.Y);a.Y=0;a.S=ja();a.ba=0;Fb(a)}function bb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function db(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.La*a.da/1E3,a.J[b][0]=c)} -g.rc=function(){if(this.i.V){this.Ya>=this.La&&Fb(this,!0);this.za=0;this.Ea=ja();if(this.ba){var a=this.Ea-this.ba;a>this.lb&&(this.S+=a,this.S>this.Ea&&(this.S=this.Ea))}try{do{for(var b,c=this.i.Ma?1:this.Na,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(q){if("number"!=typeof q)throw q;}for(var f=this.ca-this.a,a=f,k=this.J.length-1;0<=k;k--){var m=this.J[k];0>m[0]||(m[0]-=a,0>=m[0]&&(m[0]=-1,m[1]()))}this.za+=f;this.Y+=f;Eb(this,0,!0);a=f;if(this.i.Ma){var n= -!1;this.Ja=this.Ja+this.hb()|0;this.ja-=a;0>=this.ja&&(this.ja+=this.ta,n=!0);0<=this.xa&&this.xa<=Gb(this)&&(this.ta=this.xa=-1,Ab(this),L(this),n=!0);n&&this.M(Gb(this)+" cycles: checksum="+h(this.Ja))}this.ya-=f;if(0>=this.ya){this.ya+=this.Na;15<=++this.mb&&(this.A&&this.A.wa(),this.mb=0);break}}while(this.i.V)}catch(q){L(this);Bb(this);this.A&&this.A.stop(ja(),Gb(this));b=q.stack||q.message;this.i.error=!0;this.K(b);return}if(this.i.V){b=setTimeout;c=this.nb;this.ba=ja();d=this.lb;this.za&&(d= -Math.round(d*this.za/this.Na));d-=this.ba-this.Ea;if(e=this.ba-this.S)this.aa=Math.round(this.Y/(10*e))/100,864E5<=e&&(this.ea=0,Db(this));if(0>d||this.aad&&(this.S-=d),d=0;this.Ya+=this.za;this.ba+=d;b(c,d)}}};function Cb(a){var b;a.i.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.V)a.M(a.toString()+" busy");else{Db(a);a.i.V=!0;a.i.yb=!0;a.sa&&a.sa.start();if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.S,Gb(a));Bb(a,!0);setTimeout(a.nb,0)}}g.zb=function(){return 0}; -function L(a){if(a.i.V){a.ca-=a.a;a.a=0;Eb(a,a.Y);a.Y=0;a.i.V=!1;a.sa&&a.sa.stop();var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ja(),Gb(a));Bb(a)}a.i.complete=void 0}function Bb(a,b){a.A&&a.A.wa(b)} -function Hb(a){this.Mb=+a.model||1170;this.sc=a.resetAddr||0;wb.call(this,a,6666667);this.jb=0;this.decode=Ib.bind(this);this.m=65536;this.h=32768;this.l=65535;this.s=32768;this.v=15;this.f=[0,0,0,0,0,0,0,this.sc];this.va=[0,0,0,0,0,0];this.Z=[0,0,0,0];this.Ha=this.B=0;this.Lb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.tc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.xb=[0,0,0,0,0,0,0,0];this.g=this.c=this.Ua=this.G=this.H=this.j=this.wb=0;this.ka=-1;Jb(this);this.i.complete=this.i.Hb=!1}x(Hb,wb);g=Hb.prototype;g.reset=function(){this.i.V&&L(this);Jb(this);zb(this);this.i.error=!1;this.parent.reset.call(this)}; -function Jb(a){a.ra=255;a.F=0;a.cb=0;a.D=0;a.qa=0;a.bb=0;a.ua=0;a.Za=0;a.Ga=0;a.Xa=262143;a.Ia=253952;a.u=[];a.j|=2;eb(a)}function eb(a){a.Za?(a.$=65536,a.N=a.Kb,a.O=a.vb,a.ob=a.Uc):(a.$=0,a.N=a.Jb,a.O=a.oc,a.ob=a.Tc)}g.hb=function(){return 0};g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ea,this.da]);a.set(2,Za(this.o));return a.data()}; -g.restore=function(a){var b=a[1];this.ea=b[1];Db(this,b[3]);a:{b=this.o;a=a[2];var c;for(c=0;cb){a.u[f].fa-=b;break}b-=a.u[f].fa}a.u.splice(f+1,0,{fa:b,pb:c<<5&224,Ab:d,Sa:e})}a.j|=2}function gb(a){return a.v=a.v&63728|a.na()|(a.l&65535?0:4)|(a.h&32768?2:0)|N(a)} -function hb(a,b){a.s=b<<12;a.l=~b&4;a.h=b<<14;a.m=b<<16;if((b^a.v)&2048)for(var c=a.va.length;0<=--c;){var d=a.f[c];a.f[c]=a.va[c];a.va[c]=d}a.B=b>>14&3;c=a.v>>14&3;a.B!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.B]);a.j|=2;a.v=b}function O(a,b){a.j&128||(a.s=a.l=b,a.h=0)}function P(a,b,c){a.j&128||(a.s=a.l=a.m=b,a.h=c||0)}function Lb(a,b,c,d){a.j&128||(a.s=a.l=a.m=b,a.h=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.s=a.l=a.m=b,a.h=a.s^a.m>>1)}function Mb(a,b,c,d){a.j&128||(a.s=a.l=a.m=b,a.h=(c^d)&(d^b))} -function F(a,b){var c=!1;0>a.ka?a.ka=gb(a):a.B||(b=4,c=!0);a.D&57344||(a.qa=63222,a.bb=b);a.B=0;var d=a.O(b|a.$),e=a.O(b+2&65535|a.$);hb(a,e&-12289|a.ka>>2&12288);c&&(a.F|=4,a.f[6]=4);Nb(a,a.ka);Nb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ka=-1;throw b;}function Ob(a){var b=Pb(a),c=Pb(a)&-1793;a.v&49152&&(c=c&-225|a.v&63712);a.f[7]=b&65535;hb(a,c);a.j&=-17} -function Qb(a,b,c){var d,e,f,k=0;d=b>>13;a.ua&a.Lb[a.B]||(d&=7);e=a.C[a.B][d];f=(a.P[a.B][d]<<6)+(b&8191)&a.Xa;if(ff){if(3932160<=f){f&=262143;var m=f>>13&31;31>m?a.ua&32&&(f=a.tc[m]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ia&&4186112>f&&(a.F|=32,F(a,4))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192:128;break; -default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.B][d]=e;if(4194170!==f||a.B)a.Ga=a.B,a.Ha=d;k&&(k&57344&&(0<=a.ka&&(k|=128),a.D&57344||(a.D=a.D|k|a.Ga<<5|a.Ha<<1),F(a,168)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.O(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.O(e)|k;a.a-=8;break; -case 6:return e=Kb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Kb(a),e=e+a.f[c]&65535,e=a.O(e|a.$)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.D&57344||(a.qa=a.qa<<8|f<<3&248|c);6==c&&!a.B&&d&4&&0>=f&&(a.f[6]<=a.ra||65534<=a.f[6])&&(a.f[6]<=a.ra-32?(a.F|=4,a.f[6]=4,F(a,4)):(a.F|=8,a.j|=64));return e}g.Jb=function(a,b,c){return Rb(this,a,b,c)};g.Kb=function(a,b,c){return Qb(this,Rb(this,a,b,c),c)};g.oc=function(a){return Xa(this.o,a)};g.vb=function(a){return Xa(this.o,Qb(this,a,2))}; -g.Tc=function(a,b){Ya(this.o,a,b&65535)};g.Uc=function(a,b){Ya(this.o,Qb(this,a,4),b)};function Sb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?(d=Rb(a,b,d,2),c&65536||61440!==(a.v&61440)&&(d&=65535),a.B=a.v>>12&3,c=a.O(d|c&a.$),a.B=a.v>>14&3):c=6!=d||(a.v>>2&12288)===(a.v&12288)?a.f[d]:a.Z[a.v>>12&3];return c} -function Tb(a,b,c,d){a.D&57344||(a.qa=22);var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=Rb(a,b,e,4),c&65536||(e&=65535),a.B=a.v>>12&3,e=Qb(a,e|c&65536,4),a.B=a.v>>14&3,Ya(a.o,e,d)):6!=e||(a.v>>2&12288)===(a.v&12288)?a.f[e]=d:a.Z[a.v>>12&3]=d}function Ub(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.N(b,c,3),a=Wa(a.o,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?Xa(a.o,a.N(b,c,2)):a.f[c]}function Vb(a,b){var c=a.c=b&7;b=a.g=(b&56)>>3;return Rb(a,b,c,8)} -function Wb(a,b){var c=a.c=b&7;(b=a.g=(b&56)>>3)?(c=a.N(b,c,3),a=Wa(a.o,c)):a=a.f[c]&255;return a}function S(a,b){var c=a.c=b&7;return(b=a.g=(b&56)>>3)?Xa(a.o,a.N(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.Ua=a.N(b,e,7),c=d.call(a,c,Wa(a.o,e)),e&1&&a.a--,a=a.o,a.a[(e&a.h)>>>a.c].Ra(e&a.o,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.N(b,e,6),Ya(a.o,e,d.call(a,c,Xa(a.o,e)))):a.f[e]=d.call(a,c,a.f[e])} -function Xb(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.o,a.a[(d&a.h)>>>a.c].Ra(d&a.o,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Yb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?Ya(a.o,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.zb=function(a){this.i.complete=!0;this.i.Hb=!1;this.i.yb=!1;this.ca=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.cb&224,c=this.u.length;0<=--c;){if(0b&&(b=this.u[c].pb,a=this.u[c],this.u.splice(c,1))}b>(this.v&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?F(this,a.Ab):F(this,160))}else this.j&1&&this.j++;this.D&57344||(this.qa=0,this.bb=this.f[7]);this.j=this.j&7|this.v&16;this.decode(Kb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function dc(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function ec(a,b){a=b&~a;O(this,a);return a}function fc(a,b){a=b&~a;O(this,a<<8);return a}function gc(a,b){a|=b;O(this,a);return a}function hc(a,b){a|=b;O(this,a<<8);return a}function ic(a,b){a=~b|65536;P(this,a);return a&65535} -function jc(a,b){a=~b|256;P(this,a<<8);return a&255}function kc(a,b){a=b-a;this.j&128||(this.s=this.l=a,this.h=b&(b^a));return a&65535}function lc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.s=this.l=c,this.h=b&(b^c));return a&255}function mc(a,b){a=b+a;this.j&128||(this.s=this.l=a,this.h=a&(b^a));return a&65535}function nc(a,b){a=b+a;var c=a<<8;this.j&128||(this.s=this.l=c,this.h=c&(b<<8^c));return a&255}function oc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function pc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function qc(a,b){a=b<<1|this.m>>16&1;Q(this,a);return a&65535}function rc(a,b){a=b<<1|this.m>>16&1;Q(this,a<<8);return a&255}function sc(a,b){a=(this.m&65536|b)>>1|b<<16;Q(this,a);return a&65535}function tc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function uc(a,b){var c=b-a;Mb(this,c,a,b);return c&65535}function vc(a,b){var c=b-a;Mb(this,c<<8,a<<8,b<<8);return c&255} -function wc(a,b){this.j&128||(this.s=this.l=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function xc(a,b){a^=b;O(this,a);return a&65535}function yc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.l=c;this.a-=(this.g?6:7)+b} -function zc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=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.f[a|1]=d&65535;this.s=d>>16;this.l=d>>16|d;this.a-=(this.g?6:7)+b}function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.l=1);a&8&&(this.s=0);this.a-=5} -function Ac(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.l=d>>16|d,this.s=d>>16):(this.h=32768,this.l=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.l=this.s=0,this.h=32768,this.m=65536,this.a-=7}var Bc=[0,7,7,10,7,11,9,13];function Cc(a){var b=this.a;a=Vb(this,a);this.f[7]=a&65535;this.a=b-Bc[this.g]} -var Dc=[0,14,14,17,14,18,16,20];function Ec(a){var b=this.a,c=Vb(this,a);a=a>>6&7;Nb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Dc[this.g]}var Fc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Gc=[7,13,13,17,14,18,17,21];function Hc(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.s=b>>16,this.l=this.s|b,this.h=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Kc(a){U(this,a,0,wc);this.a-=this.g?9:3+(7==this.c?2:0)}function Lc(a){U(this,a,R(this,a),xc);this.a-=this.g?9:3+(7==this.c?2:0)}function Y(){F(this,8)}function Ib(a){Mc[a>>12].call(this,a)} -var Mc=[function(a){Nc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,Yb(this,a,b));this.a=c-Fc[(this.G?8:0)+this.g]+(7!=this.c||this.g?0:2)},function(a){var b=R(this,a);a=S(this,a);Mb(this,b-a,a,b);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),ec);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c? -2:0)},function(a){U(this,a,R(this,a),gc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),Zb);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){Oc[a>>8&15].call(this,a)},function(a){Pc[a>>8&15].call(this,a)},function(a){var b=Ub(this,a);O(this,Xb(this,a,b,1)<<8);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){var b=Ub(this,a)<<8;a=Wb(this,a)<<8;Mb(this,b-a,a,b);this.a-=this.g?4+ -(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,(Ub(this,a)&Wb(this,a))<<8);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){T(this,a,Ub(this,a),fc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){T(this,a,Ub(this,a),hc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),uc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},Y],Nc=[function(a){Qc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.l&65535))},function(a){V(this,a,this.l&65535?0:4)},function(a){V(this,a,!this.na()==!(this.h&32768))},function(a){V(this,a,!this.na()!=!(this.h&32768))},function(a){V(this,a,!!(this.l&65535)&&!this.na()==!(this.h&32768))},function(a){V(this,a,(this.l&65535?0:4)||!this.na()!=!(this.h&32768))},Ec,Ec,function(a){Rc[a>>6&3].call(this,a)},function(a){Sc[a>>6&3].call(this,a)},function(a){Tc[a>>6&3].call(this,a)},function(a){Uc[a>> -6&3].call(this,a)},Y,Y],Rc=[function(a){P(this,Yb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,ic);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,mc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,kc);this.a-=this.g?9:3+(7==this.c?2:0)}],Sc=[function(a){U(this,a,0,oc);this.a-=this.g?11:6},function(a){U(this,a,N(this)?1:0,Zb);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,N(this)?1:0,uc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.g?4:3+(7==this.c?2:0)}],Tc=[function(a){U(this,a,0,sc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,qc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,cc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,ac);this.a-=this.g?9:3+(7==this.c?2:0)}],Uc=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.vb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Sb(this,a,0);Nb(this,a);O(this,a);this.a-= -11},function(a){var b=Pb(this),c=this.a;Tb(this,a,0,b);O(this,b);this.a=c-Gc[this.g]},function(a){O(this,Yb(this,a,this.na?65535:0));this.a-=this.g?9:3+(7==this.c?2:0)}],Qc=[function(a){Vc[a&15].call(this,a)},Y,Y,Y,Cc,Cc,Cc,Cc,function(a){if(a&8)F(this,8);else{var b=Pb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.v&49152||(this.v=this.v&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){Wc[a&15].call(this,a)},function(a){Xc[a&15].call(this,a)},Kc,Kc, -Kc,Kc],Vc=[function(){this.v&49152?(this.F|=128,F(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ob(this);this.j|=this.v&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.v&49152||(Jb(this),this.o.reset());this.a-=667},function(){Ob(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Wc=[Ic,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.l=1;this.a-=5},W,W,W,function(){this.s=0;this.a-= -5},W,W,W,W,W,W,W],Xc=[Ic,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.l=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Oc=[Hc,Hc,Ac,Ac,yc,yc,zc,zc,Lc,Lc,Y,Y,Y,Y,Jc,Jc],Pc=[function(a){V(this,a,!this.na())},function(a){V(this,a,this.na())},function(a){V(this,a,!N(this)&&!!(this.l&65535))},function(a){V(this,a,N(this)||(this.l&65535?0:4))},function(a){V(this,a,!(this.h&32768))},function(a){V(this,a,this.h&32768?2:0)},function(a){V(this, -a,!N(this))},function(a){V(this,a,N(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},Y,Y],Yc=[function(a){P(this,Xb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,jc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,nc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,lc);this.a-=this.g? -9:3+(7==this.c?2:0)}],Zc=[function(a){T(this,a,0,pc);this.a-=this.g?11:6},function(a){T(this,a,N(this)?1:0,$b);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,N(this)?1:0,vc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=Wb(this,a);P(this,a<<8);this.a-=this.g?4:3+(7==this.c?2:0)}],$c=[function(a){T(this,a,0,tc);this.a-=this.g?9+(this.Ua&1):3+(7==this.c?2:0)},function(a){T(this,a,0,rc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,dc);this.a-=this.g?9+(this.Ua&1):3+(7==this.c? -2:0)},function(a){T(this,a,0,bc);this.a-=this.g?9:3+(7==this.c?2:0)}],ad=[Y,function(a){a=Sb(this,a,65536);Nb(this,a);O(this,a);this.a-=11},function(a){var b=Pb(this),c=this.a;Tb(this,a,65536,b);O(this,b);this.a=c-Gc[this.g]},Y]; -function bd(a){v.call(this,"ROM",a,bd);this.a=null;this.m=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.h=a.file;this.u=ba(this.h);if(this.h){a=this.h;var b=ca(this.u);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;l(a,null,!0,function(a,b,f){cd(c,a,b,f)})}}x(bd);bd.prototype.oa=function(a,b,c,d){this.o=b;this.b=c;this.I=d;dd(this)};bd.prototype.ha=function(){this.l&&(this.I&&this.I.a(this.id,this.m,this.c,this.l),delete this.l);return!0}; -bd.prototype.ga=function(){return!0}; -function cd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Va,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,m=eval("("+c+")");if(f=m.bytes)a.a=f;else if(f=m.words)for(a.a=Array(2*f.length),k=e=0;e>8&255;else if(f=m.data)for(a.a=Array(4*f.length),k=e=0;e>8&255,a.a[k++]=f[e]>>16&255,a.a[k++]=f[e]>>24&255;else a.a=m;a.l=m.symbols;if(!a.a.length){p("Empty ROM: "+b); -return}if(1==a.a.length){p(a.a[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.a=Array(b.length),e=0;e>>d.c].Bb(e&d.o,a.a[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Fa)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.u=d.receiveData){this.status(this.Va+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ha=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.ga=function(a){return a?this.save():!0};g.reset=function(){id(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return id(this)};function id(a){a.G=0;a.a=0;a.c=128;a.h=[];return!0}g.ab=function(a){if("number"==typeof a)this.h.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.H||8,c=a-this.m%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.m&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.m+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.M(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;cb(this.b,100,4,52,this.D)}};var jd={},hd=(jd[65392]=[null,null,Z.prototype.cc,Z.prototype.Hc,"RCSR"],jd[65394]=[null,null,Z.prototype.bc,Z.prototype.Gc,"RBUF"],jd[65396]=[null,null,Z.prototype.qc,Z.prototype.Wc,"XCSR"],jd[65398]=[null,null,Z.prototype.pc,Z.prototype.Vc,"XBUF"],jd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bmd){if(od(d,this.u)){this.l=new M(this,"1.30.1","failsafe");od(this.l)&&(td(this,d),a=2,ud(this.l));this.l.set("timestamp",ka());vd(this.l);var e=this.a&&!this.m;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=sd(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?od(d,k):("error"== -f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(pa("user",""),this.c=null)):this.M(f+": "+k),ud(d),od(d)?(c=sd(d),e=!0):c=!1))}e&&rd(this,c?d:null)}else 2==a&&d.clear()}else rd(this);delete this.u;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.i.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.b&&(wd(this,this.b,b,c,a),this.b.Ca());this.G&&(td(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; -function td(a,b){if(la("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.1"};d.url=a.O;d.user=c;d.type="bug";d.data=b;l("http://www.pcjs.org/api/v1/report",d,!0)}} -function xd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),k=new M(a,"1.30.1","validate"),m=ka();k.set("timestamp",m);f.set("timestamp",m);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ga&&(c&&L(a.b),d=a.b.ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.i.L=!1,!1===d&&(e=null)));for(var m=y(a.id),n=0;n>1),this.a=new Int32Array(this.c,0,d>>2),pb(this,lb?qb:rb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a){a&1&&F(this.b,4);var 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},ea: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.ma=!0},G:function(a,b){return this.H(a, +b)},S:function(a,b){return this.Y(a,b)},ca:function(a,b,c){this.h||this.Ab(a,b,c)},ja:function(a,b,c){this.h||this.ka(a,b,c)},D:function(a){return this.g[a]},J:function(a){return this.g[a]},O:function(a){a&1&&F(this.b,4);return this.m.getUint16(a,!0)},$:function(a){a&1&&F(this.b,4);return this.o[a>>1]},ba:function(a,b){this.g[a]=b;this.ma=!0},da:function(a,b){this.g[a]=b;this.ma=!0},ia:function(a,b){a&1&&F(this.b,4);this.m.setUint16(a,b,!0);this.ma=!0},ta:function(a,b){a&1&&F(this.b,4);this.o[a>> +1]=b;this.ma=!0}};function Ra(a,b,c){a.I=b;a.w=a.l=0;c&&((a.w=c.w)&&tb(a,ub,!1),(a.l=c.l)&&vb(a,ub,!1))}function vb(a,b,c){c&&a.l||(a.Qa=!a.h&&b[1]||a.B,a.Sc=!a.h&&b[3]||a.A);if(c||void 0===c)a.Ab=b[1]||a.B,a.ka=b[3]||a.A}function tb(a,b,c){c&&a.w||(a.Ya=b[0]||a.s,a.oc=b[2]||a.u);if(c||void 0===c)a.H=b[0]||a.s,a.Y=b[2]||a.u}function pb(a,b){b||(b=wb);tb(a,b,void 0);vb(a,b,void 0)} +var wb=[],sb=[E.prototype.N,E.prototype.ea,E.prototype.aa,E.prototype.ua],ub=[E.prototype.G,E.prototype.ca,E.prototype.S,E.prototype.ja];if(Ja)var rb=[E.prototype.D,E.prototype.ba,E.prototype.O,E.prototype.ia],qb=[E.prototype.J,E.prototype.da,E.prototype.$,E.prototype.ta]; +function xb(a,b){v.call(this,"CPU",a,xb);var c=a.multiplier||1;this.Ja=a.cycles||b;this.da=c;this.Va=Math.round(this.Ja/1E4)/100;this.ia=this.Va*this.da;this.i.V=!1;this.i.xb=!1;this.i.Aa=a.autoStart;this.i.cb=!1;this.i.La=!1;this.Ca=this.ja=0;this.Ia=a.csStart;this.ta=a.csInterval;this.ua=a.csStop;this.J=[];this.mb=this.sc.bind(this);D(this)}x(xb);var yb=["power","reset"];g=xb.prototype; +g.oa=function(a,b,c,d){this.B=a;this.m=b;this.I=d;for(b=0;b>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} +g.R=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.L)a=!0;else{var b=null,c,m=y(a.id);for(c=0;ca.aa/a.ia&&(b=1),a.da=b,b=a.Va*a.da,a.ia!=b)){a.ia=b;b=a.ia.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Fb(a,a.Y);a.Y=0;a.S=ja();a.ba=0;Gb(a)}function cb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function eb(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ja*a.da/1E3,a.J[b][0]=c)} +g.sc=function(){if(this.i.V){this.Xa>=this.Ja&&Gb(this,!0);this.ya=0;this.Ha=ja();if(this.ba){var a=this.Ha-this.ba;a>this.kb&&(this.S+=a,this.S>this.Ha&&(this.S=this.Ha))}try{do{for(var b,c=this.i.La?1:this.Ka,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.yb(b)}catch(q){if("number"!=typeof q)throw q;}for(var f=this.ca-this.a,a=f,k=this.J.length-1;0<=k;k--){var m=this.J[k];0>m[0]||(m[0]-=a,0>=m[0]&&(m[0]=-1,m[1]()))}this.ya+=f;this.Y+=f;Fb(this,0,!0);a=f;if(this.i.La){var n= +!1;this.Ca=this.Ca+this.fb()|0;this.ja-=a;0>=this.ja&&(this.ja+=this.ta,n=!0);0<=this.ua&&this.ua<=Hb(this)&&(this.ta=this.ua=-1,Bb(this),L(this),n=!0);n&&this.M(Hb(this)+" cycles: checksum="+h(this.Ca))}this.xa-=f;if(0>=this.xa){this.xa+=this.Ka;15<=++this.lb&&(this.B&&this.B.wa(),this.lb=0);break}}while(this.i.V)}catch(q){L(this);Cb(this);this.B&&this.B.stop(ja(),Hb(this));b=q.stack||q.message;this.i.error=!0;this.K(b);return}if(this.i.V){b=setTimeout;c=this.mb;this.ba=ja();d=this.kb;this.ya&&(d= +Math.round(d*this.ya/this.Ka));d-=this.ba-this.Ha;if(e=this.ba-this.S)this.aa=Math.round(this.Y/(10*e))/100,864E5<=e&&(this.ea=0,Eb(this));if(0>d||this.aad&&(this.S-=d),d=0;this.Xa+=this.ya;this.ba+=d;b(c,d)}}};function Db(a){var b;a.i.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.V)a.M(a.toString()+" busy");else{Eb(a);a.i.V=!0;a.i.xb=!0;if(b=a.w.run)b.textContent="Halt";a.B&&a.B.start(a.S,Hb(a));Cb(a,!0);setTimeout(a.mb,0)}}g.yb=function(){return 0}; +function L(a){if(a.i.V){a.ca-=a.a;a.a=0;Fb(a,a.Y);a.Y=0;a.i.V=!1;var b=a.w.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Hb(a));Cb(a)}a.i.complete=void 0}function Cb(a,b){a.B&&a.B.wa(b)} +function Ib(a){this.Mb=+a.model||1170;this.Ob=a.resetAddr||0;xb.call(this,a,6666667);this.gb=0;this.decode=Jb.bind(this);this.o=65536;this.h=32768;this.l=65535;this.s=32768;this.v=15;this.f=[0,0,0,0,0,0,0,this.Ob];this.va=[0,0,0,0,0,0];this.Z=[0,0,0,0];this.Fa=this.A=0;this.Lb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.tc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.wb=[0,0,0,0,0,0,0,0];this.g=this.c=this.Ta=this.G=this.H=this.j=this.vb=0;this.ka=-1;Kb(this);this.i.complete=this.i.Hb=!1}x(Ib,xb);g=Ib.prototype;g.hb=function(){fb(this)};g.reset=function(){this.i.V&&L(this);Kb(this);Ab(this);this.i.error=!1;this.parent.reset.call(this)}; +function Kb(a){a.sa=255;a.F=0;a.ab=0;a.D=0;a.qa=0;a.$a=0;a.ra=0;a.Oa=0;a.Ea=0;a.Wa=262143;a.Ga=253952;a.u=[];a.j|=2;a.m&&fb(a)}function fb(a){a.Oa?(a.$=65536,a.N=a.Kb,a.O=a.ub,a.nb=a.Uc,Sa(a.m,a.ra&16?22:18)):(a.$=0,a.N=a.Jb,a.O=a.pc,a.nb=a.Tc,Sa(a.m,16))}g.fb=function(){return 0};g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ea,this.da]);a.set(2,$a(this.m));return a.data()}; +g.restore=function(a){var b=a[1];this.ea=b[1];Eb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;cb){a.u[f].fa-=b;break}b-=a.u[f].fa}a.u.splice(f+1,0,{fa:b,ob:c<<5&224,zb:d,Ra:e})}a.j|=2}function hb(a){return a.v=a.v&63728|a.na()|(a.l&65535?0:4)|(a.h&32768?2:0)|N(a)} +function ib(a,b){a.s=b<<12;a.l=~b&4;a.h=b<<14;a.o=b<<16;if((b^a.v)&2048)for(var c=a.va.length;0<=--c;){var d=a.f[c];a.f[c]=a.va[c];a.va[c]=d}a.A=b>>14&3;c=a.v>>14&3;a.A!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.A]);a.j|=2;a.v=b}function O(a,b){a.j&128||(a.s=a.l=b,a.h=0)}function P(a,b,c){a.j&128||(a.s=a.l=a.o=b,a.h=c||0)}function Mb(a,b,c,d){a.j&128||(a.s=a.l=a.o=b,a.h=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.s=a.l=a.o=b,a.h=a.s^a.o>>1)}function Nb(a,b,c,d){a.j&128||(a.s=a.l=a.o=b,a.h=(c^d)&(d^b))} +function F(a,b){var c=!1;0>a.ka?a.ka=hb(a):a.A||(b=4,c=!0);a.D&57344||(a.qa=63222,a.$a=b);a.A=0;var d=a.O(b|a.$),e=a.O(b+2&65535|a.$);ib(a,e&-12289|a.ka>>2&12288);c&&(a.F|=4,a.f[6]=4);Ob(a,a.ka);Ob(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ka=-1;throw b;}function Pb(a){var b=Qb(a),c=Qb(a)&-1793;a.v&49152&&(c=c&-225|a.v&63712);a.f[7]=b&65535;ib(a,c);a.j&=-17} +function Rb(a,b,c){var d,e,f,k=0;d=b>>13;a.ra&a.Lb[a.A]||(d&=7);e=a.C[a.A][d];f=(a.P[a.A][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var m=f>>13&31;31>m?a.ra&32&&(f=a.tc[m]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ga&&4186112>f&&(a.F|=32,F(a,4))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192:128;break; +default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.A][d]=e;if(4194170!==f||a.A)a.Ea=a.A,a.Fa=d;k&&(k&57344&&(0<=a.ka&&(k|=128),a.D&57344||(a.D=a.D|k|a.Ea<<5|a.Fa<<1),F(a,168)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.O(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.O(e)|k;a.a-=8;break; +case 6:return e=Lb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Lb(a),e=e+a.f[c]&65535,e=a.O(e|a.$)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.D&57344||(a.qa=a.qa<<8|f<<3&248|c);6==c&&!a.A&&d&4&&0>=f&&(a.f[6]<=a.sa||65534<=a.f[6])&&(a.f[6]<=a.sa-32?(a.F|=4,a.f[6]=4,F(a,4)):(a.F|=8,a.j|=64));return e}g.Jb=function(a,b,c){return Sb(this,a,b,c)};g.Kb=function(a,b,c){return Rb(this,Sb(this,a,b,c),c)};g.pc=function(a){return Ya(this.m,a)};g.ub=function(a){return Ya(this.m,Rb(this,a,2))}; +g.Tc=function(a,b){Za(this.m,a,b&65535)};g.Uc=function(a,b){Za(this.m,Rb(this,a,4),b)};function Tb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?(d=Sb(a,b,d,2),c&65536||61440!==(a.v&61440)&&(d&=65535),a.A=a.v>>12&3,c=a.O(d|c&a.$),a.A=a.v>>14&3):c=6!=d||(a.v>>2&12288)===(a.v&12288)?a.f[d]:a.Z[a.v>>12&3];return c} +function Ub(a,b,c,d){a.D&57344||(a.qa=22);var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=Sb(a,b,e,4),c&65536||(e&=65535),a.A=a.v>>12&3,e=Rb(a,e|c&65536,4),a.A=a.v>>14&3,Za(a.m,e,d)):6!=e||(a.v>>2&12288)===(a.v&12288)?a.f[e]=d:a.Z[a.v>>12&3]=d}function Vb(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.N(b,c,3),a=Xa(a.m,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?Ya(a.m,a.N(b,c,2)):a.f[c]}function Wb(a,b){var c=a.c=b&7;b=a.g=(b&56)>>3;return Sb(a,b,c,8)} +function Xb(a,b){var c=a.c=b&7;(b=a.g=(b&56)>>3)?(c=a.N(b,c,3),a=Xa(a.m,c)):a=a.f[c]&255;return a}function S(a,b){var c=a.c=b&7;return(b=a.g=(b&56)>>3)?Ya(a.m,a.N(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.Ta=a.N(b,e,7),c=d.call(a,c,Xa(a.m,e)),e&1&&a.a--,a=a.m,a.a[(e&a.h)>>>a.c].Qa(e&a.m,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.N(b,e,6),Za(a.m,e,d.call(a,c,Ya(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} +function Yb(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.m,a.a[(d&a.h)>>>a.c].Qa(d&a.m,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Zb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?Za(a.m,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.yb=function(a){this.i.complete=!0;this.i.Hb=!1;this.i.xb=!1;this.ca=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.ab&224,c=this.u.length;0<=--c;){if(0b&&(b=this.u[c].ob,a=this.u[c],this.u.splice(c,1))}b>(this.v&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?F(this,a.zb):F(this,160))}else this.j&1&&this.j++;this.D&57344||(this.qa=0,this.$a=this.f[7]);this.j=this.j&7|this.v&16;this.decode(Lb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function ec(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function fc(a,b){a=b&~a;O(this,a);return a}function gc(a,b){a=b&~a;O(this,a<<8);return a}function hc(a,b){a|=b;O(this,a);return a}function ic(a,b){a|=b;O(this,a<<8);return a}function jc(a,b){a=~b|65536;P(this,a);return a&65535} +function kc(a,b){a=~b|256;P(this,a<<8);return a&255}function lc(a,b){a=b-a;this.j&128||(this.s=this.l=a,this.h=b&(b^a));return a&65535}function mc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.s=this.l=c,this.h=b&(b^c));return a&255}function nc(a,b){a=b+a;this.j&128||(this.s=this.l=a,this.h=a&(b^a));return a&65535}function oc(a,b){a=b+a;var c=a<<8;this.j&128||(this.s=this.l=c,this.h=c&(b<<8^c));return a&255}function pc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} +function qc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function rc(a,b){a=b<<1|this.o>>16&1;Q(this,a);return a&65535}function sc(a,b){a=b<<1|this.o>>16&1;Q(this,a<<8);return a&255}function tc(a,b){a=(this.o&65536|b)>>1|b<<16;Q(this,a);return a&65535}function uc(a,b){a=((this.o&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function vc(a,b){var c=b-a;Nb(this,c,a,b);return c&65535}function wc(a,b){var c=b-a;Nb(this,c<<8,a<<8,b<<8);return c&255} +function xc(a,b){this.j&128||(this.s=this.l=b&65280,this.h=this.o=0);return(b<<8|b>>8)&65535}function yc(a,b){a^=b;O(this,a);return a&65535}function zc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.o=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.l=c;this.a-=(this.g?6:7)+b} +function Ac(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.h=0;b&=63;if(b&32){b=64-b;32>b-1;this.o=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.f[a|1]=d&65535;this.s=d>>16;this.l=d>>16|d;this.a-=(this.g?6:7)+b}function W(a){a&1&&(this.o=0);a&2&&(this.h=0);a&4&&(this.l=1);a&8&&(this.s=0);this.a-=5} +function Bc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.l=d>>16|d,this.s=d>>16):(this.h=32768,this.l=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.l=this.s=0,this.h=32768,this.o=65536,this.a-=7}var Cc=[0,7,7,10,7,11,9,13];function Dc(a){var b=this.a;a=Wb(this,a);this.f[7]=a&65535;this.a=b-Cc[this.g]} +var Ec=[0,14,14,17,14,18,16,20];function Fc(a){var b=this.a,c=Wb(this,a);a=a>>6&7;Ob(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Ec[this.g]}var Gc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Hc=[7,13,13,17,14,18,17,21];function Ic(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.s=b>>16,this.l=this.s|b,this.h=0,this.o=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Lc(a){U(this,a,0,xc);this.a-=this.g?9:3+(7==this.c?2:0)}function Mc(a){U(this,a,R(this,a),yc);this.a-=this.g?9:3+(7==this.c?2:0)}function Y(){F(this,8)}function Jb(a){Nc[a>>12].call(this,a)} +var Nc=[function(a){Oc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,Zb(this,a,b));this.a=c-Gc[(this.G?8:0)+this.g]+(7!=this.c||this.g?0:2)},function(a){var b=R(this,a);a=S(this,a);Nb(this,b-a,a,b);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),fc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c? +2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),$b);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){Pc[a>>8&15].call(this,a)},function(a){Qc[a>>8&15].call(this,a)},function(a){var b=Vb(this,a);O(this,Yb(this,a,b,1)<<8);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){var b=Vb(this,a)<<8;a=Xb(this,a)<<8;Nb(this,b-a,a,b);this.a-=this.g?4+ +(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,(Vb(this,a)&Xb(this,a))<<8);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){T(this,a,Vb(this,a),gc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){T(this,a,Vb(this,a),ic);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),vc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},Y],Oc=[function(a){Rc[a>> +4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.l&65535))},function(a){V(this,a,this.l&65535?0:4)},function(a){V(this,a,!this.na()==!(this.h&32768))},function(a){V(this,a,!this.na()!=!(this.h&32768))},function(a){V(this,a,!!(this.l&65535)&&!this.na()==!(this.h&32768))},function(a){V(this,a,(this.l&65535?0:4)||!this.na()!=!(this.h&32768))},Fc,Fc,function(a){Sc[a>>6&3].call(this,a)},function(a){Tc[a>>6&3].call(this,a)},function(a){Uc[a>>6&3].call(this,a)},function(a){Vc[a>> +6&3].call(this,a)},Y,Y],Sc=[function(a){P(this,Zb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,jc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,nc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,lc);this.a-=this.g?9:3+(7==this.c?2:0)}],Tc=[function(a){U(this,a,0,pc);this.a-=this.g?11:6},function(a){U(this,a,N(this)?1:0,$b);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,N(this)?1:0,vc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=S(this, +a);P(this,a);this.a-=this.g?4:3+(7==this.c?2:0)}],Uc=[function(a){U(this,a,0,tc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,rc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,dc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,bc);this.a-=this.g?9:3+(7==this.c?2:0)}],Vc=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.ub(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Tb(this,a,0);Ob(this,a);O(this,a);this.a-= +11},function(a){var b=Qb(this),c=this.a;Ub(this,a,0,b);O(this,b);this.a=c-Hc[this.g]},function(a){O(this,Zb(this,a,this.na?65535:0));this.a-=this.g?9:3+(7==this.c?2:0)}],Rc=[function(a){Wc[a&15].call(this,a)},Y,Y,Y,Dc,Dc,Dc,Dc,function(a){if(a&8)F(this,8);else{var b=Qb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.v&49152||(this.v=this.v&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){Xc[a&15].call(this,a)},function(a){Yc[a&15].call(this,a)},Lc,Lc, +Lc,Lc],Wc=[function(){this.v&49152?(this.F|=128,F(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Pb(this);this.j|=this.v&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.v&49152||(Kb(this),this.m.reset());this.a-=667},function(){Pb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Xc=[Jc,function(){this.o=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.l=1;this.a-=5},W,W,W,function(){this.s=0;this.a-= +5},W,W,W,W,W,W,W],Yc=[Jc,function(){this.o=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.l=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Pc=[Ic,Ic,Bc,Bc,zc,zc,Ac,Ac,Mc,Mc,Y,Y,Y,Y,Kc,Kc],Qc=[function(a){V(this,a,!this.na())},function(a){V(this,a,this.na())},function(a){V(this,a,!N(this)&&!!(this.l&65535))},function(a){V(this,a,N(this)||(this.l&65535?0:4))},function(a){V(this,a,!(this.h&32768))},function(a){V(this,a,this.h&32768?2:0)},function(a){V(this, +a,!N(this))},function(a){V(this,a,N(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},Y,Y],Zc=[function(a){P(this,Yb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,kc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,oc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,mc);this.a-=this.g? +9:3+(7==this.c?2:0)}],$c=[function(a){T(this,a,0,qc);this.a-=this.g?11:6},function(a){T(this,a,N(this)?1:0,ac);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,N(this)?1:0,wc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=Xb(this,a);P(this,a<<8);this.a-=this.g?4:3+(7==this.c?2:0)}],ad=[function(a){T(this,a,0,uc);this.a-=this.g?9+(this.Ta&1):3+(7==this.c?2:0)},function(a){T(this,a,0,sc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,ec);this.a-=this.g?9+(this.Ta&1):3+(7==this.c? +2:0)},function(a){T(this,a,0,cc);this.a-=this.g?9:3+(7==this.c?2:0)}],bd=[Y,function(a){a=Tb(this,a,65536);Ob(this,a);O(this,a);this.a-=11},function(a){var b=Qb(this),c=this.a;Ub(this,a,65536,b);O(this,b);this.a=c-Hc[this.g]},Y]; +function cd(a){v.call(this,"ROM",a,cd);this.a=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.h=a.file;this.u=ba(this.h);if(this.h){a=this.h;var b=ca(this.u);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;l(a,null,!0,function(a,b,f){dd(c,a,b,f)})}}x(cd);cd.prototype.oa=function(a,b,c,d){this.m=b;this.b=c;this.I=d;ed(this)};cd.prototype.ha=function(){this.l&&(this.I&&this.I.a(this.id,this.o,this.c,this.l),delete this.l);return!0}; +cd.prototype.ga=function(){return!0}; +function dd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,m=eval("("+c+")");if(f=m.bytes)a.a=f;else if(f=m.words)for(a.a=Array(2*f.length),k=e=0;e>8&255;else if(f=m.data)for(a.a=Array(4*f.length),k=e=0;e>8&255,a.a[k++]=f[e]>>16&255,a.a[k++]=f[e]>>24&255;else a.a=m;a.l=m.symbols;if(!a.a.length){p("Empty ROM: "+b); +return}if(1==a.a.length){p(a.a[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.a=Array(b.length),e=0;e>>d.c].Ab(e&d.m,a.a[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Da)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.u=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ha=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ga=function(a){return a?this.save():!0};g.reset=function(){jd(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return jd(this)};function jd(a){a.G=0;a.a=0;a.c=128;a.h=[];return!0}g.Za=function(a){if("number"==typeof a)this.h.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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.A&&!this.o&&c&&(b=String.fromCharCode(this.A)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.M(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;db(this.b,100,4,52,this.D)}};var kd={},id=(kd[65392]=[null,null,Z.prototype.dc,Z.prototype.Hc,"RCSR"],kd[65394]=[null,null,Z.prototype.cc,Z.prototype.Gc,"RBUF"],kd[65396]=[null,null,Z.prototype.rc,Z.prototype.Wc,"XCSR"],kd[65398]=[null,null,Z.prototype.qc,Z.prototype.Vc,"XBUF"],kd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bnd){if(pd(d,this.u)){this.l=new M(this,"1.30.1","failsafe");pd(this.l)&&(ud(this,d),a=2,vd(this.l));this.l.set("timestamp",ka());wd(this.l);var e=this.a&&!this.o;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=td(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?pd(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(pa("user",""),this.c=null)):this.M(f+": "+k),vd(d),pd(d)?(c=td(d),e=!0):c=!1))}e&&sd(this,c?d:null)}else 2==a&&d.clear()}else sd(this);delete this.u;delete this.B}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.i.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.b&&(xd(this,this.b,b,c,a),this.b.Aa());this.G&&(ud(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +function ud(a,b){if(la("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.1"};d.url=a.O;d.user=c;d.type="bug";d.data=b;l("http://www.pcjs.org/api/v1/report",d,!0)}} +function yd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),k=new M(a,"1.30.1","validate"),m=ka();k.set("timestamp",m);f.set("timestamp",m);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ga&&(c&&L(a.b),d=a.b.ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.i.L=!1,!1===d&&(e=null)));for(var m=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");l(e,null,!0,function(f,k,m){if(m||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+m+")");else{if(f=d[3])if(m=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=m[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);m[0]!=n&&(k=k.replace(m[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);Ed(a,b,c)}})}else c(a,null)} -function Fd(a,b,c,d){function e(a){if(void 0===m){var b=k&&C(k,"machine-warning");m=b&&b[0]||k}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Bd||wa(!0));n=!1}var k,m,n=!0;Bd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],J=document.createElement("style");J.type="text/css";J.styleSheet?J.styleSheet.cssText=q:J.appendChild(document.createTextNode(q));t.appendChild(J)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");q=function(d,m){m?Cd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=m.transformNode(n))?(k.outerHTML=n,--Bd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(m,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Bd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Cd(b,a,d,!0,e,q):Dd(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ba){f(Ba.message)}return n}window.embedPDP11=function(a,b,c,d){wa(!1);return Fd(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +g.R=function(a,b,c){var d=this;switch(b){case "power":return this.w[b]=c,c.onclick=function(){d.g||(d.i.L?yd(d,!1,!0):rd(d,d.Ba))},!0;case "reset":return this.w[b]=c,c.onclick=function(){if(d.i.L&&!d.g)if(d.a&&!d.s){var a=la("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");yd(d,a,!0);!a&&d.D?window&&window.location.reload():d.Ba(nd)}else d.reset(),d.b&&d.b.Aa()},!0;case "save":if(da())c.parentNode.removeChild(c);else return this.w[b]= +c,c.onclick=function(){var a=od(d,!0);if(a){var b=!!(d.a&&!d.s||d.D),c=yd(d,b);b?zd(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1}; +function od(a,b){var c=a.c;c||((c=oa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Ad(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c} +function Ad(a,b){a.c=null;b=l(ea()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(pa("user",b.data),a.c=b.data)}catch(d){p(d.message+" ("+c+")")}return a.c}function qd(a){var b=null;a.c&&(b=ea()+"/api/v1/user?req=load&user="+a.c+"&state="+Bd(a,"1.30.1"));return b} +function zd(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Bd(a,"1.30.1");d.data=c;b=l(ea()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");l(e,null,!0,function(f,k,m){if(m||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+m+")");else{if(f=d[3])if(m=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=m[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);m[0]!=n&&(k=k.replace(m[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);Fd(a,b,c)}})}else c(a,null)} +function Gd(a,b,c,d){function e(a){if(void 0===m){var b=k&&C(k,"machine-warning");m=b&&b[0]||k}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Cd||wa(!0));n=!1}var k,m,n=!0;Cd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],J=document.createElement("style");J.type="text/css";J.styleSheet?J.styleSheet.cssText=q:J.appendChild(document.createTextNode(q));t.appendChild(J)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");q=function(d,m){m?Dd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=m.transformNode(n))?(k.outerHTML=n,--Cd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(m,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Cd||wa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Dd(b,a,d,!0,e,q):Ed(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ba){f(Ba.message)}return n}window.embedPDP11=function(a,b,c,d){wa(!1);return Gd(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); From 65148360987cc48e462bb4c1355e78081c8a1448 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Mon, 10 Oct 2016 17:09:29 -0700 Subject: [PATCH 09/36] Cleaned up how memory and IOPAGE traps are triggered, how ODD byte-level IOPAGE accesses are handled, and how memory is dumped by the Debugger --- devices/pdp11/machine/1170/machine.xml | 2 +- devices/pdp11/machine/1170/test/machine.xml | 2 +- devices/pdp11/panel/1170/led.xml | 119 +++++ .../pdp11/panel/1170/{wide.xml => test.xml} | 0 devices/pdp11/rom/custom/boot.mac | 1 + docs/pcx86/examples/components.css | 25 +- docs/pcx86/examples/components.xsl | 4 +- docs/pcx86/examples/pcx86-dbg.js | 6 +- docs/pcx86/examples/pcx86.js | 6 +- modules/pcx86/lib/chipset.js | 6 +- modules/pdp11/lib/bus.js | 247 ++++++++--- modules/pdp11/lib/cpu.js | 13 - modules/pdp11/lib/cpustate.js | 26 +- modules/pdp11/lib/debugger.js | 106 ++--- modules/pdp11/lib/device.js | 62 ++- modules/pdp11/lib/memory.js | 40 +- modules/pdp11/lib/messages.js | 6 +- modules/pdp11/lib/ram.js | 73 ++-- modules/pdp11/lib/rom.js | 12 +- modules/shared/templates/components.css | 25 +- modules/shared/templates/components.xsl | 4 +- versions/pc8080/1.30.1/components.css | 25 +- versions/pc8080/1.30.1/components.xsl | 4 +- versions/pcx86/1.30.1/components.css | 25 +- versions/pcx86/1.30.1/components.xsl | 4 +- versions/pcx86/1.30.1/pcx86-dbg.js | 6 +- versions/pcx86/1.30.1/pcx86.js | 6 +- versions/pdpjs/1.30.1/components.css | 25 +- versions/pdpjs/1.30.1/components.xsl | 4 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 411 +++++++++--------- versions/pdpjs/1.30.1/pdp11.js | 285 ++++++------ 31 files changed, 901 insertions(+), 679 deletions(-) create mode 100644 devices/pdp11/panel/1170/led.xml rename devices/pdp11/panel/1170/{wide.xml => test.xml} (100%) diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/machine.xml index a0926e60b..83ea462b4 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/machine.xml @@ -9,6 +9,6 @@ - +
    diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index 8ceb0eef0..95333a243 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -9,6 +9,6 @@ - +
    diff --git a/devices/pdp11/panel/1170/led.xml b/devices/pdp11/panel/1170/led.xml new file mode 100644 index 000000000..1a3376b83 --- /dev/null +++ b/devices/pdp11/panel/1170/led.xml @@ -0,0 +1,119 @@ + + + Control Panel + + + ADDRESS + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + DATA + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + + + Enter + Clear + + + + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + + 0 + 0 + 0 + 0 + + + + Run + Step + Reset + Fast + + diff --git a/devices/pdp11/panel/1170/wide.xml b/devices/pdp11/panel/1170/test.xml similarity index 100% rename from devices/pdp11/panel/1170/wide.xml rename to devices/pdp11/panel/1170/test.xml diff --git a/devices/pdp11/rom/custom/boot.mac b/devices/pdp11/rom/custom/boot.mac index 05a03da70..65bf107bc 100644 --- a/devices/pdp11/rom/custom/boot.mac +++ b/devices/pdp11/rom/custom/boot.mac @@ -461,6 +461,7 @@ BOOTRP: ; 142460 TSTB (R1) ; WAIT BPL .-2 CLRB (R1) + MOV R3,R0 CLR PC .END START diff --git a/docs/pcx86/examples/components.css b/docs/pcx86/examples/components.css index 4a449ca97..f1782cf02 100644 --- a/docs/pcx86/examples/components.css +++ b/docs/pcx86/examples/components.css @@ -29,7 +29,7 @@ } .pcjs-label { font-size: small; - line-height: 19px; + line-height: 20px; vertical-align: middle; float: left; font-family: Monaco, "Lucida Console", monospace; @@ -47,14 +47,14 @@ font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; } .pcjs-register { font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; border: 1px solid black; } @@ -96,6 +96,18 @@ line-height: 34px; background-color: #ffffff; } +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-tripled-label { + text-align: right; + padding: 8px; +} +.pcjs-ledpad { + line-height: 32px; + background-color: #000000; +} .pcjs-led { float: left; width: 8px; @@ -103,19 +115,18 @@ margin: 4px; border: 1px solid black; text-align: center; - line-height: 19px; + vertical-align: middle; background-color: #000000; } .pcjs-rled { - float: left; width: 8px; height: 8px; margin: 4px; border: 1px solid black; border-radius: 50%; text-align: center; - line-height: 19px; - background-color: #000000; + vertical-align: middle; + background-color: #ff0000; } .pcjs-screen { clear: both; diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl index c48ca5c2c..43f7691f9 100644 --- a/docs/pcx86/examples/components.xsl +++ b/docs/pcx86/examples/components.xsl @@ -1,6 +1,7 @@ ]> @@ -330,6 +331,7 @@ margin:0 auto; position:; position:relative; + text-align:; float:left; @@ -411,7 +413,7 @@ -
    +

    diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 7d9c94ec9..c897ddac6 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -1364,9 +1364,9 @@ a;Lf(this);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!== this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=12}return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Ec=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.zd=this.Ec+a,this.S|=2,this.A-=11);return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Mc=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.Sd=this.Mc+a,this.S|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.D?0:1);return this.$a},W,function(a){this.ca&131072? E.call(this,6):(Of(this,a),this.A-=-1===this.D?3:6,this.S|=2);return a},W],tk=[W,W,W,W,Hh,Kh,Jh,Ih]; function X(a){bb.call(this,"ChipSet",a,X,32768);var b=a.model;b&&!uk[b]&&w("Unrecognized ChipSet model: "+b);this.ja=uk[b]||vk;this.C=[];b=wk(a[xk]);this.C[0]=[b,b];null==b&&(this.ia=[360,360],(b=a.floppies)&&b.length&&(this.ia=b),yk(this,zk,this.ia.length),yk(this,Ak,a.monitor||(this.ja=kg&&(this.cb=this.Da=2);this.ka=a.scaleTimers||!1;this.Ub=a.rtcDate;this.Db=!1;a.sound&&(this.sb=this.Fa=null,window&&(this.sb=window.AudioContext|| -window.webkitAudioContext),this.sb&&(this.Fa=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"Coprocessor"}; +window.webkitAudioContext),this.sb&&(this.Fa=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"FPU"}; Ek[5150][0][Ak]={Lc:48,gd:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Pd:"Monitor Type"};Ek[5150][0][5]={Lc:12,gd:{16:0,32:4,48:8,64:12},Pd:"Base Memory (16Kb Increments)"};Ek[5150][1][6]={Lc:31,gd:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Pd:"Expansion Memory (32Kb Increments)"};Ek[5160]=[{},{}];Ek[5160][0][zk]=Ek[5150][0][zk];Ek[5160][0][3]=Ek[5150][0][3];Ek[5160][0][Ak]=Ek[5150][0][Ak]; -Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"Coprocessor"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; +Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"FPU"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; l.Pb=function(a,b,c){switch(b){case xk:return this.qa[b]=c,Fk(this,0,b),!0;case Bk:if(5150==(this.ja|0)||5160.101==this.ja)return this.qa[b]=c,Fk(this,1,b),!0;break;case "swdesc":return this.qa[b]=c,!0}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.Tb=Jb(a,"FPU");yk(this,3,this.Tb?1:0,!0);this.B=Jb(a,"Keyboard");this.gb=c.Y.Id/1193181;qc(b,this,Gk);yc(b,this,Hk);this.jab;b++){var c=13>=b?Sk(e,b):e.A[b];a&&(a+="\n");a+="CMOS["+u(b)+"]: "+u(c)}e.ha.O(a)})}lf(c,26,this.Pm.bind(this))}; @@ -1386,7 +1386,7 @@ function Fk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcjs-bitCell";f|| function Yk(a,b,c){for(var d=null,e=Ek[a.ja]||Ek[a.ja|0]||Ek[5150],f=0;fg.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<=Se&&(this.Ea=this.pa=2);this.Z=a.scaleTimers||!1;this.Xa=a.rtcDate;this.Oa=!1;a.sound&&(this.La=this.qa=null,window&&(this.La=window.AudioContext|| -window.webkitAudioContext),this.La&&(this.qa=new this.La));this.reset(!0);t(this)}Ta(U);var Ci=5150.9,Se=5170,Bi={5150:5150,5160:5160,5170:Se,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:Ci,deskpro386:5180},Ei="sw1",Ii="sw2",Ji={Yj:1,ONE:0,gn:64,en:128,Wm:192,lc:192,eg:6},Ki={fn:16,Sm:32,Xm:48,lc:48,eg:4},Gi=1,Hi=4,W={5150:[{},{}]};W[5150][0][Gi]={lc:192,Nc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};W[5150][0][3]={lc:2,Nc:{0:0,1:2},ed:"Coprocessor"}; +window.webkitAudioContext),this.La&&(this.qa=new this.La));this.reset(!0);t(this)}Ta(U);var Ci=5150.9,Se=5170,Bi={5150:5150,5160:5160,5170:Se,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:Ci,deskpro386:5180},Ei="sw1",Ii="sw2",Ji={Yj:1,ONE:0,gn:64,en:128,Wm:192,lc:192,eg:6},Ki={fn:16,Sm:32,Xm:48,lc:48,eg:4},Gi=1,Hi=4,W={5150:[{},{}]};W[5150][0][Gi]={lc:192,Nc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};W[5150][0][3]={lc:2,Nc:{0:0,1:2},ed:"FPU"}; W[5150][0][Hi]={lc:48,Nc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},ed:"Monitor Type"};W[5150][0][5]={lc:12,Nc:{16:0,32:4,48:8,64:12},ed:"Base Memory (16Kb Increments)"};W[5150][1][6]={lc:31,Nc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},ed:"Expansion Memory (32Kb Increments)"};W[5160]=[{},{}];W[5160][0][Gi]=W[5150][0][Gi];W[5160][0][3]=W[5150][0][3];W[5160][0][Hi]=W[5150][0][Hi]; -W[5160][0][5]={lc:12,Nc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};W[5160][1][6]=W[5150][1][6];W[5160.101]=[{},{}];W[5160.101][0][5]={lc:143,Nc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};W[5160.101][0][3]={lc:16,Nc:{0:0,1:16},ed:"Coprocessor"};W[5160.101][1][2]={lc:1,Nc:{0:0,1:1},ed:"Floppy Type"};W[5160.101][1][Gi]=W[5150][0][Gi];W[5160.101][1][Hi]=W[5150][0][Hi];l=U.prototype; +W[5160][0][5]={lc:12,Nc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};W[5160][1][6]=W[5150][1][6];W[5160.101]=[{},{}];W[5160.101][0][5]={lc:143,Nc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};W[5160.101][0][3]={lc:16,Nc:{0:0,1:16},ed:"FPU"};W[5160.101][1][2]={lc:1,Nc:{0:0,1:1},ed:"Floppy Type"};W[5160.101][1][Gi]=W[5150][0][Gi];W[5160.101][1][Hi]=W[5150][0][Hi];l=U.prototype; l.zb=function(a,b,c){switch(b){case Ei:return this.la[b]=c,Li(this,0,b),!0;case Ii:if(5150==(this.ca|0)||5160.101==this.ca)return this.la[b]=c,Li(this,1,b),!0;break;case "swdesc":return this.la[b]=c,!0}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.od=mb(a,"FPU");Fi(this,3,this.od?1:0,!0);this.C=mb(a,"Keyboard");this.Ga=c.T.Yc/1193181;Sb(b,this,Mi);Ub(b,this,Ni);this.ca=Se){this.H=16;this.P=0;this.R=16;this.ua=0;this.W=160;512<=$i(this)&&(this.W|=16);3==+aj(this,Hi,void 0)&&(this.W|=64);5180==(this.ca|0)&&(this.W|=12);this.va=3;this.I= @@ -1369,7 +1369,7 @@ function Li(a,b,c){for(var d="",e=a.la[c],f=1;8>=f;f++){var g="pcjs-bitCell";f|| function aj(a,b,c){for(var d=null,e=W[a.ca]||W[a.ca|0]||W[5150],f=0;fd.hb[0]&&(d.hb[0]=255,d.hb[1]--,0>d.hb[1]&&(d.hb[1]=255)));return e}function xj(a,b,c,d){a=a.G[b];c=a.$b[c];c.hb[a.Ib]=c.jc[a.Ib]=d;a.Ib^=1} function yj(a,b){a=a.G[b];b=a.Db|1;a.Db&=-16;return b}function zj(a,b,c){a=a.G[b];b=c&3;a.Db=a.Db&~(16<>2].$b[b&3],c,d,e)}function Bj(a,b,c){b=a.G[b>>2].$b[b&3];b.Ef&&b.qg&&b.Sf?(c&&(b.done=c),b.Rd||Gj(a,b,!0)):c&&c(!0)} function Gj(a,b,c){c&&(b.count=b.hb[1]<<8|b.hb[0],b.type=b.mode&12,b.si=b.Ff=!1);for(var d=!1;0<=b.count&&(c=b.xf<<16|b.gb[1]<<8|b.gb[0],4==b.type?(d=!0,function(c){b.qg.call(b.Ef,b.Sf,-1,function(e,g){0>e&&(b.si||(b.si=!0),e=255);b.Rd||a.ia.Mc(c,e);(d=g)&&setTimeout(function(){Hj(b)||Gj(a,b)},0)})}(c)):8==b.type?(c=a.ia.Jb(c),0>b.qg.call(b.Ef,b.Sf,c)&&(b.Ff=!0)):0!=b.type&&(b.Ff=!0)),!d&&!Hj(b););} diff --git a/modules/pcx86/lib/chipset.js b/modules/pcx86/lib/chipset.js index aeea597aa..2ea035b0a 100644 --- a/modules/pcx86/lib/chipset.js +++ b/modules/pcx86/lib/chipset.js @@ -810,7 +810,7 @@ ChipSet.DIPSW[ChipSet.MODEL_5150][0][ChipSet.SWITCH_TYPE.FPU] = { 0: 0x00, // 0 means an FPU is NOT installed 1: 0x02 // 1 means an FPU is installed }, - LABEL: "Coprocessor" + LABEL: "FPU" }; ChipSet.DIPSW[ChipSet.MODEL_5150][0][ChipSet.SWITCH_TYPE.MONITOR] = { MASK: 0x30, @@ -910,7 +910,7 @@ ChipSet.DIPSW[ChipSet.MODEL_ATT_6300][0][ChipSet.SWITCH_TYPE.FPU] = { 0: 0x00, 1: 0x10 }, - LABEL: "Coprocessor" + LABEL: "FPU" }; ChipSet.DIPSW[ChipSet.MODEL_ATT_6300][1][ChipSet.SWITCH_TYPE.FLOPTYPE] = { MASK: 0x01, @@ -2809,7 +2809,7 @@ ChipSet.prototype.updateDIPSwitchDescriptions = function() 3: "Monochrome" }; sText += this.getDIPMemorySize(true) + "Kb"; - sText += ", " + (+this.getDIPCoprocessor(true)? "" : "No ") + "Coprocessor"; + sText += ", " + (+this.getDIPCoprocessor(true)? "" : "No ") + "FPU"; sText += ", " + asMonitorTypes[this.getDIPVideoMonitor(true)] + " Monitor"; sText += ", " + this.getDIPFloppyDrives(true) + " Floppy Drives"; if (this.aDIPSwitches[0][1] != null && this.aDIPSwitches[0][1] != this.aDIPSwitches[0][0] || diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 423de801f..576f2b2ef 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -77,9 +77,11 @@ function BusPDP11(parmsBus, cpu, dbg) /* * This controls the location of the IOPAGE (ie, at the top of 16-bit, 18-bit, or 22-bit address range). - * It is managed by setIOPageRange(). initMemory() establishes the default (16). + * It is managed by setIOPageRange(). reset() establishes the default (16). */ this.nIOPageRange = 0; // zero means no IOPAGE access (yet) + this.prevIOPageBlocks = []; // this saves any memory blocks we had to replace with IOPAGE blocks + this.realIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them /* * Compute all BusPDP11 memory block parameters, based on the width of the bus. The entire @@ -140,6 +142,7 @@ function BusPDP11(parmsBus, cpu, dbg) */ this.aIOHandlers = []; this.fIOBreakAll = false; + this.nDisableTraps = 0; /* * Array of RESET notification handlers registered by Device components. @@ -183,19 +186,62 @@ BusPDP11.ERROR = { }; /* - * These are our custom controller functions for all IOPAGE accesses. + * Every entry in the aIOHandlers table is an array with the following indexes: + */ +BusPDP11.IOHANDLER = { + READ_BYTE: 0, + WRITE_BYTE: 1, + READ_WORD: 2, + WRITE_WORD: 3, + NAME: 4 +}; + +/* + * These are our custom IOController functions for all IOPAGE accesses. They look up the IOPAGE + * offset in the aIOHandlers table, and if an entry exists, they use the appropriate IOHANDLER indexes + * (above) to locate the appropriate read/write handlers. * - * Note that we try to have reasonable fall-backs for byte reads when only word read handlers exist, - * and word reads if only byte handlers exist. Ditto for writes. These fall-backs may not always be + * Note that we try to have reasonable fallbacks for byte reads when only word read handlers exist, + * and word reads if only byte handlers exist. Ditto for writes. These fallbacks may not always be * appropriate; for example, when a byte write falls back to a word write, the address must be read * first, and depending on the underlying I/O device, that may or may not have side-effects. It's really * up to the device to know whether that matters, and provide all the necessary handlers if it does. * + * TODO: Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works + * just fine by registering WORD handlers for the appropriate ODD addresses. What is unclear, however, + * is what is exactly supposed to happen when the CPU reads or writes a BYTE from an ODD IOPAGE address; + * it's likely that our built-in fallbacks are NOT correct for those cases. + * + * For example, let's imagine that only read/write WORD handlers have been registered for ODD address + * 177701 (ie, General Register R1, Set 0). If a readByte(177701) request is made, we would fallback to + * reading the word at 177700 and returning the high byte, but that would fetch the contents of General + * Register R0 instead of R1, which clearly seems wrong. + * + * One solution is for the caller to register both BYTE and WORD handlers for ODD addresses, making + * the caller responsible for the defining the correct behavior in all cases. However, that's more work + * for the caller, and we're just punting the problem instead of solving it. + * + * Another solution is for addIOHandlers() to detect the ODD address case, and install custom fallback + * handlers for read and write BYTE accesses. In the above example, the custom read BYTE handler would + * invoke the read WORD handler and mask the result with 0xff, and the custom write BYTE handler would + * first call the read WORD handler, insert the new data into the low byte of the result, and then + * call the write WORD handler. + * + * addIOHandlers() currently implements the second solution. Again, we're assuming that's the correct + * behavior for ODD IOPAGE accesses, which may not be a valid assumption. + * + * One of things that gives me pause about the second solution is that when the destination of a MOVB + * instruction is a general register, the byte is sign-extended to a word. So it seems to strange to have + * a different MOVB behavior when the destination is ODD general register using an ODD IOPAGE address. + * Other byte instructions, like CLRB, would function identically when modifying ODD general registers, + * regardless how they are referenced. + * * TODO: Another small potential improvement would be for addIOHandlers() to predefine fall-backs for all - * missing handlers, so there's never a need to check each entry (eg, afn[0], afn[1], etc) before calling - * it. However, since there's no avoiding checking afn itself (unless we FULLY populate the aIOHandlers - * array), and since these I/O accesses should be pretty infrequent relative to all other memory accesses, - * the benefit seems pretty minimal. + * missing handlers, in both the ODD and EVEN cases, so there's never a need to check each function index + * before calling it. However, since there's no avoiding checking aIOHandlers[off] (unless we FULLY populate + * the aIOHandlers array), and since these I/O accesses should be pretty infrequent relative to all other + * memory accesses, the benefit seems pretty minimal. Plus, all our fallback assumptions still need to be + * verified, so let's wait until that's done before we start optimizing this code. */ BusPDP11.IOController = { @@ -213,26 +259,26 @@ BusPDP11.IOController = { var bus = this.controller; var afn = bus.aIOHandlers[off]; if (afn) { - if (afn[0]) { - b = afn[0](addr) & 0xff; // we mask the result of readByte() in case the caller is re-using their readWord() handler - } else if (afn[2]) { + if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { + b = afn[BusPDP11.IOHANDLER.READ_BYTE](addr); + } else if (afn[BusPDP11.IOHANDLER.READ_WORD]) { if (!(addr & 0x1)) { - b = afn[2](addr) & 0xff; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addr) & 0xff; } else { - b = afn[2](addr & ~0x1) >> 8; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; } } } else if (addr & 0x1) { afn = bus.aIOHandlers[off & ~0x1]; if (afn) { - if (afn[2]) { - b = afn[2](addr & ~0x1) >> 8; + if (afn[BusPDP11.IOHANDLER.READ_WORD]) { + b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; } } } if (b >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[4] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); } return b; } @@ -261,21 +307,21 @@ BusPDP11.IOController = { /* * If a writeByte() handler exists, call it; we're done */ - if (afn[1]) { - afn[1](b, addr); + if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { + afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addr); fWrite = true; } /* * If a writeWord() handler exists, call the readWord() handler first to get the original data, - * then call writeWord() with the new data pre-inserted into the original data. + * then call writeWord() with the new data pre-inserted in the original data. */ - else if (afn[3]) { - w = afn[2]? afn[2](addr) : 0; + else if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { + w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](addr) : 0; if (!(addr & 0x1)) { - afn[3]((w & ~0xff) | b, addr); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addr); fWrite = true; } else { - afn[3]((w & 0xff) | (b << 8), addr & ~0x1); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr & ~0x1); fWrite = true; } } @@ -283,21 +329,21 @@ BusPDP11.IOController = { /* * If no handler existed, and this address was odd, then perhaps a handler exists for the even address; * if so, call the readWord() handler first to get the original data, then call writeWord() with the new - * data pre-inserted into (the high byte of) the original data. + * data pre-inserted in (the high byte of) the original data. */ afn = bus.aIOHandlers[off & ~0x1]; if (afn) { - if (afn[3]) { + if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { addr &= ~0x1; - w = afn[2]? afn[2](addr) : 0; - afn[3]((w & 0xff) | (b << 8), addr); + w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](addr) : 0; + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr); fWrite = true; } } } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[4] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); } return; } @@ -321,15 +367,15 @@ BusPDP11.IOController = { var bus = this.controller; var afn = bus.aIOHandlers[off]; if (afn) { - if (afn[2]) { - w = afn[2](addr); - } else if (afn[0]) { - w = afn[0](addr) | (afn[0](addr + 1) << 8); + if (afn[BusPDP11.IOHANDLER.READ_WORD]) { + w = afn[BusPDP11.IOHANDLER.READ_WORD](addr); + } else if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { + w = afn[BusPDP11.IOHANDLER.READ_BYTE](addr) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addr + 1) << 8); } } if (w >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[4] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); } return w; } @@ -354,18 +400,18 @@ BusPDP11.IOController = { var bus = this.controller; var afn = bus.aIOHandlers[off]; if (afn) { - if (afn[3]) { - afn[3](w, addr); + if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { + afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addr); fWrite = true; - } else if (afn[1]) { - afn[1](w & 0xff, addr); - afn[1](w >> 8, addr + 1); + } else if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addr); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addr + 1); fWrite = true; } } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { - this.dbg.printMessage(afn[4] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); } return; } @@ -385,13 +431,12 @@ BusPDP11.IOController = { */ BusPDP11.prototype.initMemory = function() { - var block = new MemoryPDP11(this.cpu); + var block = new MemoryPDP11(this); block.copyBreakpoints(this.dbg); this.aMemBlocks = new Array(this.nBlockTotal); for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) { this.aMemBlocks[iBlock] = block; } - this.setIOPageRange(16); }; /** @@ -400,8 +445,12 @@ BusPDP11.prototype.initMemory = function() * We can define the IOPAGE address range with a single number, because the size of the IOPAGE is fixed at 8Kb. * The bottom of the range is (2 ^ nRange) - IOPAGE_LENGTH, and the top is (2 ^ nRange) - 1. * + * Note that we defer our initial call to this function as long as possible (ie, at the end of reset()) so that + * other components have first shot at adding their own memory blocks (if any), because addMemory() only allows + * installing memory on top of empty memory blocks. + * * @this {BusPDP11} - * @param {number} nRange (16, 18 or 22) + * @param {number} nRange (16, 18 or 22; 0 removes the IOPAGE altogether) */ BusPDP11.prototype.setIOPageRange = function(nRange) { @@ -409,12 +458,20 @@ BusPDP11.prototype.setIOPageRange = function(nRange) var addr; if (this.nIOPageRange) { addr = (1 << this.nIOPageRange) - BusPDP11.IOPAGE_LENGTH; - if (!this.removeMemory(addr, BusPDP11.IOPAGE_LENGTH)) return; + this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.prevIOPageBlocks); this.nIOPageRange = 0; } - addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH; - if (!this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this)) return; - this.nIOPageRange = nRange; + if (nRange) { + this.nIOPageRange = nRange; + addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH; + this.prevIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); + if (this.realIOPageBlocks) { + this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.realIOPageBlocks); + } else { + this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this); + this.realIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); + } + } } }; @@ -460,6 +517,7 @@ BusPDP11.prototype.reset = function() for (var i = 0; i < this.afnReset.length; i++) { this.afnReset[i](); } + this.setIOPageRange(16); }; /** @@ -474,13 +532,17 @@ BusPDP11.prototype.reset = function() * @param {number} addr (ie, an IOPAGE address) * @param {number} data (-1 if read, otherwise write) * @param {number} byteFlag (true if byte I/O, otherwise word) + * @return {number} */ BusPDP11.prototype.unknownAccess = function(addr, data, byteFlag) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { - this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); + if (!this.nDisableTraps) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { + this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); + } + this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); } - this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); + return 0; }; /** @@ -549,8 +611,13 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) var sizeBlock = this.nBlockSize - (addrNext - addrBlock); if (sizeBlock > sizeLeft) sizeBlock = sizeLeft; - if (block && block.size) { - if (block.type == type && block.controller == controller) { + /* + * addMemory() will now happily replace an existing block when a memory controller is specified; + * this is a work-around to make life easier for setIOPageRange(), which otherwise would have to call + * removeMemory() first, which would just waste time and memory allocating more (empty) blocks. + */ + if (!controller && block && block.size) { + if (block.type == type /* && block.controller == controller */) { /* * Where there is already a similar block with a non-zero size, we allow the allocation only if: * @@ -575,7 +642,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) return this.reportError(BusPDP11.ERROR.RANGE_INUSE, addrNext, sizeLeft); } - var blockNew = new MemoryPDP11(this.cpu, addrNext, sizeBlock, this.nBlockSize, type, controller); + var blockNew = new MemoryPDP11(this, addrNext, sizeBlock, this.nBlockSize, type, controller); blockNew.copyBreakpoints(this.dbg, block); this.aMemBlocks[iBlock++] = blockNew; @@ -584,7 +651,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) } if (sizeLeft <= 0) { - this.status(Math.floor(size / 1024) + "Kb " + MemoryPDP11.TYPE.NAMES[type] + " at " + str.toHexLong(addr)); + this.status(Math.floor(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toHexLong(addr)); return true; } @@ -713,7 +780,7 @@ BusPDP11.prototype.removeMemory = function(addr, size) var iBlock = addr >>> this.nBlockShift; while (size > 0) { var blockOld = this.aMemBlocks[iBlock]; - var blockNew = new MemoryPDP11(this.cpu, addr); + var blockNew = new MemoryPDP11(this, addr); blockNew.copyBreakpoints(this.dbg, blockOld); this.aMemBlocks[iBlock++] = blockNew; addr = iBlock * this.nBlockSize; @@ -799,7 +866,7 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type) this.assert(block); if (!block) break; if (type !== undefined) { - var blockNew = new MemoryPDP11(this.cpu, addr); + var blockNew = new MemoryPDP11(this, addr); blockNew.clone(block, type, this.dbg); block = blockNew; } @@ -831,7 +898,10 @@ BusPDP11.prototype.getByte = function(addr) */ BusPDP11.prototype.getByteDirect = function(addr) { - return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); + this.nDisableTraps++; + var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); + this.nDisableTraps--; + return b; }; /** @@ -862,12 +932,17 @@ BusPDP11.prototype.getWord = function(addr) */ BusPDP11.prototype.getWordDirect = function(addr) { + var w; var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; + this.nDisableTraps++; if (!PDP11.WORDBUS && off == this.nBlockLimit) { - return this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); + w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); + } else { + w = this.aMemBlocks[iBlock].readWordDirect(off, addr); } - return this.aMemBlocks[iBlock].readWordDirect(off, addr); + this.nDisableTraps--; + return w; }; /** @@ -894,7 +969,9 @@ BusPDP11.prototype.setByte = function(addr, b) */ BusPDP11.prototype.setByteDirect = function(addr, b) { + this.nDisableTraps++; this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr); + this.nDisableTraps--; }; /** @@ -930,12 +1007,14 @@ BusPDP11.prototype.setWordDirect = function(addr, w) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; + this.nDisableTraps++; if (!PDP11.WORDBUS && off == this.nBlockLimit) { this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr); this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1); - return; + } else { + this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr); } - this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr); + this.nDisableTraps--; }; /** @@ -1099,13 +1178,41 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, BusPDP11.prototype.addIOTable = function(component, table) { for (var port in table) { + var addr = +port; var afn = table[port]; + + /* + * Don't install (ie, ignore) handlers for I/O addresses that are defined with a model number + * that is "greater than" than the current model. + */ if (afn[5] && afn[5] > this.cpu.model) continue; + var fnReadByte = afn[0]? afn[0].bind(component) : null; var fnWriteByte = afn[1]? afn[1].bind(component) : null; var fnReadWord = afn[2]? afn[2].bind(component) : null; var fnWriteWord = afn[3]? afn[3].bind(component) : null; - this.addIOHandlers(+port, +port, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]); + + /* + * As discussed in the IOController comments above, when handlers are being registered for ODD addresses, + * we assume that we need different fallback handlers when reading and/or writing bytes. + */ + if (addr & 0x1) { + if (!fnReadByte && fnReadWord) { + fnReadByte = function(fnReadWord) { + return function(addr) { + return fnReadWord(addr) & 0xff; + }.bind(component); + }(fnReadWord); + } + if (!fnWriteByte && fnWriteWord && fnReadWord) { + fnWriteByte = function(fnWriteWord, fnReadWord) { + return function(data, addr) { + return fnWriteWord((fnReadWord(addr) & ~0xff) | data, addr); + }.bind(component); + }(fnWriteWord, fnReadWord); + } + } + this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]); } }; @@ -1120,6 +1227,24 @@ BusPDP11.prototype.addResetHandler = function(fnReset) this.afnReset.push(fnReset); }; +/** + * fault(addr) + * + * Memory interface for signaling alignment errors. + * + * @this {BusPDP11} + * @param {number} addr + */ +BusPDP11.prototype.fault = function(addr) +{ + if (!this.nDisableTraps) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { + this.dbg.printMessage("memory fault on address " + this.dbg.toStrBase(addr), true, true); + } + this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); + } +}; + /** * reportError(errNum, addr, size, fQuiet) * diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 354fda36f..86d26049e 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -205,22 +205,9 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.flags.autoStart = (sAutoStart == "true"? true : (sAutoStart == "false"? false : !!sAutoStart)); } - this.initBusComplete(); - this.setReady(); }; -/** - * initBusComplete() - * - * Stub for Bus finalization (overridden by the CPUStatePDP11 component). - * - * @this {CPUPDP11} - */ -CPUPDP11.prototype.initBusComplete = function() -{ -}; - /** * reset() * diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index c7f1324a5..a47d16474 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -98,17 +98,6 @@ Component.subclass(CPUStatePDP11, CPUPDP11); */ var InterruptEvent; -/** - * initBusComplete() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.initBusComplete = function() -{ - this.assert(this.bus); - this.setMemoryAccess(); -}; - /** * initProcessor() * @@ -156,7 +145,7 @@ CPUStatePDP11.prototype.initRegs = function() this.regsAlt = [ // Alternate R0 - R5 0, 0, 0, 0, 0, 0 ]; - this.regsAltStack = [ // Alternate R6 stack pointers (kernel, super, illegal, user) + this.regsAltStack = [ // Alternate R6 stack pointers (KERNEL, SUPER, illegal, USER) 0, 0, 0, 0 ]; this.mmuMode = 0; // current memory management mode (see PDP11.MODE.KERNEL | SUPER | UNUSED | USER) @@ -1029,19 +1018,6 @@ CPUStatePDP11.prototype.updateSubFlags = function(result, src, dst) } }; -/** - * fault(addr) - * - * Memory interface for signaling alignment errors. - * - * @this {CPUStatePDP11} - * @param {number} addr - */ -CPUStatePDP11.prototype.fault = function(addr) -{ - this.trap(PDP11.TRAP.BUS_ERROR, addr); -}; - /** * panic(reason) * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 8cbd7edde..7a0f34bf8 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -587,12 +587,7 @@ if (DEBUGGER) { var b = 0xff; var addr = this.getAddr(dbgAddr, false, 1); if (addr !== PDP11.ADDR_INVALID) { - this.nDisableMessages++; - /* - * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). - */ b = this.bus.getByteDirect(addr); - this.nDisableMessages--; if (inc) this.incAddr(dbgAddr, inc); } return b; @@ -611,16 +606,7 @@ if (DEBUGGER) { var w = 0xffff; var addr = this.getAddr(dbgAddr, false, 2); if (addr !== PDP11.ADDR_INVALID) { - this.nDisableMessages++; - /* - * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). - * - * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what - * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are - * performed by the CPU, not the Bus. - */ w = this.bus.getWordDirect(addr); - this.nDisableMessages--; if (inc) this.incAddr(dbgAddr, inc); } return w; @@ -638,12 +624,7 @@ if (DEBUGGER) { { var addr = this.getAddr(dbgAddr, true, 1); if (addr !== PDP11.ADDR_INVALID) { - this.nDisableMessages++; - /* - * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). - */ this.bus.setByteDirect(addr, b); - this.nDisableMessages--; if (inc) this.incAddr(dbgAddr, inc); this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target } @@ -661,16 +642,7 @@ if (DEBUGGER) { { var addr = this.getAddr(dbgAddr, true, 2); if (addr !== PDP11.ADDR_INVALID) { - this.nDisableMessages++; - /* - * TODO: We also need a Bus interface to disable accesses that could trigger a trap(). - * - * NOTE: We don't care if the word address is aligned, because 1) we assume the user knows what - * they're doing, and 2) the Bus simply ignores the low address bit anyway. Alignment checks are - * performed by the CPU, not the Bus. - */ this.bus.setWordDirect(addr, w); - this.nDisableMessages--; if (inc) this.incAddr(dbgAddr, inc); this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target } @@ -879,7 +851,7 @@ if (DEBUGGER) { if (!cPrev++) this.println("..."); } else { typePrev = block.type; - var sType = MemoryPDP11.TYPE.NAMES[typePrev]; + var sType = MemoryPDP11.TYPE_NAMES[typePrev]; if (block) { this.println(str.toHex(block.id, 8) + " %" + str.toHex(i << this.bus.nBlockShift, 8) + " %%" + str.toHex(block.addr, 8) + " " + str.toHexWord(block.used) + " " + str.toHexWord(block.size) + " " + sType); } @@ -1034,7 +1006,6 @@ if (DEBUGGER) { this.bitsMessage = this.bitsWarning = MessagesPDP11.WARN; this.sMessagePrev = null; this.aMessageBuffer = []; - this.nDisableMessages = 0; /* * Internally, we use "key" instead of "keys", since the latter is a method on JavasScript objects, * but externally, we allow the user to specify "keys"; "kbd" is also allowed as shorthand for "keyboard". @@ -1154,26 +1125,6 @@ if (DEBUGGER) { return s; }; - /** - * disableMessages(s) - * - * @this {DebuggerPDP11} - */ - DebuggerPDP11.prototype.disableMessages = function() - { - this.nDisableMessages++; - }; - - /** - * enableMessages(s) - * - * @this {DebuggerPDP11} - */ - DebuggerPDP11.prototype.enableMessages = function() - { - this.nDisableMessages--; - }; - /** * message(sMessage, fAddress) * @@ -1183,8 +1134,6 @@ if (DEBUGGER) { */ DebuggerPDP11.prototype.message = function(sMessage, fAddress) { - if (this.nDisableMessages) return; - if (fAddress) { sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getPC())); } @@ -1632,9 +1581,7 @@ if (DEBUGGER) { */ if (nState >= 0 && this.aaOpcodeCounts.length) { this.cOpcodes++; - this.nDisableMessages++; var opCode = this.bus.getWordDirect(addr); - this.nDisableMessages--; if (opCode != null) { var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory]; this.setAddr(dbgAddr, cpu.getPC()); @@ -2741,9 +2688,8 @@ if (DEBUGGER) { /** * doDump(asArgs) * - * The length parameter is interpreted as a number of bytes, in hex, which we convert to the appropriate number - * of lines, because we always display whole lines. If the length is omitted/undefined, it defaults to 0x80 (128.) - * bytes, which normally translates to 8 lines. + * The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, and it is + * interpreted using the current base. * * @this {DebuggerPDP11} * @param {Array.} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes]) @@ -2840,27 +2786,31 @@ if (DEBUGGER) { var sDump = ""; var size = (sCmd == "dd"? 4 : (sCmd == "dw"? 2 : 1)); - var cb = (size * len) || 128; - var cLines = ((cb + 15) >> 4) || 1; + var nBytes = (size * len) || 128; + var nLines = ((nBytes + 15) >> 4) || 1; - while (cLines-- && cb > 0) { - var data = 0, iByte = 0, i; + while (nLines-- && nBytes > 0) { + var data = 0, shift = 0, i; var sData = "", sChars = ""; sAddr = this.toStrAddr(dbgAddr); /* - * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords) + * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords). + * + * And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've + * changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated + * to prevent generating traps due to to Debugger access of unaligned memory and/or undefined IOPAGE addresses. */ - var nBytes = (size == 4? 16 : this.nBase); - for (i = nBytes; i > 0 && cb > 0; i--) { - var b = this.getByte(dbgAddr, 1); - data |= (b << (iByte++ << 3)); - if (iByte == size) { + for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) { + var n, v = size == 2? this.getWord(dbgAddr, n = 2) : this.getByte(dbgAddr, n = 1); + data |= (v << (shift << 3)); + shift += n; + if (shift == size) { sData += this.toStrBase(data, size); sData += (size == 1? (i == 9? '-' : ' ') : " "); - data = iByte = 0; + data = shift = 0; } - sChars += (b >= 32 && b < 128? String.fromCharCode(b) : '.'); - cb--; + sChars += (v >= 32 && v < 128? String.fromCharCode(v) : '.'); + nBytes--; } if (sDump) sDump += '\n'; sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : ""); @@ -3568,14 +3518,14 @@ if (DEBUGGER) { if (n === undefined) n = 1; - var cb = 0x100; + var nBytes = 0x100; if (sAddrEnd !== undefined) { var dbgAddrEnd = this.parseAddr(sAddrEnd, true); if (!dbgAddrEnd || dbgAddrEnd.addr < dbgAddr.addr) return; - cb = dbgAddrEnd.addr - dbgAddr.addr; - if (!DEBUG && cb > 0x100) { + nBytes = dbgAddrEnd.addr - dbgAddr.addr; + if (!DEBUG && nBytes > 0x100) { /* * Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to * prevent the user from wedging the browser by dumping too many lines, but also a recognition @@ -3587,10 +3537,10 @@ if (DEBUGGER) { n = -1; } - var cLines = 0; + var nLines = 0; var sInstruction; - while (cb > 0 && n--) { + while (nBytes > 0 && n--) { var nSequence = (this.isBusy(false) || this.nStep)? this.nCycles : null; var sComment = (nSequence != null? "cycles" : null); @@ -3599,7 +3549,7 @@ if (DEBUGGER) { var addr = dbgAddr.addr; // we snap dbgAddr.addr *after* calling findSymbol(), which re-evaluates it if (aSymbol[0] && n) { - if (!cLines && n || aSymbol[0].indexOf('+') < 0) { + if (!nLines && n || aSymbol[0].indexOf('+') < 0) { var sLabel = aSymbol[0] + ':'; if (aSymbol[2]) sLabel += ' ' + aSymbol[2]; this.println(sLabel); @@ -3615,8 +3565,8 @@ if (DEBUGGER) { this.println(sInstruction); this.dbgAddrNextCode = dbgAddr; - cb -= dbgAddr.addr - addr; - cLines++; + nBytes -= dbgAddr.addr - addr; + nLines++; } }; diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 015d87043..3770e9247 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -33,10 +33,12 @@ "use strict"; if (NODE) { - var web = require("../../shared/lib/weblib"); - var Component = require("../../shared/lib/component"); - var State = require("../../shared/lib/state"); - var BusPDP11 = require("./bus"); + var str = require("../../shared/lib/strlib"); + var web = require("../../shared/lib/weblib"); + var Component = require("../../shared/lib/component"); + var State = require("../../shared/lib/state"); + var BusPDP11 = require("./bus"); + var MessagesPDP11 = require("./messages"); } /** @@ -55,7 +57,7 @@ if (NODE) { */ function DevicePDP11(parmsDevice) { - Component.call(this, "Device", parmsDevice, DevicePDP11); + Component.call(this, "Device", parmsDevice, DevicePDP11, MessagesPDP11.DEVICE); this.display = { data: 0, @@ -981,6 +983,20 @@ DevicePDP11.prototype.writePSW = function(data, addr) this.cpu.opFlags |= PDP11.OPFLAG.NO_FLAGS; }; +/** + * writeIgnored(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr + */ +DevicePDP11.prototype.writeIgnored = function(data, addr) +{ + if (this.messageEnabled()) { + this.printMessage("writeIgnored(" + str.toOct(addr) + "): " + str.toOct(data), true, true); + } +}; + /** * kw11_interrupt() * @@ -1023,28 +1039,28 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3"], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], - [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, null, "MMR1"], - [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, null, "MMR2"], + [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1"], + [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2"], [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR"], [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR"], [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR"], [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR"], - [PDP11.UNIBUS.R0SET0]: /* 177700 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], - [PDP11.UNIBUS.R1SET0]: /* 177701 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], - [PDP11.UNIBUS.R2SET0]: /* 177702 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], - [PDP11.UNIBUS.R3SET0]: /* 177703 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R3SET0"], - [PDP11.UNIBUS.R4SET0]: /* 177704 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R4SET0"], - [PDP11.UNIBUS.R5SET0]: /* 177705 */ [DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R5SET0"], - [PDP11.UNIBUS.R6KERNEL]:/* 177706 */ [DevicePDP11.prototype.readR6KERNEL,DevicePDP11.prototype.writeR6KERNEL,DevicePDP11.prototype.readR6KERNEL, DevicePDP11.prototype.writeR6KERNEL,"R6KERNEL"], - [PDP11.UNIBUS.R7KERNEL]:/* 177707 */ [DevicePDP11.prototype.readR7KERNEL,DevicePDP11.prototype.writeR7KERNEL,DevicePDP11.prototype.readR7KERNEL, DevicePDP11.prototype.writeR7KERNEL,"R7KERNEL"], - [PDP11.UNIBUS.R0SET1]: /* 177710 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1"], - [PDP11.UNIBUS.R1SET1]: /* 177711 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1"], - [PDP11.UNIBUS.R2SET1]: /* 177712 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1"], - [PDP11.UNIBUS.R3SET1]: /* 177713 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1"], - [PDP11.UNIBUS.R4SET1]: /* 177714 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1"], - [PDP11.UNIBUS.R5SET1]: /* 177715 */ [DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1"], - [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER"], - [PDP11.UNIBUS.R6USER]: /* 177717 */ [DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER"], + [PDP11.UNIBUS.R0SET0]: /* 177700 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], + [PDP11.UNIBUS.R1SET0]: /* 177701 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], + [PDP11.UNIBUS.R2SET0]: /* 177702 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], + [PDP11.UNIBUS.R3SET0]: /* 177703 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R3SET0"], + [PDP11.UNIBUS.R4SET0]: /* 177704 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R4SET0"], + [PDP11.UNIBUS.R5SET0]: /* 177705 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R5SET0"], + [PDP11.UNIBUS.R6KERNEL]:/* 177706 */ [null, null, DevicePDP11.prototype.readR6KERNEL,DevicePDP11.prototype.writeR6KERNEL,"R6KERNEL"], + [PDP11.UNIBUS.R7KERNEL]:/* 177707 */ [null, null, DevicePDP11.prototype.readR7KERNEL,DevicePDP11.prototype.writeR7KERNEL,"R7KERNEL"], + [PDP11.UNIBUS.R0SET1]: /* 177710 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1"], + [PDP11.UNIBUS.R1SET1]: /* 177711 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1"], + [PDP11.UNIBUS.R2SET1]: /* 177712 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1"], + [PDP11.UNIBUS.R3SET1]: /* 177713 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1"], + [PDP11.UNIBUS.R4SET1]: /* 177714 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1"], + [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1"], + [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER"], + [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER"], [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", PDP11.MODEL_1170], [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", PDP11.MODEL_1170], [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", PDP11.MODEL_1170], diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index a2ed951cb..cc2534331 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -56,7 +56,7 @@ var littleEndian = (TYPEDARRAYS? (function() { })() : false); /** - * MemoryPDP11(cpu, addr, used, size, type, controller) + * MemoryPDP11(bus, addr, used, size, type, controller) * * The Bus component allocates Memory objects so that each has a memory buffer with a * block-granular starting address and an address range equal to bus.nBlockSize; however, @@ -89,17 +89,17 @@ var littleEndian = (TYPEDARRAYS? (function() { * is available). * * @constructor - * @param {CPUStatePDP11} cpu + * @param {BusPDP11} bus * @param {number|null} [addr] of lowest used address in block * @param {number} [used] portion of block in bytes (0 for none); must be a multiple of 4 * @param {number} [size] of block's buffer in bytes (0 for none); must be a multiple of 4 * @param {number} [type] is one of the MemoryPDP11.TYPE constants (default is MemoryPDP11.TYPE.NONE) * @param {Object} [controller] is an optional memory controller component */ -function MemoryPDP11(cpu, addr, used, size, type, controller) +function MemoryPDP11(bus, addr, used, size, type, controller) { var i; - this.cpu = cpu; + this.bus = bus; this.id = (MemoryPDP11.idBlock += 2); this.adw = null; this.offset = 0; @@ -209,10 +209,10 @@ MemoryPDP11.TYPE = { RAM: 1, ROM: 2, VIDEO: 3, - CONTROLLER: 4, - COLORS: ["black", "blue", "green", "cyan"], - NAMES: ["NONE", "RAM", "ROM", "VID", "H/W"] + CONTROLLER: 4 }; +MemoryPDP11.TYPE_COLORS = ["black", "blue", "green", "cyan"]; +MemoryPDP11.TYPE_NAMES = ["NONE", "RAM", "ROM", "VID", "H/W"]; /* * Last used block ID (used for debugging only) @@ -469,7 +469,7 @@ MemoryPDP11.prototype = { * @param {string} sMessage */ printAddr: function(sMessage) { - if (DEBUG && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { + if (DEBUG && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY)) { this.dbg.printMessage(sMessage + ' ' + (this.addr != null? ('@' + this.dbg.toStrBase(this.addr)) : '#' + this.id), true); } }, @@ -557,7 +557,7 @@ MemoryPDP11.prototype = { * @return {number} */ readNone: function readNone(off, addr) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM) /* && !off */) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY) /* && !off */) { this.dbg.printMessage("attempt to read invalid block %" + str.toHex(this.addr), true); this.dbg.stopCPU(); } @@ -572,7 +572,7 @@ MemoryPDP11.prototype = { * @param {number} addr */ writeNone: function writeNone(off, v, addr) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM) /* && !off */) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY) /* && !off */) { this.dbg.printMessage("attempt to write " + str.toHexWord(v) + " to invalid block %" + str.toHex(this.addr), true); this.dbg.stopCPU(); } @@ -624,7 +624,7 @@ MemoryPDP11.prototype = { */ readWordMemory: function readWordMemory(off, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } if (BYTEARRAYS) { return this.ab[off] | (this.ab[off + 1] << 8); @@ -668,7 +668,7 @@ MemoryPDP11.prototype = { */ writeWordMemory: function writeWordMemory(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } if (BYTEARRAYS) { this.ab[off] = (w & 0xff); @@ -763,7 +763,7 @@ MemoryPDP11.prototype = { */ readByteLE: function readByteLE(off, addr) { var b = this.ab[off]; - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY)) { this.dbg.printMessage("Memory.readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true); } return b; @@ -778,7 +778,7 @@ MemoryPDP11.prototype = { */ readWordBE: function readWordBE(off, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } return this.dv.getUint16(off, true); }, @@ -793,7 +793,7 @@ MemoryPDP11.prototype = { readWordLE: function readWordLE(off, addr) { var w; if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset @@ -804,7 +804,7 @@ MemoryPDP11.prototype = { } else { w = this.ab[off] | (this.ab[off+1] << 8); } - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY)) { this.dbg.printMessage("Memory.readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true); } return w; @@ -832,7 +832,7 @@ MemoryPDP11.prototype = { writeByteLE: function writeByteLE(off, b, addr) { this.ab[off] = b; this.fDirty = true; - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY)) { this.dbg.printMessage("Memory.writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true); } }, @@ -846,7 +846,7 @@ MemoryPDP11.prototype = { */ writeWordBE: function writeWordBE(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } this.dv.setUint16(off, w, true); this.fDirty = true; @@ -861,7 +861,7 @@ MemoryPDP11.prototype = { */ writeWordLE: function writeWordLE(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.cpu.fault(addr); + this.bus.fault(addr); } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset @@ -874,7 +874,7 @@ MemoryPDP11.prototype = { this.ab[off+1] = w >> 8; } this.fDirty = true; - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEM)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY)) { this.dbg.printMessage("Memory.writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true); } } diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index 38ca2f2c2..7a1927419 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -36,7 +36,8 @@ var MessagesPDP11 = { CPU: 0x00000001, TRAP: 0x00000010, BUS: 0x00000040, - MEM: 0x00000080, + MEMORY: 0x00000080, + DEVICE: 0x00000100, KEYBOARD: 0x00010000, KEYS: 0x00020000, DISK: 0x00200000, @@ -67,7 +68,8 @@ MessagesPDP11.CATEGORIES = { "cpu": MessagesPDP11.CPU, "trap": MessagesPDP11.TRAP, "bus": MessagesPDP11.BUS, - "mem": MessagesPDP11.MEM, + "memory": MessagesPDP11.MEMORY, + "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 "disk": MessagesPDP11.DISK, diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index ae533f7ed..67840ad85 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -83,6 +83,24 @@ RAMPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.bus = bus; this.cpu = cpu; this.dbg = dbg; + this.initRAM(); +}; + +/** + * initRAM() + * + * @this {RAMPDP11} + */ +RAMPDP11.prototype.initRAM = function() +{ + if (!this.fAllocated && this.sizeRAM) { + if (this.bus.addMemory(this.addrRAM, this.sizeRAM, MemoryPDP11.TYPE.RAM)) { + this.fAllocated = true; + } + } + if (!this.fAllocated) { + Component.error("No RAM allocated"); + } this.setReady(); }; @@ -96,15 +114,12 @@ RAMPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) */ RAMPDP11.prototype.powerUp = function(data, fRepower) { - if (!fRepower) { - /* - * The Computer powers up the CPU last, at which point CPUState state is restored, - * which includes the Bus state, and since we use the Bus to allocate all our memory, - * memory contents are already restored for us, so we don't need the usual restore - * logic. We just need to call reset(), to allocate memory for the RAM. - */ - this.reset(); - } + /* + * The Computer powers up the CPU last, at which point CPUState state is restored, + * which includes the Bus state, and since we use the Bus to allocate all our memory, + * memory contents are already restored for us, so we don't need the usual restore + * logic. + */ return true; }; @@ -124,7 +139,7 @@ RAMPDP11.prototype.powerDown = function(fSave, fShutdown) * our memory, memory contents are already saved for us, so we don't need the usual * save logic. */ - return (fSave)? this.save() : true; + return true; }; /** @@ -134,41 +149,9 @@ RAMPDP11.prototype.powerDown = function(fSave, fShutdown) */ RAMPDP11.prototype.reset = function() { - if (!this.fAllocated && this.sizeRAM) { - if (this.bus.addMemory(this.addrRAM, this.sizeRAM, MemoryPDP11.TYPE.RAM)) { - this.fAllocated = true; - } - } - if (!this.fAllocated) { - Component.error("No RAM allocated"); - } -}; - -/** - * save() - * - * This implements save support for the RAMPDP11 component. - * - * @this {RAMPDP11} - * @return {Object} - */ -RAMPDP11.prototype.save = function() -{ - return null; -}; - -/** - * restore(data) - * - * This implements restore support for the RAMPDP11 component. - * - * @this {RAMPDP11} - * @param {Object} data - * @return {boolean} true if successful, false if failure - */ -RAMPDP11.prototype.restore = function(data) -{ - return true; + /* + * If you want to zero RAM on reset, then this would be a good place to do it. + */ }; /** diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index baa978281..0539e1183 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -120,7 +120,7 @@ Component.subclass(ROMPDP11); * ROM contents, so in that case, having a reset() function that restores the original ROM data * might be useful; then again, it might not, depending on what you're trying to debug. * - * If we do add reset(), then we'll want to change copyROM() to hang onto the original + * If we do add reset(), then we'll want to change initROM() to hang onto the original * ROM data; currently, we release it after copying it into the read-only memory allocated * via bus.addMemory(). */ @@ -139,7 +139,7 @@ ROMPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.bus = bus; this.cpu = cpu; this.dbg = dbg; - this.copyROM(); + this.initROM(); }; /** @@ -266,11 +266,11 @@ ROMPDP11.prototype.doneLoad = function(sURL, sROMData, nErrorCode) this.abROM[i] = str.parseInt(asHexData[i], 16); } } - this.copyROM(); + this.initROM(); }; /** - * copyROM() + * initROM() * * This function is called by both initBus() and doneLoad(), but it cannot copy the the ROM data into place * until after initBus() has received the Bus component AND doneLoad() has received the abROM data. When both @@ -278,7 +278,7 @@ ROMPDP11.prototype.doneLoad = function(sURL, sROMData, nErrorCode) * * @this {ROMPDP11} */ -ROMPDP11.prototype.copyROM = function() +ROMPDP11.prototype.initROM = function() { if (!this.isReady()) { if (!this.sFilePath) { @@ -341,9 +341,7 @@ ROMPDP11.prototype.addROM = function(addr) if (DEBUG) this.log("addROM(): copying ROM to " + str.toHexLong(addr) + " (" + str.toHexLong(this.abROM.length) + " bytes)"); var i; for (i = 0; i < this.abROM.length; i++) { - if (DEBUGGER && this.dbg) this.dbg.disableMessages(); this.bus.setByteDirect(addr + i, this.abROM[i]); - if (DEBUGGER && this.dbg) this.dbg.enableMessages(); } return true; } diff --git a/modules/shared/templates/components.css b/modules/shared/templates/components.css index 1837bb4bf..3cde83dd7 100644 --- a/modules/shared/templates/components.css +++ b/modules/shared/templates/components.css @@ -34,7 +34,7 @@ } .pcjs-label { font-size: small; - line-height: 19px; + line-height: 20px; vertical-align: middle; float: left; font-family: Monaco, "Lucida Console", monospace; @@ -52,14 +52,14 @@ font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; } .pcjs-register { font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; border: 1px solid black; } @@ -101,6 +101,18 @@ line-height: 34px; /* the equivalent of "vertical-align: middle" for single-line elements */ background-color: #ffffff; } +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-tripled-label { + text-align: right; + padding: 8px; +} +.pcjs-ledpad { + line-height: 32px; + background-color: #000000; +} .pcjs-led { float: left; width: 8px; @@ -108,19 +120,18 @@ margin: 4px; border: 1px solid black; text-align: center; - line-height: 19px; /* the equivalent of "vertical-align: middle" for single-line elements */ + vertical-align: middle; background-color: #000000; } .pcjs-rled { - float: left; width: 8px; height: 8px; margin: 4px; border: 1px solid black; border-radius: 50%; text-align: center; - line-height: 19px; /* the equivalent of "vertical-align: middle" for single-line elements */ - background-color: #000000; + vertical-align: middle; + background-color: #ff0000; } .pcjs-screen { clear: both; diff --git a/modules/shared/templates/components.xsl b/modules/shared/templates/components.xsl index c18a6cb8f..7b72d6fb9 100644 --- a/modules/shared/templates/components.xsl +++ b/modules/shared/templates/components.xsl @@ -2,6 +2,7 @@ + ]> @@ -331,6 +332,7 @@ margin:0 auto; position:; position:relative; + text-align:; float:left; @@ -412,7 +414,7 @@
    -
    +

    diff --git a/versions/pc8080/1.30.1/components.css b/versions/pc8080/1.30.1/components.css index 4a449ca97..f1782cf02 100644 --- a/versions/pc8080/1.30.1/components.css +++ b/versions/pc8080/1.30.1/components.css @@ -29,7 +29,7 @@ } .pcjs-label { font-size: small; - line-height: 19px; + line-height: 20px; vertical-align: middle; float: left; font-family: Monaco, "Lucida Console", monospace; @@ -47,14 +47,14 @@ font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; } .pcjs-register { font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; border: 1px solid black; } @@ -96,6 +96,18 @@ line-height: 34px; background-color: #ffffff; } +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-tripled-label { + text-align: right; + padding: 8px; +} +.pcjs-ledpad { + line-height: 32px; + background-color: #000000; +} .pcjs-led { float: left; width: 8px; @@ -103,19 +115,18 @@ margin: 4px; border: 1px solid black; text-align: center; - line-height: 19px; + vertical-align: middle; background-color: #000000; } .pcjs-rled { - float: left; width: 8px; height: 8px; margin: 4px; border: 1px solid black; border-radius: 50%; text-align: center; - line-height: 19px; - background-color: #000000; + vertical-align: middle; + background-color: #ff0000; } .pcjs-screen { clear: both; diff --git a/versions/pc8080/1.30.1/components.xsl b/versions/pc8080/1.30.1/components.xsl index 2be9e05c8..1bf53a560 100644 --- a/versions/pc8080/1.30.1/components.xsl +++ b/versions/pc8080/1.30.1/components.xsl @@ -1,6 +1,7 @@ ]> @@ -330,6 +331,7 @@ margin:0 auto; position:; position:relative; + text-align:; float:left; @@ -411,7 +413,7 @@
    -
    +

    diff --git a/versions/pcx86/1.30.1/components.css b/versions/pcx86/1.30.1/components.css index 4a449ca97..f1782cf02 100644 --- a/versions/pcx86/1.30.1/components.css +++ b/versions/pcx86/1.30.1/components.css @@ -29,7 +29,7 @@ } .pcjs-label { font-size: small; - line-height: 19px; + line-height: 20px; vertical-align: middle; float: left; font-family: Monaco, "Lucida Console", monospace; @@ -47,14 +47,14 @@ font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; } .pcjs-register { font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; border: 1px solid black; } @@ -96,6 +96,18 @@ line-height: 34px; background-color: #ffffff; } +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-tripled-label { + text-align: right; + padding: 8px; +} +.pcjs-ledpad { + line-height: 32px; + background-color: #000000; +} .pcjs-led { float: left; width: 8px; @@ -103,19 +115,18 @@ margin: 4px; border: 1px solid black; text-align: center; - line-height: 19px; + vertical-align: middle; background-color: #000000; } .pcjs-rled { - float: left; width: 8px; height: 8px; margin: 4px; border: 1px solid black; border-radius: 50%; text-align: center; - line-height: 19px; - background-color: #000000; + vertical-align: middle; + background-color: #ff0000; } .pcjs-screen { clear: both; diff --git a/versions/pcx86/1.30.1/components.xsl b/versions/pcx86/1.30.1/components.xsl index 14ba82384..3dc004f64 100644 --- a/versions/pcx86/1.30.1/components.xsl +++ b/versions/pcx86/1.30.1/components.xsl @@ -1,6 +1,7 @@ ]> @@ -330,6 +331,7 @@ margin:0 auto; position:; position:relative; + text-align:; float:left; @@ -411,7 +413,7 @@
    -
    +

    diff --git a/versions/pcx86/1.30.1/pcx86-dbg.js b/versions/pcx86/1.30.1/pcx86-dbg.js index 7d9c94ec9..c897ddac6 100644 --- a/versions/pcx86/1.30.1/pcx86-dbg.js +++ b/versions/pcx86/1.30.1/pcx86-dbg.js @@ -1364,9 +1364,9 @@ a;Lf(this);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!== this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=12}return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Ec=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.zd=this.Ec+a,this.S|=2,this.A-=11);return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Mc=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.Sd=this.Mc+a,this.S|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.D?0:1);return this.$a},W,function(a){this.ca&131072? E.call(this,6):(Of(this,a),this.A-=-1===this.D?3:6,this.S|=2);return a},W],tk=[W,W,W,W,Hh,Kh,Jh,Ih]; function X(a){bb.call(this,"ChipSet",a,X,32768);var b=a.model;b&&!uk[b]&&w("Unrecognized ChipSet model: "+b);this.ja=uk[b]||vk;this.C=[];b=wk(a[xk]);this.C[0]=[b,b];null==b&&(this.ia=[360,360],(b=a.floppies)&&b.length&&(this.ia=b),yk(this,zk,this.ia.length),yk(this,Ak,a.monitor||(this.ja=kg&&(this.cb=this.Da=2);this.ka=a.scaleTimers||!1;this.Ub=a.rtcDate;this.Db=!1;a.sound&&(this.sb=this.Fa=null,window&&(this.sb=window.AudioContext|| -window.webkitAudioContext),this.sb&&(this.Fa=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"Coprocessor"}; +window.webkitAudioContext),this.sb&&(this.Fa=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"FPU"}; Ek[5150][0][Ak]={Lc:48,gd:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Pd:"Monitor Type"};Ek[5150][0][5]={Lc:12,gd:{16:0,32:4,48:8,64:12},Pd:"Base Memory (16Kb Increments)"};Ek[5150][1][6]={Lc:31,gd:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Pd:"Expansion Memory (32Kb Increments)"};Ek[5160]=[{},{}];Ek[5160][0][zk]=Ek[5150][0][zk];Ek[5160][0][3]=Ek[5150][0][3];Ek[5160][0][Ak]=Ek[5150][0][Ak]; -Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"Coprocessor"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; +Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"FPU"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; l.Pb=function(a,b,c){switch(b){case xk:return this.qa[b]=c,Fk(this,0,b),!0;case Bk:if(5150==(this.ja|0)||5160.101==this.ja)return this.qa[b]=c,Fk(this,1,b),!0;break;case "swdesc":return this.qa[b]=c,!0}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.Tb=Jb(a,"FPU");yk(this,3,this.Tb?1:0,!0);this.B=Jb(a,"Keyboard");this.gb=c.Y.Id/1193181;qc(b,this,Gk);yc(b,this,Hk);this.jab;b++){var c=13>=b?Sk(e,b):e.A[b];a&&(a+="\n");a+="CMOS["+u(b)+"]: "+u(c)}e.ha.O(a)})}lf(c,26,this.Pm.bind(this))}; @@ -1386,7 +1386,7 @@ function Fk(a,b,c){for(var d="",e=a.qa[c],f=1;8>=f;f++){var g="pcjs-bitCell";f|| function Yk(a,b,c){for(var d=null,e=Ek[a.ja]||Ek[a.ja|0]||Ek[5150],f=0;fg.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<=Se&&(this.Ea=this.pa=2);this.Z=a.scaleTimers||!1;this.Xa=a.rtcDate;this.Oa=!1;a.sound&&(this.La=this.qa=null,window&&(this.La=window.AudioContext|| -window.webkitAudioContext),this.La&&(this.qa=new this.La));this.reset(!0);t(this)}Ta(U);var Ci=5150.9,Se=5170,Bi={5150:5150,5160:5160,5170:Se,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:Ci,deskpro386:5180},Ei="sw1",Ii="sw2",Ji={Yj:1,ONE:0,gn:64,en:128,Wm:192,lc:192,eg:6},Ki={fn:16,Sm:32,Xm:48,lc:48,eg:4},Gi=1,Hi=4,W={5150:[{},{}]};W[5150][0][Gi]={lc:192,Nc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};W[5150][0][3]={lc:2,Nc:{0:0,1:2},ed:"Coprocessor"}; +window.webkitAudioContext),this.La&&(this.qa=new this.La));this.reset(!0);t(this)}Ta(U);var Ci=5150.9,Se=5170,Bi={5150:5150,5160:5160,5170:Se,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:Ci,deskpro386:5180},Ei="sw1",Ii="sw2",Ji={Yj:1,ONE:0,gn:64,en:128,Wm:192,lc:192,eg:6},Ki={fn:16,Sm:32,Xm:48,lc:48,eg:4},Gi=1,Hi=4,W={5150:[{},{}]};W[5150][0][Gi]={lc:192,Nc:{1:0,2:64,3:128,4:192},ed:"Number of Floppy Drives"};W[5150][0][3]={lc:2,Nc:{0:0,1:2},ed:"FPU"}; W[5150][0][Hi]={lc:48,Nc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},ed:"Monitor Type"};W[5150][0][5]={lc:12,Nc:{16:0,32:4,48:8,64:12},ed:"Base Memory (16Kb Increments)"};W[5150][1][6]={lc:31,Nc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},ed:"Expansion Memory (32Kb Increments)"};W[5160]=[{},{}];W[5160][0][Gi]=W[5150][0][Gi];W[5160][0][3]=W[5150][0][3];W[5160][0][Hi]=W[5150][0][Hi]; -W[5160][0][5]={lc:12,Nc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};W[5160][1][6]=W[5150][1][6];W[5160.101]=[{},{}];W[5160.101][0][5]={lc:143,Nc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};W[5160.101][0][3]={lc:16,Nc:{0:0,1:16},ed:"Coprocessor"};W[5160.101][1][2]={lc:1,Nc:{0:0,1:1},ed:"Floppy Type"};W[5160.101][1][Gi]=W[5150][0][Gi];W[5160.101][1][Hi]=W[5150][0][Hi];l=U.prototype; +W[5160][0][5]={lc:12,Nc:{64:0,128:4,192:8,256:12},ed:"Base Memory (64Kb Increments)"};W[5160][1][6]=W[5150][1][6];W[5160.101]=[{},{}];W[5160.101][0][5]={lc:143,Nc:{128:1,256:130,512:8,640:141},ed:"Base Memory (128Kb Increments)"};W[5160.101][0][3]={lc:16,Nc:{0:0,1:16},ed:"FPU"};W[5160.101][1][2]={lc:1,Nc:{0:0,1:1},ed:"Floppy Type"};W[5160.101][1][Gi]=W[5150][0][Gi];W[5160.101][1][Hi]=W[5150][0][Hi];l=U.prototype; l.zb=function(a,b,c){switch(b){case Ei:return this.la[b]=c,Li(this,0,b),!0;case Ii:if(5150==(this.ca|0)||5160.101==this.ca)return this.la[b]=c,Li(this,1,b),!0;break;case "swdesc":return this.la[b]=c,!0}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.od=mb(a,"FPU");Fi(this,3,this.od?1:0,!0);this.C=mb(a,"Keyboard");this.Ga=c.T.Yc/1193181;Sb(b,this,Mi);Ub(b,this,Ni);this.ca=Se){this.H=16;this.P=0;this.R=16;this.ua=0;this.W=160;512<=$i(this)&&(this.W|=16);3==+aj(this,Hi,void 0)&&(this.W|=64);5180==(this.ca|0)&&(this.W|=12);this.va=3;this.I= @@ -1369,7 +1369,7 @@ function Li(a,b,c){for(var d="",e=a.la[c],f=1;8>=f;f++){var g="pcjs-bitCell";f|| function aj(a,b,c){for(var d=null,e=W[a.ca]||W[a.ca|0]||W[5150],f=0;fd.hb[0]&&(d.hb[0]=255,d.hb[1]--,0>d.hb[1]&&(d.hb[1]=255)));return e}function xj(a,b,c,d){a=a.G[b];c=a.$b[c];c.hb[a.Ib]=c.jc[a.Ib]=d;a.Ib^=1} function yj(a,b){a=a.G[b];b=a.Db|1;a.Db&=-16;return b}function zj(a,b,c){a=a.G[b];b=c&3;a.Db=a.Db&~(16<>2].$b[b&3],c,d,e)}function Bj(a,b,c){b=a.G[b>>2].$b[b&3];b.Ef&&b.qg&&b.Sf?(c&&(b.done=c),b.Rd||Gj(a,b,!0)):c&&c(!0)} function Gj(a,b,c){c&&(b.count=b.hb[1]<<8|b.hb[0],b.type=b.mode&12,b.si=b.Ff=!1);for(var d=!1;0<=b.count&&(c=b.xf<<16|b.gb[1]<<8|b.gb[0],4==b.type?(d=!0,function(c){b.qg.call(b.Ef,b.Sf,-1,function(e,g){0>e&&(b.si||(b.si=!0),e=255);b.Rd||a.ia.Mc(c,e);(d=g)&&setTimeout(function(){Hj(b)||Gj(a,b)},0)})}(c)):8==b.type?(c=a.ia.Jb(c),0>b.qg.call(b.Ef,b.Sf,c)&&(b.Ff=!0)):0!=b.type&&(b.Ff=!0)),!d&&!Hj(b););} diff --git a/versions/pdpjs/1.30.1/components.css b/versions/pdpjs/1.30.1/components.css index 4a449ca97..f1782cf02 100644 --- a/versions/pdpjs/1.30.1/components.css +++ b/versions/pdpjs/1.30.1/components.css @@ -29,7 +29,7 @@ } .pcjs-label { font-size: small; - line-height: 19px; + line-height: 20px; vertical-align: middle; float: left; font-family: Monaco, "Lucida Console", monospace; @@ -47,14 +47,14 @@ font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; } .pcjs-register { font-family: Monaco, "Lucida Console", monospace; font-size: small; text-align: center; - line-height: 19px; + line-height: 20px; vertical-align: middle; border: 1px solid black; } @@ -96,6 +96,18 @@ line-height: 34px; background-color: #ffffff; } +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-tripled-label { + text-align: right; + padding: 8px; +} +.pcjs-ledpad { + line-height: 32px; + background-color: #000000; +} .pcjs-led { float: left; width: 8px; @@ -103,19 +115,18 @@ margin: 4px; border: 1px solid black; text-align: center; - line-height: 19px; + vertical-align: middle; background-color: #000000; } .pcjs-rled { - float: left; width: 8px; height: 8px; margin: 4px; border: 1px solid black; border-radius: 50%; text-align: center; - line-height: 19px; - background-color: #000000; + vertical-align: middle; + background-color: #ff0000; } .pcjs-screen { clear: both; diff --git a/versions/pdpjs/1.30.1/components.xsl b/versions/pdpjs/1.30.1/components.xsl index 9d9d19b93..0fe803637 100644 --- a/versions/pdpjs/1.30.1/components.xsl +++ b/versions/pdpjs/1.30.1/components.xsl @@ -1,6 +1,7 @@ ]> @@ -330,6 +331,7 @@ margin:0 auto; position:; position:relative; + text-align:; float:left; @@ -411,7 +413,7 @@
    -
    +

    diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 6e1eac17b..9fd884407 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -688,216 +688,217 @@ function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf( function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ua(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encodeURIComponent(b[p]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function m(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Xa=this.id:(this.xb=this.id.substr(0,b),this.Xa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,hb:!1,yb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Ua=void 0,Va={}; -if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Xa=/\+/g,Ya=/([^&=]+)=?([^&]*)/g;Wa=Ya.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Xa," "))]=decodeURIComponent(Wa[2].replace(Xa," "))}function Za(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 y(a,b){b||(b=r);a.prototype=Za(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var $a=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else $a={},t=[];function ab(a,b,c){$a[a]&&b&&($a[a][b]=c)}function bb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.qa-1;this.A=this.G/this.qa|0;this.Ka=[];this.F=[];this.pc=[Bb,Cb,Db,Eb];a=new H(this.b);Fb(a,this.j);this.P=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ka[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&F(this.j,64)&&D(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Hb(d,b|4186112,-1,1);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Cb(a,b,c){var d=!1,e=this.controller,f=e.Ka[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ka[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&F(this.j,64)&&D(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Hb(e,c|4186112,b,1),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Db(a,b){var c=-1,d=this.controller;(a=d.Ka[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&F(this.j,64)&&D(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Hb(d,b|4186112,-1,0);this.j&&F(this.j,64)&&D(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Eb(a,b,c){var d=!1,e=this.controller;if(a=e.Ka[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&F(this.j,64)&&D(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Hb(e,c|4186112,b,0),this.j&&F(this.j,64)&&D(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Gb(a,b){if(b!=a.B){var c;if(a.B){c=(1<>>a.Y;0>>a.Y;0g&&(q=g);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+g<=n.w)return n.ob+=n.w-f,n.w=f,!0;if(f>=n.w+n.ob){q=n.size-(f-p);q>g&&(q=g);n.ob=f-n.w+q;f=p+a.qa;g-=q;l++;continue}}return Ib(1,f,g)}f=new H(a.b,f,q,a.qa,d,e);Fb(f,a.j,n);a.P[l++]=f;f=p+a.qa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Lb[d]+" at "+k(b,8,!0)),!0):Ib(2,b,c)} -h.Ua=function(a){return this.P[(a&this.g)>>>this.Y].ub(a&this.f,a)};h.ma=function(a){return this.P[(a&this.g)>>>this.Y].cc(a&this.f,a)};function Mb(a,b){return a.P[(b&a.g)>>>a.Y].Cb(b&a.f,b)}h.mb=function(a,b){this.P[(a&this.g)>>>this.Y].vb(a&this.f,b&255,a)};h.Wa=function(a,b){this.P[(a&this.g)>>>this.Y].nc(a&this.f,b&65535,a)}; -function Nb(a){for(var b=0,c=[],d=0;da.b.Wb))for(var f=e[0]?e[0].bind(b):null,g=e[1]?e[1].bind(b):null,l=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,p=a,q=+d,e=e[4],v=+d;v<=q;v+=2){var u=v&8191;void 0!==p.Ka[u]?m("I/O address already registered: "+k(v,8,!0)):p.Ka[u]=[f,g,l,n,e||"unknown",!1]}}}function Pb(a,b){a.F.push(b)}function Ib(a,b,c){m("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1} -function J(a){r.call(this,"Device",a,J);this.g={data:0,Gd:0,sb:20,Jd:0};this.f={Hd:0,Hb:-1}}y(J);h=J.prototype;h.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;var e=this;this.f.Hb=Qb(this.b,function(){e.f.Ma|=128;e.f.Ma&64&&(Rb(e.b,0,6,64),Sb(e.b,e.f.Hb,1E3/60))});Ob(b,this,K);Pb(b,this.reset.bind(this));G(this)};h.Gc=function(){var a=this.f.Ma;this.f.Ma&=-129;return a};h.kd=function(a){this.f.Ma=a;a&64&&Sb(this.b,this.f.Hb,1E3/60);this.f.Ma=a&-129}; -h.Ic=function(){var a=this.b;return a.G&62337|a.wa<<5|a.xa<<1};h.md=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.wa=a>>5&3;b.xa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.tb!=c&&(b.tb=c,Tb(b))}Ub(this)};h.Jc=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Kc=function(){return this.b.Eb};h.Lc=function(){return this.b.Pa};h.nd=function(a){var b=this.b;b.Pa!=a&&(b.Pa=a,a&16?(b.ab=4194303,b.ya=3915776):(b.ab=262143,b.ya=253952),Tb(b));Ub(this)}; -function Ub(a){a.g.sb=a.g.sb&-8|(a.b.tb?a.b.Pa&16?1:2:4)}h.Tc=function(a){return this.b.T[1][a>>1&7]};h.vd=function(a,b){this.b.T[1][b>>1&7]=a&65295};h.Rc=function(a){return this.b.T[1][(a>>1&7)+8]};h.td=function(a,b){this.b.T[1][(b>>1&7)+8]=a&65295};h.Sc=function(a){return this.b.pa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.T[1][b]&=65295};h.Qc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.T[1][b]&=65295}; -h.Fc=function(a){return this.b.T[0][a>>1&7]};h.jd=function(a,b){this.b.T[0][b>>1&7]=a&65295};h.Dc=function(a){return this.b.T[0][(a>>1&7)+8]};h.gd=function(a,b){this.b.T[0][(b>>1&7)+8]=a&65295};h.Ec=function(a){return this.b.pa[0][a>>1&7]};h.hd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.T[0][b]&=65295};h.Cc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.fd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.T[0][b]&=65295};h.Zc=function(a){return this.b.T[3][a>>1&7]}; -h.Bd=function(a,b){this.b.T[3][b>>1&7]=a&65295};h.Xc=function(a){return this.b.T[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.T[3][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.b.pa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.T[3][b]&=65295};h.Wc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.T[3][b]&=65295};h.ra=function(a){a&=7;return this.b.K&2048?this.b.Ha[a]:this.b.u[a]}; -h.ua=function(a,b){b&=7;this.b.K&2048?this.b.Ha[b]=a:this.b.u[b]=a};h.Yb=function(){return this.b.K&49152?this.b.ta[0]:this.b.u[6]};h.ic=function(a){this.b.K&49152?this.b.ta[0]=a:this.b.u[6]=a};h.ac=function(){return this.b.u[7]};h.lc=function(a){this.b.u[7]=a};h.sa=function(a){a&=7;return this.b.K&2048?this.b.u[a]:this.b.Ha[a]};h.va=function(a,b){b&=7;this.b.K&2048?this.b.u[b]=a:this.b.Ha[b]=a};h.Zb=function(){return 1==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[1]}; -h.jc=function(a){1==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.$b=function(){return 3==(this.b.K&49152)>>14?this.b.u[6]:this.b.ta[3]};h.kc=function(a){3==(this.b.K&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.Bc=function(a){return this.b.fc[a-65504>>1]};h.ed=function(a,b){this.b.fc[b-65504>>1]=a};h.bc=function(a){return 65520==a?61183:0};h.mc=function(){};h.Vc=function(){return 1};h.xd=function(){};h.Ac=function(){return this.b.$};h.dd=function(){this.b.$=0};h.Hc=function(){return this.b.ec}; -h.ld=function(a,b){b&1||(a&=255);this.b.ec=a};h.Mc=function(){return this.b.Fb};h.od=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Fb=a;b.D|=2};h.Uc=function(){return this.b.Qa&65280};h.wd=function(a){this.b.Qa=a|255};h.Nc=function(){return Vb(this.b)};h.pd=function(a){Wb(this.b,a&-1809|Vb(this.b)&1808);this.b.D|=128};h.reset=function(){this.g.sb=this.g.sb&-120|20;this.f.Ma=0}; -var L={},K=(L[62592]=[null,null,J.prototype.Tc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Rc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Sc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Qc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.Fc,J.prototype.jd,"KISDR"],L[62672]=[null,null,J.prototype.Dc,J.prototype.gd,"KDSDR"],L[62688]=[null,null,J.prototype.Ec,J.prototype.hd,"KISAR"],L[62704]=[null,null,J.prototype.Cc,J.prototype.fd,"KDSAR"],L[62798]=[null,null, -J.prototype.Lc,J.prototype.nd,"MMR3"],L[65382]=[null,null,J.prototype.Gc,J.prototype.kd,"LKS"],L[65402]=[null,null,J.prototype.Ic,J.prototype.md,"MMR0"],L[65404]=[null,null,J.prototype.Jc,null,"MMR1"],L[65406]=[null,null,J.prototype.Kc,null,"MMR2"],L[65408]=[null,null,J.prototype.Zc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Xc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Yc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Wc,J.prototype.yd,"UDSAR"],L[65472]=[J.prototype.ra, -J.prototype.ua,J.prototype.ra,J.prototype.ua,"R0SET0"],L[65473]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R1SET0"],L[65474]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R2SET0"],L[65475]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R3SET0"],L[65476]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R4SET0"],L[65477]=[J.prototype.ra,J.prototype.ua,J.prototype.ra,J.prototype.ua,"R5SET0"],L[65478]=[J.prototype.Yb,J.prototype.ic,J.prototype.Yb, -J.prototype.ic,"R6KERNEL"],L[65479]=[J.prototype.ac,J.prototype.lc,J.prototype.ac,J.prototype.lc,"R7KERNEL"],L[65480]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R0SET1"],L[65481]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R1SET1"],L[65482]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R2SET1"],L[65483]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R3SET1"],L[65484]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R4SET1"], -L[65485]=[J.prototype.sa,J.prototype.va,J.prototype.sa,J.prototype.va,"R5SET1"],L[65486]=[J.prototype.Zb,J.prototype.jc,J.prototype.Zb,J.prototype.jc,"R6SUPER"],L[65487]=[J.prototype.$b,J.prototype.kc,J.prototype.$b,J.prototype.kc,"R6USER"],L[65504]=[null,null,J.prototype.Bc,J.prototype.ed,"CTRL",1170],L[65520]=[null,null,J.prototype.bc,J.prototype.mc,"LSIZE",1170],L[65522]=[null,null,J.prototype.bc,J.prototype.mc,"HSIZE",1170],L[65524]=[null,null,J.prototype.Vc,J.prototype.xd,"SYSID",1170],L[65526]= -[null,null,J.prototype.Ac,J.prototype.dd,"CPUERR",1170],L[65528]=[null,null,J.prototype.Hc,J.prototype.ld,"MB",1170],L[65530]=[null,null,J.prototype.Mc,J.prototype.od,"PIR"],L[65532]=[null,null,J.prototype.Uc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Nc,J.prototype.pd,"PSW"],L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608]; -K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640];K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672]; -K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704];K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424]; -K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456];K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504]; -La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.f=new Int32Array(this.A,0,d>>2),lc(this,hc?mc:nc);else{this.f=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},X:function(a){return this.f[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&this.b.O(4,b);b=a>>2;a=(a&3)<<3;var c=this.f[b]>>a;return 24>a?c&65535:c&255|(this.f[b+1]&255)<<8},oa:function(a,b){var c=a>>2;a=(a&3)<<3;this.f[c]= -this.f[c]&~(255<>2;a=(a&3)<<3;24>a?this.f[c]=this.f[c]&~(65535<>8);this.La=!0},U:function(a,b){if(this.j&&null!=this.w){var c=this.j;sc(c,this.w+a,1,c.N)&&c.ea(!0)}return this.Bb(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;sc(c,this.w+a,2,c.N)&&c.ea(!0)}return this.Cb(a,b)},ka:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;sc(d,this.w+a, -1,d.G)&&d.ea(!0)}this.g?this.F(a,b,c):this.wb(a,b,c)},xa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;sc(d,this.w+a,2,d.G)&&d.ea(!0)}this.g?this.F(a,b,c):this.Ib(a,b,c)},N:function(a){return this.C[a]},W:function(a,b){a=this.C[a];this.j&&F(this.j,128)&&D(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},aa:function(a,b){a&1&&this.b.O(4,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&this.b.O(4,b);a=this.I[a>>1];this.j&&F(this.j,128)&&D(this.j,"Memory.readWord("+ -I(this.j,b)+"): "+I(this.j,a),!0);return a},ia:function(a,b){this.C[a]=b;this.La=!0},la:function(a,b,c){this.C[a]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},wa:function(a,b,c){a&1&&this.b.O(4,c);this.G.setUint16(a,b,!0);this.La=!0},ya:function(a,b,c){a&1&&this.b.O(4,c);this.I[a>>1]=b;this.La=!0;this.j&&F(this.j,128)&&D(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}}; -function Fb(a,b,c){a.j=b;a.B=a.J=0;c&&((a.B=c.B)&&rc(a,qc,!1),(a.J=c.J)&&pc(a,qc,!1))}function tc(a,b){b?--a.J||(a.vb=a.g?a.F:a.wb,a.nc=a.g?a.H:a.Ib):--a.B||(a.ub=a.Bb,a.cc=a.Cb)}function pc(a,b,c){c&&a.J||(a.vb=!a.g&&b[1]||a.F,a.nc=!a.g&&b[3]||a.H);if(c||void 0===c)a.wb=b[1]||a.F,a.Ib=b[3]||a.H}function rc(a,b,c){c&&a.B||(a.ub=b[0]||a.L,a.cc=b[2]||a.M);if(c||void 0===c)a.Bb=b[0]||a.L,a.Cb=b[2]||a.M}function lc(a,b){b||(b=uc);rc(a,b,void 0);pc(a,b,void 0)} -var uc=[],oc=[H.prototype.X,H.prototype.oa,H.prototype.ga,H.prototype.Xa],qc=[H.prototype.U,H.prototype.ka,H.prototype.ca,H.prototype.xa];if(wb)var nc=[H.prototype.N,H.prototype.ia,H.prototype.aa,H.prototype.wa],mc=[H.prototype.W,H.prototype.la,H.prototype.da,H.prototype.ya]; -function vc(a,b){r.call(this,"CPU",a,vc,1);var c=a.multiplier||1;this.Ja=a.cycles||b;this.Na=c;this.Za=Math.round(this.Ja/1E4)/100;this.Va=this.Za*this.Na;this.v.ba=!1;this.v.Gb=!1;this.v.gb=a.autoStart;this.v.Lb=!1;this.v.$a=!1;this.jb=this.ia=0;this.kb=a.csStart;this.bb=a.csInterval;this.cb=a.csStop;this.L=[];this.Ub=this.cd.bind(this);G(this)}y(vc);var wc=["power","reset"];h=vc.prototype; -h.Ga=function(a,b,c,d){this.F=a;this.B=b;this.j=d;for(b=0;b=a.ia&&(a.ia+=a.bb,c=!0);0<=a.cb&&a.cb<=Cc(a)&&(a.bb=a.cb=-1,zc(a),a.ea(),c=!0);c&&a.i(Cc(a)+" cycles: checksum="+k(a.jb))}} -function Dc(a,b,c,d){if(a.J[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ia||8;c=!a.v.ba||a.v.Lb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} -h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=bb(a.id);for(c=0;ca.ca/a.Va?b=1:d=!0;a.Na=b;b=a.Za*a.Na;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.F&&a.F.nb()}Fc(a,a.X);a.X=0;a.W=ra();a.da=0;Gc(a);return d}function Qb(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.L[b][0]&&(c*=a.Ja*a.Na/1E3,a.L[b][0]=c)}function Hc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b} -function Ic(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -h.cd=function(){if(this.v.ba){this.ib>=this.Ja&&Gc(this,!0);this.oa=0;this.Ia=ra();if(this.da){var a=this.Ia-this.da;a>this.rb&&(this.W+=a,this.W>this.Ia&&(this.W=this.Ia))}try{do{var b=Hc(this,this.v.$a?1:this.Ra);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Ic(this,c);this.oa+=c;this.X+=c;Fc(this,0,!0);Bc(this,c);this.ka-=c;if(0>=this.ka){this.ka+=this.Ra;15<=++this.Rb&&(this.F&&this.F.za(),this.Rb=0);break}}while(this.v.ba)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), -Cc(this));vb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Ub;this.da=ra();c=this.rb;this.oa&&(c=Math.round(c*this.oa/this.Ra));var c=c-(this.da-this.Ia),d=this.da-this.W;d&&(this.ca=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ga=0,Ec(this)));if(0>c||this.cac&&(this.W-=c),c=0;this.ib+=this.oa;this.da+=c;a(b,c)}}}; -h.eb=function(a){if(ib(this))return!1;if(this.v.ba)return this.i(this.toString()+" busy"),!1;Ec(this);this.v.ba=!0;this.v.Gb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.W,Cc(this)));M(this,!0);setTimeout(this.Ub,0);return!0};h.fb=function(){return 0};h.ea=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Fc(this,this.X);this.X=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Cc(this));M(this)}this.v.complete=a}; -function M(a,b){a.F&&a.F.za(b)} -function Jc(a){this.Wb=+a.model||1170;this.yc=a.resetAddr||0;vc.call(this,a,6666667);this.pb=0;this.decode=Kc.bind(this);this.R=65536;this.S=32768;this.Z=65535;this.V=32768;this.K=15;this.u=[0,0,0,0,0,0,0,this.yc];this.Ha=[0,0,0,0,0,0];this.ta=[0,0,0,0];this.xa=this.C=0;this.vc=[4,2,0,1];this.T=[[0,0,0,0,0,0,0,0,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]];this.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.zc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.fc=[0,0,0,0,0,0,0,0];this.g=this.f=this.Ya=this.H=this.I=this.D=this.ec=0;this.la=-1;Lc(this);this.v.complete=this.v.rc=!1}y(Jc,vc);h=Jc.prototype;h.Sb=function(){Tb(this)};h.reset=function(){this.v.ba&&this.ea();Lc(this);yc(this);this.v.error=!1;this.parent.reset.call(this)}; -function Lc(a){a.Qa=255;a.$=0;a.Fb=0;a.G=0;a.Oa=0;a.Eb=0;a.Pa=0;a.tb=0;a.wa=0;a.ab=262143;a.ya=253952;a.A=[];a.D|=2;a.B&&Tb(a)}function Tb(a){a.tb?(a.aa=65536,a.M=a.uc,a.U=a.dc,a.Vb=a.Dd,Gb(a.B,a.Pa&16?22:18)):(a.aa=0,a.M=a.tc,a.U=a.$c,a.Vb=a.Cd,Gb(a.B,16))}h.Ob=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Na]);a.set(2,Nb(this.B));return a.data()}; -h.restore=function(a){var b=a[1];this.ga=b[1];Ec(this,b[3]);a:{b=this.B;a=a[2];var c;for(c=0;c>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ta-1;this.C=this.I/this.ta|0;this.Fa=[];this.w=0;this.B=[];this.hc=[Db,Eb,Fb,Gb];a=new H(this);Hb(a,this.j);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Eb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} +function Fb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} +function Jb(a,b){if(b!=a.F){var c;a.F&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ta;g-=q;l++;continue}}return Ob(1,f,g)}f=new H(a,f,q,a.ta,d,e);Hb(f,a.j,m);a.W[l++]=f;f=p+a.ta;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Pb[d]+" at "+k(b,8,!0)),!0):Ob(2,b,c)} +function Lb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ia=function(a){return this.W[(a&this.i)>>>this.Y].Yb(a&this.f,a)};function Qb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Rb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].fc(a&this.f,b&65535,a)};function Sb(a){for(var b=0,c=[],d=0;da.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;e&1&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&m&&(l=function(a,c){return function(b,d){return a(c(d)&-256|b,d)}.bind(b)}(p,m)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} +function Wb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+I(a.j,b),!0,!0),a.b.$(4,b))}function Ob(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function J(a){r.call(this,"Device",a,J,256);this.i={data:0,Gd:0,rb:20,Jd:0};this.f={Hd:0,Fb:-1}}y(J);h=J.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=Xb(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(Yb(e.b,0,6,64),Zb(e.b,e.f.Fb,1E3/60))});Ub(b,this,K);Vb(b,this.reset.bind(this));G(this)}; +h.yc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.fd=function(a){this.f.Ha=a;a&64&&Zb(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.Ac=function(){var a=this.b;return a.G&62337|a.ra<<5|a.sa<<1};h.hd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ra=a>>5&3;b.sa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,hc(b))}ic(this)};h.Bc=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Cc=function(){return this.b.Cb};h.Dc=function(){return this.b.Ka}; +h.jd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),hc(b));ic(this)};function ic(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Pc=function(a){return this.b.R[1][a>>1&7]};h.vd=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Nc=function(a){return this.b.R[1][(a>>1&7)+8]};h.td=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Oc=function(a){return this.b.oa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; +h.Mc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.xc=function(a){return this.b.R[0][a>>1&7]};h.ed=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.vc=function(a){return this.b.R[0][(a>>1&7)+8]};h.cd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.wc=function(a){return this.b.oa[0][a>>1&7]};h.dd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.uc=function(a){return this.b.oa[0][(a>>1&7)+8]}; +h.bd=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Vc=function(a){return this.b.R[3][a>>1&7]};h.Bd=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Tc=function(a){return this.b.R[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Uc=function(a){return this.b.oa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Sc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; +h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Gc=function(){return this.b.L&49152?this.b.qa[0]:this.b.u[6]};h.md=function(a){this.b.L&49152?this.b.qa[0]=a:this.b.u[6]=a};h.Jc=function(){return this.b.u[7]};h.pd=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; +h.Hc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[1]};h.nd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[1]=a};h.Ic=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[3]};h.od=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[3]=a};h.tc=function(a){return this.b.ac[a-65504>>1]};h.ad=function(a,b){this.b.ac[b-65504>>1]=a};h.Xb=function(a){return 65520==a?61183:0};h.ec=function(){};h.Rc=function(){return 1};h.xd=function(){};h.sc=function(){return this.b.Z}; +h.$c=function(){this.b.Z=0};h.zc=function(){return this.b.$b};h.gd=function(a,b){b&1||(a&=255);this.b.$b=a};h.Ec=function(){return this.b.Db};h.kd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Qc=function(){return this.b.La&65280};h.wd=function(a){this.b.La=a|255};h.Fc=function(){return jc(this.b)};h.ld=function(a){kc(this.b,a&-1809|jc(this.b)&1808);this.b.D|=128};h.dc=function(a,b){E(this)&&B(this,"writeIgnored("+ba(b)+"): "+ba(a),!0,!0)}; +h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0}; +var L={},K=(L[62592]=[null,null,J.prototype.Pc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Nc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Oc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Mc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.xc,J.prototype.ed,"KISDR"],L[62672]=[null,null,J.prototype.vc,J.prototype.cd,"KDSDR"],L[62688]=[null,null,J.prototype.wc,J.prototype.dd,"KISAR"],L[62704]=[null,null,J.prototype.uc,J.prototype.bd,"KDSAR"],L[62798]=[null,null, +J.prototype.Dc,J.prototype.jd,"MMR3"],L[65382]=[null,null,J.prototype.yc,J.prototype.fd,"LKS"],L[65402]=[null,null,J.prototype.Ac,J.prototype.hd,"MMR0"],L[65404]=[null,null,J.prototype.Bc,J.prototype.dc,"MMR1"],L[65406]=[null,null,J.prototype.Cc,J.prototype.dc,"MMR2"],L[65408]=[null,null,J.prototype.Vc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Tc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Uc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Sc,J.prototype.yd,"UDSAR"], +L[65472]=[null,null,J.prototype.Za,J.prototype.cb,"R0SET0"],L[65473]=[null,null,J.prototype.Za,J.prototype.cb,"R1SET0"],L[65474]=[null,null,J.prototype.Za,J.prototype.cb,"R2SET0"],L[65475]=[null,null,J.prototype.Za,J.prototype.cb,"R3SET0"],L[65476]=[null,null,J.prototype.Za,J.prototype.cb,"R4SET0"],L[65477]=[null,null,J.prototype.Za,J.prototype.cb,"R5SET0"],L[65478]=[null,null,J.prototype.Gc,J.prototype.md,"R6KERNEL"],L[65479]=[null,null,J.prototype.Jc,J.prototype.pd,"R7KERNEL"],L[65480]=[null,null, +J.prototype.$a,J.prototype.eb,"R0SET1"],L[65481]=[null,null,J.prototype.$a,J.prototype.eb,"R1SET1"],L[65482]=[null,null,J.prototype.$a,J.prototype.eb,"R2SET1"],L[65483]=[null,null,J.prototype.$a,J.prototype.eb,"R3SET1"],L[65484]=[null,null,J.prototype.$a,J.prototype.eb,"R4SET1"],L[65485]=[null,null,J.prototype.$a,J.prototype.eb,"R5SET1"],L[65486]=[null,null,J.prototype.Hc,J.prototype.nd,"R6SUPER"],L[65487]=[null,null,J.prototype.Ic,J.prototype.od,"R6USER"],L[65504]=[null,null,J.prototype.tc,J.prototype.ad, +"CTRL",1170],L[65520]=[null,null,J.prototype.Xb,J.prototype.ec,"LSIZE",1170],L[65522]=[null,null,J.prototype.Xb,J.prototype.ec,"HSIZE",1170],L[65524]=[null,null,J.prototype.Rc,J.prototype.xd,"SYSID",1170],L[65526]=[null,null,J.prototype.sc,J.prototype.$c,"CPUERR",1170],L[65528]=[null,null,J.prototype.zc,J.prototype.gd,"MB",1170],L[65530]=[null,null,J.prototype.Ec,J.prototype.kd,"PIR"],L[65532]=[null,null,J.prototype.Qc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Fc,J.prototype.ld,"PSW"], +L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608];K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640]; +K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672];K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704]; +K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424];K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456]; +K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&Wb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.M)&&c.ea(!0)}return this.zb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.M)&&c.ea(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a, +1,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Gb(a,b,c)},sa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Hb(a,b,c)},N:function(a){return this.C[a]},U:function(a,b){a=this.C[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ba:function(a,b){a&1&&Wb(this.w,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&Wb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +I(this.j,b)+"): "+I(this.j,a),!0);return a},ka:function(a,b){this.C[a]=b;this.Ga=!0},ma:function(a,b,c){this.C[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},ra:function(a,b,c){a&1&&Wb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Wb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}}; +function Hb(a,b,c){a.j=b;a.i=a.J=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.J=c.J)&&vc(a,wc,!1))}function zc(a,b){b?--a.J||(a.ub=a.f?a.F:a.Gb,a.fc=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Yb=a.Ab)}function vc(a,b,c){c&&a.J||(a.ub=!a.f&&b[1]||a.F,a.fc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.F,a.Hb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Yb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} +var Ac=[],uc=[H.prototype.V,H.prototype.pa,H.prototype.ga,H.prototype.va],wc=[H.prototype.S,H.prototype.la,H.prototype.ca,H.prototype.sa];if(lb)var tc=[H.prototype.N,H.prototype.ka,H.prototype.ba,H.prototype.ra],sc=[H.prototype.U,H.prototype.ma,H.prototype.da,H.prototype.Ta]; +function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.aa=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Kb=!1;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Tb=this.Zc.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; +h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Ic(a)&&(a.Xa=a.Ya=-1,Fc(a),a.ea(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.jb))}} +function Jc(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ga||8;c=!a.v.aa||a.v.Kb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} +h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ca/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&a.F.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.da=0;Mc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Zb(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)}function Nc(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 Oc(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]()))}} +h.Zc=function(){if(this.v.aa){this.ib>=this.Na&&Mc(this,!0);this.pa=0;this.Ea=ra();if(this.da){var a=this.Ea-this.da;a>this.Qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Oc(this,c);this.pa+=c;this.V+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Rb&&(this.F&&this.F.ua(),this.Rb=0);break}}while(this.v.aa)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), +Ic(this));kb(this,e.stack||e.message);return}if(this.v.aa){a=setTimeout;b=this.Tb;this.da=ra();c=this.Qb;this.pa&&(c=Math.round(c*this.pa/this.Ma));var c=c-(this.da-this.Ea),d=this.da-this.U;d&&(this.ca=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ga=0,Kc(this)));if(0>c||this.cac&&(this.U-=c),c=0;this.ib+=this.pa;this.da+=c;a(b,c)}}}; +h.ab=function(a){if(jb(this))return!1;if(this.v.aa)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.aa=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.U,Ic(this)));M(this,!0);setTimeout(this.Tb,0);return!0};h.bb=function(){return 0};h.ea=function(a){if(this.v.aa){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.aa=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Ic(this));M(this)}this.v.complete=a}; +function M(a,b){a.F&&a.F.ua(b)} +function hd(a){this.Vb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.pb=0;this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.qc];this.Da=[0,0,0,0,0,0];this.qa=[0,0,0,0];this.sa=this.C=0;this.nc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.ac=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.$b=0;this.ma=-1;jd(this);this.v.complete=this.v.jc=!1}y(hd,Bc);h=hd.prototype;h.reset=function(){this.v.aa&&this.ea();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.ra=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&hc(a)}function hc(a){a.sb?(a.ba=65536,a.M=a.mc,a.S=a.Zb,a.Ub=a.Dd,Jb(a.w,a.Ka&16?22:18)):(a.ba=0,a.M=a.lc,a.S=a.Wc,a.Ub=a.Cd,Jb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Ia]);a.set(2,Sb(this.w));return a.data()}; +h.restore=function(a){var b=a[1];this.ga=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.A[f].Ea-=b;break}b-=a.A[f].Ea}a.A.splice(f+1,0,{Ea:b,Xb:c<<5&224,hc:d,Ab:e})}a.D|=2}function Vb(a){return a.K=a.K&63728|a.Fa()|gd(a)|fd(a)|ed(a)} -function Wb(a,b){a.V=b<<12;a.Z=~b&4;a.S=b<<14;a.R=b<<16;if((b^a.K)&2048)for(var c=a.Ha.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ha[c];a.Ha[c]=d}a.C=b>>14&3;c=a.K>>14&3;a.C!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.C]);a.D|=2;a.K=b}function O(a,b){a.D&128||(a.V=a.Z=b,a.S=0)}function jd(a,b,c){a.D&128||(a.V=a.Z=a.R=b,a.S=c||0)}function kd(a,b,c,d){a.D&128||(a.V=a.Z=a.R=b,a.S=(c^b)&(d^b))}function ld(a,b){a.D&128||(a.V=a.Z=a.R=b,a.S=a.V^a.R>>1)}function md(a,b,c,d){a.D&128||(a.V=a.Z=a.R=b,a.S=(c^d)&(d^b))} -h.O=function(a){var b=!1;0>this.la?this.la=Vb(this):this.C||(a=4,b=!0);this.G&57344||(this.Oa=63222,this.Eb=a);this.C=0;var c=this.U(a|this.aa),d=this.U(a+2&65535|this.aa);Wb(this,d&-12289|this.la>>2&12288);b&&(this.$|=4,this.u[6]=4);nd(this,this.la);nd(this,this.u[7]);id(this,c);this.D&=-113;this.la=-1;throw a;};function od(a){var b=pd(a),c=pd(a)&-1793;a.K&49152&&(c=c&-225|a.K&63712);id(a,b);Wb(a,c);a.D&=-17} -function qd(a,b,c){var d,e,f,g=0;d=b>>13;a.Pa&a.vc[a.C]||(d&=7);e=a.T[a.C][d];f=(a.pa[a.C][d]<<6)+(b&8191)&a.ab;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Pa&32&&(f=a.zc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.ya&&4186112>f&&(a.$|=32,a.O(4,12))}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.T[a.C][d]=e;if(4194170!==f||a.C)a.wa=a.C,a.xa=d;g&&(g&57344&&(0<=a.la&&(g|=128),a.G&57344||(a.G=a.G|g|a.wa<<5|a.xa<<1),a.O(168,16)),a.G&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.U(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.U(e)|g;a.b-= -8;break;case 6:return e=hd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=hd(a),e=e+a.u[c]&65535,e=a.U(e|a.aa)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Qa||65534<=a.u[6])&&(a.u[6]<=a.Qa-32?(a.$|=4,a.u[6]=4,a.O(4,24)):(a.$|=8,a.D|=64));return e}h.tc=function(a,b,c){return rd(this,a,b,c)};h.uc=function(a,b,c){return qd(this,rd(this,a,b,c),c)};h.$c=function(a){return this.B.ma(a)};h.dc=function(a){return this.B.ma(qd(this,a,2))}; -h.Cd=function(a,b){this.B.Wa(a,b&65535)};h.Dd=function(a,b){this.B.Wa(qd(this,a,4),b)};function sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=rd(a,b,d,2),c&65536||61440!==(a.K&61440)&&(d&=65535),a.C=a.K>>12&3,c=a.U(d|c&a.aa),a.C=a.K>>14&3):c=6!=d||(a.K>>2&12288)===(a.K&12288)?a.u[d]:a.ta[a.K>>12&3];return c} -function td(a,b,c,d){a.G&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=rd(a,b,e,4),c&65536||(e&=65535),a.C=a.K>>12&3,e=qd(a,e|c&65536,4),a.C=a.K>>14&3,a.B.Wa(e,d)):6!=e||(a.K>>2&12288)===(a.K&12288)?a.u[e]=d:a.ta[a.K>>12&3]=d}function ud(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return rd(a,b,c,8)} -function xd(a,b){var c=a.f=b&7;(b=a.g=(b&56)>>3)?(c=a.M(b,c,3),a=a.B.Ua(c)):a=a.u[c]&255;return a}function yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.B.ma(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ya=a.M(b,e,7),c=d.call(a,c,a.B.Ua(e)),e&1&&a.b--,a.B.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.M(b,e,6),a.B.Wa(e,d.call(a,c,a.B.ma(e)))):a.u[e]=d.call(a,c,a.u[e])} -function zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.B.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Ad(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.B.Wa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(id(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.fb=function(a){this.v.complete=!0;var b=this.v.rc=this.j&&Bd(this.j),c=a?this.v.Gb?0:1:-1;this.v.Gb=!1;this.N=this.b=a;do{if(b){if(Cd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.O(168,28):this.D&64?this.O(4,30):this.D&16&&this.O(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Fb&224,e=this.A.length;0<=--e;){if(0d&&(d=this.A[e].Xb,a=this.A[e],this.A.splice(e,1))}d>(this.K&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.O(a.hc,26):this.O(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Oa=0,this.Eb=this.u[7]);this.D=this.D&7|this.K&16;this.decode(hd(this))}while(0>1|b<<16;ld(this,a);return a&65535}function Id(a,b){a=b&2048|b>>1|b<<8;ld(this,a<<8);return a&255}function Jd(a,b){a=b&~a;O(this,a);return a}function Kd(a,b){a=b&~a;O(this,a<<8);return a}function Ld(a,b){a|=b;O(this,a);return a} -function Md(a,b){a|=b;O(this,a<<8);return a}function Nd(a,b){a=~b|65536;jd(this,a);return a&65535}function Od(a,b){a=~b|256;jd(this,a<<8);return a&255}function Pd(a,b){a=b-a;this.D&128||(this.V=this.Z=a,this.S=b&(b^a));return a&65535}function Qd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.V=this.Z=c,this.S=b&(b^c));return a&255}function Rd(a,b){a=b+a;this.D&128||(this.V=this.Z=a,this.S=a&(b^a));return a&65535} -function Sd(a,b){a=b+a;var c=a<<8;this.D&128||(this.V=this.Z=c,this.S=c&(b<<8^c));return a&255}function Td(a,b){a=-b;jd(this,a,a&b&32768);return a&65535}function Ud(a,b){a=-b;jd(this,a<<8,(a&b&128)<<8);return a&255}function Vd(a,b){a=b<<1|this.R>>16&1;ld(this,a);return a&65535}function Wd(a,b){a=b<<1|this.R>>16&1;ld(this,a<<8);return a&255}function Xd(a,b){a=(this.R&65536|b)>>1|b<<16;ld(this,a);return a&65535}function Yd(a,b){a=((this.R&65536)>>8|b)>>1|b<<8;ld(this,a<<8);return a&255} -function Zd(a,b){var c=b-a;md(this,c,a,b);return c&65535}function $d(a,b){var c=b-a;md(this,c<<8,a<<8,b<<8);return c&255}function ae(a,b){this.D&128||(this.V=this.Z=b&65280,this.S=this.R=0);return(b<<8|b>>8)&65535}function be(a,b){a^=b;O(this,a);return a&65535} -function ce(a){var b=yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.R=this.S=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.S=32768)}this.u[a]=c&65535;this.V=this.Z=c;this.b-=(this.g?6:7)+b} -function de(a){var b=yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=0;b&=63;if(b&32){b=64-b;32>b-1;this.R=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.V=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function S(a){a&1&&(this.R=0);a&2&&(this.S=0);a&4&&(this.Z=1);a&8&&(this.V=0);this.b-=5} -function ee(a){var b=yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.R=this.S=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Z=d>>16|d,this.V=d>>16):(this.S=32768,this.Z=d>>15|d,this.V=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.V=0,this.S=32768,this.R=65536,this.b-=7}var fe=[0,7,7,10,7,11,9,13];function ge(a){var b=this.b;id(this,wd(this,a));this.b=b-fe[this.g]} -var he=[0,14,14,17,14,18,16,20];function ie(a){var b=this.b,c=wd(this,a);a=a>>6&7;nd(this,this.u[a]);this.u[a]=this.u[7];id(this,c);this.b=b-he[this.g]}var je=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],ke=[7,13,13,17,14,18,17,21];function le(a){var b=yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.V=b>>16,this.Z=this.V|b,this.S=0,this.R=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)id(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function oe(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)}function pe(a){Q(this,a,vd(this,a),be);this.b-=this.g?9:3+(7==this.f?2:0)}function V(){this.O(8,6)}function Kc(a){qe[a>>12].call(this,a)} -var qe=[function(a){re[a>>8&15].call(this,a)},function(a){var b=vd(this,a),c=this.b;O(this,Ad(this,a,b));this.b=c-je[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)},function(a){var b=vd(this,a);a=yd(this,a);md(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,vd(this,a)&yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Jd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,vd(this,a),Ld);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Dd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){se[a>>8&15].call(this,a)},function(a){Me[a>>8&15].call(this,a)},function(a){var b=ud(this,a);O(this,zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=ud(this,a)<<8;a=xd(this,a)<<8;md(this,b-a,a,b);this.b-=this.g? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(ud(this,a)&xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,ud(this,a),Kd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,ud(this,a),Md);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,vd(this,a),Zd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],re= -[function(a){Ne[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!gd(this))},function(a){R(this,a,gd(this))},function(a){R(this,a,!this.Fa()==!fd(this))},function(a){R(this,a,!this.Fa()!=!fd(this))},function(a){R(this,a,!gd(this)&&!this.Fa()==!fd(this))},function(a){R(this,a,gd(this)||!this.Fa()!=!fd(this))},ie,ie,function(a){Oe[a>>6&3].call(this,a)},function(a){Pe[a>>6&3].call(this,a)},function(a){Qe[a>>6&3].call(this,a)},function(a){Re[a>>6&3].call(this,a)},V,V],Oe=[function(a){jd(this, -Ad(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Rd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Pd);this.b-=this.g?9:3+(7==this.f?2:0)}],Pe=[function(a){Q(this,a,0,Td);this.b-=this.g?11:6},function(a){Q(this,a,ed(this)?1:0,Dd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,ed(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=yd(this,a);jd(this,a);this.b-=this.g?4:3+(7==this.f? -2:0)}],Qe=[function(a){Q(this,a,0,Xd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Hd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Fd);this.b-=this.g?9:3+(7==this.f?2:0)}],Re=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.dc(a|65536);id(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=sd(this,a,0);nd(this,a);O(this,a);this.b-=11},function(a){var b=pd(this),c=this.b;td(this,a, -0,b);O(this,b);this.b=c-ke[this.g]},function(a){O(this,Ad(this,a,this.Fa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ne=[function(a){Se[a&15].call(this,a)},V,V,V,ge,ge,ge,ge,function(a){if(a&8)this.O(8,6);else{var b=pd(this);a&=7;id(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.K&49152||(this.K=this.K&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.O(8,6)},function(a){Te[a&15].call(this,a)},function(a){Ue[a&15].call(this,a)},oe,oe,oe,oe],Se=[function(){this.K&49152?(this.$|=128,this.O(4, -3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){od(this);this.D|=this.K&16;this.b-=13},function(){this.O(12,1);this.b-=5},function(){this.O(16,4);this.b-=25},function(){this.K&49152||(Lc(this),this.B.reset());this.b-=667},function(){od(this);this.b-=13},V,V,V,V,V,V,V,V,V],Te=[me,function(){this.R=0;this.b-=5},function(){this.S=0;this.b-=5},S,function(){this.Z=1;this.b-=5},S,S,S,function(){this.V=0;this.b-=5},S,S,S,S,S,S,S],Ue=[me,function(){this.R= -65536;this.b-=5},function(){this.S=32768;this.b-=5},T,function(){this.Z=0;this.b-=5},T,T,T,function(){this.V=32768;this.b-=5},T,T,T,T,T,T,T],se=[le,le,ee,ee,ce,ce,de,de,pe,pe,V,V,V,V,ne,ne],Me=[function(a){R(this,a,!this.Fa())},function(a){R(this,a,this.Fa())},function(a){R(this,a,!ed(this)&&!gd(this))},function(a){R(this,a,ed(this)||gd(this))},function(a){R(this,a,!fd(this))},function(a){R(this,a,fd(this))},function(a){R(this,a,!ed(this))},function(a){R(this,a,ed(this))},function(){this.O(24,2); -this.b-=25},function(){this.O(28,5);this.b-=5},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},V,V],Ve=[function(a){jd(this,zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Sd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Qd);this.b-=this.g?9:3+(7==this.f?2:0)}],We=[function(a){P(this,a,0,Ud);this.b-= -this.g?11:6},function(a){P(this,a,ed(this)?1:0,Ed);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,ed(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=xd(this,a);jd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Xe=[function(a){P(this,a,0,Yd);this.b-=this.g?9+(this.Ya&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Id);this.b-=this.g?9+(this.Ya&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Gd);this.b-=this.g?9:3+(7== -this.f?2:0)}],Ye=[V,function(a){a=sd(this,a,65536);nd(this,a);O(this,a);this.b-=11},function(a){var b=pd(this),c=this.b;td(this,a,65536,b);O(this,b);this.b=c-ke[this.g]},V];function Ze(a){r.call(this,"ROM",a,Ze);this.f=null;this.C=a.addr;this.g=a.size;this.G=a.writable;this.F=a.alias;this.A=a.file;this.H=da(this.A);if(this.A){a=this.A;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){$e(c,a,b,f)})}}y(Ze); -Ze.prototype.Ga=function(a,b,c,d){this.B=b;this.b=c;this.j=d;af(this)};Ze.prototype.Ca=function(){if(this.Da){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.g,e=this.Da,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var n=l.o,p=l.a;if(void 0!==n){var q=f,n=[n>>>0,g],v=qa(q,n,a.Kb);0>v&&q.splice(-(v+1),0,n)}p&&(l.a=p.replace(/''/g,'"'))}a.H.push({Id:b,w:c,wc:d,Da:e,Jb:f})}delete this.Da}return!0};Ze.prototype.Ba=function(){return!0}; -function $e(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{ab(a.xb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Da=l.symbols;if(!a.f.length){m("Empty ROM: "+ -b);return}if(1==a.f.length){m(a.f[0]);return}}catch(n){a.na("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e>>d.Y].wb(e&d.f,a.f[c]&255,e);a.j&&a.j.g--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c>> -e.Y;0>>=e.Y;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Xa)return;b=oa(b[1]);if(this.I=cb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.xb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Ca=function(a,b){if(!b)if(this.Tb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.Ba=function(a){return a?this.save():!0};h.reset=function(){ff(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return ff(this)};function ff(a){a.U=0;a.f=0;a.g=128;a.C=[];return!0}h.Db=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.W||8,c=a-this.H%a,this.W&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;Rb(this.b,100,4,52,this.N)}};var gf={},ef=(gf[65392]=[null,null,W.prototype.Pc,W.prototype.rd,"RCSR"],gf[65394]=[null,null,W.prototype.Oc,W.prototype.qd,"RBUF"],gf[65396]=[null,null,W.prototype.bd,W.prototype.Fd,"XCSR"],gf[65398]=[null,null,W.prototype.ad,W.prototype.Ed,"XBUF"],gf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};hf.prototype.Pb=function(){return-1};hf.prototype.Qb=function(){}; -function kf(a,b,c,d){if(c)if(b){0>a.C&&a.A.length&&(a.C=0);if(0>a.C||b!=a.A[a.C])a.A.splice(0,0,b),a.C=0;a.C--}else a.X?b="end":b=a.A[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(oa(b.substring(c,f))),c=f+1}}return a} -function lf(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; +h.ua=function(a){if(this.pb&&(a||!this.v.aa||this.v.Kb)){for(a=0;ab){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Wb:c<<5&224,cc:d,yb:e})}a.D|=2}function jc(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} +function kc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.qa[c]=a.u[6],a.u[6]=a.qa[a.C]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} +h.$=function(a){var b=!1;0>this.ma?this.ma=jc(this):this.C||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.C=0;var c=this.S(a|this.ba),d=this.S(a+2&65535|this.ba);kc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.D&=-17} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.nc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.C][d]=e;if(4194170!==f||a.C)a.ra=a.C,a.sa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ra<<5|a.sa<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= +8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.lc=function(a,b,c){return xd(this,a,b,c)};h.mc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Wc=function(a){return this.w.ia(a)};h.Zb=function(a){return this.w.ia(wd(this,a,2))}; +h.Cd=function(a,b){this.w.Sa(a,b&65535)};h.Dd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.S(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.qa[a.L>>12&3];return c} +function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=wd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.qa[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} +function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ia(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.bb=function(a){this.v.complete=!0;var b=this.v.jc=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0d&&(d=this.B[e].Wb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.cc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} +function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} +function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} +function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} +function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b} +function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5} +function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]} +var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)} +var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],xe= +[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, +Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? +2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, +0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= +65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24,2); +this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= +this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7== +this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.C=a.addr;this.i=a.size;this.G=a.writable;this.F=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Id:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; +function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.C=[];return!0}h.Bb=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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;Yb(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Lc,W.prototype.rd,"RCSR"],nf[65394]=[null,null,W.prototype.Kc,W.prototype.qd,"RBUF"],nf[65396]=[null,null,W.prototype.Yc,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.Xc,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; +function qf(a,b,c,d){if(c)if(b){0>a.B&&a.i.length&&(a.B=0);if(0>a.B||b!=a.i[a.B])a.i.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.i[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} +function rf(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 mf(a,b,c){var d;if(b){b=nf(a,b);for(var e=0,f=!1,g=b,l=[],n=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function qf(a,b){if(b)return pf(a,b,a.ca[b]);var c=0;for(b in a.ca)pf(a,b,a.ca[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ba[b]);var c=0;for(b in a.ba)vf(a,b,a.ba[b]),c++;return 0>>d.B.Y;n=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;n--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=Lb[c],q&&d.i(k(q.id,8)+" %"+k(e<>>c.Y].Bb(d&c.f,d),this.g--,b&&Af(a,b));return c};h.ma=function(a,b){var c=65535,d=Y(a);-1!==d&&(this.g++,c=Mb(this.B,d),this.g--,b&&Af(a,b));return c}; -h.mb=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.P[(d&e.g)>>>e.Y].wb(d&e.f,b&255,d);this.g--;c&&Af(a,c);M(this.b,!0)}};h.Wa=function(a,b,c){var d=Y(a);if(-1!==d){this.g++;var e=this.B;e.P[(d&e.g)>>>e.Y].Ib(d&e.f,b&65535,d);this.g--;c&&Af(a,c);M(this.b,!0)}};function X(a){return{w:a,Aa:!1}}function Bf(a){return[a.w,a.Aa]}function Cf(a){return{w:a[0],Aa:a[1]}} -function zf(a,b,c){var d;c=(c?a.M:a.Ra).w;if(void 0!==b){d=b=nf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Qb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ha[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Vb(this.b)));return b}; -h.message=function(a,b){this.g||(b&&(a+=" @"+I(this,X(this.b.u[7]).w)),this.ha&1073741824?this.wa.push(a):this.oa&&a==this.oa||(this.oa=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.ka=0,M(a))))}; -function tf(a){var b;if(Bd(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.Y],!1)}a.N=["br"];if(a.G)for(b=1;b>>d.Y],!0);a.G=["bw"];a.Ya=0} -h.Sa=function(a,b,c){var d=!0;c||Jf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.i("invalid address: "+I(this,b.w)),d=!1;else{var f=this.B;f.P[e>>>f.Y].Sa(e&f.f,a==this.G)}}d&&(a.push(b),c?b.Aa=!0:(Kf(this,a,a.length-1,"set"),tf(this)));return d};function Jf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Y],b==a.G));l.Aa||tf(a);break}}return f} -function Lf(a,b){for(var c=1;c>23)&65535,x=I(w,u);else if(8192==C)u=u.w-((f&63)<<1)&65535,x=I(w,u);else if(12288==C)x=I(w,f&7,1);else if(24576==C)x=I(w,f&63,1);else if(C=f&B,B&4032&&(C>>=6,B>>=6),B&63)switch(B=C&7,C&56){case 0:x=Ef(B);break;case 8:x="@"+Ef(B);break;case 16:7>B?x="("+Ef(B)+ -")+":(C=w.ma(u,2),x="#"+I(w,C,0,!0));break;case 24:7>B?x="@("+Ef(B)+")+":(C=w.ma(u,2),x="@#"+I(w,C,0,!0));break;case 32:x="-("+Ef(B)+")";break;case 40:x="@-("+Ef(B)+")";break;case 48:C=w.ma(u,2);x=I(w,C,0,!0)+"("+Ef(B)+")";7==B&&(x=[x,I(w,C+u.w&65535)]);break;case 56:C=w.ma(u,2),x="@"+I(w,C)+"("+Ef(B)+")",7==B&&(x=[x,I(w,C+u.w&65535)])}w=x;if(!w||!w.length){l="INVALID";break}"string"!=typeof w&&(n=w[1],w=w[0]);0b?(c=Ef(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Ha[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.ta[b-16]):20==b&&(c="PS="+I(a,Vb(d)));c&&(c+=" ");return c}function Qf(a){var b,c="";for(b=0;6>b;b++)c+=Pf(a,b);c=c+"\n"+(Pf(a,6)+Pf(a,7)+Pf(a,20));return c+=Of(a,"T")+Of(a,"N")+Of(a,"Z")+Of(a,"V")+Of(a,"C")}h.Kb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.wc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}M(d);a.i("updated registers:")}a.i(Qf(a));c&&(a.M=X(d.u[7]),Hf(a,I(a,a.M.w)))}}function Vf(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=Nf(a,b,g,f);a.i(f);a.M=b;e-=b.w-n;c++}}} -function Mf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.X&&(a.i("ended assemble at "+I(a,a.W.w)),a.M=a.W,a.X=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(hb(a)&&0q||"z"ja.length&&(a.i("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].w?(Z=ca+Z,ca=0):ca+=ja.length);var Pc=[];"call"==ye&&(jb=1E5,Pc=["CALL"]);for(void 0!==xe&&a.i(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Za=Z;Ae++;jb--}}Ae||(a.i("no "+ze+"history available"),a.Za=void 0)}else{var Yb=zf(a,ia);if(Yb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||og),Zb=of(a,za)>>>0,65536>4||1;qg--&&0<$b;){var ac=0,Qc=0,nb,Rc="",De="",ia=I(a,Yb.w);for(nb=4==mb?16:a.ia;0bc?String.fromCharCode(bc):".";$b--}lb&&(lb+="\n");lb+=ia+" "+Rc+(0==nb?" "+De:"")}lb&&a.i(lb);a.Ra=Yb}}}}break;case "e":if("else"==g[0])break;var Ra,Sc,Tc,Uc,Vc=g[0],Wc=g[1];"eb"==Vc?(Ra=1,Sc=255,Tc=a.Ua,Uc=a.mb):"e"==Vc||"ew"==Vc?(Ra=2,Sc=65535,Tc=a.ma,Uc=a.Wa):Wc=null;if(null==Wc)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var cc=zf(a,Wc);if(cc)for(var dc=2;dcZc;){for(var Aa=null,ug=256;65536>qb.w>>>0;){$c.w=a.ma(qb,2);if(null==qb.w||!ug--)break;if(!($c.w&1)){for(var vg=a,ec=$c,Fe=null,rb=ec.w,Ge=rb,ad=1;6>=ad&& -rb;ad++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b$f){if(bg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");bg(this.C)&&(gg(this,d),a=2,hg(this.C));this.C.set("timestamp",sa());ig(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=fg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?bg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.g=null)):this.i(f+": "+g),hg(d),bg(d)?(c=fg(d),e=!0):c=!1))}e&&eg(this,c?d:null)}else 2==a&&d.clear()}else eg(this);delete this.I;delete this.L}e=bb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(jg(this,this.b,b,c,a),this.b.gb());this.U&&(gg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; -function gg(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.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function Xf(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ba&&(c&&a.b.ea(),d=a.b.Ba(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=bb(a.id),n=0;nf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(g=g.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Bg(a,b,c)}})}else c(a,null)} -function Cg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);n&&(--ng||Sa(!0));n=!1}var g,l,n=!0;ng++;$a[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?zg(c,null,null,!1,e,function(d,n){n?(ab(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(g.outerHTML=n,--ng||Sa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(n,g),--ng||Sa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?zg(b,a,d,!0,e,p):Ag(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return n}window.embedPDP11=function(a,b,c,d){Sa(!1);return Cg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); +63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};h=xf.prototype; +h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.F=a;(a=Dc(a,"messages"))&&Af(this,a);this.Va=Df;Ef(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=Y(Ff(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Pb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ia=function(a,b){var c=65535,d=Y(a);-1!==d&&(c=Qb(this.w,d),b&&Gf(a,b));return c}; +h.mb=function(a,b,c){var d=Y(a);-1!==d&&(Rb(this.w,d,b),c&&Gf(a,c),M(this.b,!0))};h.Sa=function(a,b,c){var d=Y(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} +function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.qa[a-16]:20==a&&(b=jc(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+I(this,X(this.b.u[7]).A));this.ha&1073741824?this.pa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,M(a)))}; +function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.C)for(b=1;b>>d.Y],!0);a.C=["bw"];a.Ma=0} +h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.g("invalid address: "+I(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.C)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Y],b==a.C));l.wa||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,x=I(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=I(v,u);else if(12288==D)x=I(v,f&7,1);else if(24576==D)x=I(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ +")+":(D=v.ia(u,2),x="#"+I(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ia(u,2),x="@#"+I(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ia(u,2);x=I(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,I(v,D+u.A&65535)]);break;case 56:D=v.ia(u,2),x="@"+I(v,D)+"("+Kf(C)+")",7==C&&(x=[x,I(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.qa[b-16]):20==b&&(c="PS="+I(a,jc(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}M(d);a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,I(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} +function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+I(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ja.length&&(a.g("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].A?(Z=ca+Z,ca=0):ca+=ja.length);var Sc=[];"call"==De&&(nb=1E5,Sc=["CALL"]);for(void 0!==Ce&&a.g(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Ua=Z;Fe++;nb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var pb=Ff(a,ia);if(pb){var $b=0;Aa&&("l"==Aa.charAt(0)&&(Aa=Aa.substr(1)||ug),$b=uf(a,Aa)>>>0,65536<$b&&($b=65536));for(var qb="",Ta="dd"==Qa?4:"dw"==Qa?2:1,ac=Ta*$b||128,wg=ac+15>>4||1;wg--&&0cc?String.fromCharCode(cc):".";ac--}qb&&(qb+="\n");qb+=ia+" "+Tc+(0==sb?" "+Ie:"")}qb&&a.g(qb);a.Na=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Vc,Wc,Xc,Yc=g[0],Zc=g[1];"eb"==Yc?(Ua=1,Vc=255,Wc=a.Qa,Xc=a.mb):"e"==Yc||"ew"==Yc?(Ua=2,Vc=65535,Wc=a.ia,Xc=a.Sa):Zc=null;if(null==Zc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var dc=Ff(a,Zc);if(dc)for(var ec=2;ec< +g.length;ec++){var tb=sf(a,g[ec]);if(void 0===tb){a.g("unrecognized value: "+g[ec]);break}tb&~Vc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var xg=Wc.call(a,dc);a.g("changing "+I(a,dc.A)+" from "+I(a,xg,Ua)+" to "+I(a,tb,Ua));Xc.call(a,dc,tb,Ua)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var $c=Ff(a,Je,!0);if(!$c)break a;Jf(a,$c,yg);a.Oa(a.f,$c,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.aa?(c||a.g("halting"),a.ea()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var ad;var ub=b.substr(2),ub=oa(ub);sf(a,ub)?(c||a.g("true: "+ub),ad=!0):(c||a.g("false: "+ub),ad=!1);ad||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var bd=0,cd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+I(a,vb.A));10>bd;){for(var Ba=null,Ag=256;65536>vb.A>>>0;){cd.A=a.ia(vb,2);if(null==vb.A||!Ag--)break;if(!(cd.A&1)){for(var Bg=a,fc=cd,Ke=null,wb= +fc.A,Le=wb,dd=1;6>=dd&&wb;dd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");hg(this.C)&&(mg(this,d),a=2,ng(this.C));this.C.set("timestamp",sa());og(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; +function mg(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.ea(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} +function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 903f8be0d..248d99dee 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -683,151 +683,150 @@ */ var g; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} -var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; -function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function l(a,b,c,d){var e=0,f=null,k=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)}),k;var m=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(m.onreadystatechange=function(){4===m.readyState&&(f=m.responseText,200==m.status||!m.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=m.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");m.open("POST",a,!!c);m.setRequestHeader("Content-type","application/x-www-form-urlencoded");m.send(n)}else m.open("GET",a,!!c),"bytes"==b&&m.overrideMimeType("text/plain; charset=x-user-defined"),m.send();c||(f=m.responseText,200!=m.status&&(e=m.status||-1),d&&d(a,f,e),k=[f,e]);return k}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function p(a){window&&window.alert(a)}function la(a){var b=!1;window&&(b=window.confirm(a));return b}var ma=null;function na(){if(null==ma){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ma=a}return ma}function oa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function pa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function qa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},ra=!1,sa=!1,ta=!0;function ua(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} -function va(a){if(ta)try{for(var b=0;bb?this.Da=this.id:(this.Ua=this.id.substr(0,b),this.Da=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Ma=null;this.i.error=!1;this.w={};this.I=null;w.push(this)}var ya=void 0,za={}; -if(window){ya||(ya=window.location.search.substr(1));for(var Aa,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Aa=Da.exec(ya);)za[decodeURIComponent(Aa[1].replace(Ca," "))]=decodeURIComponent(Aa[2].replace(Ca," "))}function Ea(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} +e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ha(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ia(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; +function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function m(a,b,c,d){var e=0,f=null,h=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)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encodeURIComponent(b[p]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function t(a){r.init.push(a)} +function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Xc:!1,Yc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.w={};this.I=null;w.push(this)}var za=void 0,Aa={}; +if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.m=this.g-1;this.s=this.B/this.g|0;this.la=[];this.o=[];this.Gb=[Na,Oa,Pa,Qa];a=new E(this.b);Ra(a,this.I);this.a=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.la[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;F(d.b,4)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.la[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.la[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||F(e.b,4)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.la[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;F(d.b,4)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.la[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||F(e.b,4)} -function Sa(a,b){if(b!=a.l){var c;if(a.l){c=(1<>>a.c;0>>a.c;0k&&(t=k);if(n&&n.size){if(n.type==d&&n.controller==e){if(f+k<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>k&&(t=k);n.Pa=f-n.za+t;f=q+a.g;k-=t;m++;continue}}return Ta(1,f,k)}f=new E(a.b,f,t,a.g,d,e);Ra(f,a.I,n);a.a[m++]=f;f=q+a.g;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+Wa[d]+" at "+h(b,8,!0)),!0):Ta(2,b,c)} -function Xa(a,b){return a.a[(b&a.h)>>>a.c].Ya(b&a.m,b)}function Ya(a,b){return a.a[(b&a.h)>>>a.c].oc(b&a.m,b)}function Za(a,b,c){a.a[(b&a.h)>>>a.c].Sc(b&a.m,c&65535,b)}function $a(a){for(var b=0,c=[],d=0;da.b.Mb))for(var f=e[0]?e[0].bind(b):null,k=e[1]?e[1].bind(b):null,m=e[2]?e[2].bind(b):null,n=e[3]?e[3].bind(b):null,q=a,t=+d,e=e[4],J=+d;J<=t;J+=2){var Ba=J&8191;void 0!==q.la[Ba]?p("I/O address already registered: "+h(J,8,!0)):q.la[Ba]=[f,k,m,n,e||"unknown",!1]}}}function bb(a,b){a.o.push(b)}function Ta(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1} -function G(a){v.call(this,"Device",a,G);this.c={data:0,Xc:0,Na:20,ad:0};this.a={$c:0,bb:-1}}x(G);g=G.prototype;g.oa=function(a,b,c,d){this.m=b;this.b=c;this.I=d;var e=this;this.a.bb=cb(this.b,function(){e.a.pa|=128;e.a.pa&64&&(db(e.b,0,6,64),eb(e.b,e.a.bb,1E3/60))});ab(b,this,H);bb(b,this.reset.bind(this));D(this)};g.Vb=function(){var a=this.a.pa;this.a.pa&=-129;return a};g.Ac=function(a){this.a.pa=a;a&64&&eb(this.b,this.a.bb,1E3/60);this.a.pa=a&-129}; -g.Xb=function(){var a=this.b;return a.D&62337|a.Ea<<5|a.Fa<<1};g.Cc=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.Ea=a>>5&3;b.Fa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Oa!=c&&(b.Oa=c,fb(b))}gb(this)};g.Yb=function(){var a=this.b.qa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Zb=function(){return this.b.$a};g.$b=function(){return this.b.ra};g.Dc=function(a){var b=this.b;b.ra!=a&&(b.ra=a,a&16?(b.Wa=4194303,b.Ga=3915776):(b.Wa=262143,b.Ga=253952),fb(b));gb(this)}; -function gb(a){a.c.Na=a.c.Na&-8|(a.b.Oa?a.b.ra&16?1:2:4)}g.hc=function(a){return this.b.C[1][a>>1&7]};g.Lc=function(a,b){this.b.C[1][b>>1&7]=a&65295};g.fc=function(a){return this.b.C[1][(a>>1&7)+8]};g.Jc=function(a,b){this.b.C[1][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.b.P[1][a>>1&7]};g.Kc=function(a,b){b=b>>1&7;this.b.P[1][b]=a;this.b.C[1][b]&=65295};g.ec=function(a){return this.b.P[1][(a>>1&7)+8]};g.Ic=function(a,b){b=(b>>1&7)+8;this.b.P[1][b]=a;this.b.C[1][b]&=65295}; -g.Ub=function(a){return this.b.C[0][a>>1&7]};g.zc=function(a,b){this.b.C[0][b>>1&7]=a&65295};g.Sb=function(a){return this.b.C[0][(a>>1&7)+8]};g.xc=function(a,b){this.b.C[0][(b>>1&7)+8]=a&65295};g.Tb=function(a){return this.b.P[0][a>>1&7]};g.yc=function(a,b){b=b>>1&7;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.Rb=function(a){return this.b.P[0][(a>>1&7)+8]};g.wc=function(a,b){b=(b>>1&7)+8;this.b.P[0][b]=a;this.b.C[0][b]&=65295};g.nc=function(a){return this.b.C[3][a>>1&7]}; -g.Rc=function(a,b){this.b.C[3][b>>1&7]=a&65295};g.lc=function(a){return this.b.C[3][(a>>1&7)+8]};g.Pc=function(a,b){this.b.C[3][(b>>1&7)+8]=a&65295};g.mc=function(a){return this.b.P[3][a>>1&7]};g.Qc=function(a,b){b=b>>1&7;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.kc=function(a){return this.b.P[3][(a>>1&7)+8]};g.Oc=function(a,b){b=(b>>1&7)+8;this.b.P[3][b]=a;this.b.C[3][b]&=65295};g.T=function(a){a&=7;return this.b.v&2048?this.b.va[a]:this.b.f[a]}; -g.W=function(a,b){b&=7;this.b.v&2048?this.b.va[b]=a:this.b.f[b]=a};g.pb=function(){return this.b.v&49152?this.b.Z[0]:this.b.f[6]};g.Bb=function(a){this.b.v&49152?this.b.Z[0]=a:this.b.f[6]=a};g.sb=function(){return this.b.f[7]};g.Eb=function(a){this.b.f[7]=a};g.U=function(a){a&=7;return this.b.v&2048?this.b.f[a]:this.b.va[a]};g.X=function(a,b){b&=7;this.b.v&2048?this.b.f[b]=a:this.b.va[b]=a};g.qb=function(){return 1==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[1]}; -g.Cb=function(a){1==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[1]=a};g.rb=function(){return 3==(this.b.v&49152)>>14?this.b.f[6]:this.b.Z[3]};g.Db=function(a){3==(this.b.v&49152)>>14?this.b.f[6]=a:this.b.Z[3]=a};g.Qb=function(a){return this.b.wb[a-65504>>1]};g.vc=function(a,b){this.b.wb[b-65504>>1]=a};g.tb=function(a){return 65520==a?61183:0};g.Fb=function(){};g.jc=function(){return 1};g.Nc=function(){};g.Pb=function(){return this.b.F};g.uc=function(){this.b.F=0};g.Wb=function(){return this.b.vb}; -g.Bc=function(a,b){b&1||(a&=255);this.b.vb=a};g.ac=function(){return this.b.ab};g.Ec=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.ic=function(){return this.b.sa&65280};g.Mc=function(a){this.b.sa=a|255};g.bc=function(){return hb(this.b)};g.Fc=function(a){ib(this.b,a&-1809|hb(this.b)&1808);this.b.j|=128};g.reset=function(){this.c.Na=this.c.Na&-120|20;this.a.pa=0}; -var I={},H=(I[62592]=[null,null,G.prototype.hc,G.prototype.Lc,"SISDR"],I[62608]=[null,null,G.prototype.fc,G.prototype.Jc,"SDSDR"],I[62624]=[null,null,G.prototype.gc,G.prototype.Kc,"SISAR"],I[62640]=[null,null,G.prototype.ec,G.prototype.Ic,"SDSAR"],I[62656]=[null,null,G.prototype.Ub,G.prototype.zc,"KISDR"],I[62672]=[null,null,G.prototype.Sb,G.prototype.xc,"KDSDR"],I[62688]=[null,null,G.prototype.Tb,G.prototype.yc,"KISAR"],I[62704]=[null,null,G.prototype.Rb,G.prototype.wc,"KDSAR"],I[62798]=[null,null, -G.prototype.$b,G.prototype.Dc,"MMR3"],I[65382]=[null,null,G.prototype.Vb,G.prototype.Ac,"LKS"],I[65402]=[null,null,G.prototype.Xb,G.prototype.Cc,"MMR0"],I[65404]=[null,null,G.prototype.Yb,null,"MMR1"],I[65406]=[null,null,G.prototype.Zb,null,"MMR2"],I[65408]=[null,null,G.prototype.nc,G.prototype.Rc,"UISDR"],I[65424]=[null,null,G.prototype.lc,G.prototype.Pc,"UDSDR"],I[65440]=[null,null,G.prototype.mc,G.prototype.Qc,"UISAR"],I[65456]=[null,null,G.prototype.kc,G.prototype.Oc,"UDSAR"],I[65472]=[G.prototype.T, -G.prototype.W,G.prototype.T,G.prototype.W,"R0SET0"],I[65473]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R1SET0"],I[65474]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R2SET0"],I[65475]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R3SET0"],I[65476]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R4SET0"],I[65477]=[G.prototype.T,G.prototype.W,G.prototype.T,G.prototype.W,"R5SET0"],I[65478]=[G.prototype.pb,G.prototype.Bb,G.prototype.pb,G.prototype.Bb, -"R6KERNEL"],I[65479]=[G.prototype.sb,G.prototype.Eb,G.prototype.sb,G.prototype.Eb,"R7KERNEL"],I[65480]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R0SET1"],I[65481]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R1SET1"],I[65482]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R2SET1"],I[65483]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R3SET1"],I[65484]=[G.prototype.U,G.prototype.X,G.prototype.U,G.prototype.X,"R4SET1"],I[65485]=[G.prototype.U,G.prototype.X, -G.prototype.U,G.prototype.X,"R5SET1"],I[65486]=[G.prototype.qb,G.prototype.Cb,G.prototype.qb,G.prototype.Cb,"R6SUPER"],I[65487]=[G.prototype.rb,G.prototype.Db,G.prototype.rb,G.prototype.Db,"R6USER"],I[65504]=[null,null,G.prototype.Qb,G.prototype.vc,"CTRL",1170],I[65520]=[null,null,G.prototype.tb,G.prototype.Fb,"LSIZE",1170],I[65522]=[null,null,G.prototype.tb,G.prototype.Fb,"HSIZE",1170],I[65524]=[null,null,G.prototype.jc,G.prototype.Nc,"SYSID",1170],I[65526]=[null,null,G.prototype.Pb,G.prototype.uc, -"CPUERR",1170],I[65528]=[null,null,G.prototype.Wb,G.prototype.Bc,"MB",1170],I[65530]=[null,null,G.prototype.ac,G.prototype.Ec,"PIR"],I[65532]=[null,null,G.prototype.ic,G.prototype.Mc,"SL"],I[65534]=[null,null,G.prototype.bc,G.prototype.Fc,"PSW"],I);H[62594]=H[62592];H[62596]=H[62592];H[62598]=H[62592];H[62600]=H[62592];H[62602]=H[62592];H[62604]=H[62592];H[62606]=H[62592];H[62610]=H[62608];H[62612]=H[62608];H[62614]=H[62608];H[62616]=H[62608];H[62618]=H[62608];H[62620]=H[62608];H[62622]=H[62608]; -H[62626]=H[62624];H[62628]=H[62624];H[62630]=H[62624];H[62632]=H[62624];H[62634]=H[62624];H[62636]=H[62624];H[62638]=H[62624];H[62642]=H[62640];H[62644]=H[62640];H[62646]=H[62640];H[62648]=H[62640];H[62650]=H[62640];H[62652]=H[62640];H[62654]=H[62640];H[62658]=H[62656];H[62660]=H[62656];H[62662]=H[62656];H[62664]=H[62656];H[62666]=H[62656];H[62668]=H[62656];H[62670]=H[62656];H[62674]=H[62672];H[62676]=H[62672];H[62678]=H[62672];H[62680]=H[62672];H[62682]=H[62672];H[62684]=H[62672];H[62686]=H[62672]; -H[62690]=H[62688];H[62692]=H[62688];H[62694]=H[62688];H[62696]=H[62688];H[62698]=H[62688];H[62700]=H[62688];H[62702]=H[62688];H[62706]=H[62704];H[62708]=H[62704];H[62710]=H[62704];H[62712]=H[62704];H[62714]=H[62704];H[62716]=H[62704];H[62718]=H[62704];H[65410]=H[65408];H[65412]=H[65408];H[65414]=H[65408];H[65416]=H[65408];H[65418]=H[65408];H[65420]=H[65408];H[65422]=H[65408];H[65426]=H[65424];H[65428]=H[65424];H[65430]=H[65424];H[65432]=H[65424];H[65434]=H[65424];H[65436]=H[65424];H[65438]=H[65424]; -H[65442]=H[65440];H[65444]=H[65440];H[65446]=H[65440];H[65448]=H[65440];H[65450]=H[65440];H[65452]=H[65440];H[65454]=H[65440];H[65458]=H[65456];H[65460]=H[65456];H[65462]=H[65456];H[65464]=H[65456];H[65466]=H[65456];H[65468]=H[65456];H[65470]=H[65456];H[65506]=H[65504];H[65508]=H[65504];H[65510]=H[65504];H[65512]=H[65504];H[65514]=H[65504];H[65516]=H[65504];H[65518]=H[65504]; -u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.c,0,d>>2),pb(this,lb?qb:rb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a){a&1&&F(this.b,4);var 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},ea: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.ma=!0},G:function(a,b){return this.H(a, -b)},S:function(a,b){return this.Y(a,b)},ca:function(a,b,c){this.h||this.Ab(a,b,c)},ja:function(a,b,c){this.h||this.ka(a,b,c)},D:function(a){return this.g[a]},J:function(a){return this.g[a]},O:function(a){a&1&&F(this.b,4);return this.m.getUint16(a,!0)},$:function(a){a&1&&F(this.b,4);return this.o[a>>1]},ba:function(a,b){this.g[a]=b;this.ma=!0},da:function(a,b){this.g[a]=b;this.ma=!0},ia:function(a,b){a&1&&F(this.b,4);this.m.setUint16(a,b,!0);this.ma=!0},ta:function(a,b){a&1&&F(this.b,4);this.o[a>> -1]=b;this.ma=!0}};function Ra(a,b,c){a.I=b;a.w=a.l=0;c&&((a.w=c.w)&&tb(a,ub,!1),(a.l=c.l)&&vb(a,ub,!1))}function vb(a,b,c){c&&a.l||(a.Qa=!a.h&&b[1]||a.B,a.Sc=!a.h&&b[3]||a.A);if(c||void 0===c)a.Ab=b[1]||a.B,a.ka=b[3]||a.A}function tb(a,b,c){c&&a.w||(a.Ya=b[0]||a.s,a.oc=b[2]||a.u);if(c||void 0===c)a.H=b[0]||a.s,a.Y=b[2]||a.u}function pb(a,b){b||(b=wb);tb(a,b,void 0);vb(a,b,void 0)} -var wb=[],sb=[E.prototype.N,E.prototype.ea,E.prototype.aa,E.prototype.ua],ub=[E.prototype.G,E.prototype.ca,E.prototype.S,E.prototype.ja];if(Ja)var rb=[E.prototype.D,E.prototype.ba,E.prototype.O,E.prototype.ia],qb=[E.prototype.J,E.prototype.da,E.prototype.$,E.prototype.ta]; -function xb(a,b){v.call(this,"CPU",a,xb);var c=a.multiplier||1;this.Ja=a.cycles||b;this.da=c;this.Va=Math.round(this.Ja/1E4)/100;this.ia=this.Va*this.da;this.i.V=!1;this.i.xb=!1;this.i.Aa=a.autoStart;this.i.cb=!1;this.i.La=!1;this.Ca=this.ja=0;this.Ia=a.csStart;this.ta=a.csInterval;this.ua=a.csStop;this.J=[];this.mb=this.sc.bind(this);D(this)}x(xb);var yb=["power","reset"];g=xb.prototype; -g.oa=function(a,b,c,d){this.B=a;this.m=b;this.I=d;for(b=0;b>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -g.R=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.i.L)a=!0;else{var b=null,c,m=y(a.id);for(c=0;ca.aa/a.ia&&(b=1),a.da=b,b=a.Va*a.da,a.ia!=b)){a.ia=b;b=a.ia.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Fb(a,a.Y);a.Y=0;a.S=ja();a.ba=0;Gb(a)}function cb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function eb(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ja*a.da/1E3,a.J[b][0]=c)} -g.sc=function(){if(this.i.V){this.Xa>=this.Ja&&Gb(this,!0);this.ya=0;this.Ha=ja();if(this.ba){var a=this.Ha-this.ba;a>this.kb&&(this.S+=a,this.S>this.Ha&&(this.S=this.Ha))}try{do{for(var b,c=this.i.La?1:this.Ka,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.yb(b)}catch(q){if("number"!=typeof q)throw q;}for(var f=this.ca-this.a,a=f,k=this.J.length-1;0<=k;k--){var m=this.J[k];0>m[0]||(m[0]-=a,0>=m[0]&&(m[0]=-1,m[1]()))}this.ya+=f;this.Y+=f;Fb(this,0,!0);a=f;if(this.i.La){var n= -!1;this.Ca=this.Ca+this.fb()|0;this.ja-=a;0>=this.ja&&(this.ja+=this.ta,n=!0);0<=this.ua&&this.ua<=Hb(this)&&(this.ta=this.ua=-1,Bb(this),L(this),n=!0);n&&this.M(Hb(this)+" cycles: checksum="+h(this.Ca))}this.xa-=f;if(0>=this.xa){this.xa+=this.Ka;15<=++this.lb&&(this.B&&this.B.wa(),this.lb=0);break}}while(this.i.V)}catch(q){L(this);Cb(this);this.B&&this.B.stop(ja(),Hb(this));b=q.stack||q.message;this.i.error=!0;this.K(b);return}if(this.i.V){b=setTimeout;c=this.mb;this.ba=ja();d=this.kb;this.ya&&(d= -Math.round(d*this.ya/this.Ka));d-=this.ba-this.Ha;if(e=this.ba-this.S)this.aa=Math.round(this.Y/(10*e))/100,864E5<=e&&(this.ea=0,Eb(this));if(0>d||this.aad&&(this.S-=d),d=0;this.Xa+=this.ya;this.ba+=d;b(c,d)}}};function Db(a){var b;a.i.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.V)a.M(a.toString()+" busy");else{Eb(a);a.i.V=!0;a.i.xb=!0;if(b=a.w.run)b.textContent="Halt";a.B&&a.B.start(a.S,Hb(a));Cb(a,!0);setTimeout(a.mb,0)}}g.yb=function(){return 0}; -function L(a){if(a.i.V){a.ca-=a.a;a.a=0;Fb(a,a.Y);a.Y=0;a.i.V=!1;var b=a.w.run;b&&(b.textContent="Run");a.B&&a.B.stop(ja(),Hb(a));Cb(a)}a.i.complete=void 0}function Cb(a,b){a.B&&a.B.wa(b)} -function Ib(a){this.Mb=+a.model||1170;this.Ob=a.resetAddr||0;xb.call(this,a,6666667);this.gb=0;this.decode=Jb.bind(this);this.o=65536;this.h=32768;this.l=65535;this.s=32768;this.v=15;this.f=[0,0,0,0,0,0,0,this.Ob];this.va=[0,0,0,0,0,0];this.Z=[0,0,0,0];this.Fa=this.A=0;this.Lb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.tc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.wb=[0,0,0,0,0,0,0,0];this.g=this.c=this.Ta=this.G=this.H=this.j=this.vb=0;this.ka=-1;Kb(this);this.i.complete=this.i.Hb=!1}x(Ib,xb);g=Ib.prototype;g.hb=function(){fb(this)};g.reset=function(){this.i.V&&L(this);Kb(this);Ab(this);this.i.error=!1;this.parent.reset.call(this)}; -function Kb(a){a.sa=255;a.F=0;a.ab=0;a.D=0;a.qa=0;a.$a=0;a.ra=0;a.Oa=0;a.Ea=0;a.Wa=262143;a.Ga=253952;a.u=[];a.j|=2;a.m&&fb(a)}function fb(a){a.Oa?(a.$=65536,a.N=a.Kb,a.O=a.ub,a.nb=a.Uc,Sa(a.m,a.ra&16?22:18)):(a.$=0,a.N=a.Jb,a.O=a.pc,a.nb=a.Tc,Sa(a.m,16))}g.fb=function(){return 0};g.save=function(){var a=new M(this);a.set(0,[]);a.set(1,[this.ea,this.da]);a.set(2,$a(this.m));return a.data()}; -g.restore=function(a){var b=a[1];this.ea=b[1];Eb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;cb){a.u[f].fa-=b;break}b-=a.u[f].fa}a.u.splice(f+1,0,{fa:b,ob:c<<5&224,zb:d,Ra:e})}a.j|=2}function hb(a){return a.v=a.v&63728|a.na()|(a.l&65535?0:4)|(a.h&32768?2:0)|N(a)} -function ib(a,b){a.s=b<<12;a.l=~b&4;a.h=b<<14;a.o=b<<16;if((b^a.v)&2048)for(var c=a.va.length;0<=--c;){var d=a.f[c];a.f[c]=a.va[c];a.va[c]=d}a.A=b>>14&3;c=a.v>>14&3;a.A!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.A]);a.j|=2;a.v=b}function O(a,b){a.j&128||(a.s=a.l=b,a.h=0)}function P(a,b,c){a.j&128||(a.s=a.l=a.o=b,a.h=c||0)}function Mb(a,b,c,d){a.j&128||(a.s=a.l=a.o=b,a.h=(c^b)&(d^b))}function Q(a,b){a.j&128||(a.s=a.l=a.o=b,a.h=a.s^a.o>>1)}function Nb(a,b,c,d){a.j&128||(a.s=a.l=a.o=b,a.h=(c^d)&(d^b))} -function F(a,b){var c=!1;0>a.ka?a.ka=hb(a):a.A||(b=4,c=!0);a.D&57344||(a.qa=63222,a.$a=b);a.A=0;var d=a.O(b|a.$),e=a.O(b+2&65535|a.$);ib(a,e&-12289|a.ka>>2&12288);c&&(a.F|=4,a.f[6]=4);Ob(a,a.ka);Ob(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ka=-1;throw b;}function Pb(a){var b=Qb(a),c=Qb(a)&-1793;a.v&49152&&(c=c&-225|a.v&63712);a.f[7]=b&65535;ib(a,c);a.j&=-17} -function Rb(a,b,c){var d,e,f,k=0;d=b>>13;a.ra&a.Lb[a.A]||(d&=7);e=a.C[a.A][d];f=(a.P[a.A][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var m=f>>13&31;31>m?a.ra&32&&(f=a.tc[m]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ga&&4186112>f&&(a.F|=32,F(a,4))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192:128;break; -default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.A][d]=e;if(4194170!==f||a.A)a.Ea=a.A,a.Fa=d;k&&(k&57344&&(0<=a.ka&&(k|=128),a.D&57344||(a.D=a.D|k|a.Ea<<5|a.Fa<<1),F(a,168)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.O(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.O(e)|k;a.a-=8;break; -case 6:return e=Lb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Lb(a),e=e+a.f[c]&65535,e=a.O(e|a.$)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.D&57344||(a.qa=a.qa<<8|f<<3&248|c);6==c&&!a.A&&d&4&&0>=f&&(a.f[6]<=a.sa||65534<=a.f[6])&&(a.f[6]<=a.sa-32?(a.F|=4,a.f[6]=4,F(a,4)):(a.F|=8,a.j|=64));return e}g.Jb=function(a,b,c){return Sb(this,a,b,c)};g.Kb=function(a,b,c){return Rb(this,Sb(this,a,b,c),c)};g.pc=function(a){return Ya(this.m,a)};g.ub=function(a){return Ya(this.m,Rb(this,a,2))}; -g.Tc=function(a,b){Za(this.m,a,b&65535)};g.Uc=function(a,b){Za(this.m,Rb(this,a,4),b)};function Tb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?(d=Sb(a,b,d,2),c&65536||61440!==(a.v&61440)&&(d&=65535),a.A=a.v>>12&3,c=a.O(d|c&a.$),a.A=a.v>>14&3):c=6!=d||(a.v>>2&12288)===(a.v&12288)?a.f[d]:a.Z[a.v>>12&3];return c} -function Ub(a,b,c,d){a.D&57344||(a.qa=22);var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=Sb(a,b,e,4),c&65536||(e&=65535),a.A=a.v>>12&3,e=Rb(a,e|c&65536,4),a.A=a.v>>14&3,Za(a.m,e,d)):6!=e||(a.v>>2&12288)===(a.v&12288)?a.f[e]=d:a.Z[a.v>>12&3]=d}function Vb(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.N(b,c,3),a=Xa(a.m,c)):a=a.f[c]&255;return a}function R(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?Ya(a.m,a.N(b,c,2)):a.f[c]}function Wb(a,b){var c=a.c=b&7;b=a.g=(b&56)>>3;return Sb(a,b,c,8)} -function Xb(a,b){var c=a.c=b&7;(b=a.g=(b&56)>>3)?(c=a.N(b,c,3),a=Xa(a.m,c)):a=a.f[c]&255;return a}function S(a,b){var c=a.c=b&7;return(b=a.g=(b&56)>>3)?Ya(a.m,a.N(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.Ta=a.N(b,e,7),c=d.call(a,c,Xa(a.m,e)),e&1&&a.a--,a=a.m,a.a[(e&a.h)>>>a.c].Qa(e&a.m,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(e=a.N(b,e,6),Za(a.m,e,d.call(a,c,Ya(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} -function Yb(a,b,c,d){var e=a.c=b&7;(b=a.g=(b&56)>>3)?(d=a.N(b,e,5),d&1&&a.a--,a=a.m,a.a[(d&a.h)>>>a.c].Qa(d&a.m,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Zb(a,b,c){var d=a.c=b&7;(b=a.g=(b&56)>>3)?Za(a.m,a.N(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.yb=function(a){this.i.complete=!0;this.i.Hb=!1;this.i.xb=!1;this.ca=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.ab&224,c=this.u.length;0<=--c;){if(0b&&(b=this.u[c].ob,a=this.u[c],this.u.splice(c,1))}b>(this.v&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?F(this,a.zb):F(this,160))}else this.j&1&&this.j++;this.D&57344||(this.qa=0,this.$a=this.f[7]);this.j=this.j&7|this.v&16;this.decode(Lb(this))}while(0>1|b<<16;Q(this,a);return a&65535}function ec(a,b){a=b&2048|b>>1|b<<8;Q(this,a<<8);return a&255}function fc(a,b){a=b&~a;O(this,a);return a}function gc(a,b){a=b&~a;O(this,a<<8);return a}function hc(a,b){a|=b;O(this,a);return a}function ic(a,b){a|=b;O(this,a<<8);return a}function jc(a,b){a=~b|65536;P(this,a);return a&65535} -function kc(a,b){a=~b|256;P(this,a<<8);return a&255}function lc(a,b){a=b-a;this.j&128||(this.s=this.l=a,this.h=b&(b^a));return a&65535}function mc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.s=this.l=c,this.h=b&(b^c));return a&255}function nc(a,b){a=b+a;this.j&128||(this.s=this.l=a,this.h=a&(b^a));return a&65535}function oc(a,b){a=b+a;var c=a<<8;this.j&128||(this.s=this.l=c,this.h=c&(b<<8^c));return a&255}function pc(a,b){a=-b;P(this,a,a&b&32768);return a&65535} -function qc(a,b){a=-b;P(this,a<<8,(a&b&128)<<8);return a&255}function rc(a,b){a=b<<1|this.o>>16&1;Q(this,a);return a&65535}function sc(a,b){a=b<<1|this.o>>16&1;Q(this,a<<8);return a&255}function tc(a,b){a=(this.o&65536|b)>>1|b<<16;Q(this,a);return a&65535}function uc(a,b){a=((this.o&65536)>>8|b)>>1|b<<8;Q(this,a<<8);return a&255}function vc(a,b){var c=b-a;Nb(this,c,a,b);return c&65535}function wc(a,b){var c=b-a;Nb(this,c<<8,a<<8,b<<8);return c&255} -function xc(a,b){this.j&128||(this.s=this.l=b&65280,this.h=this.o=0);return(b<<8|b>>8)&65535}function yc(a,b){a^=b;O(this,a);return a&65535}function zc(a){var b=S(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.o=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.l=c;this.a-=(this.g?6:7)+b} -function Ac(a){var b=S(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.h=0;b&=63;if(b&32){b=64-b;32>b-1;this.o=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.f[a|1]=d&65535;this.s=d>>16;this.l=d>>16|d;this.a-=(this.g?6:7)+b}function W(a){a&1&&(this.o=0);a&2&&(this.h=0);a&4&&(this.l=1);a&8&&(this.s=0);this.a-=5} -function Bc(a){var b=S(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.l=d>>16|d,this.s=d>>16):(this.h=32768,this.l=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.l=this.s=0,this.h=32768,this.o=65536,this.a-=7}var Cc=[0,7,7,10,7,11,9,13];function Dc(a){var b=this.a;a=Wb(this,a);this.f[7]=a&65535;this.a=b-Cc[this.g]} -var Ec=[0,14,14,17,14,18,16,20];function Fc(a){var b=this.a,c=Wb(this,a);a=a>>6&7;Ob(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Ec[this.g]}var Gc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Hc=[7,13,13,17,14,18,17,21];function Ic(a){var b=S(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.s=b>>16,this.l=this.s|b,this.h=0,this.o=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Lc(a){U(this,a,0,xc);this.a-=this.g?9:3+(7==this.c?2:0)}function Mc(a){U(this,a,R(this,a),yc);this.a-=this.g?9:3+(7==this.c?2:0)}function Y(){F(this,8)}function Jb(a){Nc[a>>12].call(this,a)} -var Nc=[function(a){Oc[a>>8&15].call(this,a)},function(a){var b=R(this,a),c=this.a;O(this,Zb(this,a,b));this.a=c-Gc[(this.G?8:0)+this.g]+(7!=this.c||this.g?0:2)},function(a){var b=R(this,a);a=S(this,a);Nb(this,b-a,a,b);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,R(this,a)&S(this,a));this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),fc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c? -2:0)},function(a){U(this,a,R(this,a),hc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),$b);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){Pc[a>>8&15].call(this,a)},function(a){Qc[a>>8&15].call(this,a)},function(a){var b=Vb(this,a);O(this,Yb(this,a,b,1)<<8);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){var b=Vb(this,a)<<8;a=Xb(this,a)<<8;Nb(this,b-a,a,b);this.a-=this.g?4+ -(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){O(this,(Vb(this,a)&Xb(this,a))<<8);this.a-=this.g?4+(this.H&&6<=this.c?1:0):(this.G?4:3)+(7==this.c?2:0)},function(a){T(this,a,Vb(this,a),gc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){T(this,a,Vb(this,a),ic);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},function(a){U(this,a,R(this,a),vc);this.a-=this.g?9+(this.H&&6<=this.c?1:0):(this.G?5:3)+(7==this.c?2:0)},Y],Oc=[function(a){Rc[a>> -4&15].call(this,a)},function(a){V(this,a,!0)},function(a){V(this,a,!!(this.l&65535))},function(a){V(this,a,this.l&65535?0:4)},function(a){V(this,a,!this.na()==!(this.h&32768))},function(a){V(this,a,!this.na()!=!(this.h&32768))},function(a){V(this,a,!!(this.l&65535)&&!this.na()==!(this.h&32768))},function(a){V(this,a,(this.l&65535?0:4)||!this.na()!=!(this.h&32768))},Fc,Fc,function(a){Sc[a>>6&3].call(this,a)},function(a){Tc[a>>6&3].call(this,a)},function(a){Uc[a>>6&3].call(this,a)},function(a){Vc[a>> -6&3].call(this,a)},Y,Y],Sc=[function(a){P(this,Zb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,jc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,nc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,1,lc);this.a-=this.g?9:3+(7==this.c?2:0)}],Tc=[function(a){U(this,a,0,pc);this.a-=this.g?11:6},function(a){U(this,a,N(this)?1:0,$b);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,N(this)?1:0,vc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=S(this, -a);P(this,a);this.a-=this.g?4:3+(7==this.c?2:0)}],Uc=[function(a){U(this,a,0,tc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,rc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,dc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){U(this,a,0,bc);this.a-=this.g?9:3+(7==this.c?2:0)}],Vc=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.ub(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Tb(this,a,0);Ob(this,a);O(this,a);this.a-= -11},function(a){var b=Qb(this),c=this.a;Ub(this,a,0,b);O(this,b);this.a=c-Hc[this.g]},function(a){O(this,Zb(this,a,this.na?65535:0));this.a-=this.g?9:3+(7==this.c?2:0)}],Rc=[function(a){Wc[a&15].call(this,a)},Y,Y,Y,Dc,Dc,Dc,Dc,function(a){if(a&8)F(this,8);else{var b=Qb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.v&49152||(this.v=this.v&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){Xc[a&15].call(this,a)},function(a){Yc[a&15].call(this,a)},Lc,Lc, -Lc,Lc],Wc=[function(){this.v&49152?(this.F|=128,F(this,4)):L(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Pb(this);this.j|=this.v&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.v&49152||(Kb(this),this.m.reset());this.a-=667},function(){Pb(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Xc=[Jc,function(){this.o=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.l=1;this.a-=5},W,W,W,function(){this.s=0;this.a-= -5},W,W,W,W,W,W,W],Yc=[Jc,function(){this.o=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.l=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Pc=[Ic,Ic,Bc,Bc,zc,zc,Ac,Ac,Mc,Mc,Y,Y,Y,Y,Kc,Kc],Qc=[function(a){V(this,a,!this.na())},function(a){V(this,a,this.na())},function(a){V(this,a,!N(this)&&!!(this.l&65535))},function(a){V(this,a,N(this)||(this.l&65535?0:4))},function(a){V(this,a,!(this.h&32768))},function(a){V(this,a,this.h&32768?2:0)},function(a){V(this, -a,!N(this))},function(a){V(this,a,N(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},Y,Y],Zc=[function(a){P(this,Yb(this,a,0));this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,kc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,oc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,1,mc);this.a-=this.g? -9:3+(7==this.c?2:0)}],$c=[function(a){T(this,a,0,qc);this.a-=this.g?11:6},function(a){T(this,a,N(this)?1:0,ac);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,N(this)?1:0,wc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){a=Xb(this,a);P(this,a<<8);this.a-=this.g?4:3+(7==this.c?2:0)}],ad=[function(a){T(this,a,0,uc);this.a-=this.g?9+(this.Ta&1):3+(7==this.c?2:0)},function(a){T(this,a,0,sc);this.a-=this.g?9:3+(7==this.c?2:0)},function(a){T(this,a,0,ec);this.a-=this.g?9+(this.Ta&1):3+(7==this.c? -2:0)},function(a){T(this,a,0,cc);this.a-=this.g?9:3+(7==this.c?2:0)}],bd=[Y,function(a){a=Tb(this,a,65536);Ob(this,a);O(this,a);this.a-=11},function(a){var b=Qb(this),c=this.a;Ub(this,a,65536,b);O(this,b);this.a=c-Hc[this.g]},Y]; -function cd(a){v.call(this,"ROM",a,cd);this.a=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.h=a.file;this.u=ba(this.h);if(this.h){a=this.h;var b=ca(this.u);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.h+"&format=bytes&decimal=true");var c=this;l(a,null,!0,function(a,b,f){dd(c,a,b,f)})}}x(cd);cd.prototype.oa=function(a,b,c,d){this.m=b;this.b=c;this.I=d;ed(this)};cd.prototype.ha=function(){this.l&&(this.I&&this.I.a(this.id,this.o,this.c,this.l),delete this.l);return!0}; -cd.prototype.ga=function(){return!0}; -function dd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,m=eval("("+c+")");if(f=m.bytes)a.a=f;else if(f=m.words)for(a.a=Array(2*f.length),k=e=0;e>8&255;else if(f=m.data)for(a.a=Array(4*f.length),k=e=0;e>8&255,a.a[k++]=f[e]>>16&255,a.a[k++]=f[e]>>24&255;else a.a=m;a.l=m.symbols;if(!a.a.length){p("Empty ROM: "+b); -return}if(1==a.a.length){p(a.a[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.a=Array(b.length),e=0;e>>d.c].Ab(e&d.m,a.a[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>e.c;0>>=e.c;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Da)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.u=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ha=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.ga=function(a){return a?this.save():!0};g.reset=function(){jd(this)};g.save=function(){var a=new M(this);a.set(0,[]);return a.data()};g.restore=function(){return jd(this)};function jd(a){a.G=0;a.a=0;a.c=128;a.h=[];return!0}g.Za=function(a){if("number"==typeof a)this.h.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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.A&&!this.o&&c&&(b=String.fromCharCode(this.A)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.M(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;db(this.b,100,4,52,this.D)}};var kd={},id=(kd[65392]=[null,null,Z.prototype.dc,Z.prototype.Hc,"RCSR"],kd[65394]=[null,null,Z.prototype.cc,Z.prototype.Gc,"RBUF"],kd[65396]=[null,null,Z.prototype.rc,Z.prototype.Wc,"XCSR"],kd[65398]=[null,null,Z.prototype.qc,Z.prototype.Vc,"XBUF"],kd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bnd){if(pd(d,this.u)){this.l=new M(this,"1.30.1","failsafe");pd(this.l)&&(ud(this,d),a=2,vd(this.l));this.l.set("timestamp",ka());wd(this.l);var e=this.a&&!this.o;if(1==a||la("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=td(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?pd(d,k):("error"== -f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(pa("user",""),this.c=null)):this.M(f+": "+k),vd(d),pd(d)?(c=td(d),e=!0):c=!1))}e&&sd(this,c?d:null)}else 2==a&&d.clear()}else sd(this);delete this.u;delete this.B}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.i.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.b&&(xd(this,this.b,b,c,a),this.b.Aa());this.G&&(ud(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; -function ud(a,b){if(la("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.1"};d.url=a.O;d.user=c;d.type="bug";d.data=b;l("http://www.pcjs.org/api/v1/report",d,!0)}} -function yd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new M(a,"1.30.1"),k=new M(a,"1.30.1","validate"),m=ka();k.set("timestamp",m);f.set("timestamp",m);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ga&&(c&&L(a.b),d=a.b.ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.i.L=!1,!1===d&&(e=null)));for(var m=y(a.id),n=0;n>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.xb=[Na,Oa,Pa,Qa];a=new E(this);Ra(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Sa(d)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Sa(e)} +function Pa(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Sa(d)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Sa(e)}function Ta(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return Ya(1,f,h)}f=new E(a,f,u,a.l,d,e);Ra(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+Za[d]+" at "+k(b,8,!0)),!0):Ya(2,b,c)} +function Va(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function ab(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function bb(a,b,c){a.b[(b&a.i)>>>a.c].Rc(b&a.g,c&65535,b)} +function cb(a){for(var b=0,c=[],d=0;da.a.Db)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;e&1&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&n&&(l=function(a,c){return function(b,d){return a(c(d)&-256|b,d)}.bind(b)}(p,n)));db(a,e,e,h,l,n,p,f[4])}}}function fb(a,b){a.s.push(b)}function G(a){a.o||F(a.a,4)} +function Ya(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function H(a){v.call(this,"Device",a,H);this.c={data:0,Wc:0,Ma:20,$c:0};this.b={Zc:0,ab:-1}}x(H);g=H.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=gb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(hb(e.a,0,6,64),ib(e.a,e.b.ab,1E3/60))});eb(b,this,I);fb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.vc=function(a){this.b.ka=a;a&64&&ib(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.xc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,jb(b))}kb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; +g.yc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),jb(b));kb(this)};function kb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Kc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Ic=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Jc=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; +g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Hc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.uc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.sc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.tc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; +g.rc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Qc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Oc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Pc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Nc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; +g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Bc=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Ec=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; +g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Cc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Dc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.qb[a-65504>>1]};g.qc=function(a,b){this.a.qb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.wb=function(){};g.ec=function(){return 1};g.Mc=function(){};g.Gb=function(){return this.a.G}; +g.pc=function(){this.a.G=0};g.Nb=function(){return this.a.pb};g.wc=function(a,b){b&1||(a&=255);this.a.pb=a};g.Sb=function(){return this.a.$a};g.zc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Lc=function(a){this.a.na=a|255};g.Tb=function(){return lb(this.a)};g.Ac=function(a){mb(this.a,a&-1809|lb(this.a)&1808);this.a.j|=128};g.vb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +var J={},I=(J[62592]=[null,null,H.prototype.cc,H.prototype.Kc,"SISDR"],J[62608]=[null,null,H.prototype.ac,H.prototype.Ic,"SDSDR"],J[62624]=[null,null,H.prototype.bc,H.prototype.Jc,"SISAR"],J[62640]=[null,null,H.prototype.$b,H.prototype.Hc,"SDSAR"],J[62656]=[null,null,H.prototype.Lb,H.prototype.uc,"KISDR"],J[62672]=[null,null,H.prototype.Jb,H.prototype.sc,"KDSDR"],J[62688]=[null,null,H.prototype.Kb,H.prototype.tc,"KISAR"],J[62704]=[null,null,H.prototype.Ib,H.prototype.rc,"KDSAR"],J[62798]=[null,null, +H.prototype.Rb,H.prototype.yc,"MMR3"],J[65382]=[null,null,H.prototype.Mb,H.prototype.vc,"LKS"],J[65402]=[null,null,H.prototype.Ob,H.prototype.xc,"MMR0"],J[65404]=[null,null,H.prototype.Pb,H.prototype.vb,"MMR1"],J[65406]=[null,null,H.prototype.Qb,H.prototype.vb,"MMR2"],J[65408]=[null,null,H.prototype.ic,H.prototype.Qc,"UISDR"],J[65424]=[null,null,H.prototype.gc,H.prototype.Oc,"UDSDR"],J[65440]=[null,null,H.prototype.hc,H.prototype.Pc,"UISAR"],J[65456]=[null,null,H.prototype.fc,H.prototype.Nc,"UDSAR"], +J[65472]=[null,null,H.prototype.sa,H.prototype.va,"R0SET0"],J[65473]=[null,null,H.prototype.sa,H.prototype.va,"R1SET0"],J[65474]=[null,null,H.prototype.sa,H.prototype.va,"R2SET0"],J[65475]=[null,null,H.prototype.sa,H.prototype.va,"R3SET0"],J[65476]=[null,null,H.prototype.sa,H.prototype.va,"R4SET0"],J[65477]=[null,null,H.prototype.sa,H.prototype.va,"R5SET0"],J[65478]=[null,null,H.prototype.Ub,H.prototype.Bc,"R6KERNEL"],J[65479]=[null,null,H.prototype.Xb,H.prototype.Ec,"R7KERNEL"],J[65480]=[null,null, +H.prototype.ta,H.prototype.wa,"R0SET1"],J[65481]=[null,null,H.prototype.ta,H.prototype.wa,"R1SET1"],J[65482]=[null,null,H.prototype.ta,H.prototype.wa,"R2SET1"],J[65483]=[null,null,H.prototype.ta,H.prototype.wa,"R3SET1"],J[65484]=[null,null,H.prototype.ta,H.prototype.wa,"R4SET1"],J[65485]=[null,null,H.prototype.ta,H.prototype.wa,"R5SET1"],J[65486]=[null,null,H.prototype.Vb,H.prototype.Cc,"R6SUPER"],J[65487]=[null,null,H.prototype.Wb,H.prototype.Dc,"R6USER"],J[65504]=[null,null,H.prototype.Hb,H.prototype.qc, +"CTRL",1170],J[65520]=[null,null,H.prototype.nb,H.prototype.wb,"LSIZE",1170],J[65522]=[null,null,H.prototype.nb,H.prototype.wb,"HSIZE",1170],J[65524]=[null,null,H.prototype.ec,H.prototype.Mc,"SYSID",1170],J[65526]=[null,null,H.prototype.Gb,H.prototype.pc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Nb,H.prototype.wc,"MB",1170],J[65530]=[null,null,H.prototype.Sb,H.prototype.zc,"PIR"],J[65532]=[null,null,H.prototype.dc,H.prototype.Lc,"SL"],J[65534]=[null,null,H.prototype.Tb,H.prototype.Ac,"PSW"], +J);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592];I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640]; +I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656];I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704]; +I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408];I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; +I[65506]=I[65504];I[65508]=I[65504];I[65510]=I[65504];I[65512]=I[65504];I[65514]=I[65504];I[65516]=I[65504];I[65518]=I[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),tb(this,pb?ub:vb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&G(this.l);var 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},da: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.ha=!0},F:function(a,b){return this.H(a,b)}, +S:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.w||this.ub(a,b,c)},fa:function(a,b,c){this.w||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},R:function(a){a&1&&G(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&G(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&G(this.l);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b){a&1&&G(this.l);this.o[a>>1]=b;this.ha=!0}}; +function Ra(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&xb(a,yb,!1),(a.m=c.m)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.m||(a.Pa=!a.w&&b[1]||a.v,a.Rc=!a.w&&b[3]||a.B);if(c||void 0===c)a.ub=b[1]||a.v,a.oa=b[3]||a.B}function xb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[E.prototype.N,E.prototype.da,E.prototype.X,E.prototype.qa],yb=[E.prototype.F,E.prototype.Z,E.prototype.S,E.prototype.fa]; +if(Ja)var vb=[E.prototype.D,E.prototype.Y,E.prototype.R,E.prototype.ea],ub=[E.prototype.J,E.prototype.$,E.prototype.W,E.prototype.pa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.T=!1;this.h.rb=!1;this.h.za=a.autoStart;this.h.bb=!1;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.H=[];this.kb=this.nc.bind(this);D(this)}x(Bb);var Cb=["power","reset"]; +g=Bb.prototype;g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} +g.P=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.h.L)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.S);a.S=0;a.R=ka();a.X=0;Lb(a)}function gb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function ib(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} +g.nc=function(){if(this.h.T){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.ib&&(this.R+=a,this.R>this.Ga&&(this.R=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.sb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.S+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= +!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,n=!0);0<=this.pa&&this.pa<=Mb(this)&&(this.oa=this.pa=-1,Fb(this),K(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.qa-=f;if(0>=this.qa){this.qa+=this.Ja;15<=++this.jb&&(this.A&&this.A.ua(),this.jb=0);break}}while(this.h.T)}catch(p){K(this);Gb(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.kb;this.X=ka();d=this.ib;this.xa&&(d= +Math.round(d*this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.R)this.W=Math.round(this.S/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.R-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Hb(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.M(a.toString()+" busy");else{Jb(a);a.h.T=!0;a.h.rb=!0;if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.R,Mb(a));Gb(a,!0);setTimeout(a.kb,0)}}g.sb=function(){return 0}; +function K(a){if(a.h.T){a.Y-=a.a;a.a=0;Kb(a,a.S);a.S=0;a.h.T=!1;var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a));Gb(a)}a.h.complete=void 0}function Gb(a,b){a.A&&a.A.ua(b)} +function Nb(a){this.Db=+a.model||1170;this.Fb=a.resetAddr||0;Bb.call(this,a,6666667);this.fb=0;this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Fb];this.ra=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.v=0;this.Cb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.qb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.pb=0;this.fa=-1;Pb(this);this.h.complete=this.h.yb=!1}x(Nb,Bb);g=Nb.prototype;g.reset=function(){this.h.T&&K(this);Pb(this);Eb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&jb(a)}function jb(a){a.Na?(a.V=65536,a.J=a.Bb,a.N=a.ob,a.lb=a.Tc,Ta(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.Ab,a.N=a.kc,a.lb=a.Sc,Ta(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,cb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,mb:c<<5&224,tb:d,Qa:e})}a.j|=2}function lb(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +function mb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.v=b>>14&3;c=a.u>>14&3;a.v!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.v]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function F(a,b){var c=!1;0>a.fa?a.fa=lb(a):a.v||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.v=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);mb(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;mb(a,c);a.j&=-17} +function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Cb[a.v]||(d&=7);e=a.C[a.v][d];f=(a.O[a.v][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,F(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; +default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.v][d]=e;if(4194170!==f||a.v)a.Da=a.v,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),F(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; +case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,F(a,4)):(a.G|=8,a.j|=64));return e}g.Ab=function(a,b,c){return Xb(this,a,b,c)};g.Bb=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return ab(this.l,a)};g.ob=function(a){return ab(this.l,Wb(this,a,2))}; +g.Sc=function(a,b){bb(this.l,a,b&65535)};g.Tc=function(a,b){bb(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.v=a.u>>12&3,c=a.N(d|c&a.V),a.v=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} +function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.v=a.u>>12&3,e=Wb(a,e|c&65536,4),a.v=a.u>>14&3,bb(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} +function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,$a(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),bb(a.l,e,d.call(a,c,ab(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?bb(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.sb=function(a){this.h.complete=!0;this.h.yb=!1;this.h.rb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].mb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?F(this,a.tb):F(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>1|b<<16;P(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function kc(a,b){a=b&~a;N(this,a);return a}function lc(a,b){a=b&~a;N(this,a<<8);return a}function mc(a,b){a|=b;N(this,a);return a}function nc(a,b){a|=b;N(this,a<<8);return a}function oc(a,b){a=~b|65536;O(this,a);return a&65535} +function pc(a,b){a=~b|256;O(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;O(this,a,a&b&32768);return a&65535} +function vc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function yc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} +function Cc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;N(this,a);return a&65535}function Ec(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} +function Hc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Ic=[0,7,7,10,7,11,9,13];function Jc(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Ic[this.c]} +var Kc=[0,14,14,17,14,18,16,20];function Lc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Kc[this.c]}var Mc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Nc=[7,13,13,17,14,18,17,21];function Oc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){F(this,8)}function Ob(a){Tc[a>>12].call(this,a)} +var Tc=[function(a){Uc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,dc(this,a,b));this.a=c-Mc[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),kc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b? +2:0)},function(a){T(this,a,Q(this,a),mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),ec);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){Vc[a>>8&15].call(this,a)},function(a){Wc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);N(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ +(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),lc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},X],Uc=[function(a){Xc[a>> +4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> +6&3].call(this,a)},X,X],Yc=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){T(this,a,0,uc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.ob(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= +11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)F(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, +Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,F(this,4)):K(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= +5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768?2:0)},function(a){U(this, +a,!M(this))},function(a){U(this,a,M(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? +9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b? +2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; +function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +id.prototype.ba=function(){return!0}; +function jd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); +return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].ub(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.v=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;hb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Gc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Fc,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Vc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Uc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.v}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.h.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function zd(a,b){if(ma("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.1"};d.url=a.R;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&K(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");l(e,null,!0,function(f,k,m){if(m||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+m+")");else{if(f=d[3])if(m=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=m[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);m[0]!=n&&(k=k.replace(m[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);Fd(a,b,c)}})}else c(a,null)} -function Gd(a,b,c,d){function e(a){if(void 0===m){var b=k&&C(k,"machine-warning");m=b&&b[0]||k}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Cd||wa(!0));n=!1}var k,m,n=!0;Cd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],J=document.createElement("style");J.type="text/css";J.styleSheet?J.styleSheet.cssText=q:J.appendChild(document.createTextNode(q));t.appendChild(J)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");q=function(d,m){m?Dd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=m.transformNode(n))?(k.outerHTML=n,--Cd||wa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(m,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Cd||wa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Dd(b,a,d,!0,e,q):Ed(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ba){f(Ba.message)}return n}window.embedPDP11=function(a,b,c,d){wa(!1);return Gd(a,b,c,d)};window.enableEvents=wa;window.sendEvent=xa;})(); +g.P=function(a,b,c){var d=this;switch(b){case "power":return this.w[b]=c,c.onclick=function(){d.g||(d.h.L?Dd(d,!1,!0):wd(d,d.Aa))},!0;case "reset":return this.w[b]=c,c.onclick=function(){if(d.h.L&&!d.g)if(d.b&&!d.s){var a=ma("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Dd(d,a,!0);!a&&d.D?window&&window.location.reload():d.Aa(sd)}else d.reset(),d.a&&d.a.za()},!0;case "save":if(da())c.parentNode.removeChild(c);else return this.w[b]= +c,c.onclick=function(){var a=td(d,!0);if(a){var b=!!(d.b&&!d.s||d.D),c=Dd(d,b);b?Ed(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1}; +function td(a,b){var c=a.c;c||((c=pa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Fd(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c} +function Fd(a,b){a.c=null;b=m(ea()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(qa("user",b.data),a.c=b.data)}catch(d){q(d.message+" ("+c+")")}return a.c}function vd(a){var b=null;a.c&&(b=ea()+"/api/v1/user?req=load&user="+a.c+"&state="+Gd(a,"1.30.1"));return b} +function Ed(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Gd(a,"1.30.1");d.data=c;b=m(ea()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,u=/( [a-z]+=)(['"])(.*?)\2/g;p=u.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],h);Kd(a,b,c)}})}else c(a,null)} +function Ld(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ha(a))}function f(a){e("Error: "+a);n&&(--Hd||xa(!0));n=!1}var h,l,n=!0;Hd++;Fa[a]={};try{if(h=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],ga=document.createElement("style");ga.type="text/css";ga.styleSheet?ga.styleSheet.cssText=p:ga.appendChild(document.createTextNode(p));u.appendChild(ga)}c|| +(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Id(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Hd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Hd||xa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,p):Jd(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(Gc){f(Gc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Ld(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From ef2420f585511bf3630af9520cf79332273c3510 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Mon, 10 Oct 2016 18:16:36 -0700 Subject: [PATCH 10/36] Handled BYTE register accesses in the IOPAGE more consistently --- modules/pdp11/lib/bus.js | 48 ++++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11-dbg.js | 2 +- versions/pdpjs/1.30.1/pdp11.js | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 576f2b2ef..b55a8ec2f 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -207,34 +207,36 @@ BusPDP11.IOHANDLER = { * first, and depending on the underlying I/O device, that may or may not have side-effects. It's really * up to the device to know whether that matters, and provide all the necessary handlers if it does. * - * TODO: Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works + * Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works * just fine by registering WORD handlers for the appropriate ODD addresses. What is unclear, however, * is what is exactly supposed to happen when the CPU reads or writes a BYTE from an ODD IOPAGE address; - * it's likely that our built-in fallbacks are NOT correct for those cases. + * it seems clear that our built-in fallbacks are NOT correct in all cases. * * For example, let's imagine that only read/write WORD handlers have been registered for ODD address - * 177701 (ie, General Register R1, Set 0). If a readByte(177701) request is made, we would fallback to - * reading the word at 177700 and returning the high byte, but that would fetch the contents of General - * Register R0 instead of R1, which clearly seems wrong. + * 177701 (ie, general register R1, set 0). If a readByte(177701) request is made, we would fallback to + * reading the word at 177700 and returning the high byte, but that would fetch the contents of general + * register R0 instead of R1, which is clearly wrong. * * One solution is for the caller to register both BYTE and WORD handlers for ODD addresses, making * the caller responsible for the defining the correct behavior in all cases. However, that's more work * for the caller, and we're just punting the problem instead of solving it. * * Another solution is for addIOHandlers() to detect the ODD address case, and install custom fallback - * handlers for read and write BYTE accesses. In the above example, the custom read BYTE handler would - * invoke the read WORD handler and mask the result with 0xff, and the custom write BYTE handler would + * handlers for read and write BYTE accesses. In the above example, the custom read BYTE handler could + * invoke the read WORD handler and mask the result with 0xff, and the custom write BYTE handler could * first call the read WORD handler, insert the new data into the low byte of the result, and then * call the write WORD handler. * - * addIOHandlers() currently implements the second solution. Again, we're assuming that's the correct - * behavior for ODD IOPAGE accesses, which may not be a valid assumption. + * However, that would produce inconsistent results between EVEN and ODD addresses in the register + * address range (0o177700 through 0o177717), so I'm assuming that the correct solution is to install + * alternate fallback BYTE handlers for ALL addresses in that range. The alternate read BYTE handler will + * mask its result with 0xff, and the alternate write BYTE handler will store the (zero-extended) byte to + * the entire corresponding register. * - * One of things that gives me pause about the second solution is that when the destination of a MOVB - * instruction is a general register, the byte is sign-extended to a word. So it seems to strange to have - * a different MOVB behavior when the destination is ODD general register using an ODD IOPAGE address. - * Other byte instructions, like CLRB, would function identically when modifying ODD general registers, - * regardless how they are referenced. + * One of things that gives me pause about this solution is that it differs from the behavior of a MOVB + * instruction when the destination is a general register, because MOVB always sign-extends the source byte + * to a word; it does NOT zero-extend. So it seems to strange to have a different MOVB behavior when the + * destination register is specified using an IOPAGE address. But, maybe that was by design. * * TODO: Another small potential improvement would be for addIOHandlers() to predefine fall-backs for all * missing handlers, in both the ODD and EVEN cases, so there's never a need to check each function index @@ -1193,23 +1195,23 @@ BusPDP11.prototype.addIOTable = function(component, table) var fnWriteWord = afn[3]? afn[3].bind(component) : null; /* - * As discussed in the IOController comments above, when handlers are being registered for ODD addresses, - * we assume that we need different fallback handlers when reading and/or writing bytes. + * As discussed in the IOController comments above, when handlers are being registered for the following + * addresses, we must install different fallback handlers for all BYTE accesses. */ - if (addr & 0x1) { + if (addr >= PDP11.UNIBUS.R0SET0 && addr <= PDP11.UNIBUS.R6USER) { if (!fnReadByte && fnReadWord) { - fnReadByte = function(fnReadWord) { + fnReadByte = function readByteIORegister(readWord) { return function(addr) { - return fnReadWord(addr) & 0xff; + return readWord(addr) & 0xff; }.bind(component); }(fnReadWord); } - if (!fnWriteByte && fnWriteWord && fnReadWord) { - fnWriteByte = function(fnWriteWord, fnReadWord) { + if (!fnWriteByte && fnWriteWord) { + fnWriteByte = function writeByteIORegister(writeWord) { return function(data, addr) { - return fnWriteWord((fnReadWord(addr) & ~0xff) | data, addr); + return writeWord(data, addr); }.bind(component); - }(fnWriteWord, fnReadWord); + }(fnWriteWord); } } this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]); diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 9fd884407..cc465f45f 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -716,7 +716,7 @@ function Mb(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.Y;0>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ia=function(a){return this.W[(a&this.i)>>>this.Y].Yb(a&this.f,a)};function Qb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; function Rb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].fc(a&this.f,b&65535,a)};function Sb(a){for(var b=0,c=[],d=0;da.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;e&1&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&m&&(l=function(a,c){return function(b,d){return a(c(d)&-256|b,d)}.bind(b)}(p,m)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} +function Ub(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} function Wb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+I(a.j,b),!0,!0),a.b.$(4,b))}function Ob(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function J(a){r.call(this,"Device",a,J,256);this.i={data:0,Gd:0,rb:20,Jd:0};this.f={Hd:0,Fb:-1}}y(J);h=J.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=Xb(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(Yb(e.b,0,6,64),Zb(e.b,e.f.Fb,1E3/60))});Ub(b,this,K);Vb(b,this.reset.bind(this));G(this)}; h.yc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.fd=function(a){this.f.Ha=a;a&64&&Zb(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.Ac=function(){var a=this.b;return a.G&62337|a.ra<<5|a.sa<<1};h.hd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ra=a>>5&3;b.sa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,hc(b))}ic(this)};h.Bc=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Cc=function(){return this.b.Cb};h.Dc=function(){return this.b.Ka}; h.jd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),hc(b));ic(this)};function ic(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Pc=function(a){return this.b.R[1][a>>1&7]};h.vd=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Nc=function(a){return this.b.R[1][(a>>1&7)+8]};h.td=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Oc=function(a){return this.b.oa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 248d99dee..b919f7a39 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -710,7 +710,7 @@ Ma.prototype.reset=function(){for(var a=0;a>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return Ya(1,f,h)}f=new E(a,f,u,a.l,d,e);Ra(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+Za[d]+" at "+k(b,8,!0)),!0):Ya(2,b,c)} function Va(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function ab(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function bb(a,b,c){a.b[(b&a.i)>>>a.c].Rc(b&a.g,c&65535,b)} function cb(a){for(var b=0,c=[],d=0;da.a.Db)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;e&1&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&n&&(l=function(a,c){return function(b,d){return a(c(d)&-256|b,d)}.bind(b)}(p,n)));db(a,e,e,h,l,n,p,f[4])}}}function fb(a,b){a.s.push(b)}function G(a){a.o||F(a.a,4)} +function eb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.a.Db)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));db(a,e,e,h,l,n,p,f[4])}}}function fb(a,b){a.s.push(b)}function G(a){a.o||F(a.a,4)} function Ya(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function H(a){v.call(this,"Device",a,H);this.c={data:0,Wc:0,Ma:20,$c:0};this.b={Zc:0,ab:-1}}x(H);g=H.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=gb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(hb(e.a,0,6,64),ib(e.a,e.b.ab,1E3/60))});eb(b,this,I);fb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; g.vc=function(a){this.b.ka=a;a&64&&ib(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.xc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,jb(b))}kb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; g.yc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),jb(b));kb(this)};function kb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Kc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Ic=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Jc=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; From 05626a33cbc19aede81cfce7c011af2721610022 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Mon, 10 Oct 2016 18:19:17 -0700 Subject: [PATCH 11/36] Version number update --- modules/pdp11/lib/bus.js | 2 +- modules/pdp11/lib/computer.js | 4 ++-- modules/pdp11/lib/cpu.js | 2 +- modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/cpustate.js | 2 +- modules/pdp11/lib/debugger.js | 2 +- modules/pdp11/lib/defines.js | 2 +- modules/pdp11/lib/device.js | 2 +- modules/pdp11/lib/keyboard.js | 2 +- modules/pdp11/lib/memory.js | 2 +- modules/pdp11/lib/messages.js | 2 +- modules/pdp11/lib/nodebugger.js | 2 +- modules/pdp11/lib/panel.js | 2 +- modules/pdp11/lib/ram.js | 2 +- modules/pdp11/lib/rk11.js | 2 +- modules/pdp11/lib/rom.js | 2 +- modules/pdp11/lib/serialport.js | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index b55a8ec2f..cc8e7a29a 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index abc29fb2f..31a9d8933 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * @@ -184,7 +184,7 @@ function ComputerPDP11(parmsComputer, parmsMachine, fSuspended) { this.println(PDP11.APPNAME + " v" + PDP11.APPVERSION + "\n" + COPYRIGHT + "\n" + LICENSE); - this.println("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis "); + this.println("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis "); if (DEBUG && this.messageEnabled()) this.printMessage("TYPEDARRAYS: " + TYPEDARRAYS); diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 86d26049e..7b80d6d72 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index a3f04d256..0dc1e49b1 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index a47d16474..7d4fe952b 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 7a0f34bf8..47b6355c9 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 76cf2211b..cf4a188f0 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 3770e9247..4075c19e7 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/keyboard.js b/modules/pdp11/lib/keyboard.js index 223eb7e3c..6d9d0452c 100644 --- a/modules/pdp11/lib/keyboard.js +++ b/modules/pdp11/lib/keyboard.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index cc2534331..4bfd96973 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index 7a1927419..ed9312b14 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/nodebugger.js b/modules/pdp11/lib/nodebugger.js index 37799a030..2a11f8c1f 100644 --- a/modules/pdp11/lib/nodebugger.js +++ b/modules/pdp11/lib/nodebugger.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 3bb09c339..bae335d91 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 67840ad85..dac5081fd 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js index 6f9ae4d1e..cc109cf43 100644 --- a/modules/pdp11/lib/rk11.js +++ b/modules/pdp11/lib/rk11.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index 0539e1183..adfab2cfb 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 9b14a54b7..57dd66dcf 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -5,7 +5,7 @@ * * This file is part of PCjs, a computer emulation software project at . * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code * may be used freely provided the original author name is acknowledged in any modified source code. * From 47767416a112ccc83ae0cfadd3b06e0b352688ca Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 11 Oct 2016 10:20:39 -0700 Subject: [PATCH 12/36] Added preliminary LED support --- devices/pdp11/panel/1170/led.xml | 24 +- modules/pcx86/lib/cpu.js | 2 +- modules/pdp11/lib/computer.js | 8 +- modules/pdp11/lib/cpu.js | 105 +++------ modules/pdp11/lib/cpustate.js | 71 ------ modules/pdp11/lib/debugger.js | 37 +-- modules/pdp11/lib/keyboard.js | 6 +- modules/pdp11/lib/panel.js | 151 ++++++++++-- modules/pdp11/lib/serialport.js | 6 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 360 ++++++++++++++--------------- versions/pdpjs/1.30.1/pdp11.js | 225 +++++++++--------- 11 files changed, 495 insertions(+), 500 deletions(-) diff --git a/devices/pdp11/panel/1170/led.xml b/devices/pdp11/panel/1170/led.xml index 1a3376b83..a7e08568d 100644 --- a/devices/pdp11/panel/1170/led.xml +++ b/devices/pdp11/panel/1170/led.xml @@ -9,43 +9,43 @@ - . + . - . + . - . + . - . + . - . + . - . + . - . + . @@ -57,31 +57,31 @@ - . + . - . + . - . + . - . + . - . + . diff --git a/modules/pcx86/lib/cpu.js b/modules/pcx86/lib/cpu.js index 73de14c10..ae65359df 100644 --- a/modules/pcx86/lib/cpu.js +++ b/modules/pcx86/lib/cpu.js @@ -99,7 +99,7 @@ function CPU(parmsCPU, nCyclesDefault) this.flags.autoStart = parmsCPU['autoStart']; /* - * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both) + * TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both) */ this.flags.displayLiveRegs = false; diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 31a9d8933..10e50637f 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -999,6 +999,7 @@ ComputerPDP11.prototype.start = function(ms, nCycles) component.start(ms, nCycles); } } + this.updateStatus(true); }; /** @@ -1023,19 +1024,20 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) component.stop(ms, nCycles); } } + this.updateStatus(true); }; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {ComputerPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -ComputerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +ComputerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var computer = this; diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 7b80d6d72..af9db3336 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -126,11 +126,6 @@ function CPUPDP11(parmsCPU, nCyclesDefault) this.flags.starting = false; this.flags.autoStart = parmsCPU['autoStart']; - /* - * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both) - */ - this.flags.displayLiveRegs = false; - /* * Get checksum parameters, if any. runCPU() behavior is not affected until fChecksum * is true, which won't happen until resetChecksum() is called with nCyclesChecksumInterval @@ -288,7 +283,7 @@ CPUPDP11.prototype.powerUp = function(data, fRepower) * * this.flags.powered = true; */ - this.updateCPU(); + this.cmp.updateStatus(); return true; }; @@ -451,54 +446,18 @@ CPUPDP11.prototype.displayChecksum = function() }; /** - * displayValue(sLabel, nValue, cch) - * - * This is principally for displaying register values, but in reality, it can be used to display any - * numeric value bound to the given label. + * setBinding(sType, sBinding, control, sValue) * * @this {CPUPDP11} - * @param {string} sLabel - * @param {number} nValue - * @param {number} [cch] - */ -CPUPDP11.prototype.displayValue = function(sLabel, nValue, cch) -{ - if (this.bindings[sLabel]) { - if (nValue === undefined) { - this.setError("Value for " + sLabel + " is invalid"); - this.stopCPU(); - } - var sVal; - var nBase = this.dbg && this.dbg.nBase || 8; - if (!this.flags.running || this.flags.displayLiveRegs) { - sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch); - } else { - sVal = "--------".substr(0, cch || 4); - } - /* - * TODO: Determine if this test actually avoids any redrawing when a register hasn't changed, and/or if - * we should maintain our own (numeric) cache of displayed register values (to avoid creating these temporary - * string values that will have to garbage-collected), and/or if this is actually slower, and/or if I'm being - * too obsessive. - */ - if (this.bindings[sLabel].textContent != sVal) this.bindings[sLabel].textContent = sVal; - } -}; - -/** - * setBinding(sHTMLType, sBinding, control, sValue) - * - * @this {CPUPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "run") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var cpu = this; - var fBound = false; switch (sBinding) { case "power": @@ -509,8 +468,7 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) * so we record those bindings here and pass them on to the Computer component in initBus(). */ this.bindings[sBinding] = control; - fBound = true; - break; + return true; case "run": this.bindings[sBinding] = control; @@ -526,13 +484,11 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) else cpu.stopCPU(); }; - fBound = true; - break; + return true; case "speed": this.bindings[sBinding] = control; - fBound = true; - break; + return true; case "setSpeed": this.bindings[sBinding] = control; @@ -540,13 +496,27 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) cpu.setSpeed(cpu.nCyclesMultiplier << 1, true); }; control.textContent = this.getSpeedTarget(); - fBound = true; - break; + return true; default: break; } - return fBound; + return false; +}; + +/** + * updateStatus(fForce) + * + * Some of the CPU bindings provide feedback and therefore need to be updated periodically. This is called + * via the Computer's updateStatus() handler several times per second; see YIELDS_PER_STATUS. + * + * @this {CPUPDP11} + * @param {boolean} [fForce] + */ +CPUPDP11.prototype.updateStatus = function(fForce) +{ + var controlSpeed = this.bindings["speed"]; + if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent(); }; /** @@ -1111,7 +1081,6 @@ CPUPDP11.prototype.runCPU = function() } catch (e) { this.stopCPU(); - this.updateCPU(); if (this.cmp) this.cmp.stop(usr.getTime(), this.getCycles()); this.setError(e.stack || e.message); return; @@ -1152,7 +1121,6 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus) if (fUpdateFocus) this.cmp.updateFocus(true); this.cmp.start(this.msStartRun, this.getCycles()); } - this.updateCPU(true); setTimeout(this.onRunTimeout, 0); return true; }; @@ -1194,29 +1162,10 @@ CPUPDP11.prototype.stopCPU = function(fComplete) if (this.cmp) { this.cmp.stop(usr.getTime(), this.getCycles()); } - this.updateCPU(); } this.flags.complete = fComplete; }; -/** - * updateCPU(fForce) - * - * This used to be performed at the end of every stepCPU(), but runCPU() -- which relies upon - * stepCPU() -- needed to have more control over when these updates are performed. However, for - * other callers of stepCPU(), such as the Debugger, the combination of stepCPU() + updateCPU() - * provides the old behavior. - * - * @this {CPUPDP11} - * @param {boolean} [fForce] (true to force a video update; used by the Debugger) - */ -CPUPDP11.prototype.updateCPU = function(fForce) -{ - if (this.cmp) { - this.cmp.updateStatus(fForce); - } -}; - /** * yieldCPU() * @@ -1232,10 +1181,10 @@ CPUPDP11.prototype.yieldCPU = function() // if (DEBUG) this.nSnapCycles = this.nBurstCycles; /* * The Debugger calls yieldCPU() after every message() to ensure browser responsiveness, but it looks - * odd for those messages to show CPU state changes but for the CPU's own status display to not (ditto - * for the Video display), so I've added this call to try to keep things looking synchronized. + * odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not, + * so I've added this call to try to keep things looking synchronized. */ - this.updateCPU(); + this.cmp.updateStatus(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 7d4fe952b..2f37706c9 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -75,11 +75,6 @@ function CPUStatePDP11(parmsCPU) CPUPDP11.call(this, parmsCPU, nCyclesDefault); - /* - * If there are no live registers to display, then updateStatus() can skip a bit.... - */ - this.cLiveRegs = 0; - /* * Initialize processor operation to match the requested model */ @@ -374,72 +369,6 @@ CPUStatePDP11.prototype.restore = function(data) return this.bus.restoreMemory(data[2]); }; -/** - * setBinding(sHTMLType, sBinding, control, sValue) - * - * @this {CPUStatePDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") - * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "AX") - * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) - * @param {string} [sValue] optional data value - * @return {boolean} true if binding was successful, false if unrecognized binding request - */ -CPUStatePDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) -{ - var fBound = false; - switch (sBinding) { - 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": - this.bindings[sBinding] = control; - this.cLiveRegs++; - fBound = true; - break; - default: - fBound = this.parent.setBinding.call(this, sHTMLType, sBinding, control); - break; - } - return fBound; -}; - -/** - * updateStatus(fForce) - * - * This provides periodic Control Panel updates (a few times per second; see YIELDS_PER_STATUS). - * this is where we take care of any DOM updates (eg, register values) while the CPU is running. - * - * @this {CPUStatePDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) - */ -CPUStatePDP11.prototype.updateStatus = function(fForce) -{ - if (this.cLiveRegs) { - if (fForce || !this.flags.running || this.flags.displayLiveRegs) { - for (var i = 0; i < this.regsGen.length; i++) { - this.displayValue('R'+i, this.regsGen[i]); - } - var regPSW = this.getPSW(); - this.displayValue("PS", regPSW); - this.displayValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); - this.displayValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); - this.displayValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); - this.displayValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); - } - } - var controlSpeed = this.bindings["speed"]; - if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent(); -}; - /** * clearCF() * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 47b6355c9..80ed0b66a 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -454,16 +454,16 @@ if (DEBUGGER) { }; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {DebuggerPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "debugInput") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ - DebuggerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) + DebuggerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var dbg = this; switch (sBinding) { @@ -626,7 +626,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.bus.setByteDirect(addr, b); if (inc) this.incAddr(dbgAddr, inc); - this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target + this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } }; @@ -644,7 +644,7 @@ if (DEBUGGER) { if (addr !== PDP11.ADDR_INVALID) { this.bus.setWordDirect(addr, w); if (inc) this.incAddr(dbgAddr, inc); - this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target + this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } }; @@ -1242,15 +1242,15 @@ if (DEBUGGER) { }; /** - * stepCPU(nCycles, fRegs, fUpdateCPU) + * stepCPU(nCycles, fRegs, fUpdateStatus) * * @this {DebuggerPDP11} * @param {number} nCycles (0 for one instruction without checking breakpoints) * @param {boolean} [fRegs] is true to display registers after step (default is false) - * @param {boolean} [fUpdateCPU] is false to disable calls to updateCPU() (default is true) + * @param {boolean} [fUpdateStatus] is false to disable Computer status updates (default is true) * @return {boolean} */ - DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateCPU) + DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateStatus) { if (!this.checkCPU()) return false; @@ -1291,11 +1291,11 @@ if (DEBUGGER) { } /* - * Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the cpu's update code, - * and then update our own state. Normally, the only time fUpdateCPU will be false is when doTrace() - * is calling us in a loop, in which case it will perform its own updateCPU() when it's done. + * Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the Computer's update code, + * and then update our own state. Normally, the only time fUpdateStatus will be false is when doTrace() + * is calling us in a loop, in which case it will perform its own updateStatus() when it's done. */ - if (fUpdateCPU !== false) this.cpu.updateCPU(); + if (fUpdateStatus !== false) this.cmp.updateStatus(); this.updateStatus(fRegs || false); return (this.nCycles > 0); @@ -2550,7 +2550,7 @@ if (DEBUGGER) { if (asArgs[2] === undefined) { this.println("begin assemble at " + this.toStrAddr(dbgAddr)); this.fAssemble = true; - this.cpu.updateCPU(); + this.cmp.updateStatus(); return; } @@ -3247,7 +3247,7 @@ if (DEBUGGER) { this.println("unknown register: " + sReg); return; } - cpu.updateCPU(); + this.cmp.updateStatus(); this.println("updated registers:"); } @@ -3493,11 +3493,12 @@ if (DEBUGGER) { }, function onCountStepComplete() { /* - * We explicitly called stepCPU() with fUpdateCPU === false, because repeatedly - * calling updateCPU() can be very slow, especially when fDisplayLiveRegs is true, - * so once the repeat count has been exhausted, we must perform a final updateCPU(). + * We explicitly called stepCPU() with fUpdateStatus === false, because repeatedly + * calling updateStatus() can be very slow, especially if a Control Panel is present + * with displayLiveRegs enabled, so once the repeat count has been exhausted, we must + * perform a final updateStatus(). */ - dbg.cpu.updateCPU(); + dbg.cmp.updateStatus(); dbg.setBusy(false); } ); diff --git a/modules/pdp11/lib/keyboard.js b/modules/pdp11/lib/keyboard.js index 6d9d0452c..54e10c866 100644 --- a/modules/pdp11/lib/keyboard.js +++ b/modules/pdp11/lib/keyboard.js @@ -60,16 +60,16 @@ Component.subclass(KeyboardPDP11); KeyboardPDP11.MINPRESSTIME = 100; // 100ms /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {KeyboardPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "esc") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -KeyboardPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +KeyboardPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { return false; }; diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index bae335d91..a29f74706 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -54,30 +54,70 @@ if (NODE) { function PanelPDP11(parmsPanel) { Component.call(this, "Panel", parmsPanel, PanelPDP11); + /* + * If there are any live registers, LEDs, etc, to display, this will provide a count. + */ + this.cLiveRegs = 0; + /* + * TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both) + */ + this.flags.displayLiveRegs = true; + } Component.subclass(PanelPDP11); /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * - * Most panel layouts don't have bindings of their own, so we pass along all binding requests to the - * Computer, CPU, Keyboard and Debugger components first. The order shouldn't matter, since any component - * that doesn't recognize the specified binding should simply ignore it. + * Some panel layouts don't have bindings of their own, and even when they do, there may still be some + * components (eg, the CPU) that prefer to update their own bindings, so we pass along all binding requests + * to the Computer, CPU, Keyboard and Debugger components first. The order shouldn't matter, since any + * component that doesn't recognize the specified binding should simply ignore it. * * @this {PanelPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -PanelPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { - if (this.cmp && this.cmp.setBinding(sHTMLType, sBinding, control, sValue)) return true; - if (this.cpu && this.cpu.setBinding(sHTMLType, sBinding, control, sValue)) return true; - if (DEBUGGER && this.dbg && this.dbg.setBinding(sHTMLType, sBinding, control, sValue)) return true; - return this.parent.setBinding.call(this, sHTMLType, sBinding, control, sValue); + if (this.cmp && this.cmp.setBinding(sType, sBinding, control, sValue)) { + return true; + } + if (this.cpu && this.cpu.setBinding(sType, sBinding, control, sValue)) { + return true; + } + if (DEBUGGER && this.dbg && this.dbg.setBinding(sType, sBinding, control, sValue)) { + return true; + } + switch (sBinding) { + 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": + this.bindings[sBinding] = control; + this.cLiveRegs++; + return true; + default: + if (sType == "rled") { + this.bindings[sBinding] = control; + this.cLiveRegs++; + return true; + } + return this.parent.setBinding.call(this, sType, sBinding, control, sValue); + } }; /** @@ -124,21 +164,98 @@ PanelPDP11.prototype.powerDown = function(fSave, fShutdown) return true; }; +/** + * updateValue(sLabel, nValue, cch) + * + * This is principally for displaying register values, but in reality, it can be used to display any + * numeric value bound to the given label. + * + * @this {PanelPDP11} + * @param {string} sLabel + * @param {number} nValue + * @param {number} [cch] + */ +PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) +{ + if (this.bindings[sLabel]) { + if (nValue === undefined) { + this.setError("Value for " + sLabel + " is invalid"); + this.cpu.stopCPU(); + } + var sVal; + var nBase = this.dbg && this.dbg.nBase || 8; + if (!this.cpu.isRunning() || this.flags.displayLiveRegs) { + sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch); + } else { + sVal = "--------".substr(0, cch || 4); + } + /* + * TODO: Determine if this test actually avoids any redrawing when a register hasn't changed, and/or if + * we should maintain our own (numeric) cache of displayed register values (to avoid creating these temporary + * string values that will have to garbage-collected), and/or if this is actually slower, and/or if I'm being + * too obsessive. + */ + if (this.bindings[sLabel].textContent != sVal) this.bindings[sLabel].textContent = sVal; + } +}; + +/** + * setLED(control, f) + * + * @this {PanelPDP11} + * @param {Object} control is an HTML control DOM object + * @param {boolean|number} f is true if the LED represented by control should be "on", false if "off" + */ +PanelPDP11.prototype.setLED = function(control, f) +{ + /* + * TODO: Add support for user-definable LED colors + */ + control.style.backgroundColor = (f? "#ff0000" : "#000000"); +}; + +/** + * updateLEDs(sPrefix, data, nLEDs) + * + * @this {PanelPDP11} + * @param {string} sPrefix + * @param {number} data + * @param {number} nLEDs + */ +PanelPDP11.prototype.updateLEDs = function(sPrefix, data, nLEDs) +{ + for (var i = 0; i < nLEDs; i++) { + var id = sPrefix + i; + var control = this.bindings[id]; + if (control) { + this.setLED(control, data & (1 << i)); + } + } +}; + /** * updateStatus(fForce) * - * Update function for Panels containing elements with high-frequency display requirements. - * - * For older (and slower) DOM-based display elements, those are sill being managed by the CPUState component, - * so it has its own updateStatus() handler. - * - * The Computer's updateStatus() handler is currently responsible for calling both our handler and the CPU's handler. - * * @this {PanelPDP11} * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) */ PanelPDP11.prototype.updateStatus = function(fForce) { + if (this.cLiveRegs) { + if (fForce || !this.cpu.isRunning() || this.flags.displayLiveRegs) { + for (var i = 0; i < this.cpu.regsGen.length; i++) { + this.updateValue('R'+i, this.cpu.regsGen[i]); + } + var regPSW = this.cpu.getPSW(); + this.updateValue("PS", regPSW); + this.updateValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); + this.updateValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); + this.updateValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); + this.updateValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); + this.updateLEDs("D", this.cpu.regsGen[0], 16); + this.updateLEDs("A", this.cpu.regsGen[7], 22); + } + } }; /** diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 57dd66dcf..cb43b4b04 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -165,16 +165,16 @@ Component.subclass(SerialPortPDP11); SerialPortPDP11.sIOBuffer = "buffer"; /** - * setBinding(sHTMLType, sBinding, control, sValue) + * setBinding(sType, sBinding, control, sValue) * * @this {SerialPortPDP11} - * @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas") + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "buffer") * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) * @param {string} [sValue] optional data value * @return {boolean} true if binding was successful, false if unrecognized binding request */ -SerialPortPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) +SerialPortPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) { var serial = this; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index cc465f45f..34affccf5 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -164,7 +164,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -214,7 +214,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -310,7 +310,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -337,7 +337,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -364,7 +364,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -391,7 +391,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -418,7 +418,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -445,7 +445,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -472,7 +472,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -499,7 +499,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -526,7 +526,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -553,7 +553,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -580,7 +580,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -607,7 +607,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -634,7 +634,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -683,217 +683,215 @@ */ var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ca(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ua(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Va=void 0,Wa={}; +function Ma(a){if(Ja)try{for(var b=0;bb?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ta-1;this.C=this.I/this.ta|0;this.Fa=[];this.w=0;this.B=[];this.hc=[Db,Eb,Fb,Gb];a=new H(this);Hb(a,this.j);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Eb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Fb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))} -function Jb(a,b){if(b!=a.F){var c;a.F&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ta;g-=q;l++;continue}}return Ob(1,f,g)}f=new H(a,f,q,a.ta,d,e);Hb(f,a.j,m);a.W[l++]=f;f=p+a.ta;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Pb[d]+" at "+k(b,8,!0)),!0):Ob(2,b,c)} -function Lb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ia=function(a){return this.W[(a&this.i)>>>this.Y].Yb(a&this.f,a)};function Qb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Rb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].fc(a&this.f,b&65535,a)};function Sb(a){for(var b=0,c=[],d=0;da.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} -function Wb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+I(a.j,b),!0,!0),a.b.$(4,b))}function Ob(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function J(a){r.call(this,"Device",a,J,256);this.i={data:0,Gd:0,rb:20,Jd:0};this.f={Hd:0,Fb:-1}}y(J);h=J.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=Xb(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(Yb(e.b,0,6,64),Zb(e.b,e.f.Fb,1E3/60))});Ub(b,this,K);Vb(b,this.reset.bind(this));G(this)}; -h.yc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.fd=function(a){this.f.Ha=a;a&64&&Zb(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.Ac=function(){var a=this.b;return a.G&62337|a.ra<<5|a.sa<<1};h.hd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ra=a>>5&3;b.sa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,hc(b))}ic(this)};h.Bc=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Cc=function(){return this.b.Cb};h.Dc=function(){return this.b.Ka}; -h.jd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),hc(b));ic(this)};function ic(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Pc=function(a){return this.b.R[1][a>>1&7]};h.vd=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Nc=function(a){return this.b.R[1][(a>>1&7)+8]};h.td=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Oc=function(a){return this.b.oa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; -h.Mc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.xc=function(a){return this.b.R[0][a>>1&7]};h.ed=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.vc=function(a){return this.b.R[0][(a>>1&7)+8]};h.cd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.wc=function(a){return this.b.oa[0][a>>1&7]};h.dd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.uc=function(a){return this.b.oa[0][(a>>1&7)+8]}; -h.bd=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Vc=function(a){return this.b.R[3][a>>1&7]};h.Bd=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Tc=function(a){return this.b.R[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Uc=function(a){return this.b.oa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Sc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; -h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Gc=function(){return this.b.L&49152?this.b.qa[0]:this.b.u[6]};h.md=function(a){this.b.L&49152?this.b.qa[0]=a:this.b.u[6]=a};h.Jc=function(){return this.b.u[7]};h.pd=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; -h.Hc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[1]};h.nd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[1]=a};h.Ic=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[3]};h.od=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[3]=a};h.tc=function(a){return this.b.ac[a-65504>>1]};h.ad=function(a,b){this.b.ac[b-65504>>1]=a};h.Xb=function(a){return 65520==a?61183:0};h.ec=function(){};h.Rc=function(){return 1};h.xd=function(){};h.sc=function(){return this.b.Z}; -h.$c=function(){this.b.Z=0};h.zc=function(){return this.b.$b};h.gd=function(a,b){b&1||(a&=255);this.b.$b=a};h.Ec=function(){return this.b.Db};h.kd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Qc=function(){return this.b.La&65280};h.wd=function(a){this.b.La=a|255};h.Fc=function(){return jc(this.b)};h.ld=function(a){kc(this.b,a&-1809|jc(this.b)&1808);this.b.D|=128};h.dc=function(a,b){E(this)&&B(this,"writeIgnored("+ba(b)+"): "+ba(a),!0,!0)}; +var lb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function zb(a){r.call(this,"Panel",a,zb);this.f=0;this.v.Kb=!0}y(zb);h=zb.prototype; +h.pa=function(a,b,c,d){if(this.C&&this.C.pa(a,b,c,d)||this.b&&this.b.pa(a,b,c,d)||this.j&&this.j.pa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.pa.call(this,a,b,c,d)}};h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.j=d};h.ya=function(a,b){b||Ab();return!0};h.xa=function(){return!0}; +function Bb(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.b.fa());var e=a.j&&a.j.ha||8;c=!a.b.v.ba||a.v.Kb?8==e?ca(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Cb(a,b,c,d){for(var e=0;e>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Hb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Lb(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} +function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Xb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Ub)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.B.push(b)} +function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Fb:-1}}y(K);h=K.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=gc(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(hc(e.b,0,6,64),ic(e.b,e.f.Fb,1E3/60))});Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)}; +h.xc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.ed=function(a){this.f.Ha=a;a&64&&ic(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.zc=function(){var a=this.b;return a.G&62337|a.sa<<5|a.ta<<1};h.gd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,jc(b))}kc(this)};h.Ac=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Bc=function(){return this.b.Cb};h.Cc=function(){return this.b.Ka}; +h.hd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),jc(b));kc(this)};function kc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Oc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Mc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Nc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; +h.Lc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.wc=function(a){return this.b.R[0][a>>1&7]};h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.uc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.vc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.tc=function(a){return this.b.oa[0][(a>>1&7)+8]}; +h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Uc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Sc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Tc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Rc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; +h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Fc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Ic=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; +h.Gc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a};h.Hc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.sc=function(a){return this.b.$b[a-65504>>1]};h.$c=function(a,b){this.b.$b[b-65504>>1]=a};h.Wb=function(a){return 65520==a?61183:0};h.dc=function(){};h.Qc=function(){return 1};h.wd=function(){};h.rc=function(){return this.b.Z}; +h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.F|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)}; h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0}; -var L={},K=(L[62592]=[null,null,J.prototype.Pc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Nc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Oc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Mc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.xc,J.prototype.ed,"KISDR"],L[62672]=[null,null,J.prototype.vc,J.prototype.cd,"KDSDR"],L[62688]=[null,null,J.prototype.wc,J.prototype.dd,"KISAR"],L[62704]=[null,null,J.prototype.uc,J.prototype.bd,"KDSAR"],L[62798]=[null,null, -J.prototype.Dc,J.prototype.jd,"MMR3"],L[65382]=[null,null,J.prototype.yc,J.prototype.fd,"LKS"],L[65402]=[null,null,J.prototype.Ac,J.prototype.hd,"MMR0"],L[65404]=[null,null,J.prototype.Bc,J.prototype.dc,"MMR1"],L[65406]=[null,null,J.prototype.Cc,J.prototype.dc,"MMR2"],L[65408]=[null,null,J.prototype.Vc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Tc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Uc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Sc,J.prototype.yd,"UDSAR"], -L[65472]=[null,null,J.prototype.Za,J.prototype.cb,"R0SET0"],L[65473]=[null,null,J.prototype.Za,J.prototype.cb,"R1SET0"],L[65474]=[null,null,J.prototype.Za,J.prototype.cb,"R2SET0"],L[65475]=[null,null,J.prototype.Za,J.prototype.cb,"R3SET0"],L[65476]=[null,null,J.prototype.Za,J.prototype.cb,"R4SET0"],L[65477]=[null,null,J.prototype.Za,J.prototype.cb,"R5SET0"],L[65478]=[null,null,J.prototype.Gc,J.prototype.md,"R6KERNEL"],L[65479]=[null,null,J.prototype.Jc,J.prototype.pd,"R7KERNEL"],L[65480]=[null,null, -J.prototype.$a,J.prototype.eb,"R0SET1"],L[65481]=[null,null,J.prototype.$a,J.prototype.eb,"R1SET1"],L[65482]=[null,null,J.prototype.$a,J.prototype.eb,"R2SET1"],L[65483]=[null,null,J.prototype.$a,J.prototype.eb,"R3SET1"],L[65484]=[null,null,J.prototype.$a,J.prototype.eb,"R4SET1"],L[65485]=[null,null,J.prototype.$a,J.prototype.eb,"R5SET1"],L[65486]=[null,null,J.prototype.Hc,J.prototype.nd,"R6SUPER"],L[65487]=[null,null,J.prototype.Ic,J.prototype.od,"R6USER"],L[65504]=[null,null,J.prototype.tc,J.prototype.ad, -"CTRL",1170],L[65520]=[null,null,J.prototype.Xb,J.prototype.ec,"LSIZE",1170],L[65522]=[null,null,J.prototype.Xb,J.prototype.ec,"HSIZE",1170],L[65524]=[null,null,J.prototype.Rc,J.prototype.xd,"SYSID",1170],L[65526]=[null,null,J.prototype.sc,J.prototype.$c,"CPUERR",1170],L[65528]=[null,null,J.prototype.zc,J.prototype.gd,"MB",1170],L[65530]=[null,null,J.prototype.Ec,J.prototype.kd,"PIR"],L[65532]=[null,null,J.prototype.Qc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Fc,J.prototype.ld,"PSW"], -L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608];K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640]; -K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672];K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704]; -K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424];K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456]; -K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&Wb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.M)&&c.ea(!0)}return this.zb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.M)&&c.ea(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a, -1,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Gb(a,b,c)},sa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Hb(a,b,c)},N:function(a){return this.C[a]},U:function(a,b){a=this.C[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ba:function(a,b){a&1&&Wb(this.w,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&Wb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -I(this.j,b)+"): "+I(this.j,a),!0);return a},ka:function(a,b){this.C[a]=b;this.Ga=!0},ma:function(a,b,c){this.C[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},ra:function(a,b,c){a&1&&Wb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Wb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}}; -function Hb(a,b,c){a.j=b;a.i=a.J=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.J=c.J)&&vc(a,wc,!1))}function zc(a,b){b?--a.J||(a.ub=a.f?a.F:a.Gb,a.fc=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Yb=a.Ab)}function vc(a,b,c){c&&a.J||(a.ub=!a.f&&b[1]||a.F,a.fc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.F,a.Hb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Yb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} -var Ac=[],uc=[H.prototype.V,H.prototype.pa,H.prototype.ga,H.prototype.va],wc=[H.prototype.S,H.prototype.la,H.prototype.ca,H.prototype.sa];if(lb)var tc=[H.prototype.N,H.prototype.ka,H.prototype.ba,H.prototype.ra],sc=[H.prototype.U,H.prototype.ma,H.prototype.da,H.prototype.Ta]; -function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.aa=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Kb=!1;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Tb=this.Zc.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; -h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Ic(a)&&(a.Xa=a.Ya=-1,Fc(a),a.ea(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.jb))}} -function Jc(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ga||8;c=!a.v.aa||a.v.Kb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}} -h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ca/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&a.F.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.da=0;Mc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Zb(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)}function Nc(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 Oc(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]()))}} -h.Zc=function(){if(this.v.aa){this.ib>=this.Na&&Mc(this,!0);this.pa=0;this.Ea=ra();if(this.da){var a=this.Ea-this.da;a>this.Qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Oc(this,c);this.pa+=c;this.V+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Rb&&(this.F&&this.F.ua(),this.Rb=0);break}}while(this.v.aa)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(), -Ic(this));kb(this,e.stack||e.message);return}if(this.v.aa){a=setTimeout;b=this.Tb;this.da=ra();c=this.Qb;this.pa&&(c=Math.round(c*this.pa/this.Ma));var c=c-(this.da-this.Ea),d=this.da-this.U;d&&(this.ca=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ga=0,Kc(this)));if(0>c||this.cac&&(this.U-=c),c=0;this.ib+=this.pa;this.da+=c;a(b,c)}}}; -h.ab=function(a){if(jb(this))return!1;if(this.v.aa)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.aa=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.U,Ic(this)));M(this,!0);setTimeout(this.Tb,0);return!0};h.bb=function(){return 0};h.ea=function(a){if(this.v.aa){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.aa=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Ic(this));M(this)}this.v.complete=a}; -function M(a,b){a.F&&a.F.ua(b)} -function hd(a){this.Vb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.pb=0;this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.qc];this.Da=[0,0,0,0,0,0];this.qa=[0,0,0,0];this.sa=this.C=0;this.nc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.ac=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.$b=0;this.ma=-1;jd(this);this.v.complete=this.v.jc=!1}y(hd,Bc);h=hd.prototype;h.reset=function(){this.v.aa&&this.ea();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.ra=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&hc(a)}function hc(a){a.sb?(a.ba=65536,a.M=a.mc,a.S=a.Zb,a.Ub=a.Dd,Jb(a.w,a.Ka&16?22:18)):(a.ba=0,a.M=a.lc,a.S=a.Wc,a.Ub=a.Cd,Jb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Ia]);a.set(2,Sb(this.w));return a.data()}; -h.restore=function(a){var b=a[1];this.ga=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Wb:c<<5&224,cc:d,yb:e})}a.D|=2}function jc(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} -function kc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.qa[c]=a.u[6],a.u[6]=a.qa[a.C]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} -h.$=function(a){var b=!1;0>this.ma?this.ma=jc(this):this.C||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.C=0;var c=this.S(a|this.ba),d=this.S(a+2&65535|this.ba);kc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.D&=-17} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.nc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.C][d]=e;if(4194170!==f||a.C)a.ra=a.C,a.sa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ra<<5|a.sa<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.lc=function(a,b,c){return xd(this,a,b,c)};h.mc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Wc=function(a){return this.w.ia(a)};h.Zb=function(a){return this.w.ia(wd(this,a,2))}; -h.Cd=function(a,b){this.w.Sa(a,b&65535)};h.Dd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.S(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.qa[a.L>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=wd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.qa[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} -function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ia(e)))):a.u[e]=d.call(a,c,a.u[e])} +var M={},L=(M[62592]=[null,null,K.prototype.Oc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Mc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Nc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Lc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.wc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.uc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.vc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.tc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, +K.prototype.Cc,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.xc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.zc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.Ac,K.prototype.cc,"MMR1"],M[65406]=[null,null,K.prototype.Bc,K.prototype.cc,"MMR2"],M[65408]=[null,null,K.prototype.Uc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Sc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Tc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Rc,K.prototype.xd,"UDSAR"], +M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Fc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ic,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, +K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Gc,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Hc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.sc,K.prototype.$c, +"CTRL",1170],M[65520]=[null,null,K.prototype.Wb,K.prototype.dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.Wb,K.prototype.dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Qc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.rc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.yc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Dc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Pc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Ec,K.prototype.kd,"PSW"], +M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; +L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; +L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; +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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.M)&&c.fa(!0)}return this.zb(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.M)&&c.fa(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a, +1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Ga=!0},ma:function(a,b,c){this.D[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.C=0;c&&((a.i=c.i)&&yc(a,xc,!1),(a.C=c.C)&&wc(a,xc,!1))}function Ac(a,b){b?--a.C||(a.ub=a.f?a.J:a.Gb,a.ec=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Xb=a.Ab)}function wc(a,b,c){c&&a.C||(a.ub=!a.f&&b[1]||a.J,a.ec=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.J,a.Hb=b[3]||a.H}function yc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Xb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)} +var Bc=[],vc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],xc=[I.prototype.S,I.prototype.la,I.prototype.da,I.prototype.ta];if(lb)var uc=[I.prototype.N,I.prototype.ka,I.prototype.ca,I.prototype.sa],tc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Ta]; +function Cc(a,b){r.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.ba=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Rb=this.Yc.bind(this);G(this)}y(Cc);var Dc=["power","reset"];h=Cc.prototype; +h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Jc(a)&&(a.Xa=a.Ya=-1,Gc(a),a.fa(),c=!0);c&&a.g(Jc(a)+" cycles: checksum="+k(a.jb))}} +h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.da/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.C&&a.C.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.ea=0;Mc(a);return d}function gc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)} +function Nc(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 gd(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]()))}} +h.Yc=function(){if(this.v.ba){this.ib>=this.Na&&Mc(this,!0);this.qa=0;this.Ea=ra();if(this.ea){var a=this.Ea-this.ea;a>this.qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;gd(this,c);this.qa+=c;this.V+=c;Lc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Qb&&(this.C&&this.C.aa(),this.Qb=0);break}}while(this.v.ba)}catch(e){this.fa();this.C&&this.C.stop(ra(), +Jc(this));kb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Rb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.Ma));var c=c-(this.ea-this.Ea),d=this.ea-this.U;d&&(this.da=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ha=0,Kc(this)));if(0>c||this.dac&&(this.U-=c),c=0;this.ib+=this.qa;this.ea+=c;a(b,c)}}}; +h.ab=function(a){if(jb(this))return!1;if(this.v.ba)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.ba=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.nb(!0),this.C.start(this.U,Jc(this)));setTimeout(this.Rb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Jc(this))}this.v.complete=a}; +function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.D=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.F=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.F|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()}; +h.restore=function(a){var b=a[1];this.ha=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.F|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} +function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.D=b>>14&3;c=a.L>>14&3;a.D!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.D]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.F&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} +h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.D=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.F&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.F&=-17} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.D]||(d&=7);e=a.R[a.D][d];f=(a.oa[a.D][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.D][d]=e;if(4194170!==f||a.D)a.sa=a.D,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= +8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))}; +h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.S(d|c&a.ca),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} +function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} +function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.bb=function(a){this.v.complete=!0;var b=this.v.jc=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0d&&(d=this.B[e].Wb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.cc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.F&1&&this.F++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} +function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.F&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.F&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} +function Yd(a,b){a=b+a;var c=a<<8;this.F&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} +function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.F&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b} function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5} function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)} var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? 4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],xe= [function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= +2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, +0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= 65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24,2); this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.C=a.addr;this.i=a.size;this.G=a.writable;this.F=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Id:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; +this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.C=[];return!0}h.Bb=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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;Yb(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Lc,W.prototype.rd,"RCSR"],nf[65394]=[null,null,W.prototype.Kc,W.prototype.qd,"RBUF"],nf[65396]=[null,null,W.prototype.Yc,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.Xc,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; +function gf(a){if(!ib(a))if(!a.B)G(a);else if(a.f&&a.w){a.i||(a.i=a.f.length);if(a.f.length!=a.i)kb(a,"ROM size ("+k(a.f.length,8,!0)+") does not match specified size ("+k(a.i,8,!0)+")");else{var b;b=a.D;if(Ob(a.w,b,a.i,a.G?1:rc)){var c;for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.D=[];return!0}h.Bb=function(a){if("number"==typeof a)this.D.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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;hc(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Kc,W.prototype.qd,"RCSR"],nf[65394]=[null,null,W.prototype.Jc,W.prototype.pd,"RBUF"],nf[65396]=[null,null,W.prototype.Xc,W.prototype.Ed,"XCSR"],nf[65398]=[null,null,W.prototype.Wc,W.prototype.Dd,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; function qf(a,b,c,d){if(c)if(b){0>a.B&&a.i.length&&(a.B=0);if(0>a.B||b!=a.i[a.B])a.i.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.i[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} function rf(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 sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ba[b]);var c=0;for(b in a.ba)vf(a,b,a.ba[b]),c++;return 0>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ca[b]);var c=0;for(b in a.ca)vf(a,b,a.ca[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Pb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ia=function(a,b){var c=65535,d=Y(a);-1!==d&&(c=Qb(this.w,d),b&&Gf(a,b));return c}; -h.mb=function(a,b,c){var d=Y(a);-1!==d&&(Rb(this.w,d,b),c&&Gf(a,c),M(this.b,!0))};h.Sa=function(a,b,c){var d=Y(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} -function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.qa[a-16]:20==a&&(b=jc(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+I(this,X(this.b.u[7]).A));this.ha&1073741824?this.pa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,M(a)))}; -function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.C)for(b=1;b>>d.Y],!0);a.C=["bw"];a.Ma=0} -h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.g("invalid address: "+I(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.C)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g>>d.Y],b==a.C));l.wa||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,x=I(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=I(v,u);else if(12288==D)x=I(v,f&7,1);else if(24576==D)x=I(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ -")+":(D=v.ia(u,2),x="#"+I(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ia(u,2),x="@#"+I(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ia(u,2);x=I(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,I(v,D+u.A&65535)]);break;case 56:D=v.ia(u,2),x="@"+I(v,D)+"("+Kf(C)+")",7==C&&(x=[x,I(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.qa[b-16]):20==b&&(c="PS="+I(a,jc(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&e>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Gf(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Gf(a,c),this.C.aa(!0))};h.Sa=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);this.C.aa(!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} +function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,a.C.aa()))}; +function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.Ma=0} +h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||zf(a);break}}return f} +function Rf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ +")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Kf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}M(d);a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,I(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.C.aa();a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,J(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+I(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ja.length&&(a.g("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].A?(Z=ca+Z,ca=0):ca+=ja.length);var Sc=[];"call"==De&&(nb=1E5,Sc=["CALL"]);for(void 0!==Ce&&a.g(Z+" instructions earlier:");0=ja.length&&(ca=0);a.Ua=Z;Fe++;nb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var pb=Ff(a,ia);if(pb){var $b=0;Aa&&("l"==Aa.charAt(0)&&(Aa=Aa.substr(1)||ug),$b=uf(a,Aa)>>>0,65536<$b&&($b=65536));for(var qb="",Ta="dd"==Qa?4:"dw"==Qa?2:1,ac=Ta*$b||128,wg=ac+15>>4||1;wg--&&0cc?String.fromCharCode(cc):".";ac--}qb&&(qb+="\n");qb+=ia+" "+Tc+(0==sb?" "+Ie:"")}qb&&a.g(qb);a.Na=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Vc,Wc,Xc,Yc=g[0],Zc=g[1];"eb"==Yc?(Ua=1,Vc=255,Wc=a.Qa,Xc=a.mb):"e"==Yc||"ew"==Yc?(Ua=2,Vc=65535,Wc=a.ia,Xc=a.Sa):Zc=null;if(null==Zc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var dc=Ff(a,Zc);if(dc)for(var ec=2;ec< -g.length;ec++){var tb=sf(a,g[ec]);if(void 0===tb){a.g("unrecognized value: "+g[ec]);break}tb&~Vc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var xg=Wc.call(a,dc);a.g("changing "+I(a,dc.A)+" from "+I(a,xg,Ua)+" to "+I(a,tb,Ua));Xc.call(a,dc,tb,Ua)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var $c=Ff(a,Je,!0);if(!$c)break a;Jf(a,$c,yg);a.Oa(a.f,$c,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.aa?(c||a.g("halting"),a.ea()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var ad;var ub=b.substr(2),ub=oa(ub);sf(a,ub)?(c||a.g("true: "+ub),ad=!0):(c||a.g("false: "+ub),ad=!1);ad||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var bd=0,cd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+I(a,vb.A));10>bd;){for(var Ba=null,Ag=256;65536>vb.A>>>0;){cd.A=a.ia(vb,2);if(null==vb.A||!Ag--)break;if(!(cd.A&1)){for(var Bg=a,fc=cd,Ke=null,wb= -fc.A,Le=wb,dd=1;6>=dd&&wb;dd++){if(2> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Rc=[];"call"==De&&(mb=1E5,Rc=["CALL"]);for(void 0!==Ce&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ua=Y;Fe++;mb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var ob=Ff(a,ha);if(ob){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Zb=uf(a,za)>>>0,65536>4||1;wg--&&0<$b;){var ac=0,qb=0,rb,Sc="",Ie="",ha=J(a,ob.A);for(rb=4==Sa?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}pb&&(pb+="\n");pb+=ha+" "+Sc+(0==rb?" "+Ie:"")}pb&&a.g(pb);a.Na=ob}}}}break;case "e":if("else"==g[0])break;var Ta,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ta=1,Uc=255,Vc=a.Qa,Wc=a.mb):"e"==Xc||"ew"==Xc?(Ta=2,Uc=65535,Vc=a.ja,Wc=a.Sa):Yc=null;if(null==Yc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Ff(a,Yc);if(cc)for(var dc=2;dc< +g.length;dc++){var sb=sf(a,g[dc]);if(void 0===sb){a.g("unrecognized value: "+g[dc]);break}sb&~Uc&&a.g("warning: "+k(sb)+" exceeds "+Ta+"-byte value");var xg=Vc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,xg,Ta)+" to "+J(a,sb,Ta));Wc.call(a,cc,sb,Ta)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var Zc=Ff(a,Je,!0);if(!Zc)break a;Jf(a,Zc,yg);a.Oa(a.f,Zc,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.ba?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var $c;var tb=b.substr(2),tb=oa(tb);sf(a,tb)?(c||a.g("true: "+tb),$c=!0):(c||a.g("false: "+tb),$c=!1);$c||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ad=0,bd=X(),ub=X(a.b.u[6]);for(a.g("stack trace for "+J(a,ub.A));10>ad;){for(var Aa=null,Ag=256;65536>ub.A>>>0;){bd.A=a.ja(ub,2);if(null==ub.A||!Ag--)break;if(!(bd.A&1)){for(var Bg=a,ec=bd,Ke=null,vb= +ec.A,Le=vb,cd=1;6>=cd&&vb;cd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");hg(this.C)&&(mg(this,d),a=2,ng(this.C));this.C.set("timestamp",sa());og(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +h.lb=function(a){void 0===a&&(a=this.f||(this.I?1:fg));if(!this.C){this.C++;var b=!1,c=!1;this.S=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>fg){if(hg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");hg(this.D)&&(mg(this,d),a=2,ng(this.D));this.D.set("timestamp",ta());og(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0}; -function mg(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.ea(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;ma[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.C=0}; +function mg(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function cg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e= "");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| (c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index b919f7a39..0408e7044 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -164,7 +164,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -214,7 +214,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -310,7 +310,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -337,7 +337,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -364,7 +364,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -391,7 +391,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -418,7 +418,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -445,7 +445,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -472,7 +472,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -499,7 +499,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -526,7 +526,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -553,7 +553,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -580,7 +580,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -607,7 +607,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -634,7 +634,7 @@ This file is part of PCjs, a computer emulation software project at . - It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis + It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code may be used freely provided the original author name is acknowledged in any modified source code. @@ -692,79 +692,78 @@ typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encod function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function t(a){r.init.push(a)} function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Xc:!1,Yc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.w={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.fb=b.comment;this.Db=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.xb=[Na,Oa,Pa,Qa];a=new E(this);Ra(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Sa(d)}function Oa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Sa(e)} -function Pa(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Sa(d)}function Qa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Sa(e)}function Ta(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return Ya(1,f,h)}f=new E(a,f,u,a.l,d,e);Ra(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+Za[d]+" at "+k(b,8,!0)),!0):Ya(2,b,c)} -function Va(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function ab(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function bb(a,b,c){a.b[(b&a.i)>>>a.c].Rc(b&a.g,c&65535,b)} -function cb(a){for(var b=0,c=[],d=0;da.a.Db)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));db(a,e,e,h,l,n,p,f[4])}}}function fb(a,b){a.s.push(b)}function G(a){a.o||F(a.a,4)} -function Ya(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function H(a){v.call(this,"Device",a,H);this.c={data:0,Wc:0,Ma:20,$c:0};this.b={Zc:0,ab:-1}}x(H);g=H.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=gb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(hb(e.a,0,6,64),ib(e.a,e.b.ab,1E3/60))});eb(b,this,I);fb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.vc=function(a){this.b.ka=a;a&64&&ib(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.xc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,jb(b))}kb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; -g.yc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),jb(b));kb(this)};function kb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Kc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Ic=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Jc=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; -g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Hc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.uc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.sc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.tc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; -g.rc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Qc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Oc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Pc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Nc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; -g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Bc=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Ec=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Cc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Dc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.qb[a-65504>>1]};g.qc=function(a,b){this.a.qb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.wb=function(){};g.ec=function(){return 1};g.Mc=function(){};g.Gb=function(){return this.a.G}; -g.pc=function(){this.a.G=0};g.Nb=function(){return this.a.pb};g.wc=function(a,b){b&1||(a&=255);this.a.pb=a};g.Sb=function(){return this.a.$a};g.zc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Lc=function(a){this.a.na=a|255};g.Tb=function(){return lb(this.a)};g.Ac=function(a){mb(this.a,a&-1809|lb(this.a)&1808);this.a.j|=128};g.vb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; -var J={},I=(J[62592]=[null,null,H.prototype.cc,H.prototype.Kc,"SISDR"],J[62608]=[null,null,H.prototype.ac,H.prototype.Ic,"SDSDR"],J[62624]=[null,null,H.prototype.bc,H.prototype.Jc,"SISAR"],J[62640]=[null,null,H.prototype.$b,H.prototype.Hc,"SDSAR"],J[62656]=[null,null,H.prototype.Lb,H.prototype.uc,"KISDR"],J[62672]=[null,null,H.prototype.Jb,H.prototype.sc,"KDSDR"],J[62688]=[null,null,H.prototype.Kb,H.prototype.tc,"KISAR"],J[62704]=[null,null,H.prototype.Ib,H.prototype.rc,"KDSAR"],J[62798]=[null,null, -H.prototype.Rb,H.prototype.yc,"MMR3"],J[65382]=[null,null,H.prototype.Mb,H.prototype.vc,"LKS"],J[65402]=[null,null,H.prototype.Ob,H.prototype.xc,"MMR0"],J[65404]=[null,null,H.prototype.Pb,H.prototype.vb,"MMR1"],J[65406]=[null,null,H.prototype.Qb,H.prototype.vb,"MMR2"],J[65408]=[null,null,H.prototype.ic,H.prototype.Qc,"UISDR"],J[65424]=[null,null,H.prototype.gc,H.prototype.Oc,"UDSDR"],J[65440]=[null,null,H.prototype.hc,H.prototype.Pc,"UISAR"],J[65456]=[null,null,H.prototype.fc,H.prototype.Nc,"UDSAR"], -J[65472]=[null,null,H.prototype.sa,H.prototype.va,"R0SET0"],J[65473]=[null,null,H.prototype.sa,H.prototype.va,"R1SET0"],J[65474]=[null,null,H.prototype.sa,H.prototype.va,"R2SET0"],J[65475]=[null,null,H.prototype.sa,H.prototype.va,"R3SET0"],J[65476]=[null,null,H.prototype.sa,H.prototype.va,"R4SET0"],J[65477]=[null,null,H.prototype.sa,H.prototype.va,"R5SET0"],J[65478]=[null,null,H.prototype.Ub,H.prototype.Bc,"R6KERNEL"],J[65479]=[null,null,H.prototype.Xb,H.prototype.Ec,"R7KERNEL"],J[65480]=[null,null, -H.prototype.ta,H.prototype.wa,"R0SET1"],J[65481]=[null,null,H.prototype.ta,H.prototype.wa,"R1SET1"],J[65482]=[null,null,H.prototype.ta,H.prototype.wa,"R2SET1"],J[65483]=[null,null,H.prototype.ta,H.prototype.wa,"R3SET1"],J[65484]=[null,null,H.prototype.ta,H.prototype.wa,"R4SET1"],J[65485]=[null,null,H.prototype.ta,H.prototype.wa,"R5SET1"],J[65486]=[null,null,H.prototype.Vb,H.prototype.Cc,"R6SUPER"],J[65487]=[null,null,H.prototype.Wb,H.prototype.Dc,"R6USER"],J[65504]=[null,null,H.prototype.Hb,H.prototype.qc, -"CTRL",1170],J[65520]=[null,null,H.prototype.nb,H.prototype.wb,"LSIZE",1170],J[65522]=[null,null,H.prototype.nb,H.prototype.wb,"HSIZE",1170],J[65524]=[null,null,H.prototype.ec,H.prototype.Mc,"SYSID",1170],J[65526]=[null,null,H.prototype.Gb,H.prototype.pc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Nb,H.prototype.wc,"MB",1170],J[65530]=[null,null,H.prototype.Sb,H.prototype.zc,"PIR"],J[65532]=[null,null,H.prototype.dc,H.prototype.Lc,"SL"],J[65534]=[null,null,H.prototype.Tb,H.prototype.Ac,"PSW"], -J);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592];I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624];I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640]; -I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656];I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688];I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704]; -I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408];I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440];I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456]; -I[65506]=I[65504];I[65508]=I[65504];I[65510]=I[65504];I[65512]=I[65504];I[65514]=I[65504];I[65516]=I[65504];I[65518]=I[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),tb(this,pb?ub:vb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&G(this.l);var 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},da: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.ha=!0},F:function(a,b){return this.H(a,b)}, -S:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.w||this.ub(a,b,c)},fa:function(a,b,c){this.w||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},R:function(a){a&1&&G(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&G(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&G(this.l);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b){a&1&&G(this.l);this.o[a>>1]=b;this.ha=!0}}; -function Ra(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&xb(a,yb,!1),(a.m=c.m)&&zb(a,yb,!1))}function zb(a,b,c){c&&a.m||(a.Pa=!a.w&&b[1]||a.v,a.Rc=!a.w&&b[3]||a.B);if(c||void 0===c)a.ub=b[1]||a.v,a.oa=b[3]||a.B}function xb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function tb(a,b){b||(b=Ab);xb(a,b,void 0);zb(a,b,void 0)}var Ab=[],wb=[E.prototype.N,E.prototype.da,E.prototype.X,E.prototype.qa],yb=[E.prototype.F,E.prototype.Z,E.prototype.S,E.prototype.fa]; -if(Ja)var vb=[E.prototype.D,E.prototype.Y,E.prototype.R,E.prototype.ea],ub=[E.prototype.J,E.prototype.$,E.prototype.W,E.prototype.pa];function Bb(a,b){v.call(this,"CPU",a,Bb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.T=!1;this.h.rb=!1;this.h.za=a.autoStart;this.h.bb=!1;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.H=[];this.kb=this.nc.bind(this);D(this)}x(Bb);var Cb=["power","reset"]; -g=Bb.prototype;g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.w[b].textContent!=d&&(a.w[b].textContent=d)}} -g.P=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.w[b]=c;a=!0;break;case "run":this.w[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.h.L)a=!0;else{var b=null,c,l=y(a.id);for(c=0;ca.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.w.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.S);a.S=0;a.R=ka();a.X=0;Lb(a)}function gb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function ib(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} -g.nc=function(){if(this.h.T){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.ib&&(this.R+=a,this.R>this.Ga&&(this.R=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.sb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.S+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= -!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,n=!0);0<=this.pa&&this.pa<=Mb(this)&&(this.oa=this.pa=-1,Fb(this),K(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.qa-=f;if(0>=this.qa){this.qa+=this.Ja;15<=++this.jb&&(this.A&&this.A.ua(),this.jb=0);break}}while(this.h.T)}catch(p){K(this);Gb(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.kb;this.X=ka();d=this.ib;this.xa&&(d= -Math.round(d*this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.R)this.W=Math.round(this.S/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.R-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Hb(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.M(a.toString()+" busy");else{Jb(a);a.h.T=!0;a.h.rb=!0;if(b=a.w.run)b.textContent="Halt";a.A&&a.A.start(a.R,Mb(a));Gb(a,!0);setTimeout(a.kb,0)}}g.sb=function(){return 0}; -function K(a){if(a.h.T){a.Y-=a.a;a.a=0;Kb(a,a.S);a.S=0;a.h.T=!1;var b=a.w.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a));Gb(a)}a.h.complete=void 0}function Gb(a,b){a.A&&a.A.ua(b)} -function Nb(a){this.Db=+a.model||1170;this.Fb=a.resetAddr||0;Bb.call(this,a,6666667);this.fb=0;this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Fb];this.ra=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.v=0;this.Cb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.qb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.pb=0;this.fa=-1;Pb(this);this.h.complete=this.h.yb=!1}x(Nb,Bb);g=Nb.prototype;g.reset=function(){this.h.T&&K(this);Pb(this);Eb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&jb(a)}function jb(a){a.Na?(a.V=65536,a.J=a.Bb,a.N=a.ob,a.lb=a.Tc,Ta(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.Ab,a.N=a.kc,a.lb=a.Sc,Ta(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,cb(this.l));return a.data()}; -g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,mb:c<<5&224,tb:d,Qa:e})}a.j|=2}function lb(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function mb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.v=b>>14&3;c=a.u>>14&3;a.v!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.v]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function F(a,b){var c=!1;0>a.fa?a.fa=lb(a):a.v||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.v=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);mb(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;mb(a,c);a.j&=-17} -function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Cb[a.v]||(d&=7);e=a.C[a.v][d];f=(a.O[a.v][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,F(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; -default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.v][d]=e;if(4194170!==f||a.v)a.Da=a.v,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),F(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,F(a,4)):(a.G|=8,a.j|=64));return e}g.Ab=function(a,b,c){return Xb(this,a,b,c)};g.Bb=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return ab(this.l,a)};g.ob=function(a){return ab(this.l,Wb(this,a,2))}; -g.Sc=function(a,b){bb(this.l,a,b&65535)};g.Tc=function(a,b){bb(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.v=a.u>>12&3,c=a.N(d|c&a.V),a.v=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} -function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.v=a.u>>12&3,e=Wb(a,e|c&65536,4),a.v=a.u>>14&3,bb(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} -function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=$a(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?ab(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,$a(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),bb(a.l,e,d.call(a,c,ab(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?bb(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.sb=function(a){this.h.complete=!0;this.h.yb=!1;this.h.rb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?F(this,168):this.j&64?F(this,4):this.j&16&&F(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].mb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?F(this,a.tb):F(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.wb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return $a(1,f,h)}f=new G(a,f,u,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} +function eb(a){for(var b=0,c=[],d=0;da.a.Cb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.s.push(b)}function ib(a){a.o||H(a.a,4)} +function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,ab:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=jb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,0,6,64),lb(e.a,e.b.ab,1E3/60))});gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,mb(b))}nb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; +g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),mb(b));nb(this)};function nb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; +g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; +g.qc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; +g.ta=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; +g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.mb=function(a){return 65520==a?61183:0};g.vb=function(){};g.ec=function(){return 1};g.Lc=function(){};g.Gb=function(){return this.a.G}; +g.oc=function(){this.a.G=0};g.Nb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Sb=function(){return this.a.$a};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Kc=function(a){this.a.na=a|255};g.Tb=function(){return Na(this.a)};g.zc=function(a){ob(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.ub=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +var K={},J=(K[62592]=[null,null,I.prototype.cc,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.ac,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.bc,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.$b,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Lb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Jb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Kb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Ib,I.prototype.qc,"KDSAR"],K[62798]=[null,null, +I.prototype.Rb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Mb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Ob,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Pb,I.prototype.ub,"MMR1"],K[65406]=[null,null,I.prototype.Qb,I.prototype.ub,"MMR2"],K[65408]=[null,null,I.prototype.ic,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.gc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.hc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.fc,I.prototype.Mc,"UDSAR"], +K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Ub,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Xb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Vb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Wb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Hb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.mb,I.prototype.vb,"LSIZE",1170],K[65522]=[null,null,I.prototype.mb,I.prototype.vb,"HSIZE",1170],K[65524]=[null,null,I.prototype.ec,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Gb,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Nb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Sb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.dc,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Tb,I.prototype.zc,"PSW"], +K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; +J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; +J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; +J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),vb(this,rb?wb:xb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.l);var 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},da: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.ha=!0},F:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.tb(a,b,c)},fa:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},P:function(a){a&1&&ib(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&ib(this.l);this.g.setUint16(a,b,!0);this.ha=!0},qa:function(a,b){a&1&&ib(this.l);this.o[a>>1]=b;this.ha= +!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&zb(a,Ab,!1),(a.m=c.m)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.w,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.tb=b[1]||a.w,a.pa=b[3]||a.B}function zb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.da,G.prototype.X,G.prototype.ra],Ab=[G.prototype.F,G.prototype.Z,G.prototype.R,G.prototype.fa]; +if(Ja)var xb=[G.prototype.D,G.prototype.Y,G.prototype.P,G.prototype.ea],wb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.qa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.S=!1;this.h.qb=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.jb=this.nc.bind(this);D(this)}x(Db);var Eb=["power","reset"];g=Db.prototype; +g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;ba.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.R);a.R=0;a.P=ka();a.X=0;Lb(a)}function jb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} +g.nc=function(){if(this.h.S){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.hb&&(this.P+=a,this.P>this.Ga&&(this.P=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.R+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= +!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.pa,n=!0);0<=this.qa&&this.qa<=Mb(this)&&(this.pa=this.qa=-1,Hb(this),F(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.ra-=f;if(0>=this.ra){this.ra+=this.Ja;15<=++this.ib&&(this.A&&this.A.oa(),this.ib=0);break}}while(this.h.S)}catch(p){F(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.jb;this.X=ka();d=this.hb;this.xa&&(d=Math.round(d* +this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.P)this.W=Math.round(this.R/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.P-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Ib(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.M(a.toString()+" busy");else{Jb(a);a.h.S=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.A&&a.A.start(a.P,Mb(a));setTimeout(a.jb,0)}}g.rb=function(){return 0}; +function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Kb(a,a.R);a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a))}a.h.complete=void 0} +function Nb(a){this.Cb=+a.model||1170;this.Eb=a.resetAddr||0;Db.call(this,a,6666667);this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Eb];this.sa=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.w=0;this.Bb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.ob=0;this.fa=-1;Pb(this);this.h.complete=this.h.xb=!1}x(Nb,Db);g=Nb.prototype;g.reset=function(){this.h.S&&F(this);Pb(this);Gb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&mb(a)}function mb(a){a.Na?(a.V=65536,a.J=a.Ab,a.N=a.nb,a.kb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.zb,a.N=a.kc,a.kb=a.Rc,Va(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,lb:c<<5&224,sb:d,Qa:e})}a.j|=2}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +function ob(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.sa.length;0<=--c;){var d=a.f[c];a.f[c]=a.sa[c];a.sa[c]=d}a.w=b>>14&3;c=a.u>>14&3;a.w!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.w]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b){var c=!1;0>a.fa?a.fa=Na(a):a.w||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.w=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);ob(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;ob(a,c);a.j&=-17} +function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Bb[a.w]||(d&=7);e=a.C[a.w][d];f=(a.O[a.w][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.Fb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; +default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.w][d]=e;if(4194170!==f||a.w)a.Da=a.w,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),H(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; +case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,H(a,4)):(a.G|=8,a.j|=64));return e}g.zb=function(a,b,c){return Xb(this,a,b,c)};g.Ab=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return cb(this.l,a)};g.nb=function(a){return cb(this.l,Wb(this,a,2))}; +g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.w=a.u>>12&3,c=a.N(d|c&a.V),a.w=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} +function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.u>>12&3,e=Wb(a,e|c&65536,4),a.w=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} +function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.xb=!1;this.h.qb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168):this.j&64?H(this,4):this.j&16&&H(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].lb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= +this.f[7]+2&65535,this.j&=-5),a?H(this,a.sb):H(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>1|b<<16;P(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function kc(a,b){a=b&~a;N(this,a);return a}function lc(a,b){a=b&~a;N(this,a<<8);return a}function mc(a,b){a|=b;N(this,a);return a}function nc(a,b){a|=b;N(this,a<<8);return a}function oc(a,b){a=~b|65536;O(this,a);return a&65535} function pc(a,b){a=~b|256;O(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;O(this,a,a&b&32768);return a&65535} function vc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function yc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} @@ -772,54 +771,54 @@ function Cc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8 function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} function Hc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Ic=[0,7,7,10,7,11,9,13];function Jc(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Ic[this.c]} var Kc=[0,14,14,17,14,18,16,20];function Lc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Kc[this.c]}var Mc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Nc=[7,13,13,17,14,18,17,21];function Oc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){F(this,8)}function Ob(a){Tc[a>>12].call(this,a)} +function Pc(){this.a-=5}function W(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a&4&&(this.i=0);a&8&&(this.o=32768);this.a-=5}function Qc(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8)}function Ob(a){Tc[a>>12].call(this,a)} var Tc=[function(a){Uc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,dc(this,a,b));this.a=c-Mc[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),kc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),ec);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){Vc[a>>8&15].call(this,a)},function(a){Wc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);N(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ (this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),lc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},X],Uc=[function(a){Xc[a>> 4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> 6&3].call(this,a)},X,X],Yc=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){T(this,a,0,uc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.ob(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)F(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):F(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, -Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,F(this,4)):K(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){F(this,12);this.a-=5},function(){F(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.nb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= +11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)H(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, +Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,H(this,4)):F(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= 5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768?2:0)},function(a){U(this, -a,!M(this))},function(a){U(this,a,M(this))},function(){F(this,24);this.a-=25},function(){F(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? +a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? 9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b? 2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; id.prototype.ba=function(){return!0}; function jd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].ub(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.v=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;hb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Gc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Fc,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Vc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Uc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;b>>d.c].tb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.w=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;kb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Fc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Ec,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Uc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Tc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.v}e=y(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.h.L=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function zd(a,b){if(ma("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.1"};d.url=a.R;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&K(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function zd(a,b){if(ma("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.1"};d.url=a.P;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&F(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n Date: Tue, 11 Oct 2016 10:28:37 -0700 Subject: [PATCH 13/36] Provided clearer separation between LED triplets --- devices/pdp11/panel/1170/led.xml | 28 ++++++++++++------------- modules/shared/templates/components.css | 3 +++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/devices/pdp11/panel/1170/led.xml b/devices/pdp11/panel/1170/led.xml index a7e08568d..de5450d67 100644 --- a/devices/pdp11/panel/1170/led.xml +++ b/devices/pdp11/panel/1170/led.xml @@ -2,85 +2,85 @@ Control Panel - + ADDRESS - + . - + . - + . - + . - + . - + . - + . - + DATA - + . - + . - + . - + . - + . diff --git a/modules/shared/templates/components.css b/modules/shared/templates/components.css index 3cde83dd7..64d48ea90 100644 --- a/modules/shared/templates/components.css +++ b/modules/shared/templates/components.css @@ -105,6 +105,9 @@ color: #ffffff; background-color: #404040; } +.pcjs-tripled { + padding: 1px; +} .pcjs-tripled-label { text-align: right; padding: 8px; From 4c63c8a97f461566655d15ec832575e7bc4e3804 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 11 Oct 2016 10:47:09 -0700 Subject: [PATCH 14/36] Quick change (perhaps temporary) to update LEDs on every WAIT transition (similar to the behavior of the original pdp11.js) --- modules/pdp11/lib/cpuops.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 0dc1e49b1..1148b9942 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1692,7 +1692,7 @@ PDP11.opWAIT = function(opCode) /* * The original PDP-11 emulation code would actually stop emulating instructions now, relying on assorted * setTimeout() callbacks, setInterval() callbacks, device XHR (XMLHttpRequest) callbacks, etc, to eventually - * call interrupt(), which would then transition the CPU's runState from 2 to 0 and kickstart emulate() again. + * call interrupt(), which would then transition the CPU of its "wait" state and kickstart emulate() again. * * That approach isn't compatible with PCjs emulators, which prefer to rely on the simulated CPU clock to * drive all simulated device updates. This means components should call the CPU's setTimer() function, which @@ -1703,9 +1703,9 @@ PDP11.opWAIT = function(opCode) * However, the PCjs approach requires the CPU to continue running. One simple solution to this dilemma: * * 1) opWAIT() sets a new opFlags bit (OPFLAG.WAIT) - * 2) Rewind PC back to WAIT + * 2) Rewind the PC back to the WAIT instruction * 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterruptQueue() - * 4) If checkInterruptQueue() detects an interrupt, advance PC past WAIT before dispatching it + * 4) If checkInterruptQueue() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt * * Technically, the PC is already exactly where it's supposed to be, so why are we wasting time with steps * 2 and 4? It's largely for the Debugger's sake, so that as long as execution is "blocked" by a WAIT, that's @@ -1716,6 +1716,12 @@ PDP11.opWAIT = function(opCode) * check can have a measurable (negative) impact on performance. Which is why it's important to use opFlags bits * whenever possible, since we can test for multiple (up to 32) exceptional conditions with a single check. */ + if (!(this.opFlags & PDP11.OPFLAG.WAIT)) { + /* + * Since here we're actually transitioning to WAIT, let's update the Panel's LEDs (well, OK, among other things). + */ + this.cmp.updateStatus(); + } this.opFlags |= PDP11.OPFLAG.WAIT; this.advancePC(-2); this.nStepCycles -= 3; From 4567e9f6c68a86b9e43827fbd7d63f9b7c94cc8a Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 11 Oct 2016 11:42:18 -0700 Subject: [PATCH 15/36] Changed both PDP-11 test machines to use the new LED control panel --- devices/pdp11/machine/1170/machine.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/machine.xml index 83ea462b4..b8805f8d0 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/machine.xml @@ -9,6 +9,6 @@ - +
    From 30e67a015b1479e37341def12374660d552e85f1 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 11 Oct 2016 12:19:54 -0700 Subject: [PATCH 16/36] Fixed some idiosyncrasies involving the versioned folder names for the various emulators. Any compiled pdp*.js script (eg, pdp11.js) will be stored in the /versions/pdpjs folder, just as any compiled c1p*.js script will be stored in the /versions/c1pjs folder. Other emulators that don't use a "js" suffix in their name (eg, PCx86 and PC8080) are stored in /versions folders that mirror their names. --- docs/pcx86/examples/components.css | 3 + modules/htmlout/lib/htmlout.js | 4 +- modules/shared/lib/embed.js | 6 +- versions/pc8080/1.30.1/components.css | 3 + versions/pcx86/1.30.1/components.css | 3 + versions/pdpjs/1.30.1/components.css | 3 + versions/pdpjs/1.30.1/pdp11-dbg.js | 86 +++++++++++----------- versions/pdpjs/1.30.1/pdp11.js | 100 +++++++++++++------------- 8 files changed, 111 insertions(+), 97 deletions(-) diff --git a/docs/pcx86/examples/components.css b/docs/pcx86/examples/components.css index f1782cf02..dc7dbc154 100644 --- a/docs/pcx86/examples/components.css +++ b/docs/pcx86/examples/components.css @@ -100,6 +100,9 @@ color: #ffffff; background-color: #404040; } +.pcjs-tripled { + padding: 1px; +} .pcjs-tripled-label { text-align: right; padding: 8px; diff --git a/modules/htmlout/lib/htmlout.js b/modules/htmlout/lib/htmlout.js index 691a4539f..8a1eb986e 100644 --- a/modules/htmlout/lib/htmlout.js +++ b/modules/htmlout/lib/htmlout.js @@ -1843,7 +1843,7 @@ HTMLOut.prototype.getRandomString = function(sIndent) * * At a minimum, each machine object should contain the following properties: * - * 'type' (eg, a machine type, such as "PCx86" or "C1P") + * 'type' (eg, a machine type, such as "C1P", "PCx86", "PC8080", or "PDP11") * 'version' (eg, "1.10", "*" to select the current version, or "uncompiled"; "*" is the default) * 'debugger' (eg, true or false; false is the default) * @@ -1891,7 +1891,7 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done) if (fCompiled) { var sScriptName = sType.toLowerCase(); var sScriptFile = sScriptName + (fDebugger? "-dbg" : "") + ".js"; - var sScriptFolder = sScriptName + ((sType == "C1P" || sType == "PC")? "js" : ""); + var sScriptFolder = sScriptName == "c1p"? "c1pjs" : (sScriptName.substr(0, 3) == "pdp"? "pdpjs" : sScriptName); asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/components.css"); asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile); this.addFilesToHTML(asFiles, sScriptEmbed); diff --git a/modules/shared/lib/embed.js b/modules/shared/lib/embed.js index 74895da68..5ff3f3124 100644 --- a/modules/shared/lib/embed.js +++ b/modules/shared/lib/embed.js @@ -409,10 +409,12 @@ function embedMachine(sAppName, sAppClass, sVersion, idMachine, sXMLFile, sXSLFi * Third-party sites that don't use the PCjs server will ALWAYS want to specify a fully-qualified * path to the XSL file, unless they choose to mirror our folder structure. */ + var sAppFolder = sAppClass; if (DEBUG || sVersion == "1.x.x") { - sXSLFile = "/modules/" + sAppClass + "/templates/components.xsl"; + sXSLFile = "/modules/" + sAppFolder + "/templates/components.xsl"; } else { - sXSLFile = "/versions/" + sAppClass + "/" + sVersion + "/components.xsl"; + if (sAppClass.substr(0, 3) == "pdp") sAppFolder = "pdpjs"; + sXSLFile = "/versions/" + sAppFolder + "/" + sVersion + "/components.xsl"; } } diff --git a/versions/pc8080/1.30.1/components.css b/versions/pc8080/1.30.1/components.css index f1782cf02..dc7dbc154 100644 --- a/versions/pc8080/1.30.1/components.css +++ b/versions/pc8080/1.30.1/components.css @@ -100,6 +100,9 @@ color: #ffffff; background-color: #404040; } +.pcjs-tripled { + padding: 1px; +} .pcjs-tripled-label { text-align: right; padding: 8px; diff --git a/versions/pcx86/1.30.1/components.css b/versions/pcx86/1.30.1/components.css index f1782cf02..dc7dbc154 100644 --- a/versions/pcx86/1.30.1/components.css +++ b/versions/pcx86/1.30.1/components.css @@ -100,6 +100,9 @@ color: #ffffff; background-color: #404040; } +.pcjs-tripled { + padding: 1px; +} .pcjs-tripled-label { text-align: right; padding: 8px; diff --git a/versions/pdpjs/1.30.1/components.css b/versions/pdpjs/1.30.1/components.css index f1782cf02..dc7dbc154 100644 --- a/versions/pdpjs/1.30.1/components.css +++ b/versions/pdpjs/1.30.1/components.css @@ -100,6 +100,9 @@ color: #ffffff; background-color: #404040; } +.pcjs-tripled { + padding: 1px; +} .pcjs-tripled-label { text-align: right; padding: 8px; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 34affccf5..054b14111 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -708,7 +708,7 @@ var lb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,devic h.pa=function(a,b,c,d){if(this.C&&this.C.pa(a,b,c,d)||this.b&&this.b.pa(a,b,c,d)||this.j&&this.j.pa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.pa.call(this,a,b,c,d)}};h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.j=d};h.ya=function(a,b){b||Ab();return!0};h.xa=function(){return!0}; function Bb(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.b.fa());var e=a.j&&a.j.ha||8;c=!a.b.v.ba||a.v.Kb?8==e?ca(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Cb(a,b,c,d){for(var e=0;e>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.F=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} function Gb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} function Hb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} @@ -716,7 +716,7 @@ function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0) function Lb(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Xb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;d>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Ub)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.B.push(b)} function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Fb:-1}}y(K);h=K.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=gc(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(hc(e.b,0,6,64),ic(e.b,e.f.Fb,1E3/60))});Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)}; @@ -726,7 +726,7 @@ h.Lc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+ h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Uc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Sc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Tc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Rc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Fc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Ic=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; h.Gc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a};h.Hc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.sc=function(a){return this.b.$b[a-65504>>1]};h.$c=function(a,b){this.b.$b[b-65504>>1]=a};h.Wb=function(a){return 65520==a?61183:0};h.dc=function(){};h.Qc=function(){return 1};h.wd=function(){};h.rc=function(){return this.b.Z}; -h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.F|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)}; +h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.D|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)}; h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0}; var M={},L=(M[62592]=[null,null,K.prototype.Oc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Mc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Nc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Lc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.wc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.uc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.vc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.tc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, K.prototype.Cc,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.xc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.zc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.Ac,K.prototype.cc,"MMR1"],M[65406]=[null,null,K.prototype.Bc,K.prototype.cc,"MMR2"],M[65408]=[null,null,K.prototype.Uc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Sc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Tc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Rc,K.prototype.xd,"UDSAR"], @@ -737,13 +737,13 @@ M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[626 L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; 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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.M)&&c.fa(!0)}return this.zb(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.M)&&c.fa(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a, -1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Ga=!0},ma:function(a,b,c){this.D[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +1,d.F)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.F)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.F[a]},U:function(a,b){a=this.F[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.F[a]=b;this.Ga=!0},ma:function(a,b,c){this.F[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; function Jb(a,b,c){a.j=b;a.i=a.C=0;c&&((a.i=c.i)&&yc(a,xc,!1),(a.C=c.C)&&wc(a,xc,!1))}function Ac(a,b){b?--a.C||(a.ub=a.f?a.J:a.Gb,a.ec=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Xb=a.Ab)}function wc(a,b,c){c&&a.C||(a.ub=!a.f&&b[1]||a.J,a.ec=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.J,a.Hb=b[3]||a.H}function yc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Xb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)} var Bc=[],vc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],xc=[I.prototype.S,I.prototype.la,I.prototype.da,I.prototype.ta];if(lb)var uc=[I.prototype.N,I.prototype.ka,I.prototype.ca,I.prototype.sa],tc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Ta]; function Cc(a,b){r.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.ba=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Rb=this.Yc.bind(this);G(this)}y(Cc);var Dc=["power","reset"];h=Cc.prototype; @@ -757,32 +757,32 @@ function Nc(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&( h.Yc=function(){if(this.v.ba){this.ib>=this.Na&&Mc(this,!0);this.qa=0;this.Ea=ra();if(this.ea){var a=this.Ea-this.ea;a>this.qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;gd(this,c);this.qa+=c;this.V+=c;Lc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Qb&&(this.C&&this.C.aa(),this.Qb=0);break}}while(this.v.ba)}catch(e){this.fa();this.C&&this.C.stop(ra(), Jc(this));kb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Rb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.Ma));var c=c-(this.ea-this.Ea),d=this.ea-this.U;d&&(this.da=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ha=0,Kc(this)));if(0>c||this.dac&&(this.U-=c),c=0;this.ib+=this.qa;this.ea+=c;a(b,c)}}}; h.ab=function(a){if(jb(this))return!1;if(this.v.ba)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.ba=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.nb(!0),this.C.start(this.U,Jc(this)));setTimeout(this.Rb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Jc(this))}this.v.complete=a}; -function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.D=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.F=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.F|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()}; +function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.F=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()}; h.restore=function(a){var b=a[1];this.ha=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.F|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} -function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.D=b>>14&3;c=a.L>>14&3;a.D!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.D]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.F&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} -h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.D=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.F&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.F&=-17} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.D]||(d&=7);e=a.R[a.D][d];f=(a.oa[a.D][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.D][d]=e;if(4194170!==f||a.D)a.sa=a.D,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))}; -h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.S(d|c&a.ca),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} +function nd(a){var b=a.S(a.u[7]);a.u[7]=a.u[7]+2&65535;return b}function od(a,b){a.u[7]=b&65535}function hc(a,b,c,d,e){for(var f=a.B.length;0b){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.D|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} +function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.F=b>>14&3;c=a.L>>14&3;a.F!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.F]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} +h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.F||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.F=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.D&=-17} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.F]||(d&=7);e=a.R[a.F][d];f=(a.oa[a.F][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.F][d]=e;if(4194170!==f||a.F)a.sa=a.F,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= +8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.F&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))}; +h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.F=a.L>>12&3,c=a.S(d|c&a.ca),a.F=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} +function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.F=a.L>>12&3,e=wd(a,e|c&65536,4),a.F=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.bb=function(a){this.v.complete=!0;var b=this.v.ic=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.F&1&&this.F++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.F&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.F&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.F&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.F&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} +function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} +function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} +function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b} function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5} function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)} var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? @@ -790,24 +790,24 @@ var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=thi [function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? 2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O= -65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24,2); -this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= +0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.D&4||this.C.aa();this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e= +[se,function(){this.O=65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24, +2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; +this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.F=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); +ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.F,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.D=[];return!0}h.Bb=function(a){if("number"==typeof a)this.D.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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;hc(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Kc,W.prototype.qd,"RCSR"],nf[65394]=[null,null,W.prototype.Jc,W.prototype.pd,"RBUF"],nf[65396]=[null,null,W.prototype.Xc,W.prototype.Ed,"XCSR"],nf[65398]=[null,null,W.prototype.Wc,W.prototype.Dd,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; @@ -819,7 +819,7 @@ d))}return d}function tf(a,b){for(var c,d=a.ta?"(":"{",e=a.ta?")":"}",f=new RegE function uf(a,b,c,d){var e;null!=b?(e=a.Ob(b),0<=e?e=a.Pb(e):(e=a.ca[b],null==e&&(e=aa(b,a.ha))),null!=e||d||a.g("invalid "+(c?c:"value")+": "+b)):d||a.g("missing "+(c||"value"));return e} function vf(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ca[b]);var c=0;for(b in a.ca)vf(a,b,a.ca[b]),c++;return 0>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.Ma=0} -h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||zf(a);break}}return f} +function Id(a,b,c){var d=a.b;if(0>>d.Y],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.Y],!0);a.F=["bw"];a.Ma=0} +h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.F)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.F));l.wa||zf(a);break}}return f} function Rf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ @@ -855,8 +855,8 @@ function bg(a,b,c){var d="t"!=b;c=uf(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e= function Nf(a,b,c,d){if(b=Ff(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Ff(a,c,!0);if(!d||d.Al[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Rc=[];"call"==De&&(mb=1E5,Rc=["CALL"]);for(void 0!==Ce&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ua=Y;Fe++;mb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var ob=Ff(a,ha);if(ob){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Zb=uf(a,za)>>>0,65536>4||1;wg--&&0<$b;){var ac=0,qb=0,rb,Sc="",Ie="",ha=J(a,ob.A);for(rb=4==Sa?16:a.ha;0fg){if(hg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");hg(this.D)&&(mg(this,d),a=2,ng(this.D));this.D.set("timestamp",ta());og(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== +h.lb=function(a){void 0===a&&(a=this.f||(this.I?1:fg));if(!this.C){this.C++;var b=!1,c=!1;this.S=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>fg){if(hg(d,this.I)){this.F=new N(this,"1.30.1","failsafe");hg(this.F)&&(mg(this,d),a=2,ng(this.F));this.F.set("timestamp",ta());og(this.F);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.C=0}; +h.Lb=function(a){var b=a[0],c=0>a[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0}; function mg(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} function cg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m).*?(<\/xsl:variable>)/,"$1pdp11$2") function Hg(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Ua;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 0408e7044..f2a80e9af 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -702,25 +702,25 @@ v.prototype={constructor:v,parent:null,toString:function(){return this.name?this this.K=function(a){this.M(a,this.Ca)}),!0;default:return!1}},log:function(){},M:function(){},status:function(a){this.M(this.Ca+": "+a)},K:function(a,b,c){c=c||this.type;b||q((c?c+": ":"")+a)},ca:function(){return this.h.L=!0},ba:function(a,b){b&&(this.h.L=!1);return!0}};function D(a){if(!a.h.error&&(a.h.ready=!0,a.h.ready)){var b=a.La;a.La=null;b&&b()}}function Ia(a,b){b&&(a.h.ready?b():a.La=b);return a.h.ready} Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ga=[];this.o=0;this.s=[];this.wb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} -function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ha=[];this.o=0;this.s=[];this.wb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return $a(1,f,h)}f=new G(a,f,u,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.Cb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.s.push(b)}function ib(a){a.o||H(a.a,4)} -function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,ab:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=jb(this.a,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,0,6,64),lb(e.a,e.b.ab,1E3/60))});gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.ab,1E3/60);this.b.ka=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,mb(b))}nb(this)};g.Pb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.ma}; -g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),mb(b));nb(this)};function nb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; +function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,ab:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=jb(this.a,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,0,6,64),lb(e.a,e.b.ab,1E3/60))});gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.la;this.b.la&=-129;return a}; +g.uc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.ab,1E3/60);this.b.la=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,mb(b))}nb(this)};g.Pb=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.na}; +g.xc=function(a){var b=this.a;b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),mb(b));nb(this)};function nb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.na&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; g.qc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; g.ta=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.mb=function(a){return 65520==a?61183:0};g.vb=function(){};g.ec=function(){return 1};g.Lc=function(){};g.Gb=function(){return this.a.G}; -g.oc=function(){this.a.G=0};g.Nb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Sb=function(){return this.a.$a};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.na&65280};g.Kc=function(a){this.a.na=a|255};g.Tb=function(){return Na(this.a)};g.zc=function(a){ob(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.ub=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +g.oc=function(){this.a.G=0};g.Nb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Sb=function(){return this.a.$a};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.oa&65280};g.Kc=function(a){this.a.oa=a|255};g.Tb=function(){return Na(this.a)};g.zc=function(a){ob(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.ub=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.la=0}; var K={},J=(K[62592]=[null,null,I.prototype.cc,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.ac,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.bc,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.$b,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Lb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Jb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Kb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Ib,I.prototype.qc,"KDSAR"],K[62798]=[null,null, I.prototype.Rb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Mb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Ob,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Pb,I.prototype.ub,"MMR1"],K[65406]=[null,null,I.prototype.Qb,I.prototype.ub,"MMR2"],K[65408]=[null,null,I.prototype.ic,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.gc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.hc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.fc,I.prototype.Mc,"UDSAR"], K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Ub,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Xb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, @@ -730,40 +730,40 @@ K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[626 J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),vb(this,rb?wb:xb);else{this.a=Array(d>>2);for(a=0;a>1),this.a=new Int32Array(this.b,0,d>>2),vb(this,rb?wb:xb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.l);var 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},da: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.ha=!0},F:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.tb(a,b,c)},fa:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},P:function(a){a&1&&ib(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&ib(this.l);this.g.setUint16(a,b,!0);this.ha=!0},qa:function(a,b){a&1&&ib(this.l);this.o[a>>1]=b;this.ha= -!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&zb(a,Ab,!1),(a.m=c.m)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.w,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.tb=b[1]||a.w,a.pa=b[3]||a.B}function zb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.da,G.prototype.X,G.prototype.ra],Ab=[G.prototype.F,G.prototype.Z,G.prototype.R,G.prototype.fa]; -if(Ja)var xb=[G.prototype.D,G.prototype.Y,G.prototype.P,G.prototype.ea],wb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.qa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.da=this.Ua*this.Z;this.h.S=!1;this.h.qb=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.jb=this.nc.bind(this);D(this)}x(Db);var Eb=["power","reset"];g=Db.prototype; -g.ja=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;b>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.l);var 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},ea: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.ia=!0},F:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.tb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},P:function(a){a&1&&ib(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ia=!0},$:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b){a&1&&ib(this.l);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b){a&1&&ib(this.l);this.o[a>>1]=b;this.ia= +!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&zb(a,Ab,!1),(a.m=c.m)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.w,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.tb=b[1]||a.w,a.pa=b[3]||a.B}function zb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.ea,G.prototype.X,G.prototype.ra],Ab=[G.prototype.F,G.prototype.Z,G.prototype.R,G.prototype.ga]; +if(Ja)var xb=[G.prototype.D,G.prototype.Y,G.prototype.P,G.prototype.fa],wb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.qa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.ea=this.Ua*this.Z;this.h.S=!1;this.h.qb=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.fa=0;this.Ha=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.jb=this.nc.bind(this);D(this)}x(Db);var Eb=["power","reset"];g=Db.prototype; +g.ka=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;ba.W/a.da&&(b=1),a.Z=b,b=a.Ua*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.R);a.R=0;a.P=ka();a.X=0;Lb(a)}function jb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} +c,!0;case "setSpeed":return this.v[b]=c,c.onclick=function(){Jb(d,d.Z<<1)},c.textContent=this.ea.toFixed(2)+"Mhz",!0}return!1};g.da=function(){var a=this.v.speed;a&&(a.textContent=this.h.S&&this.W?this.W.toFixed(2)+"Mhz":"Stopped")};function Kb(a,b,c){a.$+=b;c&&(a.Y=a.a=0)}function Lb(a,b){var c=1;b&&1a.W/a.ea&&(b=1),a.Z=b,b=a.Ua*a.Z,a.ea!=b)){a.ea=b;b=a.ea.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.R);a.R=0;a.P=ka();a.X=0;Lb(a)}function jb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} g.nc=function(){if(this.h.S){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.hb&&(this.P+=a,this.P>this.Ga&&(this.P=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.R+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= -!1;this.Ba=this.Ba+this.eb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.pa,n=!0);0<=this.qa&&this.qa<=Mb(this)&&(this.pa=this.qa=-1,Hb(this),F(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.ra-=f;if(0>=this.ra){this.ra+=this.Ja;15<=++this.ib&&(this.A&&this.A.oa(),this.ib=0);break}}while(this.h.S)}catch(p){F(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.jb;this.X=ka();d=this.hb;this.xa&&(d=Math.round(d* -this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.P)this.W=Math.round(this.R/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.P-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Ib(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.M(a.toString()+" busy");else{Jb(a);a.h.S=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.A&&a.A.start(a.P,Mb(a));setTimeout(a.jb,0)}}g.rb=function(){return 0}; +!1;this.Ba=this.Ba+this.eb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,n=!0);0<=this.qa&&this.qa<=Mb(this)&&(this.pa=this.qa=-1,Hb(this),F(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.ra-=f;if(0>=this.ra){this.ra+=this.Ja;15<=++this.ib&&(this.A&&this.A.da(),this.ib=0);break}}while(this.h.S)}catch(p){F(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.jb;this.X=ka();d=this.hb;this.xa&&(d=Math.round(d* +this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.P)this.W=Math.round(this.R/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.P-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Ib(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.M(a.toString()+" busy");else{Jb(a);a.h.S=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.A&&a.A.start(a.P,Mb(a));setTimeout(a.jb,0)}}g.rb=function(){return 0}; function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Kb(a,a.R);a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a))}a.h.complete=void 0} function Nb(a){this.Cb=+a.model||1170;this.Eb=a.resetAddr||0;Db.call(this,a,6666667);this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Eb];this.sa=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.w=0;this.Bb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.ob=0;this.fa=-1;Pb(this);this.h.complete=this.h.xb=!1}x(Nb,Db);g=Nb.prototype;g.reset=function(){this.h.S&&F(this);Pb(this);Gb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.na=255;a.G=0;a.$a=0;a.B=0;a.la=0;a.Za=0;a.ma=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&mb(a)}function mb(a){a.Na?(a.V=65536,a.J=a.Ab,a.N=a.nb,a.kb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.V=0,a.J=a.zb,a.N=a.kc,a.kb=a.Rc,Va(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.l));return a.data()}; -g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,lb:c<<5&224,sb:d,Qa:e})}a.j|=2}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.ob=0;this.ga=-1;Pb(this);this.h.complete=this.h.xb=!1}x(Nb,Db);g=Nb.prototype;g.reset=function(){this.h.S&&F(this);Pb(this);Gb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Pb(a){a.oa=255;a.G=0;a.$a=0;a.B=0;a.ma=0;a.Za=0;a.na=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&mb(a)}function mb(a){a.Na?(a.V=65536,a.J=a.Ab,a.N=a.nb,a.kb=a.Sc,Va(a.l,a.na&16?22:18)):(a.V=0,a.J=a.zb,a.N=a.kc,a.kb=a.Rc,Va(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,lb:c<<5&224,sb:d,Qa:e})}a.j|=2}function Na(a){return a.u=a.u&63728|a.ja()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} function ob(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.sa.length;0<=--c;){var d=a.f[c];a.f[c]=a.sa[c];a.sa[c]=d}a.w=b>>14&3;c=a.u>>14&3;a.w!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.w]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b){var c=!1;0>a.fa?a.fa=Na(a):a.w||(b=4,c=!0);a.B&57344||(a.la=63222,a.Za=b);a.w=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);ob(a,e&-12289|a.fa>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.fa);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.fa=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;ob(a,c);a.j&=-17} -function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.Bb[a.w]||(d&=7);e=a.C[a.w][d];f=(a.O[a.w][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.Fb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; -default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.w][d]=e;if(4194170!==f||a.w)a.Da=a.w,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),H(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.G|=4,a.f[6]=4,H(a,4)):(a.G|=8,a.j|=64));return e}g.zb=function(a,b,c){return Xb(this,a,b,c)};g.Ab=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return cb(this.l,a)};g.nb=function(a){return cb(this.l,Wb(this,a,2))}; +function H(a,b){var c=!1;0>a.ga?a.ga=Na(a):a.w||(b=4,c=!0);a.B&57344||(a.ma=63222,a.Za=b);a.w=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);ob(a,e&-12289|a.ga>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.ga);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ga=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;ob(a,c);a.j&=-17} +function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.na&a.Bb[a.w]||(d&=7);e=a.C[a.w][d];f=(a.O[a.w][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Fb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; +default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.w][d]=e;if(4194170!==f||a.w)a.Da=a.w,a.Ea=d;h&&(h&57344&&(0<=a.ga&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),H(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; +case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.G|=4,a.f[6]=4,H(a,4)):(a.G|=8,a.j|=64));return e}g.zb=function(a,b,c){return Xb(this,a,b,c)};g.Ab=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return cb(this.l,a)};g.nb=function(a){return cb(this.l,Wb(this,a,2))}; g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.w=a.u>>12&3,c=a.N(d|c&a.V),a.w=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} -function Zb(a,b,c,d){a.B&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.u>>12&3,e=Wb(a,e|c&65536,4),a.w=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} +function Zb(a,b,c,d){a.B&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.u>>12&3,e=Wb(a,e|c&65536,4),a.w=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} g.rb=function(a){this.h.complete=!0;this.h.xb=!1;this.h.qb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168):this.j&64?H(this,4):this.j&16&&H(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].lb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?H(this,a.sb):H(this,160))}else this.j&1&&this.j++;this.B&57344||(this.la=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>1|b<<16;P(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function kc(a,b){a=b&~a;N(this,a);return a}function lc(a,b){a=b&~a;N(this,a<<8);return a}function mc(a,b){a|=b;N(this,a);return a}function nc(a,b){a|=b;N(this,a<<8);return a}function oc(a,b){a=~b|65536;O(this,a);return a&65535} function pc(a,b){a=~b|256;O(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;O(this,a,a&b&32768);return a&65535} function vc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function yc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} @@ -775,32 +775,32 @@ function Pc(){this.a-=5}function W(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a& var Tc=[function(a){Uc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,dc(this,a,b));this.a=c-Mc[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),kc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),ec);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){Vc[a>>8&15].call(this,a)},function(a){Wc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);N(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ (this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),lc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},X],Uc=[function(a){Xc[a>> -4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> +4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ja()==!(this.g&32768))},function(a){U(this,a,!this.ja()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> 6&3].call(this,a)},X,X],Yc=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){T(this,a,0,uc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.nb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)H(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, -Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,H(this,4)):F(this);this.a-=7},function(){this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V,function(){this.o=0;this.a-= -5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768?2:0)},function(a){U(this, -a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rc);this.a-=this.c? -9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b? -2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; -function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)H(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, +Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,H(this,4)):F(this);this.a-=7},function(){this.j&4||this.A.da();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V, +function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ja())},function(a){U(this,a,this.ja())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768? +2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, +a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c? +9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; +function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ka=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; id.prototype.ba=function(){return!0}; function jd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].tb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.w=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;kb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Fc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Ec,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Uc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Tc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;ba[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; function zd(a,b){if(ma("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.1"};d.url=a.P;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&F(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n).*?(<\/xsl:variable>)/,"$1pdp11$2") function Kd(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,u=/( [a-z]+=)(['"])(.*?)\2/g;p=u.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],h);Kd(a,b,c)}})}else c(a,null)} function Ld(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ha(a))}function f(a){e("Error: "+a);n&&(--Hd||xa(!0));n=!1}var h,l,n=!0;Hd++;Fa[a]={};try{if(h=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],ga=document.createElement("style");ga.type="text/css";ga.styleSheet?ga.styleSheet.cssText=p:ga.appendChild(document.createTextNode(p));u.appendChild(ga)}c|| -(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Id(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Hd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Hd||xa(!0)):f("invalid machine element: "+ +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Id(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Hd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Hd||xa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,p):Jd(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(Gc){f(Gc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Ld(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From 8315774b1db3131b334049a3c3894c8b5a487257 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 11 Oct 2016 16:08:32 -0700 Subject: [PATCH 17/36] Implemented a fallback fix for UNIBUS addresses where a byte write is expected to modify the entire word --- modules/pdp11/lib/bus.js | 10 +++++++--- modules/pdp11/lib/device.js | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index cc8e7a29a..ea55b9eff 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -307,7 +307,7 @@ BusPDP11.IOController = { var afn = bus.aIOHandlers[off]; if (afn) { /* - * If a writeByte() handler exists, call it; we're done + * If a writeByte() handler exists, call it; we're done. */ if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addr); @@ -316,9 +316,13 @@ BusPDP11.IOController = { /* * If a writeWord() handler exists, call the readWord() handler first to get the original data, * then call writeWord() with the new data pre-inserted in the original data. + * + * WARNING: Whenever we call readWord() under these circumstances, we zero the address parameter, + * so that the handler can distinguish this case. Thus, if we're dealing with a special register + * where a byte write operation modifies the entire register, the handler can simply return zero. */ else if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { - w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](addr) : 0; + w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; if (!(addr & 0x1)) { afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addr); fWrite = true; @@ -337,7 +341,7 @@ BusPDP11.IOController = { if (afn) { if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { addr &= ~0x1; - w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](addr) : 0; + w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr); fWrite = true; } diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 4075c19e7..8e2c4d877 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -918,6 +918,7 @@ DevicePDP11.prototype.writeMB = function(data, addr) */ DevicePDP11.prototype.readPIR = function(addr) { + if (!addr) return 0; // the caller is preparing to write the low or high byte; these are the bits to return for the other byte return this.cpu.getPIR(); }; @@ -942,6 +943,7 @@ DevicePDP11.prototype.writePIR = function(data, addr) */ DevicePDP11.prototype.readSL = function(addr) { + if (!addr) return 0; // the caller is preparing to write the low or high byte; these are the bits to return for the other byte return this.cpu.getSL(); }; From 58d358b51e09c5ea40631bacb9601274d11a70e9 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Wed, 12 Oct 2016 16:40:47 -0700 Subject: [PATCH 18/36] Switching to new interrupt triggers --- modules/pdp11/lib/bus.js | 96 ++++--- modules/pdp11/lib/cpustate.js | 219 +++++++++++----- modules/pdp11/lib/defines.js | 8 +- modules/pdp11/lib/device.js | 6 +- modules/pdp11/lib/serialport.js | 24 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 385 ++++++++++++++--------------- versions/pdpjs/1.30.1/pdp11.js | 260 +++++++++---------- 7 files changed, 539 insertions(+), 459 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index ea55b9eff..aff9285a7 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -199,46 +199,34 @@ BusPDP11.IOHANDLER = { /* * These are our custom IOController functions for all IOPAGE accesses. They look up the IOPAGE * offset in the aIOHandlers table, and if an entry exists, they use the appropriate IOHANDLER indexes - * (above) to locate the appropriate read/write handlers. + * (above) to locate the registered read/write handlers. If no handler is found, then unknownAccess() + * is called, triggering a trap -- unless traps are disabled because direct access was requested + * (eg, by the Debugger). * - * Note that we try to have reasonable fallbacks for byte reads when only word read handlers exist, - * and word reads if only byte handlers exist. Ditto for writes. These fallbacks may not always be - * appropriate; for example, when a byte write falls back to a word write, the address must be read - * first, and depending on the underlying I/O device, that may or may not have side-effects. It's really - * up to the device to know whether that matters, and provide all the necessary handlers if it does. + * Handlers receive the original IOPAGE address that was used, although in most cases, it's ignored, + * because most handlers usually handle only one address. Only handlers used for a range of addresses + * must pay attention to it. + * + * Note that these functions include fallbacks for byte reads when only word read handlers exist (by + * masking or shifting the result) and for word reads if only byte handlers exist (by combining bytes). + * Fallbacks for writes exist, too, but they are slightly more complicated, because a byte write using + * a word write handler requires reading the word first, and then updating the appropriate byte within + * that word. + * + * Those fallbacks may not always be appropriate; for example, byte writes to some device registers + * must be zero-extended to update the entire word. For those cases, the fallback's "preliminary" read + * is issued with a zero address so that the handler can distinguish a normal read from one of these + * preliminary reads, and return an appropriate value for the update (ie, zero). + * + * If none of these fallback behaviors are appropriate, the device has a simple recourse: register + * handlers for all possible addresses and sizes. * * Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works - * just fine by registering WORD handlers for the appropriate ODD addresses. What is unclear, however, - * is what is exactly supposed to happen when the CPU reads or writes a BYTE from an ODD IOPAGE address; - * it seems clear that our built-in fallbacks are NOT correct in all cases. + * just fine by registering WORD handlers for the appropriate ODD addresses. For BYTE accesses, it + * depends. For CPU register addresses, addIOHandlers() installs special byte handlers that perform + * either a simple word read or write. Other addresses must be handled on case-by-case basis. * - * For example, let's imagine that only read/write WORD handlers have been registered for ODD address - * 177701 (ie, general register R1, set 0). If a readByte(177701) request is made, we would fallback to - * reading the word at 177700 and returning the high byte, but that would fetch the contents of general - * register R0 instead of R1, which is clearly wrong. - * - * One solution is for the caller to register both BYTE and WORD handlers for ODD addresses, making - * the caller responsible for the defining the correct behavior in all cases. However, that's more work - * for the caller, and we're just punting the problem instead of solving it. - * - * Another solution is for addIOHandlers() to detect the ODD address case, and install custom fallback - * handlers for read and write BYTE accesses. In the above example, the custom read BYTE handler could - * invoke the read WORD handler and mask the result with 0xff, and the custom write BYTE handler could - * first call the read WORD handler, insert the new data into the low byte of the result, and then - * call the write WORD handler. - * - * However, that would produce inconsistent results between EVEN and ODD addresses in the register - * address range (0o177700 through 0o177717), so I'm assuming that the correct solution is to install - * alternate fallback BYTE handlers for ALL addresses in that range. The alternate read BYTE handler will - * mask its result with 0xff, and the alternate write BYTE handler will store the (zero-extended) byte to - * the entire corresponding register. - * - * One of things that gives me pause about this solution is that it differs from the behavior of a MOVB - * instruction when the destination is a general register, because MOVB always sign-extends the source byte - * to a word; it does NOT zero-extend. So it seems to strange to have a different MOVB behavior when the - * destination register is specified using an IOPAGE address. But, maybe that was by design. - * - * TODO: Another small potential improvement would be for addIOHandlers() to predefine fall-backs for all + * TODO: Another small potential improvement would be for addIOHandlers() to install fallbacks for ALL * missing handlers, in both the ODD and EVEN cases, so there's never a need to check each function index * before calling it. However, since there's no avoiding checking aIOHandlers[off] (unless we FULLY populate * the aIOHandlers array), and since these I/O accesses should be pretty infrequent relative to all other @@ -336,6 +324,10 @@ BusPDP11.IOController = { * If no handler existed, and this address was odd, then perhaps a handler exists for the even address; * if so, call the readWord() handler first to get the original data, then call writeWord() with the new * data pre-inserted in (the high byte of) the original data. + * + * WARNING: Whenever we call readWord() under these circumstances, we zero the address parameter, + * so that the handler can distinguish this case. Thus, if we're dealing with a special register + * where a byte write operation modifies the entire register, the handler can simply return zero. */ afn = bus.aIOHandlers[off & ~0x1]; if (afn) { @@ -484,7 +476,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) /** * getControllerBuffer(addr) * - * Our Bus component also acts as custom memory controller, so it must also provide this function. + * Our Bus component also acts as custom memory controller for the IOPAGE, so it must also provide this function. * * @this {BusPDP11} * @param {number} addr @@ -493,7 +485,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) BusPDP11.prototype.getControllerBuffer = function(addr) { /* - * No buffer is required; all accesses go to a registered I/O handler or the bit-bucket. + * No buffer is required for the IOPAGE; all accesses go to registered I/O handlers or to unknownAccess(). */ return [null, 0]; }; @@ -501,7 +493,7 @@ BusPDP11.prototype.getControllerBuffer = function(addr) /** * getControllerAccess() * - * Our Bus component also acts as custom memory controller, so it must also provide this function. + * Our Bus component also acts as custom memory controller for the IOPAGE, so it must also provide this function. * * @this {BusPDP11} * @return {Array.} @@ -511,6 +503,17 @@ BusPDP11.prototype.getControllerAccess = function() return this.afnIOPage; }; +/** + * getWidth() + * + * @this {BusPDP11} + * @return {number} + */ +BusPDP11.prototype.getWidth = function() +{ + return this.nBusWidth; +}; + /** * reset() * @@ -530,9 +533,7 @@ BusPDP11.prototype.reset = function() * unknownAccess(addr, data, byteFlag) * * This is our default I/O handler, called whenever there's an IOPAGE access without a corresponding entry - * in aIOHandlers; in the interim, our Device component will override this default handler with its own function - * by calling addIODefaultHandlers(), until the Device component has been completely rewritten to install I/O - * handlers for all supported I/O addresses. + * in aIOHandlers. * * @this {BusPDP11} * @param {number} addr (ie, an IOPAGE address) @@ -757,17 +758,6 @@ BusPDP11.prototype.scanMemory = function(info, addr, size) return info; }; -/** - * getWidth() - * - * @this {BusPDP11} - * @return {number} - */ -BusPDP11.prototype.getWidth = function() -{ - return this.nBusWidth; -}; - /** * removeMemory(addr, size) * diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 2f37706c9..1d07478c5 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -83,15 +83,37 @@ function CPUStatePDP11(parmsCPU) Component.subclass(CPUStatePDP11, CPUPDP11); +/* + * Overview of Device Interrupt Support + * + * Originally, the CPU maintained a queue of requested interrupts. Entries in this queue recorded a device's + * priority, vector, and delay (ie, a number of instructions to process before issuing the interrupt). This queue + * would constantly grow and shrink as requests were issued and dispatched, and as long as there was something + * in the queue, the CPU was constantly examining it. + * + * Now we are trying something simpler. First, the CPU offers timer services to any device that wants a callback + * after a specified delay, which are much more efficient than requiring the CPU to dive into an interrupt queue and + * look for (and decrement) delay counts on every instruction. + * + * Second, when a device decides it's time to interrupt (either at the end of some operation or when its delay timer + * has fired), it will simply request the interrupt, and CPU priority permitting, the interrupt will be dispatched. + * If CPU priority is NOT permitting, then the interrupt will remain pending until the priority drops. This means + * that the CPU need not check for any pending interrupts until/unless the CPU priority changes. + * + * All this will be managed with "triggers". Every device that wants to interrupt must register via addTrigger(). + * This will add a Trigger object to an array, and each object will contain the (self) assigned vector, the priority, + * the interrupt request status, and a next pointer. + */ + /** * @typedef {{ - * delay: number, - * priority: number, * vector: number, - * callback: (function()|null|undefined) - * }} InterruptEvent + * priority: number, + * request: number, + * next: (Trigger|null) + * }} Trigger */ -var InterruptEvent; +var Trigger; /** * initProcessor() @@ -101,7 +123,15 @@ var InterruptEvent; CPUStatePDP11.prototype.initProcessor = function() { this.decode = PDP11.op1170.bind(this); + + /** @type {Array.} */ + this.aTriggers = []; + + /** @type {Trigger|null} */ + this.triggerNext = null; + this.initRegs(); + this.flags.complete = this.flags.debugCheck = false; }; @@ -169,7 +199,7 @@ CPUStatePDP11.prototype.initRegs = function() this.regMB = 0; /* - * opFlags contains various triggers that stepCPU() needs to be aware of + * opFlags contains various conditions that stepCPU() needs to be aware of */ this.opFlags = 0; @@ -208,8 +238,6 @@ CPUStatePDP11.prototype.resetRegs = function() this.mmuMask = 0x3ffff; this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; - /** @type {Array.} */ - this.interruptQueue = []; this.opFlags |= PDP11.OPFLAG.INTQ; if (this.bus) this.setMemoryAccess(); @@ -562,77 +590,131 @@ CPUStatePDP11.prototype.setSP = function(addr) }; /** - * interrupt(delay, priority, vector, callback) - * - * Interrupts are stored in a queue in delay order with the delay expressed as - * a difference. For example if the delays were 0, 1, 0 then the first entry - * is active and both the second and third are waiting for one more instruction - * execution to become active. + * addTrigger(vector, priority) * * @this {CPUStatePDP11} - * @param {number} delay - * @param {number} priority * @param {number} vector - * @param {function()} [callback] + * @param {number} priority + * @return {Trigger} */ -CPUStatePDP11.prototype.interrupt = function(delay, priority, vector, callback) +CPUStatePDP11.prototype.addTrigger = function(vector, priority) { - var i = this.interruptQueue.length; - while (i-- > 0) { - if (this.interruptQueue[i].vector === vector) { - if (i > 0) { - this.interruptQueue[i - 1].delay += this.interruptQueue[i].delay; - } - this.interruptQueue.splice(i, 1); - break; - } - } - if (delay >= 0) { - i = this.interruptQueue.length; // queue in delay 'difference' order - while (i-- > 0) { - if (this.interruptQueue[i].delay > delay) { - this.interruptQueue[i].delay -= delay; - break; - } - delay -= this.interruptQueue[i].delay; - } - /* - * NOTE regarding a Google Closure Compiler "bug": if an InterruptEvent is inserted into the - * interruptQueue with the named properties below, they will never be seen by the rest of the - * code, because the compiler renames all other property references EXCEPT these. - * - * this.interruptQueue.splice(i + 1, 0, { - * "delay": delay, - * "priority": (priority << 5) & 0xe0, - * "vector": vector, - * "callback": callback - * }); - * - * Perhaps if the inlined object had been explicitly @typed, that wouldn't have happened, but - * I'm playing it safe now: I've taken the object out-of-line, removed the quoted property names, - * and explicitly typed it. The compiler re-inlines the object with correctly renamed properties. - */ - /** @type {InterruptEvent} */ - var interruptEvent = { - delay: delay, - priority: (priority << 5) & 0xe0, - vector: vector, - callback: callback - }; - this.interruptQueue.splice(i + 1, 0, interruptEvent); - } - this.opFlags |= PDP11.OPFLAG.INTQ; + var trigger = {vector: vector, priority: priority, request: -1, next: null}; + this.aTriggers.push(trigger); + return trigger; }; /** - * checkInterruptQueue() + * checkTriggers() * * @this {CPUStatePDP11} */ -CPUStatePDP11.prototype.checkInterruptQueue = function() +CPUStatePDP11.prototype.checkTriggers = function() +{ + if (this.triggerNext && this.setTrigger(this.triggerNext)) { + this.removeTrigger(this.triggerNext); + } +}; + +/** + * insertTrigger(trigger) + * + * @this {CPUStatePDP11} + * @param {Trigger} trigger + */ +CPUStatePDP11.prototype.insertTrigger = function(trigger) +{ + if (trigger != this.triggerNext) { + var triggerPrev = this.triggerNext; + if (!triggerPrev || triggerPrev.priority <= trigger.priority) { + trigger.next = triggerPrev; + this.triggerNext = trigger; + } else { + do { + var triggerNext = triggerPrev.next; + if (!triggerNext || triggerNext.priority <= trigger.priority) { + trigger.next = triggerNext; + triggerPrev.next = trigger; + break; + } + triggerPrev = triggerNext; + } while (true); + } + } +}; + +/** + * removeTrigger(trigger) + * + * @this {CPUStatePDP11} + * @param {Trigger} trigger + */ +CPUStatePDP11.prototype.removeTrigger = function(trigger) +{ + var triggerPrev = this.triggerNext; + if (triggerPrev == trigger) { + this.triggerNext = trigger.next; + } else { + do { + var triggerNext = triggerPrev.next; + if (triggerNext == trigger) { + triggerPrev.next = triggerNext.next; + break; + } + triggerPrev = triggerNext; + } while (true); + } +}; + +/** + * setTrigger(trigger) + * + * @this {CPUStatePDP11} + * @param {Trigger|null} trigger + * @return {boolean} (true if interrupt dispatched, false if not) + */ +CPUStatePDP11.prototype.setTrigger = function(trigger) +{ + if (!this.dispatchInterrupt(trigger.vector, trigger.priority)) { + this.insertTrigger(trigger); + return false; + } + return true; +}; + +/** + * dispatchInterrupt(vector, priority) + * + * @this {CPUStatePDP11} + * @param {number} vector + * @param {number} priority + * @return {boolean} (true if dispatched, false if not) + */ +CPUStatePDP11.prototype.dispatchInterrupt = function(vector, priority) +{ + var priorityCPU = (this.regPSW & PDP11.PSW.PRI) >> PDP11.PSW.SHIFT.PRI; + if (priority > priorityCPU) { + if (this.opFlags & PDP11.OPFLAG.WAIT) { + this.advancePC(2); + this.opFlags &= ~PDP11.OPFLAG.WAIT; + } + this.trap(vector, PDP11.REASON.INTERRUPT); + return true; + } + return false; +}; + +/** + * checkInterrupts() + * + * @this {CPUStatePDP11} + */ +CPUStatePDP11.prototype.checkInterrupts = function() { if (this.opFlags & PDP11.OPFLAG.INTQ) { this.opFlags &= ~PDP11.OPFLAG.INTQ; + this.checkTriggers(); + /* var interruptEvent = null; var savePSW = this.regPIR & 0xe0; for (var i = this.interruptQueue.length; --i >= 0;) { @@ -666,6 +748,7 @@ CPUStatePDP11.prototype.checkInterruptQueue = function() this.trap(interruptEvent.vector, PDP11.REASON.INTERRUPT); } } + */ } else if (this.opFlags & PDP11.OPFLAG.INTQ_SPL) { /* @@ -735,7 +818,7 @@ CPUStatePDP11.prototype.setPSW = function(newPSW) this.regsGen[6] = this.regsAltStack[this.mmuMode]; } /* - * Trigger a call to checkInterruptQueue() + * Trigger a call to checkInterrupts() */ this.opFlags |= PDP11.OPFLAG.INTQ; this.regPSW = newPSW; @@ -1017,7 +1100,7 @@ CPUStatePDP11.prototype.trap = function(vector, reason) } } - throw vector; + if (reason != PDP11.REASON.INTERRUPT) throw vector; }; /** @@ -1891,7 +1974,7 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles) * interrupting the natural flow of instructions whenever the Debugger is stepping through code. */ if ((this.opFlags & (PDP11.OPFLAG.INTQ_SPL | PDP11.OPFLAG.INTQ | PDP11.OPFLAG.WAIT)) /*&& nMinCycles*/) { - this.checkInterruptQueue(); + this.checkInterrupts(); } } diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index cf4a188f0..e1581ea45 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -506,7 +506,6 @@ var PDP11 = { PRI: 4, RVEC: 0o60, XVEC: 0o64, - DELAY: 40, RCSR: { // 177560 RE: 0x0001, // Reader Enable (W/O) TODO: Determine if we really need to exclude this write-only bit from RMASK DTR: 0x0002, // Data Terminal Ready (R/W) @@ -529,7 +528,8 @@ var PDP11 = { PARITY: 0x1000, // Received Data Parity (R/O) FE: 0x2000, // Framing Error (R/O) OE: 0x4000, // Overrun Error (R/O) - ERROR: 0x8000 // Error (R/O) + ERROR: 0x8000, // Error (R/O) + DELAY: 1 }, XCSR: { // 177564 BREAK: 0x0001, // BREAK (R/W) @@ -538,11 +538,11 @@ var PDP11 = { READY: 0x0080, // Transmitter Ready (R/O) RMASK: 0x00C5, WMASK: 0x0045, - DELAY: 8 + DELAY: 1 }, XBUF: { // 177566 DATA: 0x00FF, // Transmitted Data (W/O) TODO: Determine why pdp11.js effectively defined this as 0x7F - DELAY: 100 + DELAY: 1 } }, KW11: { // KW11-L Line Time Clock diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 8e2c4d877..bc8a5e0d7 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -125,10 +125,12 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.dbg = dbg; var device = this; - this.kw11.timer = this.cpu.addTimer(function() { + this.kw11.timer = cpu.addTimer(function() { device.kw11_interrupt(); }); + this.kw11.trigger = cpu.addTrigger(PDP11.KW11.VEC, PDP11.KW11.PRI); + bus.addIOTable(this, DevicePDP11.UNIBUS_IOTABLE); bus.addResetHandler(this.reset.bind(this)); @@ -1008,7 +1010,7 @@ DevicePDP11.prototype.kw11_interrupt = function() { this.kw11.lks |= PDP11.KW11.LKS.MON; if (this.kw11.lks & PDP11.KW11.LKS.IE) { - this.cpu.interrupt(PDP11.KW11.DELAY, PDP11.KW11.PRI, PDP11.KW11.VEC); + this.cpu.setTrigger(this.kw11.trigger); this.cpu.setTimer(this.kw11.timer, 1000/60); } }; diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index cb43b4b04..98ae227dd 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -260,22 +260,28 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) var serial = this; - this.timerReceiveData = this.cpu.addTimer(function() { + this.triggerReceiveInterrupt = this.cpu.addTrigger(PDP11.DL11.RVEC, PDP11.DL11.PRI); + + this.timerReceiveInterrupt = this.cpu.addTimer(function() { if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) { if (serial.abReceive.length) { serial.rbuf = serial.abReceive.shift(); serial.rcsr |= PDP11.DL11.RCSR.RD; if (serial.rcsr & PDP11.DL11.RCSR.RIE) { - serial.cpu.interrupt(PDP11.DL11.DELAY, PDP11.DL11.PRI, PDP11.DL11.RVEC); + serial.cpu.setTrigger(serial.triggerReceiveInterrupt); } } } }); - this.doneTransmitInterrupt = function() { + this.triggerTransmitInterrupt = this.cpu.addTrigger(PDP11.DL11.XVEC, PDP11.DL11.PRI); + + this.timerTransmitInterrupt = this.cpu.addTimer(function() { serial.xcsr |= PDP11.DL11.XCSR.READY; - return !!(serial.xcsr & PDP11.DL11.XCSR.TIE); - }; + if (serial.xcsr & PDP11.DL11.XCSR.TIE) { + serial.cpu.setTrigger(serial.triggerTransmitInterrupt); + } + }); bus.addIOTable(this, SerialPortPDP11.UNIBUS_IOTABLE); this.setReady(); @@ -465,7 +471,7 @@ SerialPortPDP11.prototype.receiveData = function(data) else { this.abReceive = this.abReceive.concat(data); } - this.cpu.setTimer(this.timerReceiveData, 50); + this.cpu.setTimer(this.timerReceiveInterrupt, PDP11.DL11.RBUF.DELAY); return true; // for now, return true regardless, since we're buffering everything anyway }; @@ -568,7 +574,7 @@ SerialPortPDP11.prototype.readRBUF = function(addr) { this.rcsr &= ~PDP11.DL11.RCSR.RD; if (this.abReceive.length > 0) { - this.cpu.setTimer(this.timerReceiveData, 50); + this.cpu.setTimer(this.timerReceiveInterrupt, PDP11.DL11.RBUF.DELAY); } return this.rbuf; }; @@ -609,7 +615,7 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr) * If the device is READY, and IE is transitioning on, then request an interrupt. */ if ((this.xcsr & (PDP11.DL11.XCSR.READY | PDP11.DL11.XCSR.TIE)) == PDP11.DL11.XCSR.READY && (data & PDP11.DL11.XCSR.TIE)) { - this.cpu.interrupt(PDP11.DL11.XCSR.DELAY, PDP11.DL11.PRI, PDP11.DL11.XVEC, this.doneTransmitInterrupt); + this.cpu.setTimer(this.timerTransmitInterrupt, PDP11.DL11.XCSR.DELAY); } this.xcsr = (this.xcsr & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK); }; @@ -639,7 +645,7 @@ SerialPortPDP11.prototype.writeXBUF = function(data, addr) if (data) { this.transmitByte(data); this.xcsr &= ~PDP11.DL11.XCSR.READY; - this.cpu.interrupt(PDP11.DL11.XBUF.DELAY, PDP11.DL11.PRI, PDP11.DL11.XVEC, this.doneTransmitInterrupt); + this.cpu.setTimer(this.timerTransmitInterrupt, PDP11.DL11.XBUF.DELAY); } }; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 054b14111..001c2de09 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -692,211 +692,210 @@ typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encod function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; +function Ma(a){if(Ja)try{for(var b=0;bb?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,fb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.F=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Hb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Lb(a,b){if(b!=a.C){var c;a.C&&(c=(1<>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ea[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ea[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ea[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Hb(a,b){var c=-1,d=this.controller;(a=d.Ea[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ea[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Lb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Xb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Ub)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.B.push(b)} -function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Fb:-1}}y(K);h=K.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=gc(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(hc(e.b,0,6,64),ic(e.b,e.f.Fb,1E3/60))});Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)}; -h.xc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.ed=function(a){this.f.Ha=a;a&64&&ic(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.zc=function(){var a=this.b;return a.G&62337|a.sa<<5|a.ta<<1};h.gd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,jc(b))}kc(this)};h.Ac=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Bc=function(){return this.b.Cb};h.Cc=function(){return this.b.Ka}; -h.hd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),jc(b));kc(this)};function kc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Oc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Mc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Nc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295}; -h.Lc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.wc=function(a){return this.b.R[0][a>>1&7]};h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.uc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.vc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.tc=function(a){return this.b.oa[0][(a>>1&7)+8]}; -h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Uc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Sc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Tc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Rc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295}; -h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Fc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Ic=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a}; -h.Gc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a};h.Hc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.sc=function(a){return this.b.$b[a-65504>>1]};h.$c=function(a,b){this.b.$b[b-65504>>1]=a};h.Wb=function(a){return 65520==a?61183:0};h.dc=function(){};h.Qc=function(){return 1};h.wd=function(){};h.rc=function(){return this.b.Z}; -h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.D|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)}; -h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0}; -var M={},L=(M[62592]=[null,null,K.prototype.Oc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Mc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Nc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Lc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.wc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.uc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.vc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.tc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, -K.prototype.Cc,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.xc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.zc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.Ac,K.prototype.cc,"MMR1"],M[65406]=[null,null,K.prototype.Bc,K.prototype.cc,"MMR2"],M[65408]=[null,null,K.prototype.Uc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Sc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Tc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Rc,K.prototype.xd,"UDSAR"], -M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Fc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ic,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, -K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Gc,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Hc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.sc,K.prototype.$c, -"CTRL",1170],M[65520]=[null,null,K.prototype.Wb,K.prototype.dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.Wb,K.prototype.dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Qc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.rc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.yc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Dc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Pc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Ec,K.prototype.kd,"PSW"], +function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Ub(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Eb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Sb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} +function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Db:-1}}y(K);h=K.prototype; +h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Db=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Db,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Db,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.D&62337|a.sa<<5|a.ta<<1}; +h.gd=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.gb=4194303,b.va=3915776):(b.gb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} +h.Mc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.uc=function(a){return this.b.R[0][a>>1&7]}; +h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Sc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295}; +h.Qc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Ya=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.bb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; +h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.Za=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; +h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Tb=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Wb};h.fd=function(a,b){b&1||(a&=255);this.b.Wb=a}; +h.Bc=function(a){return a?this.b.Xb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Xb=a;b.F|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; +var M={},L=(M[62592]=[null,null,K.prototype.Mc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Kc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Lc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Jc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.uc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.sc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.tc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.rc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, +K.prototype.Ac,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.vc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.xc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.yc,K.prototype.$b,"MMR1"],M[65406]=[null,null,K.prototype.zc,K.prototype.$b,"MMR2"],M[65408]=[null,null,K.prototype.Sc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Qc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Rc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Pc,K.prototype.xd,"UDSAR"], +M[65472]=[null,null,K.prototype.Ya,K.prototype.bb,"R0SET0"],M[65473]=[null,null,K.prototype.Ya,K.prototype.bb,"R1SET0"],M[65474]=[null,null,K.prototype.Ya,K.prototype.bb,"R2SET0"],M[65475]=[null,null,K.prototype.Ya,K.prototype.bb,"R3SET0"],M[65476]=[null,null,K.prototype.Ya,K.prototype.bb,"R4SET0"],M[65477]=[null,null,K.prototype.Ya,K.prototype.bb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, +K.prototype.Za,K.prototype.cb,"R0SET1"],M[65481]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET1"],M[65482]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET1"],M[65483]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET1"],M[65484]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET1"],M[65485]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, +"CTRL",1170],M[65520]=[null,null,K.prototype.Tb,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Tb,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; -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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.M)&&c.fa(!0)}return this.zb(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.M)&&c.fa(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a, -1,d.F)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.F)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.F[a]},U:function(a,b){a=this.F[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.F[a]=b;this.Ga=!0},ma:function(a,b,c){this.F[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Jb(a,b,c){a.j=b;a.i=a.C=0;c&&((a.i=c.i)&&yc(a,xc,!1),(a.C=c.C)&&wc(a,xc,!1))}function Ac(a,b){b?--a.C||(a.ub=a.f?a.J:a.Gb,a.ec=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Xb=a.Ab)}function wc(a,b,c){c&&a.C||(a.ub=!a.f&&b[1]||a.J,a.ec=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.J,a.Hb=b[3]||a.H}function yc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Xb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)} -var Bc=[],vc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],xc=[I.prototype.S,I.prototype.la,I.prototype.da,I.prototype.ta];if(lb)var uc=[I.prototype.N,I.prototype.ka,I.prototype.ca,I.prototype.sa],tc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Ta]; -function Cc(a,b){r.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.ba=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Rb=this.Yc.bind(this);G(this)}y(Cc);var Dc=["power","reset"];h=Cc.prototype; -h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Jc(a)&&(a.Xa=a.Ya=-1,Gc(a),a.fa(),c=!0);c&&a.g(Jc(a)+" cycles: checksum="+k(a.jb))}} -h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.da/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.C&&a.C.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.ea=0;Mc(a);return d}function gc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)} -function Nc(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 gd(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]()))}} -h.Yc=function(){if(this.v.ba){this.ib>=this.Na&&Mc(this,!0);this.qa=0;this.Ea=ra();if(this.ea){var a=this.Ea-this.ea;a>this.qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;gd(this,c);this.qa+=c;this.V+=c;Lc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Qb&&(this.C&&this.C.aa(),this.Qb=0);break}}while(this.v.ba)}catch(e){this.fa();this.C&&this.C.stop(ra(), -Jc(this));kb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Rb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.Ma));var c=c-(this.ea-this.Ea),d=this.ea-this.U;d&&(this.da=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ha=0,Kc(this)));if(0>c||this.dac&&(this.U-=c),c=0;this.ib+=this.qa;this.ea+=c;a(b,c)}}}; -h.ab=function(a){if(jb(this))return!1;if(this.v.ba)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.ba=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.nb(!0),this.C.start(this.U,Jc(this)));setTimeout(this.Rb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Jc(this))}this.v.complete=a}; -function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.F=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()}; -h.restore=function(a){var b=a[1];this.ha=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;cb){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.D|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)} -function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.F=b>>14&3;c=a.L>>14&3;a.F!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.F]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))} -h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.F||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.F=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.D&=-17} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.F]||(d&=7);e=a.R[a.F][d];f=(a.oa[a.F][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.F][d]=e;if(4194170!==f||a.F)a.sa=a.F,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&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.S(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.S(e)|g;a.b-= -8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.F&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))}; -h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.F=a.L>>12&3,c=a.S(d|c&a.ca),a.F=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.F=a.L>>12&3,e=wd(a,e|c&65536,4),a.F=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)} -function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.bb=function(a){this.v.complete=!0;var b=this.v.ic=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.fa();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a} -function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535} -function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255} -function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535} -function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b} -function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5} -function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]} -var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)} -var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],xe= -[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this, -Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a, -0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.D&4||this.C.aa();this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e= -[se,function(){this.O=65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24, -2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-= -this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7== -this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.F=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef); -ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.F,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0}; -function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.F=[];return!0}h.Bb=function(a){if("number"==typeof a)this.F.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.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;hc(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Kc,W.prototype.qd,"RCSR"],nf[65394]=[null,null,W.prototype.Jc,W.prototype.pd,"RBUF"],nf[65396]=[null,null,W.prototype.Xc,W.prototype.Ed,"XCSR"],nf[65398]=[null,null,W.prototype.Wc,W.prototype.Dd,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){}; -function qf(a,b,c,d){if(c)if(b){0>a.B&&a.i.length&&(a.B=0);if(0>a.B||b!=a.i[a.B])a.i.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.i[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a} -function rf(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; +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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, +1,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Fa=!0},ma:function(a,b,c){this.D[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&Yb(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Eb,a.bc=a.f?a.H:a.Fb):--a.i||(a.tb=a.yb,a.Ub=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Eb=b[1]||a.I,a.Fb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Ub=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} +var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.N,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; +function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Cb=!1;this.v.eb=a.autoStart;this.v.Va=!1;this.ib=this.ka=0;this.jb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Pb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; +h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.ib))}} +h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ca/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.U);a.U=0;a.T=ra();a.ea=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c)} +function Oc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +h.Wc=function(){if(this.v.da){this.hb>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ea){var a=this.Da-this.ea;a>this.qb&&(this.T+=a,this.T>this.Da&&(this.T=this.Da))}try{do{var b=Oc(this,this.v.Va?1:this.La);try{this.ab(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.M-this.b;Pc(this,c);this.qa+=c;this.U+=c;Mc(this,0,!0);Jc(this,c);this.la-=c;if(0>=this.la){this.la+=this.La;15<=++this.Ob&&(this.B&&this.B.aa(),this.Ob=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(), +Kc(this));kb(this,e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Pb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ea-this.Da),d=this.ea-this.T;d&&(this.ca=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.cac&&(this.T-=c),c=0;this.hb+=this.qa;this.ea+=c;a(b,c)}}}; +h.$a=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Cb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.T,Kc(this)));setTimeout(this.Pb,0);return!0};h.ab=function(){return 0};h.fa=function(a){if(this.v.da){this.M-=this.b;this.b=0;Mc(this,this.U);this.U=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; +function id(a){this.Sb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=jd.bind(this);this.jc=[];this.V=null;this.O=65536;this.P=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.F=this.Wb=0;this.ma=-1;kd(this);this.v.complete=this.v.fc=!1}y(id,Dc);h=id.prototype;h.reset=function(){this.v.da&&this.fa();kd(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; +function kd(a){a.Ka=255;a.Z=0;a.Xb=0;a.D=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.gb=262143;a.va=253952;a.F|=2;a.w&&kc(a)}function kc(a){a.sb?(a.ba=65536,a.K=a.ic,a.N=a.Vb,a.Rb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.ba=0,a.K=a.hc,a.N=a.Tc,a.Rb=a.Bd,Lb(a.w,16))}h.Lb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; +h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c(a.L&224)>>5?(a.F&4&&(a.u[7]=a.u[7]+2&65535,a.F&=-5),a.$(c,26),c=!0):c=!1;if(!c){if(b!=a.V)if(c=a.V,!c||c.lb<=b.lb)b.next=c,a.V=b;else{do{a=c.next;if(!a||a.lb<=b.lb){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Db(a){return a.L=a.L&63728|a.Aa()|nd(a)|md(a)|ld(a)} +function mc(a,b){a.S=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.S=a.X=b,a.P=0)}function qd(a,b,c){a.F&128||(a.S=a.X=a.O=b,a.P=c||0)}function rd(a,b,c,d){a.F&128||(a.S=a.X=a.O=b,a.P=(c^b)&(d^b))}function sd(a,b){a.F&128||(a.S=a.X=a.O=b,a.P=a.S^a.O>>1)}function td(a,b,c,d){a.F&128||(a.S=a.X=a.O=b,a.P=(c^d)&(d^b))} +h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,b=!0);this.D&57344||(this.Ia=63222,this.Bb=a);this.C=0;var c=this.N(a|this.ba),d=this.N(a+2&65535|this.ba);mc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);ud(this,this.ma);ud(this,this.u[7]);pd(this,c);this.F&=-113;this.ma=-1;throw a;};function vd(a){var b=wd(a),c=wd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);pd(a,b);mc(a,c);a.F&=-17} +function xd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.gb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.D&57344||(a.D=a.D|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.N(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.N(e)|g;a.b-= +8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=a.N(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.hc=function(a,b,c){return yd(this,a,b,c)};h.ic=function(a,b,c){return xd(this,yd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Vb=function(a){return this.w.ja(xd(this,a,2))}; +h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(xd(this,a,4),b)};function zd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=yd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.N(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} +function Ad(a,b,c,d){a.D&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=yd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=xd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Bd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Cd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Dd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return yd(a,b,c,8)} +function Ed(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Fd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Gd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Hd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(pd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.ab=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Id(this.j),c=a?this.v.Cb?0:1:-1;this.v.Cb=!1;this.M=this.b=a;do{if(b){if(Jd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){if(this.F&=-3,this.V&&hc(this,this.V)){var d=a=this.V;if(d==a)this.V=a.next;else{do{var e=d.next;if(e==a){d.next=e.next;break}d=e}while(1)}}}else this.F&1&&this.F++;this.D&57344||(this.Ia=0, +this.Bb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function Pd(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function Qd(a,b){a=b&~a;O(this,a);return a}function Rd(a,b){a=b&~a;O(this,a<<8);return a}function Sd(a,b){a|=b;O(this,a);return a}function Td(a,b){a|=b;O(this,a<<8);return a}function Ud(a,b){a=~b|65536;qd(this,a);return a&65535}function Vd(a,b){a=~b|256;qd(this,a<<8);return a&255}function Wd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.P=b&(b^a));return a&65535} +function Xd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.P=b&(b^c));return a&255}function Yd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.P=a&(b^a));return a&65535}function Zd(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.P=c&(b<<8^c));return a&255}function $d(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function ae(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function be(a,b){a=b<<1|this.O>>16&1;sd(this,a);return a&65535} +function ce(a,b){a=b<<1|this.O>>16&1;sd(this,a<<8);return a&255}function de(a,b){a=(this.O&65536|b)>>1|b<<16;sd(this,a);return a&65535}function ee(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function fe(a,b){var c=b-a;td(this,c,a,b);return c&65535}function ge(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function he(a,b){this.F&128||(this.S=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function ie(a,b){a^=b;O(this,a);return a&65535} +function je(a){var b=Fd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} +function ke(a){var b=Fd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function le(a){var b=Fd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.P=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.P=32768,this.O=65536,this.b-=7}var me=[0,7,7,10,7,11,9,13];function ne(a){var b=this.b;pd(this,Dd(this,a));this.b=b-me[this.i]} +var oe=[0,14,14,17,14,18,16,20];function pe(a){var b=this.b,c=Dd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];pd(this,c);this.b=b-oe[this.i]}var qe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],re=[7,13,13,17,14,18,17,21];function se(a){var b=Fd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)pd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ve(a){Q(this,a,0,he);this.b-=this.i?9:3+(7==this.f?2:0)}function we(a){Q(this,a,Cd(this,a),ie);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function jd(a){xe[a>>12].call(this,a)} +var xe=[function(a){ye[a>>8&15].call(this,a)},function(a){var b=Cd(this,a),c=this.b;O(this,Hd(this,a,b));this.b=c-qe[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Cd(this,a);a=Fd(this,a);td(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Cd(this,a)&Fd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Qd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Kd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Se[a>>8&15].call(this,a)},function(a){Te[a>>8&15].call(this,a)},function(a){var b=Bd(this,a);O(this,Gd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Bd(this,a)<<8;a=Ed(this,a)<<8;td(this,b-a,a,b);this.b-=this.i? +4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Bd(this,a)&Ed(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Bd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),fe);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ye= +[function(a){Ue[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!this.Aa()==!md(this))},function(a){R(this,a,!this.Aa()!=!md(this))},function(a){R(this,a,!nd(this)&&!this.Aa()==!md(this))},function(a){R(this,a,nd(this)||!this.Aa()!=!md(this))},pe,pe,function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},V,V],Ve=[function(a){qd(this, +Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],We=[function(a){Q(this,a,0,$d);this.b-=this.i?11:6},function(a){Q(this,a,ld(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);qd(this,a);this.b-=this.i?4:3+(7==this.f? +2:0)}],Xe=[function(a){Q(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Md);this.b-=this.i?9:3+(7==this.f?2:0)}],Ye=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Vb(a|65536);pd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=zd(this,a,0);ud(this,a);O(this,a);this.b-=11},function(a){var b=wd(this),c=this.b;Ad(this,a, +0,b);O(this,b);this.b=c-re[this.i]},function(a){O(this,Hd(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ue=[function(a){Ze[a&15].call(this,a)},V,V,V,ne,ne,ne,ne,function(a){if(a&8)this.$(8,6);else{var b=wd(this);a&=7;pd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){$e[a&15].call(this,a)},function(a){af[a&15].call(this,a)},ve,ve,ve,ve],Ze=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){vd(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.w.reset());this.b-=667},function(){vd(this);this.b-=13},V,V,V,V,V,V,V,V,V],$e=[te,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],af= +[te,function(){this.O=65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Se=[se,se,le,le,je,je,ke,ke,we,we,V,V,V,V,ue,ue],Te=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!ld(this)&&!nd(this))},function(a){R(this,a,ld(this)||nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(){this.$(24, +2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},V,V],bf=[function(a){qd(this,Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,ae);this.b-= +this.i?11:6},function(a){P(this,a,ld(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,ld(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);qd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,ee);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Pd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Nd);this.b-=this.i?9:3+(7== +this.f?2:0)}],ef=[V,function(a){a=zd(this,a,65536);ud(this,a);O(this,a);this.b-=11},function(a){var b=wd(this),c=this.b;Ad(this,a,65536,b);O(this,b);this.b=c-re[this.i]},V];function ff(a){r.call(this,"ROM",a,ff);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){gf(c,a,b,f)})}}y(ff); +ff.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;hf(this)};ff.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Hb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Gb:f})}delete this.za}return!0};ff.prototype.xa=function(){return!0}; +function gf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){nf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return nf(this)};function nf(a){a.N=0;a.f=0;a.i=128;a.D=[];return!0}h.Ab=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var of={},mf=(of[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],of[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],of[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],of[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],of);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};pf.prototype.Mb=function(){return-1};pf.prototype.Nb=function(){}; +function rf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} +function sf(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 sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ca[b]);var c=0;for(b in a.ca)vf(a,b,a.ca[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function xf(a,b){if(b)return wf(a,b,a.ba[b]);var c=0;for(b in a.ba)wf(a,b,a.ba[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Gf(a,b));return c}; -h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Gf(a,c),this.C.aa(!0))};h.Sa=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);this.C.aa(!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}} -function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,a.C.aa()))}; -function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.Y],!0);a.F=["bw"];a.Ma=0} -h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.F)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.F));l.wa||zf(a);break}}return f} -function Rf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+ -")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Kf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.oc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.C.aa();a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,J(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} -function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Rc=[];"call"==De&&(mb=1E5,Rc=["CALL"]);for(void 0!==Ce&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ua=Y;Fe++;mb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var ob=Ff(a,ha);if(ob){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Zb=uf(a,za)>>>0,65536>4||1;wg--&&0<$b;){var ac=0,qb=0,rb,Sc="",Ie="",ha=J(a,ob.A);for(rb=4==Sa?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}pb&&(pb+="\n");pb+=ha+" "+Sc+(0==rb?" "+Ie:"")}pb&&a.g(pb);a.Na=ob}}}}break;case "e":if("else"==g[0])break;var Ta,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ta=1,Uc=255,Vc=a.Qa,Wc=a.mb):"e"==Xc||"ew"==Xc?(Ta=2,Uc=65535,Vc=a.ja,Wc=a.Sa):Yc=null;if(null==Yc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Ff(a,Yc);if(cc)for(var dc=2;dc< -g.length;dc++){var sb=sf(a,g[dc]);if(void 0===sb){a.g("unrecognized value: "+g[dc]);break}sb&~Uc&&a.g("warning: "+k(sb)+" exceeds "+Ta+"-byte value");var xg=Vc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,xg,Ta)+" to "+J(a,sb,Ta));Wc.call(a,cc,sb,Ta)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var Zc=Ff(a,Je,!0);if(!Zc)break a;Jf(a,Zc,yg);a.Oa(a.f,Zc,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.ba?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var $c;var tb=b.substr(2),tb=oa(tb);sf(a,tb)?(c||a.g("true: "+tb),$c=!0):(c||a.g("false: "+tb),$c=!1);$c||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ad=0,bd=X(),ub=X(a.b.u[6]);for(a.g("stack trace for "+J(a,ub.A));10>ad;){for(var Aa=null,Ag=256;65536>ub.A>>>0;){bd.A=a.ja(ub,2);if(null==ub.A||!Ag--)break;if(!(bd.A&1)){for(var Bg=a,ec=bd,Ke=null,vb= -ec.A,Le=vb,cd=1;6>=cd&&vb;cd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bfg){if(hg(d,this.I)){this.F=new N(this,"1.30.1","failsafe");hg(this.F)&&(mg(this,d),a=2,ng(this.F));this.F.set("timestamp",ta());og(this.F);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0}; -function mg(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&Hf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Hf(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Hf(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Fb(f,b&65535,d);e.w--;c&&Hf(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function If(a){return[a.A,a.wa]}function Jf(a){return{A:a[0],wa:a[1]}} +function Gf(a,b,c){var d;c=(c?a.K:a.Ma).A;if(void 0!==b){d=b=uf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Nb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.M-=a.b,a.b=0,a.la=0,a.B.aa()))}; +function Af(a){var b;if(Id(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.La=0} +h.Na=function(a,b,c){var d=!0;c||Qf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Rf(this,a,a.length-1,"set"),Af(this)));return d};function Qf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||Af(a);break}}return f} +function Sf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Lf(C);break;case 8:x="@"+Lf(C);break;case 16:7>C?x="("+Lf(C)+ +")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Lf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Lf(C)+")";break;case 40:x="@-("+Lf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Lf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Lf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Lf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Xf(a){var b,c="";for(b=0;6>b;b++)c+=Wf(a,b);c=c+"\n"+(Wf(a,6)+Wf(a,7)+Wf(a,20));return c+=Vf(a,"T")+Vf(a,"N")+Vf(a,"Z")+Vf(a,"V")+Vf(a,"C")}h.Hb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Xf(a));c&&(a.K=X(d.u[7]),Of(a,J(a,a.K.A)))}}function bg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Uf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} +function Tf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Tc=[];"call"==Ee&&(nb=1E5,Tc=["CALL"]);for(void 0!==De&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;Ge++;nb--}}Ge||(a.g("no "+Fe+"history available"),a.Ta=void 0)}else{var pb=Gf(a,ha);if(pb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||vg),Zb=vf(a,za)>>>0,65536>4||1;xg--&&0<$b;){var ac=0,rb=0,sb,Uc="",Je="",ha=J(a,pb.A);for(sb=4==Ta?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}qb&&(qb+="\n");qb+=ha+" "+Uc+(0==sb?" "+Je:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Wc,Xc,Yc,Zc=g[0],$c=g[1];"eb"==Zc?(Ua=1,Wc=255,Xc=a.Pa,Yc=a.mb):"e"==Zc||"ew"==Zc?(Ua=2,Wc=65535,Xc=a.ja,Yc=a.Ra):$c=null;if(null==$c)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Gf(a,$c);if(cc)for(var dc=2;dc< +g.length;dc++){var tb=tf(a,g[dc]);if(void 0===tb){a.g("unrecognized value: "+g[dc]);break}tb&~Wc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var yg=Xc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,yg,Ua)+" to "+J(a,tb,Ua));Yc.call(a,cc,tb,Ua)}}break;case "g":a:{var Ke=g[1],zg=b;if(void 0!==Ke){var ad=Gf(a,Ke,!0);if(!ad)break a;Kf(a,ad,zg);a.Na(a.f,ad,!0)}a.$a(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var bd;var ub=b.substr(2),ub=oa(ub);tf(a,ub)?(c||a.g("true: "+ub),bd=!0):(c||a.g("false: "+ub),bd=!1);bd||(d=!1);break}f=!0;break;case "k":var Ag=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var cd=0,dd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>cd;){for(var Aa=null,Bg=256;65536>vb.A>>>0;){dd.A=a.ja(vb,2);if(null==vb.A||!Bg--)break;if(!(dd.A&1)){for(var Cg=a,ec=dd,Le=null,wb= +ec.A,Me=wb,ed=1;6>=ed&&wb;ed++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bgg){if(ig(d,this.J)){this.D=new N(this,"1.30.1","failsafe");ig(this.D)&&(ng(this,d),a=2,og(this.D));this.D.set("timestamp",ta());pg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=mg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ig(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),og(d),ig(d)?(c=mg(d),e=!0):c=!1))}e&&lg(this,c?d:null)}else 2==a&&d.clear()}else lg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(qg(this,this.b,b,c,a),this.b.eb());this.T&&(ng(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function ng(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function dg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)} -function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Ua;})(); +h.pa=function(a,b,c){var d=this;switch(b){case "power":return this.I[b]=c,c.onclick=function(){d.B||(d.v.ga?dg(d,!1,!0):kg(d,d.kb))},!0;case "reset":return this.I[b]=c,c.onclick=function(){if(d.v.ga&&!d.B)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");dg(d,a,!0);!a&&d.N?window&&window.location.reload():d.kb(gg)}else d.reset(),d.b&&d.b.eb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.I[b]= +c,c.onclick=function(){var a=hg(d,!0);if(a){var b=!!(d.f&&!d.H||d.N),c=dg(d,b);b?rg(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function hg(a,b){var c=a.i;c||((c=Ba("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=sg(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function sg(a,b){a.i=null;b=ua(ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ca("user",b.data),a.i=b.data)}catch(d){n(d.message+" ("+c+")")}return a.i}function jg(a){var b=null;a.i&&(b=ga()+"/api/v1/user?req=load&user="+a.i+"&state="+tg(a,"1.30.1"));return b} +function rg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=tg(a,"1.30.1");d.data=c;b=ua(ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}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===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--ug||Na(!0));m=!1}var g,l,m=!0;ug++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Gg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--ug||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--ug||Na(!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,p):Hg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Jg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index f2a80e9af..9cdc018c9 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -684,148 +684,148 @@ var g; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ha(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ia(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +function da(){var a=ea();return-1!==a.indexOf("pcjs.org",a.length-8)}var fa={"&":"&","<":"<",">":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ia(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function m(a,b,c,d){var e=0,f=null,h=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)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encodeURIComponent(b[p]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function t(a){r.init.push(a)} +function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Ta=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.cb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.A=this.D/this.l|0;this.ha=[];this.o=0;this.s=[];this.wb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} -function Ra(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(u=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){u=n.size-(f-p);u>h&&(u=h);n.Oa=f-n.ya+u;f=p+a.l;h-=u;l++;continue}}return $a(1,f,h)}f=new G(a,f,u,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.l;h-=u}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} -function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].jc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.Cb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.s.push(b)}function ib(a){a.o||H(a.a,4)} -function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,ab:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.ab=jb(this.a,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,0,6,64),lb(e.a,e.b.ab,1E3/60))});gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Mb=function(){var a=this.b.la;this.b.la&=-129;return a}; -g.uc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.ab,1E3/60);this.b.la=a&-129};g.Ob=function(){var a=this.a;return a.B&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.B!=a){b.B=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,mb(b))}nb(this)};g.Pb=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Qb=function(){return this.a.Za};g.Rb=function(){return this.a.na}; -g.xc=function(a){var b=this.a;b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Fa=3915776):(b.Va=262143,b.Fa=253952),mb(b));nb(this)};function nb(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.na&16?1:2:4)}g.cc=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.ac=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.bc=function(a){return this.a.O[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.O[1][b]=a;this.a.C[1][b]&=65295}; -g.$b=function(a){return this.a.O[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.O[1][b]=a;this.a.C[1][b]&=65295};g.Lb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Jb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Kb=function(a){return this.a.O[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.Ib=function(a){return this.a.O[0][(a>>1&7)+8]}; -g.qc=function(a,b){b=(b>>1&7)+8;this.a.O[0][b]=a;this.a.C[0][b]&=65295};g.ic=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.gc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.O[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.O[3][b]=a;this.a.C[3][b]&=65295};g.fc=function(a){return this.a.O[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.O[3][b]=a;this.a.C[3][b]&=65295}; -g.ta=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Ub=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Xb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; -g.Vb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Wb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Hb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.mb=function(a){return 65520==a?61183:0};g.vb=function(){};g.ec=function(){return 1};g.Lc=function(){};g.Gb=function(){return this.a.G}; -g.oc=function(){this.a.G=0};g.Nb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Sb=function(){return this.a.$a};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.dc=function(){return this.a.oa&65280};g.Kc=function(a){this.a.oa=a|255};g.Tb=function(){return Na(this.a)};g.zc=function(a){ob(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.ub=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.la=0}; -var K={},J=(K[62592]=[null,null,I.prototype.cc,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.ac,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.bc,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.$b,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Lb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Jb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Kb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Ib,I.prototype.qc,"KDSAR"],K[62798]=[null,null, -I.prototype.Rb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Mb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Ob,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Pb,I.prototype.ub,"MMR1"],K[65406]=[null,null,I.prototype.Qb,I.prototype.ub,"MMR2"],K[65408]=[null,null,I.prototype.ic,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.gc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.hc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.fc,I.prototype.Mc,"UDSAR"], -K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Ub,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Xb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, -I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Vb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Wb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Hb,I.prototype.pc, -"CTRL",1170],K[65520]=[null,null,I.prototype.mb,I.prototype.vb,"LSIZE",1170],K[65522]=[null,null,I.prototype.mb,I.prototype.vb,"HSIZE",1170],K[65524]=[null,null,I.prototype.ec,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Gb,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Nb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Sb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.dc,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Tb,I.prototype.zc,"PSW"], +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ja="undefined"!==typeof ArrayBuffer;function Ka(a){v.call(this,"Panel",a,Ka);this.b=0;this.h.$a=!0}x(Ka);g=Ka.prototype; +g.T=function(a,b,c,d){if(this.w&&this.w.T(a,b,c,d)||this.a&&this.a.T(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.v[b]=c,this.b++,!0;default:return"rled"==a?(this.v[b]=c,this.b++,!0):this.parent.T.call(this,a,b,c,d)}};g.ja=function(a,b,c,d){this.w=a;this.j=b;this.a=c;this.I=d};g.ba=function(a,b){b||La();return!0};g.aa=function(){return!0}; +function E(a,b,c,d){if(a.v[b]){void 0===c&&(a.h.error=!0,a.K("Value for "+b+" is invalid"),F(a.a));var e=a.I&&a.I.b||8;if(!a.a.h.S||a.h.$a)if(8==e){e="";d?11>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.j-1;this.s=this.D/this.j|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Oa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Oa){t=n.size-(f-p);t>h&&(t=h);n.Oa=f-n.xa+t;f=p+a.j;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.j,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.j;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} +function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a){a.o||H(a.a,4)} +function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,Za:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;var e=this;this.b.Za=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.Za,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.Za,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; +g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Ua=4194303,b.Fa=3915776):(b.Ua=262143,b.Fa=253952),nb(b));ob(this)};function ob(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.$b=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Yb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.Zb=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; +g.Xb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Ib=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Gb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Hb=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Fb=function(a){return this.a.P[0][(a>>1&7)+8]}; +g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.fc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.dc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ec=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.cc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; +g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.ua=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; +g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.jb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; +g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.lb};g.vc=function(a,b){b&1||(a&=255);this.a.lb=a};g.Pb=function(a){return a?this.a.mb:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.mb=a;b.l|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.l|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +var K={},J=(K[62592]=[null,null,I.prototype.$b,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Yb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.Zb,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Xb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Ib,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Gb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Hb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Fb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, +I.prototype.Ob,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Jb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Lb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Mb,I.prototype.rb,"MMR1"],K[65406]=[null,null,I.prototype.Nb,I.prototype.rb,"MMR2"],K[65408]=[null,null,I.prototype.fc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.dc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.ec,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.cc,I.prototype.Mc,"UDSAR"], +K[65472]=[null,null,I.prototype.sa,I.prototype.ua,"R0SET0"],K[65473]=[null,null,I.prototype.sa,I.prototype.ua,"R1SET0"],K[65474]=[null,null,I.prototype.sa,I.prototype.ua,"R2SET0"],K[65475]=[null,null,I.prototype.sa,I.prototype.ua,"R3SET0"],K[65476]=[null,null,I.prototype.sa,I.prototype.ua,"R4SET0"],K[65477]=[null,null,I.prototype.sa,I.prototype.ua,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.ta,I.prototype.va,"R0SET1"],K[65481]=[null,null,I.prototype.ta,I.prototype.va,"R1SET1"],K[65482]=[null,null,I.prototype.ta,I.prototype.va,"R2SET1"],K[65483]=[null,null,I.prototype.ta,I.prototype.va,"R3SET1"],K[65484]=[null,null,I.prototype.ta,I.prototype.va,"R4SET1"],K[65485]=[null,null,I.prototype.ta,I.prototype.va,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.jb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.jb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; -J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];t(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),vb(this,rb?wb:xb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.l);var 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},ea: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.ia=!0},F:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.tb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},P:function(a){a&1&&ib(this.l);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.l);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ia=!0},$:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b){a&1&&ib(this.l);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b){a&1&&ib(this.l);this.o[a>>1]=b;this.ia= -!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&zb(a,Ab,!1),(a.m=c.m)&&Bb(a,Ab,!1))}function Bb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.w,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.tb=b[1]||a.w,a.pa=b[3]||a.B}function zb(a,b,c){c&&a.i||(a.Xa=b[0]||a.s,a.jc=b[2]||a.A);if(c||void 0===c)a.H=b[0]||a.s,a.V=b[2]||a.A}function vb(a,b){b||(b=Cb);zb(a,b,void 0);Bb(a,b,void 0)}var Cb=[],yb=[G.prototype.N,G.prototype.ea,G.prototype.X,G.prototype.ra],Ab=[G.prototype.F,G.prototype.Z,G.prototype.R,G.prototype.ga]; -if(Ja)var xb=[G.prototype.D,G.prototype.Y,G.prototype.P,G.prototype.fa],wb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.qa];function Db(a,b){v.call(this,"CPU",a,Db);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ua=Math.round(this.Ia/1E4)/100;this.ea=this.Ua*this.Z;this.h.S=!1;this.h.qb=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.fa=0;this.Ha=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.jb=this.nc.bind(this);D(this)}x(Db);var Eb=["power","reset"];g=Db.prototype; -g.ka=function(a,b,c,d){this.A=a;this.l=b;this.I=d;for(b=0;ba.W/a.ea&&(b=1),a.Z=b,b=a.Ua*a.Z,a.ea!=b)){a.ea=b;b=a.ea.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.M("target speed: "+b)}Kb(a,a.R);a.R=0;a.P=ka();a.X=0;Lb(a)}function jb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.H[b][0]&&(c*=a.Ia*a.Z/1E3,a.H[b][0]=c)} -g.nc=function(){if(this.h.S){this.Wa>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.hb&&(this.P+=a,this.P>this.Ga&&(this.P=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.xa+=f;this.R+=f;Kb(this,0,!0);a=f;if(this.h.Ka){var n= -!1;this.Ba=this.Ba+this.eb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,n=!0);0<=this.qa&&this.qa<=Mb(this)&&(this.pa=this.qa=-1,Hb(this),F(this),n=!0);n&&this.M(Mb(this)+" cycles: checksum="+k(this.Ba))}this.ra-=f;if(0>=this.ra){this.ra+=this.Ja;15<=++this.ib&&(this.A&&this.A.da(),this.ib=0);break}}while(this.h.S)}catch(p){F(this);this.A&&this.A.stop(ka(),Mb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.jb;this.X=ka();d=this.hb;this.xa&&(d=Math.round(d* -this.xa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.P)this.W=Math.round(this.R/(10*e))/100,864E5<=e&&(this.$=0,Jb(this));if(0>d||this.Wd&&(this.P-=d),d=0;this.Wa+=this.xa;this.X+=d;b(c,d)}}};function Ib(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.M(a.toString()+" busy");else{Jb(a);a.h.S=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.A&&a.A.start(a.P,Mb(a));setTimeout(a.jb,0)}}g.rb=function(){return 0}; -function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Kb(a,a.R);a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.A&&a.A.stop(ka(),Mb(a))}a.h.complete=void 0} -function Nb(a){this.Cb=+a.model||1170;this.Eb=a.resetAddr||0;Db.call(this,a,6666667);this.decode=Ob.bind(this);this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Eb];this.sa=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.w=0;this.Bb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.O=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.pb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Sa=this.D=this.F=this.j=this.ob=0;this.ga=-1;Pb(this);this.h.complete=this.h.xb=!1}x(Nb,Db);g=Nb.prototype;g.reset=function(){this.h.S&&F(this);Pb(this);Gb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Pb(a){a.oa=255;a.G=0;a.$a=0;a.B=0;a.ma=0;a.Za=0;a.na=0;a.Na=0;a.Da=0;a.Va=262143;a.Fa=253952;a.s=[];a.j|=2;a.l&&mb(a)}function mb(a){a.Na?(a.V=65536,a.J=a.Ab,a.N=a.nb,a.kb=a.Sc,Va(a.l,a.na&16?22:18)):(a.V=0,a.J=a.zb,a.N=a.kc,a.kb=a.Rc,Va(a.l,16))}g.eb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.l));return a.data()}; -g.restore=function(a){var b=a[1];this.$=b[1];Jb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;cb){a.s[f].aa-=b;break}b-=a.s[f].aa}a.s.splice(f+1,0,{aa:b,lb:c<<5&224,sb:d,Qa:e})}a.j|=2}function Na(a){return a.u=a.u&63728|a.ja()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function ob(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.sa.length;0<=--c;){var d=a.f[c];a.f[c]=a.sa[c];a.sa[c]=d}a.w=b>>14&3;c=a.u>>14&3;a.w!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.w]);a.j|=2;a.u=b}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Rb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b){var c=!1;0>a.ga?a.ga=Na(a):a.w||(b=4,c=!0);a.B&57344||(a.ma=63222,a.Za=b);a.w=0;var d=a.N(b|a.V),e=a.N(b+2&65535|a.V);ob(a,e&-12289|a.ga>>2&12288);c&&(a.G|=4,a.f[6]=4);Tb(a,a.ga);Tb(a,a.f[7]);a.f[7]=d&65535;a.j&=-113;a.ga=-1;throw b;}function Ub(a){var b=Vb(a),c=Vb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;ob(a,c);a.j&=-17} -function Wb(a,b,c){var d,e,f,h=0;d=b>>13;a.na&a.Bb[a.w]||(d&=7);e=a.C[a.w][d];f=(a.O[a.w][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Fb[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.G|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; -default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.w][d]=e;if(4194170!==f||a.w)a.Da=a.w,a.Ea=d;h&&(h&57344&&(0<=a.ga&&(h|=128),a.B&57344||(a.B=a.B|h|a.Da<<5|a.Ea<<1),H(a,168)),a.B&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.N(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.N(e)|h;a.a-=8;break; -case 6:return e=Qb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Qb(a),e=e+a.f[c]&65535,e=a.N(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.B&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.G|=4,a.f[6]=4,H(a,4)):(a.G|=8,a.j|=64));return e}g.zb=function(a,b,c){return Xb(this,a,b,c)};g.Ab=function(a,b,c){return Wb(this,Xb(this,a,b,c),c)};g.kc=function(a){return cb(this.l,a)};g.nb=function(a){return cb(this.l,Wb(this,a,2))}; -g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Wb(this,a,4),b)};function Yb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Xb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.w=a.u>>12&3,c=a.N(d|c&a.V),a.w=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} -function Zb(a,b,c,d){a.B&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Xb(a,b,e,4),c&65536||(e&=65535),a.w=a.u>>12&3,e=Wb(a,e|c&65536,4),a.w=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function $b(a,b){b>>=6;var c=a.F=b&7;(b=a.D=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.F=b&7;return(b=a.D=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function ac(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Xb(a,b,c,8)} -function bc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.J(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.J(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[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),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function cc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.J(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function dc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.J(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.rb=function(a){this.h.complete=!0;this.h.xb=!1;this.h.qb=!1;this.Y=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168):this.j&64?H(this,4):this.j&16&&H(this,12),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;a=null;for(var b=this.$a&224,c=this.s.length;0<=--c;){if(0b&&(b=this.s[c].lb,a=this.s[c],this.s.splice(c,1))}b>(this.u&224)&&(this.j&4&&(this.f[7]= -this.f[7]+2&65535,this.j&=-5),a?H(this,a.sb):H(this,160))}else this.j&1&&this.j++;this.B&57344||(this.ma=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Qb(this))}while(0>1|b<<16;P(this,a);return a&65535}function jc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function kc(a,b){a=b&~a;N(this,a);return a}function lc(a,b){a=b&~a;N(this,a<<8);return a}function mc(a,b){a|=b;N(this,a);return a}function nc(a,b){a|=b;N(this,a<<8);return a}function oc(a,b){a=~b|65536;O(this,a);return a&65535} -function pc(a,b){a=~b|256;O(this,a<<8);return a&255}function qc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function rc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function sc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function tc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function uc(a,b){a=-b;O(this,a,a&b&32768);return a&65535} -function vc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function wc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function yc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){var c=b-a;Sb(this,c,a,b);return c&65535}function Bc(a,b){var c=b-a;Sb(this,c<<8,a<<8,b<<8);return c&255} -function Cc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Dc(a,b){a^=b;N(this,a);return a&65535}function Ec(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} -function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} -function Hc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Ic=[0,7,7,10,7,11,9,13];function Jc(a){var b=this.a;a=ac(this,a);this.f[7]=a&65535;this.a=b-Ic[this.c]} -var Kc=[0,14,14,17,14,18,16,20];function Lc(a){var b=this.a,c=ac(this,a);a=a>>6&7;Tb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Kc[this.c]}var Mc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Nc=[7,13,13,17,14,18,17,21];function Oc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Rc(a){T(this,a,0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)}function Sc(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8)}function Ob(a){Tc[a>>12].call(this,a)} -var Tc=[function(a){Uc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,dc(this,a,b));this.a=c-Mc[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Sb(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),kc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b? -2:0)},function(a){T(this,a,Q(this,a),mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),ec);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){Vc[a>>8&15].call(this,a)},function(a){Wc[a>>8&15].call(this,a)},function(a){var b=$b(this,a);N(this,cc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){var b=$b(this,a)<<8;a=bc(this,a)<<8;Sb(this,b-a,a,b);this.a-=this.c?4+ -(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){N(this,($b(this,a)&bc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),lc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){S(this,a,$b(this,a),nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)},X],Uc=[function(a){Xc[a>> -4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ja()==!(this.g&32768))},function(a){U(this,a,!this.ja()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))},Lc,Lc,function(a){Yc[a>>6&3].call(this,a)},function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>> -6&3].call(this,a)},X,X],Yc=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qc);this.a-=this.c?9:3+(7==this.b?2:0)}],Zc=[function(a){T(this,a,0,uc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gc);this.a-=this.c?9:3+(7==this.b?2:0)}],ad=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.nb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Yb(this,a,0);Tb(this,a);N(this,a);this.a-= -11},function(a){var b=Vb(this),c=this.a;Zb(this,a,0,b);N(this,b);this.a=c-Nc[this.c]},function(a){N(this,dc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Xc=[function(a){bd[a&15].call(this,a)},X,X,X,Jc,Jc,Jc,Jc,function(a){if(a&8)H(this,8);else{var b=Vb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8)},function(a){cd[a&15].call(this,a)},function(a){dd[a&15].call(this,a)},Rc,Rc, -Rc,Rc],bd=[function(){this.u&49152?(this.G|=128,H(this,4)):F(this);this.a-=7},function(){this.j&4||this.A.da();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Ub(this);this.j|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Pb(this),this.l.reset());this.a-=667},function(){Ub(this);this.a-=13},X,X,X,X,X,X,X,X,X],cd=[Pc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V, -function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],dd=[Pc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Vc=[Oc,Oc,Hc,Hc,Ec,Ec,Fc,Fc,Sc,Sc,X,X,X,X,Qc,Qc],Wc=[function(a){U(this,a,!this.ja())},function(a){U(this,a,this.ja())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768? -2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){ed[a>>6&3].call(this,a)},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},X,X],ed=[function(a){O(this,cc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, -a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],fd=[function(a){S(this,a,0,vc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,zc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jc);this.a-=this.c? -9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],hd=[X,function(a){a=Yb(this,a,65536);Tb(this,a);N(this,a);this.a-=11},function(a){var b=Vb(this),c=this.a;Zb(this,a,65536,b);N(this,b);this.a=c-Nc[this.c]},X]; -function id(a){v.call(this,"ROM",a,id);this.b=null;this.o=a.addr;this.c=a.size;this.s=a.writable;this.g=a.alias;this.i=a.file;this.A=ba(this.i);if(this.i){a=this.i;var b=ca(this.A);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){jd(c,a,b,f)})}}x(id);id.prototype.ka=function(a,b,c,d){this.l=b;this.a=c;this.I=d;kd(this)};id.prototype.ca=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; -id.prototype.ba=function(){return!0}; -function jd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); -return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].tb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.w=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ca=function(a,b){if(!b)if(this.gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.ba=function(a){return a?this.save():!0};g.reset=function(){od(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return od(this)};function od(a){a.F=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.M(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;kb(this.a,100,4,52,this.D)}};var pd={},nd=(pd[65392]=[null,null,Z.prototype.Zb,Z.prototype.Fc,"RCSR"],pd[65394]=[null,null,Z.prototype.Yb,Z.prototype.Ec,"RBUF"],pd[65396]=[null,null,Z.prototype.mc,Z.prototype.Uc,"XCSR"],pd[65398]=[null,null,Z.prototype.lc,Z.prototype.Tc,"XBUF"],pd);t(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.M("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsd){if(ud(d,this.A)){this.m=new L(this,"1.30.1","failsafe");ud(this.m)&&(zd(this,d),a=2,Ad(this.m));this.m.set("timestamp",la());Bd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?ud(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.M(f+": "+h),Ad(d),ud(d)?(c=yd(d),e=!0):c=!1))}e&&xd(this,c?d:null)}else 2==a&&d.clear()}else xd(this);delete this.A;delete this.w}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Cd(this,this.a,b,c,a),this.a.za());this.F&&(zd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function zd(a,b){if(ma("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.1"};d.url=a.P;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Dd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ba&&(c&&F(a.a),d=a.a.ba(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,u=/( [a-z]+=)(['"])(.*?)\2/g;p=u.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);Kd(a,b,c)}})}else c(a,null)} -function Ld(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ha(a))}function f(a){e("Error: "+a);n&&(--Hd||xa(!0));n=!1}var h,l,n=!0;Hd++;Fa[a]={};try{if(h=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],ga=document.createElement("style");ga.type="text/css";ga.styleSheet?ga.styleSheet.cssText=p:ga.appendChild(document.createTextNode(p));u.appendChild(ga)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Id(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Hd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Hd||xa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Id(b,a,d,!0,e,p):Jd(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(Gc){f(Gc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Ld(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); +J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.j);var 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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a){a&1&&ib(this.j);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.j);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&ib(this.j);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b){a&1&&ib(this.j);this.o[a>>1]=b;this.ha= +!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.V=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)}var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa]; +if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.pa];function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.da=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.ya=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.hb=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; +g.ja=function(a,b,c,d){this.w=a;this.j=b;this.I=d;for(b=0;ba.W/a.da&&(b=1),a.Z=b,b=a.Ta*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}Lb(a,a.N);a.N=0;a.M=ka();a.X=0;Mb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c)} +g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Mb(this,!0);this.wa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.fb&&(this.M+=a,this.M>this.Ga&&(this.M=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.wa+=f;this.N+=f;Lb(this,0,!0);a=f;if(this.h.Ka){var n= +!1;this.Ba=this.Ba+this.bb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,n=!0);0<=this.pa&&this.pa<=Nb(this)&&(this.oa=this.pa=-1,Ib(this),F(this),n=!0);n&&this.O(Nb(this)+" cycles: checksum="+k(this.Ba))}this.qa-=f;if(0>=this.qa){this.qa+=this.Ja;15<=++this.gb&&(this.w&&this.w.ca(),this.gb=0);break}}while(this.h.S)}catch(p){F(this);this.w&&this.w.stop(ka(),Nb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.hb;this.X=ka();d=this.fb;this.wa&&(d=Math.round(d* +this.wa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.M)this.W=Math.round(this.N/(10*e))/100,864E5<=e&&(this.$=0,Kb(this));if(0>d||this.Wd&&(this.M-=d),d=0;this.Va+=this.wa;this.X+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.M,Nb(a));setTimeout(a.hb,0)}}g.pb=function(){return 0}; +function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Lb(a,a.N);a.N=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Nb(a))}a.h.complete=void 0} +function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.R=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.l=this.lb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Qb(a){a.na=255;a.F=0;a.mb=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.l|=2;a.j&&nb(a)}function nb(a){a.Na?(a.V=65536,a.H=a.xb,a.J=a.kb,a.ib=a.Sc,Va(a.j,a.ma&16?22:18)):(a.V=0,a.H=a.wb,a.J=a.hc,a.ib=a.Rc,Va(a.j,16))}g.bb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.j));return a.data()}; +g.restore=function(a){var b=a[1];this.$=b[1];Kb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c(a.u&224)>>5?(a.l&4&&(a.f[7]=a.f[7]+2&65535,a.l&=-5),H(a,c),c=!0):c=!1;if(!c){if(b!=a.R)if(c=a.R,!c||c.Aa<=b.Aa)b.next=c,a.R=b;else{do{a=c.next;if(!a||a.Aa<=b.Aa){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +function pb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.s=b>>14&3;c=a.u>>14&3;a.s!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.s]);a.l|=2;a.u=b}function N(a,b){a.l&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b){var c=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,c=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var d=a.J(b|a.V),e=a.J(b+2&65535|a.V);pb(a,e&-12289|a.fa>>2&12288);c&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.fa=-1;throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.l&=-17} +function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; +default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.J(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.J(e)|h;a.a-=8;break; +case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.J(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4)):(a.F|=8,a.l|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.j,a)};g.kb=function(a){return cb(this.j,Xb(this,a,2))}; +g.Rc=function(a,b){db(this.j,a,b&65535)};g.Sc=function(a,b){db(this.j,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.J(d|c&a.V),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} +function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.j,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} +function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.j,e)),e&1&&a.a--,a=a.j,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.j,e,d.call(a,c,cb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])} +function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.j,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.j,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.Y=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?H(this,168):this.l&64?H(this,4):this.l&16&&H(this,12),this.l&=-113),this.l&7))if(this.l&2){if(this.l&=-3,this.R&&kb(this,this.R)){var b=a=this.R;if(b==a)this.R=a.next;else{do{var c=b.next;if(c==a){b.next=c.next;break}b=c}while(1)}}}else this.l&1&&this.l++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.l=this.l&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255} +function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255}function rc(a,b){a=b-a;this.l&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.i=c,this.g=b&(b^c));return a&255} +function tc(a,b){a=b+a;this.l&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535} +function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.l&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Ec(a,b){a^=b;N(this,a);return a&65535} +function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +function Gc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} +function Ic(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Jc=[0,7,7,10,7,11,9,13];function Kc(a){var b=this.a;a=bc(this,a);this.f[7]=a&65535;this.a=b-Jc[this.c]} +var Lc=[0,14,14,17,14,18,16,20];function Mc(a){var b=this.a,c=bc(this,a);a=a>>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8)}function Pb(a){Uc[a>>12].call(this,a)} +var Uc=[function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,ec(this,a,b));this.a=c-Nc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Tb(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),lc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? +2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Wc[a>>8&15].call(this,a)},function(a){Xc[a>>8&15].call(this,a)},function(a){var b=ac(this,a);N(this,dc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=ac(this,a)<<8;a=cc(this,a)<<8;Tb(this,b-a,a,b);this.a-=this.c?4+ +(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(ac(this,a)&cc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),mc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Vc=[function(a){Yc[a>> +4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Mc,Mc,function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>> +6&3].call(this,a)},X,X],Zc=[function(a){O(this,ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.kb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= +11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.l|=1),this.a-=5):H(this,8)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc,Sc, +Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4)):F(this);this.a-=7},function(){this.l&4||this.w.ca();this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.l|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Qb(this),this.j.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V, +function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],ed=[Qc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Wc=[Pc,Pc,Ic,Ic,Fc,Fc,Gc,Gc,Tc,Tc,X,X,X,X,Rc,Rc],Xc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768? +2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, +a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,kc);this.a-=this.c? +9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; +function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;ld(this)};jd.prototype.ba=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +jd.prototype.aa=function(){return!0}; +function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); +return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].qb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.eb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.aa=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var qd={},od=(qd[65392]=[null,null,Z.prototype.Wb,Z.prototype.Fc,"RCSR"],qd[65394]=[null,null,Z.prototype.Vb,Z.prototype.Ec,"RBUF"],qd[65396]=[null,null,Z.prototype.jc,Z.prototype.Uc,"XCSR"],qd[65398]=[null,null,Z.prototype.ic,Z.prototype.Tc,"XBUF"],qd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;btd){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.ya());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function Ad(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Ed(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&F(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],h);Ld(a,b,c)}})}else c(a,null)} +function Md(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Id||xa(!0));n=!1}var h,l,n=!0;Id++;Fa[a]={};try{if(h=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ha=document.createElement("style");ha.type="text/css";ha.styleSheet?ha.styleSheet.cssText=p:ha.appendChild(document.createTextNode(p));t.appendChild(ha)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Jd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Id||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Id||xa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Jd(b,a,d,!0,e,p):Kd(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(Hc){f(Hc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Md(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From 8bb978d7a94a59a3edeefc4e5985ee493bd0ebd0 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Wed, 12 Oct 2016 22:08:45 -0700 Subject: [PATCH 19/36] Resolved a problem with the original timer implementation, where a call to setTimer() made in the middle of a CPU burst would not properly account for cycles already executed as part of the current burst --- modules/pc8080/lib/cpu.js | 43 ++-- modules/pdp11/lib/cpu.js | 45 +++-- modules/pdp11/lib/serialport.js | 4 +- versions/pc8080/1.30.1/pc8080-dbg.js | 46 ++--- versions/pc8080/1.30.1/pc8080.js | 258 ++++++++++++------------ versions/pdpjs/1.30.1/pdp11-dbg.js | 290 +++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 143 ++++++------- 7 files changed, 423 insertions(+), 406 deletions(-) diff --git a/modules/pc8080/lib/cpu.js b/modules/pc8080/lib/cpu.js index 0c64e3259..cc92a4d29 100644 --- a/modules/pc8080/lib/cpu.js +++ b/modules/pc8080/lib/cpu.js @@ -973,7 +973,13 @@ CPU8080.prototype.setTimer = function(iTimer, ms, fReset) if (iTimer >= 0 && iTimer < this.aTimers.length) { if (fReset || this.aTimers[iTimer][0] < 0) { nCycles = this.getMSCycles(ms); - this.aTimers[iTimer][0] = nCycles; + /* + * We must now confront the following problem: if the CPU is currently executing a burst of cycles, + * the number of cycles it has executed in that burst so far must NOT be charged against the cycle + * timeout we're about to set. The simplest way to resolve that is to immediately call endBurst() + * and bias the above cycle timeout by the number of cycles that the burst executed. + */ + this.aTimers[iTimer][0] = nCycles + this.endBurst(); } } return nCycles; @@ -1036,14 +1042,18 @@ CPU8080.prototype.updateTimers = function(nCycles) }; /** - * endBurst() + * endBurst(fReset) * * @this {CPU8080} + * @param {boolean} [fReset] + * @return {number} (number of cycles executed in the most recent burst) */ -CPU8080.prototype.endBurst = function() +CPU8080.prototype.endBurst = function(fReset) { - this.nBurstCycles -= this.nStepCycles; + var nCycles = this.nBurstCycles -= this.nStepCycles; this.nStepCycles = 0; + if (fReset) this.nBurstCycles = 0; + return nCycles; }; /** @@ -1071,35 +1081,34 @@ CPU8080.prototype.runCPU = function(fUpdateFocus) try { do { /* - * nCyclesPerBurst is how many cycles we WANT to run on each iteration of stepCPU(), and may - * be as HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust - * nCyclesPerBurst downward if any CPU timers need to fire during the next burst. + * nCycles is how many cycles we WANT to run on each iteration of stepCPU(), and may be as + * HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust + * nCycles downward if any CPU timers need to fire during the next burst. */ - var nCyclesPerBurst = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield); + var nCycles = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield); /* * Execute the burst. */ - this.stepCPU(nCyclesPerBurst); + this.stepCPU(nCycles); /* - * nCycles is how many cycles stepCPU() actually ran (nBurstCycles less any remaining nStepCycles). + * Terminate the burst, returning the number of cycles that stepCPU() actually ran. */ - var nCycles = this.nBurstCycles - this.nStepCycles; - - /* - * Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero. - */ - this.updateTimers(nCycles); + nCycles = this.endBurst(true); /* * Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU first started). */ this.nCyclesThisRun += nCycles; this.nRunCycles += nCycles; - this.addCycles(0, true); this.updateChecksum(nCycles); + /* + * Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero. + */ + this.updateTimers(nCycles); + this.nCyclesNextYield -= nCycles; if (this.nCyclesNextYield <= 0) { this.nCyclesNextYield += this.nCyclesPerYield; diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index af9db3336..65d3f58eb 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -936,7 +936,13 @@ CPUPDP11.prototype.setTimer = function(iTimer, ms, fReset) if (iTimer >= 0 && iTimer < this.aTimers.length) { if (fReset || this.aTimers[iTimer][0] < 0) { nCycles = this.getMSCycles(ms); - this.aTimers[iTimer][0] = nCycles; + /* + * We must now confront the following problem: if the CPU is currently executing a burst of cycles, + * the number of cycles it has executed in that burst so far must NOT be charged against the cycle + * timeout we're about to set. The simplest way to resolve that is to immediately call endBurst() + * and bias the above cycle timeout by the number of cycles that the burst executed. + */ + this.aTimers[iTimer][0] = nCycles + this.endBurst(); } } return nCycles; @@ -999,14 +1005,18 @@ CPUPDP11.prototype.updateTimers = function(nCycles) }; /** - * endBurst() + * endBurst(fReset) * * @this {CPUPDP11} + * @param {boolean} [fReset] + * @return {number} (number of cycles executed in the most recent burst) */ -CPUPDP11.prototype.endBurst = function() +CPUPDP11.prototype.endBurst = function(fReset) { - this.nBurstCycles -= this.nStepCycles; + var nCycles = this.nBurstCycles -= this.nStepCycles; this.nStepCycles = 0; + if (fReset) this.nBurstCycles = 0; + return nCycles; }; /** @@ -1027,17 +1037,17 @@ CPUPDP11.prototype.runCPU = function() try { do { /* - * nCyclesPerBurst is how many cycles we WANT to run on each iteration of stepCPU(), and may - * be as HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust - * nCyclesPerBurst downward if any CPU timers need to fire during the next burst. + * nCycles is how many cycles we WANT to run on each iteration of stepCPU(), and may be as + * HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust + * nCycles downward if any CPU timers need to fire during the next burst. */ - var nCyclesPerBurst = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield); + var nCycles = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield); /* * Execute the burst. */ try { - this.stepCPU(nCyclesPerBurst); + this.stepCPU(nCycles); } catch(exception) { /* @@ -1049,25 +1059,22 @@ CPUPDP11.prototype.runCPU = function() } /* - * nCycles is how many cycles stepCPU() actually ran (nBurstCycles less any remaining nStepCycles); - * that calculation matches the return value from stepCPU(), but since it may have thrown an exception, - * we can't rely on it. + * Terminate the burst, returning the number of cycles that stepCPU() actually ran. */ - var nCycles = this.nBurstCycles - this.nStepCycles; - - /* - * Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero. - */ - this.updateTimers(nCycles); + nCycles = this.endBurst(true); /* * Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU first started). */ this.nCyclesThisRun += nCycles; this.nRunCycles += nCycles; - this.addCycles(0, true); this.updateChecksum(nCycles); + /* + * Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero. + */ + this.updateTimers(nCycles); + this.nCyclesNextYield -= nCycles; if (this.nCyclesNextYield <= 0) { this.nCyclesNextYield += this.nCyclesPerYield; diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 98ae227dd..bddd5a75b 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -262,7 +262,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerReceiveInterrupt = this.cpu.addTrigger(PDP11.DL11.RVEC, PDP11.DL11.PRI); - this.timerReceiveInterrupt = this.cpu.addTimer(function() { + this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() { if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) { if (serial.abReceive.length) { serial.rbuf = serial.abReceive.shift(); @@ -276,7 +276,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerTransmitInterrupt = this.cpu.addTrigger(PDP11.DL11.XVEC, PDP11.DL11.PRI); - this.timerTransmitInterrupt = this.cpu.addTimer(function() { + this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() { serial.xcsr |= PDP11.DL11.XCSR.READY; if (serial.xcsr & PDP11.DL11.XCSR.TIE) { serial.cpu.setTrigger(serial.triggerTransmitInterrupt); diff --git a/versions/pc8080/1.30.1/pc8080-dbg.js b/versions/pc8080/1.30.1/pc8080-dbg.js index 9d6df2ef5..01d80a74a 100644 --- a/versions/pc8080/1.30.1/pc8080-dbg.js +++ b/versions/pc8080/1.30.1/pc8080-dbg.js @@ -682,14 +682,14 @@ function Aa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}re function Ea(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Ia={init:[],show:[],exit:[]},Ja=!1,Ka=!1,La=!0;function Ma(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Na(a){Ia.init.push(a)} function Oa(a){if(La)try{for(var b=0;bb?this.cb=this.id:(this.Bb=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,sb:!1,Kb:!1,xa:!1,error:!1};this.Eb=null;this.C.error=!1;this.N={};this.H=null;this.ta=d||0;Ta.push(this)}var Ua=void 0,Va={}; -if(window){Ua||(Ua=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Ua);)Va[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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} +if(window){Ua||(Ua=window.location.search.substr(1));for(var Wa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Wa=Za.exec(Ua);)Va[decodeURIComponent(Wa[1].replace(Ya," "))]=decodeURIComponent(Wa[2].replace(Ya," "))}function $a(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function A(a,b){b||(b=z);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),Ta=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},Ta=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function Pa(a,b,c){b||w((c?c+": ":"")+a)} function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b=a.O&&(a.O+=a.hb,c=!0);0<=a.ib&&a.ib<=Fc(a)&&(a.hb=a.ib=-1,Bc(a),a.qa(),c=!0);c&&a.g(Fc(a)+" cycles: checksum="+t(a.tb))}} l.pa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.N[b]=c;a=!0;break;case "run":this.N[b]=c;c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.xa)a=!0;else{var b=null,c,h=cb(a.id);for(c=0;ca.J/a.ab?b=1:d=!0;a.Ra=b;b=a.ha*a.Ra;if(a.ab!=b){a.ab=b;b=a.ab.toFixed(2)+"Mhz";var e=a.N.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.xb()}Hc(a,a.G);a.G=0;a.D=qa();a.K=0;Ic(a);return d}function Jc(a,b){var c=a.w.length;a.w.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.w[b][0]&&(c*=a.Y*a.Ra/1E3,a.w[b][0]=c)}function Lc(a){a.L-=a.b;a.b=0} -l.bb=function(a){if(jb(this,!0)){if(!this.C.Aa){Gc(this);this.B&&this.B.start(this.D,Fc(this));this.C.Aa=!0;this.C.Sb=!0;this.I&&this.I.start();var b=this.N.run;b&&(b.textContent="Halt");this.B&&(this.B.Ja(!0),a&&this.B.xb(!0))}this.ja>=this.Y&&Ic(this,!0);this.ba=0;this.ea=qa();this.K&&(a=this.ea-this.K,a>this.wa&&(this.D+=a,this.D>this.ea&&(this.D=this.ea)));try{do{for(var c=this.C.fb?1:this.fa,d=this.w.length-1;0<=d;d--){var e=this.w[d];0>e[0]||c>e[0]&&(c=e[0])}this.kb(c);var f=this.L-this.b;a= -f;for(var g=this.w.length-1;0<=g;g--){var h=this.w[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ba+=f;this.G+=f;Hc(this,0,!0);Ec(this,f);this.P-=f;if(0>=this.P){this.P+=this.fa;15<=++this.za&&(this.B&&this.B.Ja(),this.za=0);break}}while(this.C.Aa)}catch(k){this.qa();Dc(this);this.B&&this.B.stop(qa(),Fc(this));jb(this,!1);ob(this,k.stack||k.message);return}c=setTimeout;d=this.Fa;this.K=qa();e=this.wa;this.ba&&(e=Math.round(e*this.ba/this.fa));e-=this.K-this.ea;if(f=this.K-this.D)this.J=Math.round(this.G/ -(10*f))/100,864E5<=f&&(this.M=0,Gc(this));if(0>e||this.Je&&(this.D-=e),e=0;this.ja+=this.ba;this.K+=e;c(d,e)}else Dc(this),this.B&&this.B.stop(qa(),Fc(this))};l.kb=function(){return 0};l.qa=function(a){kb(this,!0);Lc(this);Hc(this,this.G);this.G=0;if(this.C.Aa){this.C.Aa=!1;this.I&&this.I.stop();var b=this.N.run;b&&(b.textContent="Run")}this.C.complete=a};function Dc(a,b){if(a.B){for(var c=a.B,d=0;da.J/a.ab?b=1:d=!0;a.Ra=b;b=a.ha*a.Ra;if(a.ab!=b){a.ab=b;b=a.ab.toFixed(2)+"Mhz";var e=a.N.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.xb()}Hc(a,a.G);a.G=0;a.D=qa();a.K=0;Ic(a);return d}function Jc(a,b){var c=a.w.length;a.w.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.w[b][0]&&(c*=a.Y*a.Ra/1E3,a.w[b][0]=c+Lc(a))}function Lc(a,b){var c=a.L-=a.b;a.b=0;b&&(a.L=0);return c} +l.bb=function(a){if(jb(this,!0)){if(!this.C.Aa){Gc(this);this.B&&this.B.start(this.D,Fc(this));this.C.Aa=!0;this.C.Sb=!0;this.I&&this.I.start();var b=this.N.run;b&&(b.textContent="Halt");this.B&&(this.B.Ja(!0),a&&this.B.xb(!0))}this.ja>=this.Y&&Ic(this,!0);this.ba=0;this.ea=qa();this.K&&(a=this.ea-this.K,a>this.wa&&(this.D+=a,this.D>this.ea&&(this.D=this.ea)));try{do{for(var c,d=this.C.fb?1:this.fa,e=this.w.length-1;0<=e;e--){var f=this.w[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.kb(c);c=Lc(this,!0);this.ba+= +c;this.G+=c;Ec(this,c);a=c;for(var g=this.w.length-1;0<=g;g--){var h=this.w[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.P-=c;if(0>=this.P){this.P+=this.fa;15<=++this.za&&(this.B&&this.B.Ja(),this.za=0);break}}while(this.C.Aa)}catch(k){this.qa();Dc(this);this.B&&this.B.stop(qa(),Fc(this));jb(this,!1);ob(this,k.stack||k.message);return}c=setTimeout;d=this.Fa;this.K=qa();e=this.wa;this.ba&&(e=Math.round(e*this.ba/this.fa));e-=this.K-this.ea;if(f=this.K-this.D)this.J=Math.round(this.G/(10*f))/ +100,864E5<=f&&(this.M=0,Gc(this));if(0>e||this.Je&&(this.D-=e),e=0;this.ja+=this.ba;this.K+=e;c(d,e)}else Dc(this),this.B&&this.B.stop(qa(),Fc(this))};l.kb=function(){return 0};l.qa=function(a){kb(this,!0);Lc(this);Hc(this,this.G);this.G=0;if(this.C.Aa){this.C.Aa=!1;this.I&&this.I.stop();var b=this.N.run;b&&(b.textContent="Run")}this.C.complete=a};function Dc(a,b){if(a.B){for(var c=a.B,d=0;d>>0,g],q=pa(p,k,a.uc);0>q&&p.splice(-(q+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.G.push({gf:b,F:c,Vd:d,Qa:e,tc:f})}delete this.Qa}return!0};Td.prototype.Ia=function(){return!0}; function Ud(a,b,c,d){if(d)a.ka("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Bb,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.B=f;else if(g)for(a.B=Array(4*g.length),d=c=0;c>8&255,a.B[d++]=g[c]>>16&255,a.B[d++]=g[c]>>24&255;else a.B=e;a.Qa=e.symbols;if(!a.B.length){w("Empty ROM: "+b);return}if(1==a.B.length){w(a.B[0]);return}}catch(h){a.ka("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, " ").replace(/ +$/,"").split(" "),a.B=Array(b.length),e=0;e>>f.ia;0>>=f.ia;0>>f.ia;0>>=f.ia;0=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=na(b[0]);if(c!=this.cb)return;b=na(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.M=d.receiveData){this.status(this.Bb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};l.Ea=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +l.zc=function(){if(!this.J){var a=zc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=na(b[0]);if(c!=this.cb)return;b=na(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.M=d.receiveData){this.status(this.Bb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};l.Ea=function(a,b){if(!b)if(this.zc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; l.Ia=function(a){return a?this.save():!0};l.reset=function(){we(this)};l.save=function(){var a=new J(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Y;c[b++]=this.ca;c[b++]=this.Da;c[b++]=this.K;c[b++]=this.P;c[b]=this.O;a.set(0,c);return a.data()};l.restore=function(a){return we(this,a[0])};function we(a,b){var c=0;b||(b=se);a.L=b[c++];a.Y=b[c++];a.ca=b[c++];a.Da=b[c++];a.K=b[c++];a.P=b[c++];a.O=b[c];return!0} function xe(a,b){var c=a.O&b;b&15||(c>>=4);b=re[c];c=((a.K&12)>>2)+6;a.K&16&&c++;c+=((a.K&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function te(a,b){hb(a,"receiveByte("+ca(b)+"), status="+ca(a.Da));return a.ba||a.Da&2?!1:(a.Y=b,a.Da|=2,Hd(a.b,a.la),!0)}l.Qb=function(a){null!=a&&(this.G="number"!=typeof a?a:this.G+String.fromCharCode(a));this.G&&(te(this,this.G.charCodeAt(0))&&(this.G=this.G.substr(1)),this.G&&this.b&&Kc(this.b,this.ra,xe(this,15)));return!0}; l.Od=function(a,b){var c=this.Y;E(this,a,null,b,"DATA",c);this.Da&=-3;return c};l.Nd=function(a,b){var c=this.Da;E(this,a,null,b,"STATUS",c);return c}; @@ -833,7 +833,7 @@ Pe="B C D E H L M A BC DE HL SP PC PS PSW".split(" "),Qe=[[45],[42,2067,32],[71, 18193,529],[66,18193,785],[66,18193,1041],[66,18193,1297],[66,18193,1617],[66,18193,1809],[5,18193,17],[5,18193,273],[5,18193,529],[5,18193,785],[5,18193,1041],[5,18193,1297],[5,18193,1617],[5,18193,1809],[76,18193,17],[76,18193,273],[76,18193,529],[76,18193,785],[76,18193,1041],[76,18193,1297],[76,18193,1617],[76,18193,1809],[46,18193,17],[46,18193,273],[46,18193,529],[46,18193,785],[46,18193,1041],[46,18193,1297],[46,18193,1617],[46,18193,1809],[18,18193,17],[18,18193,273],[18,18193,529],[18,18193, 785],[18,18193,1041],[18,18193,1297],[18,18193,1617],[18,18193,1809],[58],[50,2067],[34,51],[30,51],[11,51],[51,2067],[4,18193,33],[65,128],[62],[54],[38,51],[30,32819],[15,51],[7,51],[1,18193,33],[65,128],[57],[50,2323],[33,51],[48,33,18193],[10,51],[51,2323],[74,18193,33],[65,128],[55],[54,32768],[31,51],[27,18193,33],[8,51],[7,32819],[67,18193,33],[65,128],[61],[50,2579],[37,51],[78,19283,18963],[14,51],[51,2579],[6,18193,33],[65,128],[60],[49,2579],[36,51],[75,18963,18707],[13,51],[7,32819],[77, 18193,33],[65,128],[59],[50,3603],[35,51],[24],[12,51],[51,3603],[47,18193,33],[65,128],[56],[69,19219,18963],[32,51],[25],[9,51],[7,32819],[19,18193,33],[65,128]];l=He.prototype; -l.Pa=function(a,b,c,d){this.u=b;this.b=c;this.B=a;(a=nc(a,"messages"))&&Le(this,a);this.Fa=Qe;Pd(this,64,function(a){a:{var b=d.u.X,c=a[0],e=a=0,k=b.length;if(c){a=Re(Se(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.u.ia;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.g("..."):(c=p.type,n=zb[c],p&&d.g(t(p.id)+" %"+t(e<>>d.u.ia;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.g("..."):(c=p.type,n=zb[c],p&&d.g(t(p.id)+" %"+t(e<>8&255;case "E":d.V=f&255;break;case "H":d.W=f&255;break;case "H case "IF":d.ua=f?d.ua|512:d.ua&-513;break;default:a.g("unknown register: "+e);return}Dc(d);a.g("updated registers:")}a.g(Kf(a));c&&(a.M=Y(d.R),Bf(a,Z(a.M.F)))}}function Rf(a,b){b=na(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.g(yf(a,c[2])):Be(a,b,!0)}function Sf(a,b,c){var d="t"!=b;c=De(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Da(c,function(){return jb(a,!0)&&a.kb(e,d,!1)},function(){Dc(a.b);jb(a,!1)})} function Bf(a,b,c,d){if(b=Se(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Se(a,c,!0);if(!d||d.Fh[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.g(n)}h[3]&&(g=h[3],f=null);f=Hf(a,b,g,f);a.g(f);a.M=b;e-=b.F-k;c++}}} l.Fb=function(a,b,c){if(b)if(a){0>this.j&&this.w.length&&(this.j=0);if(0>this.j||a!=this.w[this.j])this.w.splice(0,0,a),this.j=0;this.j--}else this.P?a="end":a=this.w[this.j+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(na(a.substring(d,f))),d=f+1}}return b}; -function Gf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.P&&(a.g("ended assemble at "+Z(a.ca.F)),a.M=a.ca,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.la=null;if(nb(a)&&0n||"z"> "+b):(a.P&&(a.g("ended assemble at "+Z(a.ca.F)),a.M=a.ca,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.la=null;if(lb(a)&&0n||"z"Fa.length&&(a.g("note: only "+Fa.length+" available"),ia=Fa.length);ua-=ia;0>ua&&(null==Fa[Fa.length-1].F?(ia=ua+ia,ua=0):ua+=Fa.length);var ld=[];"call"==Ye&&(Gb=1E5,ld=["CALL"]);for(void 0!==Xe&&a.g(ia+" instructions earlier:");0< -Gb&&ua!=a.fa;){var af=Fa[ua++];if(null==af.F)break;var Hb=Y(af.F),kg=ia--,bf=Hf(a,Hb,"history",kg);(!ld.length||0<=bf.indexOf(ld[0]))&&a.g(bf);Hb.Lb&&(ua+=Hb.Lb,Gb-=Hb.Lb,ia-=Hb.Lb);ua>=Fa.length&&(ua=0);a.eb=ia;$e++;Gb--}}$e||(a.g("no "+Ze+"history available"),a.eb=void 0)}else{var oc=Se(a,X);if(oc){var pc=0;ta&&("l"==ta.charAt(0)&&(ta=ta.substr(1)||Cb),pc=De(a,ta)>>>0,65536>4||1;lg--&&0tc?String.fromCharCode(tc):".";rc--}Ib&&(Ib+="\n");Ib+=X+" "+nd+(Jb?"":" "+cf)}Ib&&a.g(Ib);a.Ua=oc}}}}break;case "e":if("else"==f[0])break;var uc=1,df=255,ef=a.aa,ff=a.va;"ew"==f[0]&&(uc=2,df=65535,ef=a.$a,ff=a.Ib);var gf=uc<<1,hf=f[1];if(null==hf)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a"); -else{var vc=Se(a,hf);if(vc)for(var wc=2;wcud;){for(var Wa=null,rg=256;65536>Mb.F>>>0;){kf.F=a.$a(Mb,2);if(null==Mb.F||!rg--)break;for(var sg=a,yc=kf,lf= -null,Nb=yc.F,mf=Nb,vd=1;6>=vd&&Nb;vd++){if(2=Fa.length&&(ua=0);a.eb=ia;$e++;Gb--}}$e||(a.g("no "+Ze+"history available"),a.eb=void 0)}else{var nc=Se(a,X);if(nc){var oc=0;ta&&("l"==ta.charAt(0)&&(ta=ta.substr(1)||Cb),oc=De(a,ta)>>>0,65536>4||1;lg--&&0sc?String.fromCharCode(sc):".";qc--}Ib&&(Ib+="\n");Ib+=X+" "+nd+(Jb?"":" "+cf)}Ib&&a.g(Ib);a.Ua=nc}}}}break;case "e":if("else"==f[0])break;var tc=1,df=255,ef=a.aa,ff=a.va;"ew"==f[0]&&(tc=2,df=65535,ef=a.$a,ff=a.Ib);var gf=tc<<1,hf=f[1];if(null==hf)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a"); +else{var uc=Se(a,hf);if(uc)for(var vc=2;vcud;){for(var Xa=null,rg=256;65536>Mb.F>>>0;){kf.F=a.$a(Mb,2);if(null==Mb.F||!rg--)break;for(var sg=a,xc=kf,lf= +null,Nb=xc.F,mf=Nb,vd=1;6>=vd&&Nb;vd++){if(2\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");for(b=0;bWf){if(Yf(d,this.L)){this.D=new J(this,"1.30.1","failsafe");Yf(this.D)&&(cg(this,d),a=2,dg(this.D));this.D.set("timestamp",ra());eg(this.D);var e=this.B&&!this.J;if(1==a||xa("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=bg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Yf(d,g):("error"== f&&"no machine state"!=g?(this.ka("Error: "+g),"unable to verify user"==g&&(Ba("user",""),this.j=null)):this.g(f+": "+g),dg(d),Yf(d)?(c=bg(d),e=!0):c=!1))}e&&ag(this,c?d:null)}else 2==a&&d.clear()}else ag(this);delete this.L;delete this.M}e=cb(this.id);for(f=0;fb?this.Sa=this.id:(this.Ta=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Wa:!1,eb:!1,Y:!1,error:!1};this.Za=null;this.l.error=!1;this.A={};this.N=null;v.push(this)}var Da=void 0,Ea={}; +function r(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ub=b.comment;this.Mc=b;b=this.id.indexOf(".");0>b?this.Sa=this.id:(this.Ta=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Wa:!1,eb:!1,Y:!1,error:!1};this.Za=null;this.l.error=!1;this.A={};this.O=null;v.push(this)}var Da=void 0,Ea={}; if(window){Da||(Da=window.location.search.substr(1));for(var Fa,Ga=/\+/g,Ha=/([^&=]+)=?([^&]*)/g;Fa=Ha.exec(Da);)Ea[decodeURIComponent(Fa[1].replace(Ga," "))]=decodeURIComponent(Fa[2].replace(Ga," "))}function Ia(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 w(a,b){b||(b=r);a.prototype=Ia(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ja=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Ja={},v=[];function Ka(a,b,c){Ja[a]&&b&&(Ja[a][b]=c)}function Aa(a,b,c){b||q((c?c+": ":"")+a)} -function La(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.j&&(this.j=10);15>2;this.f=this.c-1;this.i=this.u/this.c|0;this.o=this.i-1;this.m=[];this.v=[];this.B=[];this.C=[];a=new D;Ya(a,this.N);this.b=Array(this.i);for(b=0;b>>a.j;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.Ma)return h.cb+=h.Ma-e,h.Ma=e,!0;if(e>=h.Ma+h.cb){n=h.size-(e-l);n>f&&(n=f);h.cb=e-h.Ma+n;e=l+a.c;f-=n;g++;continue}}return $a(1,e,f)}e=new D(e,n,a.c,d);Ya(e,a.N,h);a.b[g++]=e;e=l+a.c;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+p(b,4,!0)),!0):$a(2,b,c)}Xa.prototype.J=function(a){return this.b[(a&this.g)>>>this.j].Pa(a&this.f,a)}; +0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1];function Ua(a){r.call(this,"Panel",a,Ua)}w(Ua);k=Ua.prototype;k.V=function(a,b,c,d){return this.v&&this.v.V(a,b,c,d)||this.a&&this.a.V(a,b,c,d)||this.m&&this.m.V(a,b,c,d)?!0:this.parent.V.call(this,a,b,c,d)};k.qa=function(a,b,c,d){this.v=a;this.j=b;this.a=c;this.O=d;this.m=Va(a,"Keyboard")};k.ga=function(a,b){b||Wa();return!0};k.ia=function(){return!0};k.Aa=function(){}; +function Wa(){for(var a=!1,b=A(document,"pc8080","panel"),c=0;c>1)+2;10>this.j&&(this.j=10);15>2;this.f=this.c-1;this.i=this.u/this.c|0;this.o=this.i-1;this.m=[];this.v=[];this.B=[];this.C=[];a=new D;Ya(a,this.O);this.b=Array(this.i);for(b=0;b>>a.j;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.Ma)return h.cb+=h.Ma-e,h.Ma=e,!0;if(e>=h.Ma+h.cb){n=h.size-(e-l);n>f&&(n=f);h.cb=e-h.Ma+n;e=l+a.c;f-=n;g++;continue}}return $a(1,e,f)}e=new D(e,n,a.c,d);Ya(e,a.O,h);a.b[g++]=e;e=l+a.c;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+p(b,4,!0)),!0):$a(2,b,c)}Xa.prototype.J=function(a){return this.b[(a&this.g)>>>this.j].Pa(a&this.f,a)}; function bb(a,b){return a.b[(b&a.g)>>>a.j].bb(b&a.f,b)}function cb(a,b){var c=b&a.f,d=(b&a.g)>>>a.j;return c!=a.f?a.b[d].kd(c,b):a.b[d++].Pa(c,b)|a.b[d&a.o].Pa(0,b+1)<<8}Xa.prototype.aa=function(a,b){this.b[(a&this.g)>>>this.j].Qa(a&this.f,b&255,a)};function db(a,b,c){a.b[(b&a.g)>>>a.j].Hb(b&a.f,c&255,b)}function fb(a,b,c){var d=b&a.f,e=(b&a.g)>>>a.j;d!=a.f?a.b[e].ld(d,c&65535,b):(a.b[e++].Qa(d,c&255,b),a.b[e&a.o].Qa(0,c>>8&255,b+1))} function gb(a){for(var b=0,c=[],d=0;d>1),this.a=new Int32Array(this.j,0,c>>2),pb(this,lb?qb:rb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},C:function(a){return this.a[a>> -2]>>>((a&3)<<3)&255},I:function(a){var 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},S: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.na=!0},w:function(a,b){return this.bb(a,b)},K:function(a,b){return this.Eb(a,b)},O:function(a,b,c){this.c||this.Hb(a,b,c)},W:function(a, -b,c){this.c||this.X(a,b,c)},u:function(a){return this.b[a]},B:function(a){return this.b[a]},G:function(a){return this.A.getUint16(a,!0)},H:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.i[a>>1]},L:function(a,b){this.b[a]=b;this.na=!0},R:function(a,b){this.b[a]=b;this.na=!0},T:function(a,b){this.A.setUint16(a,b,!0);this.na=!0},Z:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.i[a>>1]=b;this.na=!0}};function Ya(a,b,c){a.N=b;a.f=a.g=0;c&&((a.f=c.f)&&tb(a,ub,!1),(a.g=c.g)&&vb(a,ub,!1))} -function vb(a,b,c){c&&a.g||(a.Qa=!a.c&&b[1]||a.o,a.ld=!a.c&&b[3]||a.s);if(c||void 0===c)a.Hb=b[1]||a.o,a.X=b[3]||a.s}function tb(a,b,c){c&&a.f||(a.Pa=b[0]||a.m,a.kd=b[2]||a.v);if(c||void 0===c)a.bb=b[0]||a.m,a.Eb=b[2]||a.v}function pb(a,b){b||(b=wb);tb(a,b,void 0);vb(a,b,void 0)}var wb=[],sb=[D.prototype.C,D.prototype.S,D.prototype.I,D.prototype.ea],ub=[D.prototype.w,D.prototype.O,D.prototype.K,D.prototype.W]; -if(Sa)var rb=[D.prototype.u,D.prototype.L,D.prototype.G,D.prototype.T],qb=[D.prototype.B,D.prototype.R,D.prototype.H,D.prototype.Z];function xb(a,b){r.call(this,"CPU",a,xb);var c=a.multiplier||1;this.la=a.cycles||b;this.I=c;this.Ca=Math.round(this.la/1E4)/100;this.W=this.Ca*this.I;this.l.oa=!1;this.l.Fb=!1;this.l.Na=a.autoStart;this.l.yb=!1;this.l.Xa=!1;this.ta=this.X=0;this.ua=a.csStart;this.Z=a.csInterval;this.ea=a.csStop;this.G=[];this.Va=this.hb.bind(this);B(this)}w(xb);var yb=["power","reset"]; -k=xb.prototype;k.qa=function(a,b,c,d){this.v=a;this.j=b;this.N=d;for(b=0;b>>((a&3)<<3)&255},I:function(a){var 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},S: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.na=!0},w:function(a,b){return this.bb(a,b)},H:function(a,b){return this.Eb(a,b)},N:function(a,b,c){this.c||this.Hb(a,b,c)},W:function(a, +b,c){this.c||this.X(a,b,c)},u:function(a){return this.b[a]},B:function(a){return this.b[a]},G:function(a){return this.A.getUint16(a,!0)},M:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.i[a>>1]},K:function(a,b){this.b[a]=b;this.na=!0},R:function(a,b){this.b[a]=b;this.na=!0},U:function(a,b){this.A.setUint16(a,b,!0);this.na=!0},Z:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.i[a>>1]=b;this.na=!0}};function Ya(a,b,c){a.O=b;a.f=a.g=0;c&&((a.f=c.f)&&tb(a,ub,!1),(a.g=c.g)&&vb(a,ub,!1))} +function vb(a,b,c){c&&a.g||(a.Qa=!a.c&&b[1]||a.o,a.ld=!a.c&&b[3]||a.s);if(c||void 0===c)a.Hb=b[1]||a.o,a.X=b[3]||a.s}function tb(a,b,c){c&&a.f||(a.Pa=b[0]||a.m,a.kd=b[2]||a.v);if(c||void 0===c)a.bb=b[0]||a.m,a.Eb=b[2]||a.v}function pb(a,b){b||(b=wb);tb(a,b,void 0);vb(a,b,void 0)}var wb=[],sb=[D.prototype.C,D.prototype.S,D.prototype.I,D.prototype.ea],ub=[D.prototype.w,D.prototype.N,D.prototype.H,D.prototype.W]; +if(Sa)var rb=[D.prototype.u,D.prototype.K,D.prototype.G,D.prototype.U],qb=[D.prototype.B,D.prototype.R,D.prototype.M,D.prototype.Z];function xb(a,b){r.call(this,"CPU",a,xb);var c=a.multiplier||1;this.la=a.cycles||b;this.K=c;this.Ca=Math.round(this.la/1E4)/100;this.U=this.Ca*this.K;this.l.oa=!1;this.l.Fb=!1;this.l.Na=a.autoStart;this.l.yb=!1;this.l.Xa=!1;this.ta=this.X=0;this.ua=a.csStart;this.Z=a.csInterval;this.ea=a.csStop;this.G=[];this.Va=this.hb.bind(this);B(this)}w(xb);var yb=["power","reset"]; +k=xb.prototype;k.qa=function(a,b,c,d){this.v=a;this.j=b;this.O=d;for(b=0;ba.O/a.W&&(b=1);a.I=b;b=a.Ca*a.I;if(a.W!=b){a.W=b;b=a.W.toFixed(2)+"Mhz";var d=a.A.setSpeed;d&&(d.textContent=b);a.da("target speed: "+b)}c&&a.v&&Ib(a.v)}Fb(a,a.L);a.L=0;a.H=ja();a.R=0;Gb(a)}function Jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function Lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.la*a.I/1E3,a.G[b][0]=c)}function Mb(a){a.S-=a.a;a.a=0} -k.hb=function(a){if(Qa(this,!0)){if(!this.l.oa){Eb(this);this.v&&this.v.start(this.H,Hb(this));this.l.oa=!0;this.l.Fb=!0;this.K&&this.K.start();var b=this.A.run;b&&(b.textContent="Halt");this.v&&(this.v.Aa(!0),a&&Ib(this.v,!0))}this.Da>=this.la&&Gb(this,!0);this.pa=0;this.sa=ja();this.R&&(a=this.sa-this.R,a>this.Ka&&(this.H+=a,this.H>this.sa&&(this.H=this.sa)));try{do{for(var c=this.l.Xa?1:this.xa,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}this.Gb(c);var f=this.S-this.a; -a=f;for(var g=this.G.length-1;0<=g;g--){var h=this.G[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.pa+=f;this.L+=f;Fb(this,0,!0);a=f;this.l.Xa&&(b=!1,this.ta=this.ta+this.Bb()|0,this.X-=a,0>=this.X&&(this.X+=this.Z,b=!0),0<=this.ea&&this.ea<=Hb(this)&&(this.Z=this.ea=-1,Bb(this),Db(this),b=!0),b&&this.da(Hb(this)+" cycles: checksum="+p(this.ta)));this.ja-=f;if(0>=this.ja){this.ja+=this.xa;15<=++this.La&&(this.v&&this.v.Aa(),this.La=0);break}}while(this.l.oa)}catch(l){Db(this);Cb(this);this.v&& -this.v.stop(ja(),Hb(this));Qa(this,!1);c=l.stack||l.message;this.l.error=!0;this.M(c);return}c=setTimeout;d=this.Va;this.R=ja();e=this.Ka;this.pa&&(e=Math.round(e*this.pa/this.xa));e-=this.R-this.sa;if(f=this.R-this.H)this.O=Math.round(this.L/(10*f))/100,864E5<=f&&(this.T=0,Eb(this));if(0>e||this.Oe&&(this.H-=e),e=0;this.Da+=this.pa;this.R+=e;c(d,e)}else Cb(this),this.v&&this.v.stop(ja(),Hb(this))};k.Gb=function(){return 0}; -function Db(a){a.l.Wa&&(a.l.eb=!0);Mb(a);Fb(a,a.L);a.L=0;if(a.l.oa){a.l.oa=!1;a.K&&a.K.stop();var b=a.A.run;b&&(b.textContent="Run")}a.l.complete=void 0}function Cb(a){if(a.v){for(var b=a.v,c=0;c>8&255;a.D=b&255}function Xb(a){return a.f<<8|a.F}function Yb(a,b){a.f=b>>8&255;a.F=b&255}function G(a){return a.g<<8|a.i} -function I(a,b){a.g=b>>8&255;a.i=b&255}function E(a,b){a.o=b&65535}function J(a){return a.m&256?1:0}function K(a,b){a.m=a.m&255|b}function Zb(a){return Ta[a.s&255]?4:0}function Ub(a){return a.C&-214|(a.s&128?128:0)|(a.m&255?0:64)|((a.s^a.w)&16?16:0)|Zb(a)|J(a)}function Sb(a,b){a.m=a.s=a.w=0;b&1&&(a.m|=256);b&4||(a.s|=1);b&16&&(a.w|=16);b&64||(a.m|=255);b&128&&(a.s^=192);a.C=a.C&-726|b&512|2}function L(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b)&255} -function $b(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?1:0))&255}function ac(a,b){a.m=a.s=a.w=a.b&b;(a.b|b)&8&&(a.w^=16);return a.m}function bc(a,b){a.w=b^255;b=a.s=b+255&255;a.m=a.m&-256|b;return b}function cc(a,b){a.w=b;b=a.s=b+1&255;a.m=a.m&-256|b;return b}function dc(a,b){return a.s=a.m=a.w=a.b|b}function M(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+1^256)&255}function ec(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?0:1)^256)&255}function fc(a,b){return a.s=a.m=a.w=a.b^b}k.J=function(a){return this.j.J(a)}; -k.aa=function(a,b){this.j.aa(a,b)};function N(a){var b=a.J(a.o);E(a,a.o+1);return b}function O(a){var b=cb(a.j,a.o);E(a,a.o+2);return b}function P(a){var b=cb(a.j,a.u);a.u=a.u+2&65535;return b}function R(a,b){a.u=a.u-2&65535;fb(a.j,a.u,b)}function gc(a){if(a.a&&a.B&255&&a.C&512){for(var b=0;8>b&&!(a.B&1<b?255:1<>8;K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Vb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Vb(this));this.a-=7},function(){Wb(this,Vb(this)-1);this.a-=5}, -function(){this.D=cc(this,this.D);this.a-=5},function(){this.D=bc(this,this.D);this.a-=5},function(){this.D=N(this);this.a-=7},function(){var a=this.b<<8&256;this.b=(a|this.b)>>1;K(this,a);this.a-=4},ic,function(){Yb(this,O(this));this.a-=10},function(){this.aa(Xb(this),this.b);this.a-=7},function(){Yb(this,Xb(this)+1);this.a-=5},function(){this.f=cc(this,this.f);this.a-=5},function(){this.f=bc(this,this.f);this.a-=5},function(){this.f=N(this);this.a-=7},function(){var a=this.b<<1;this.b=a&255|J(this); -K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Xb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Xb(this));this.a-=7},function(){Yb(this,Xb(this)-1);this.a-=5},function(){this.F=cc(this,this.F);this.a-=5},function(){this.F=bc(this,this.F);this.a-=5},function(){this.F=N(this);this.a-=7},function(){var a=this.b<<8;this.b=(J(this)<<8|this.b)>>1;K(this,a&256);this.a-=4},ic,function(){I(this,O(this));this.a-=10},function(){var a=O(this);fb(this.j,a,G(this));this.a-=16},function(){I(this, -G(this)+1);this.a-=5},function(){this.g=cc(this,this.g);this.a-=5},function(){this.g=bc(this,this.g);this.a-=5},function(){this.g=N(this);this.a-=7},function(){var a=0,b=J(this);if((this.s^this.w)&16||9<(this.b&15))a|=6;if(b||154<=this.b)a|=96,b=1;this.b=L(this,a);K(this,b?256:0);this.a-=4},ic,function(){var a;I(this,a=G(this)+G(this));K(this,a>>8&256);this.a-=10},function(){var a;a=O(this);a=cb(this.j,a);I(this,a);this.a-=16},function(){I(this,G(this)-1);this.a-=5},function(){this.i=cc(this,this.i); -this.a-=5},function(){this.i=bc(this,this.i);this.a-=5},function(){this.i=N(this);this.a-=7},function(){this.b=~this.b&255;this.a-=4},ic,function(){this.u=O(this)&65535;this.a-=10},function(){this.aa(O(this),this.b);this.a-=13},function(){this.u=this.u+1&65535;this.a-=5},function(){var a=G(this);this.aa(a,cc(this,this.J(a)));this.a-=10},function(){var a=G(this);this.aa(a,bc(this,this.J(a)));this.a-=10},function(){this.aa(G(this),N(this));this.a-=10},function(){this.m|=256;this.a-=4},ic,function(){var a; -I(this,a=G(this)+this.u);K(this,a>>8&256);this.a-=10},function(){this.b=this.J(O(this));this.a-=13},function(){this.u=this.u-1&65535;this.a-=5},function(){this.b=cc(this,this.b);this.a-=5},function(){this.b=bc(this,this.b);this.a-=5},function(){this.b=N(this);this.a-=7},function(){K(this,J(this)?0:256);this.a-=4},function(){this.a-=5},function(){this.c=this.D;this.a-=5},function(){this.c=this.f;this.a-=5},function(){this.c=this.F;this.a-=5},function(){this.c=this.g;this.a-=5},function(){this.c=this.i; +break;case "speed":this.A[b]=c;a=!0;break;case "setSpeed":this.A[b]=c,c.onclick=function(){Eb(d,d.K<<1,!0)},c.textContent=this.U.toFixed(2)+"Mhz",a=!0}return a};function Fb(a,b){var c=1;b&&1a.R/a.U&&(b=1);a.K=b;b=a.Ca*a.K;if(a.U!=b){a.U=b;b=a.U.toFixed(2)+"Mhz";var d=a.A.setSpeed;d&&(d.textContent=b);a.da("target speed: "+b)}c&&a.v&&Hb(a.v)}a.H+=a.N;a.N=0;a.I=ja();a.S=0;Fb(a)}function Ib(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function Kb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.la*a.K/1E3,a.G[b][0]=c+Lb(a))}function Lb(a,b){var c=a.W-=a.a;a.a=0;b&&(a.W=0);return c} +k.hb=function(a){if(Qa(this,!0)){if(!this.l.oa){Eb(this);this.v&&this.v.start(this.I,Gb(this));this.l.oa=!0;this.l.Fb=!0;this.M&&this.M.start();var b=this.A.run;b&&(b.textContent="Halt");this.v&&(this.v.Aa(!0),a&&Hb(this.v,!0))}this.Da>=this.la&&Fb(this,!0);this.pa=0;this.sa=ja();this.S&&(a=this.sa-this.S,a>this.Ka&&(this.I+=a,this.I>this.sa&&(this.I=this.sa)));try{do{for(var c,d=this.l.Xa?1:this.xa,e=this.G.length-1;0<=e;e--){var f=this.G[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.Gb(c);c=Lb(this,!0); +this.pa+=c;this.N+=c;a=c;this.l.Xa&&(b=!1,this.ta=this.ta+this.Bb()|0,this.X-=a,0>=this.X&&(this.X+=this.Z,b=!0),0<=this.ea&&this.ea<=Gb(this)&&(this.Z=this.ea=-1,Bb(this),Db(this),b=!0),b&&this.da(Gb(this)+" cycles: checksum="+p(this.ta)));a=c;for(var g=this.G.length-1;0<=g;g--){var h=this.G[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ja-=c;if(0>=this.ja){this.ja+=this.xa;15<=++this.La&&(this.v&&this.v.Aa(),this.La=0);break}}while(this.l.oa)}catch(l){Db(this);Cb(this);this.v&&this.v.stop(ja(), +Gb(this));Qa(this,!1);c=l.stack||l.message;this.l.error=!0;this.L(c);return}c=setTimeout;d=this.Va;this.S=ja();e=this.Ka;this.pa&&(e=Math.round(e*this.pa/this.xa));e-=this.S-this.sa;if(f=this.S-this.I)this.R=Math.round(this.N/(10*f))/100,864E5<=f&&(this.H=0,Eb(this));if(0>e||this.Re&&(this.I-=e),e=0;this.Da+=this.pa;this.S+=e;c(d,e)}else Cb(this),this.v&&this.v.stop(ja(),Gb(this))};k.Gb=function(){return 0}; +function Db(a){a.l.Wa&&(a.l.eb=!0);Lb(a);a.H+=a.N;a.N=0;if(a.l.oa){a.l.oa=!1;a.M&&a.M.stop();var b=a.A.run;b&&(b.textContent="Run")}a.l.complete=void 0}function Cb(a){if(a.v){for(var b=a.v,c=0;c>8&255;a.D=b&255}function Wb(a){return a.f<<8|a.F}function Xb(a,b){a.f=b>>8&255;a.F=b&255}function G(a){return a.g<<8|a.i} +function I(a,b){a.g=b>>8&255;a.i=b&255}function E(a,b){a.o=b&65535}function J(a){return a.m&256?1:0}function K(a,b){a.m=a.m&255|b}function Yb(a){return Ta[a.s&255]?4:0}function Tb(a){return a.C&-214|(a.s&128?128:0)|(a.m&255?0:64)|((a.s^a.w)&16?16:0)|Yb(a)|J(a)}function Rb(a,b){a.m=a.s=a.w=0;b&1&&(a.m|=256);b&4||(a.s|=1);b&16&&(a.w|=16);b&64||(a.m|=255);b&128&&(a.s^=192);a.C=a.C&-726|b&512|2}function L(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b)&255} +function Zb(a,b){a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?1:0))&255}function $b(a,b){a.m=a.s=a.w=a.b&b;(a.b|b)&8&&(a.w^=16);return a.m}function ac(a,b){a.w=b^255;b=a.s=b+255&255;a.m=a.m&-256|b;return b}function bc(a,b){a.w=b;b=a.s=b+1&255;a.m=a.m&-256|b;return b}function cc(a,b){return a.s=a.m=a.w=a.b|b}function M(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+1^256)&255}function dc(a,b){b^=255;a.w=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?0:1)^256)&255}function ec(a,b){return a.s=a.m=a.w=a.b^b}k.J=function(a){return this.j.J(a)}; +k.aa=function(a,b){this.j.aa(a,b)};function N(a){var b=a.J(a.o);E(a,a.o+1);return b}function O(a){var b=cb(a.j,a.o);E(a,a.o+2);return b}function P(a){var b=cb(a.j,a.u);a.u=a.u+2&65535;return b}function R(a,b){a.u=a.u-2&65535;fb(a.j,a.u,b)}function fc(a){if(a.a&&a.B&255&&a.C&512){for(var b=0;8>b&&!(a.B&1<b?255:1<>8;K(this,a&256);this.a-=4},hc,function(){var a;I(this,a=G(this)+Ub(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Ub(this));this.a-=7},function(){Vb(this,Ub(this)-1);this.a-=5}, +function(){this.D=bc(this,this.D);this.a-=5},function(){this.D=ac(this,this.D);this.a-=5},function(){this.D=N(this);this.a-=7},function(){var a=this.b<<8&256;this.b=(a|this.b)>>1;K(this,a);this.a-=4},hc,function(){Xb(this,O(this));this.a-=10},function(){this.aa(Wb(this),this.b);this.a-=7},function(){Xb(this,Wb(this)+1);this.a-=5},function(){this.f=bc(this,this.f);this.a-=5},function(){this.f=ac(this,this.f);this.a-=5},function(){this.f=N(this);this.a-=7},function(){var a=this.b<<1;this.b=a&255|J(this); +K(this,a&256);this.a-=4},hc,function(){var a;I(this,a=G(this)+Wb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Wb(this));this.a-=7},function(){Xb(this,Wb(this)-1);this.a-=5},function(){this.F=bc(this,this.F);this.a-=5},function(){this.F=ac(this,this.F);this.a-=5},function(){this.F=N(this);this.a-=7},function(){var a=this.b<<8;this.b=(J(this)<<8|this.b)>>1;K(this,a&256);this.a-=4},hc,function(){I(this,O(this));this.a-=10},function(){var a=O(this);fb(this.j,a,G(this));this.a-=16},function(){I(this, +G(this)+1);this.a-=5},function(){this.g=bc(this,this.g);this.a-=5},function(){this.g=ac(this,this.g);this.a-=5},function(){this.g=N(this);this.a-=7},function(){var a=0,b=J(this);if((this.s^this.w)&16||9<(this.b&15))a|=6;if(b||154<=this.b)a|=96,b=1;this.b=L(this,a);K(this,b?256:0);this.a-=4},hc,function(){var a;I(this,a=G(this)+G(this));K(this,a>>8&256);this.a-=10},function(){var a;a=O(this);a=cb(this.j,a);I(this,a);this.a-=16},function(){I(this,G(this)-1);this.a-=5},function(){this.i=bc(this,this.i); +this.a-=5},function(){this.i=ac(this,this.i);this.a-=5},function(){this.i=N(this);this.a-=7},function(){this.b=~this.b&255;this.a-=4},hc,function(){this.u=O(this)&65535;this.a-=10},function(){this.aa(O(this),this.b);this.a-=13},function(){this.u=this.u+1&65535;this.a-=5},function(){var a=G(this);this.aa(a,bc(this,this.J(a)));this.a-=10},function(){var a=G(this);this.aa(a,ac(this,this.J(a)));this.a-=10},function(){this.aa(G(this),N(this));this.a-=10},function(){this.m|=256;this.a-=4},hc,function(){var a; +I(this,a=G(this)+this.u);K(this,a>>8&256);this.a-=10},function(){this.b=this.J(O(this));this.a-=13},function(){this.u=this.u-1&65535;this.a-=5},function(){this.b=bc(this,this.b);this.a-=5},function(){this.b=ac(this,this.b);this.a-=5},function(){this.b=N(this);this.a-=7},function(){K(this,J(this)?0:256);this.a-=4},function(){this.a-=5},function(){this.c=this.D;this.a-=5},function(){this.c=this.f;this.a-=5},function(){this.c=this.F;this.a-=5},function(){this.c=this.g;this.a-=5},function(){this.c=this.i; this.a-=5},function(){this.c=this.J(G(this));this.a-=7},function(){this.c=this.b;this.a-=5},function(){this.D=this.c;this.a-=5},function(){this.a-=5},function(){this.D=this.f;this.a-=5},function(){this.D=this.F;this.a-=5},function(){this.D=this.g;this.a-=5},function(){this.D=this.i;this.a-=5},function(){this.D=this.J(G(this));this.a-=7},function(){this.D=this.b;this.a-=5},function(){this.f=this.c;this.a-=5},function(){this.f=this.D;this.a-=5},function(){this.a-=5},function(){this.f=this.F;this.a-= 5},function(){this.f=this.g;this.a-=5},function(){this.f=this.i;this.a-=5},function(){this.f=this.J(G(this));this.a-=7},function(){this.f=this.b;this.a-=5},function(){this.F=this.c;this.a-=5},function(){this.F=this.D;this.a-=5},function(){this.F=this.f;this.a-=5},function(){this.a-=5},function(){this.F=this.g;this.a-=5},function(){this.F=this.i;this.a-=5},function(){this.F=this.J(G(this));this.a-=7},function(){this.F=this.b;this.a-=5},function(){this.g=this.c;this.a-=5},function(){this.g=this.D;this.a-= 5},function(){this.g=this.f;this.a-=5},function(){this.g=this.F;this.a-=5},function(){this.a-=5},function(){this.g=this.i;this.a-=5},function(){this.g=this.J(G(this));this.a-=7},function(){this.g=this.b;this.a-=5},function(){this.i=this.c;this.a-=5},function(){this.i=this.D;this.a-=5},function(){this.i=this.f;this.a-=5},function(){this.i=this.F;this.a-=5},function(){this.i=this.g;this.a-=5},function(){this.a-=5},function(){this.i=this.J(G(this));this.a-=7},function(){this.i=this.b;this.a-=5},function(){this.aa(G(this), -this.c);this.a-=7},function(){this.aa(G(this),this.D);this.a-=7},function(){this.aa(G(this),this.f);this.a-=7},function(){this.aa(G(this),this.F);this.a-=7},function(){this.aa(G(this),this.g);this.a-=7},function(){this.aa(G(this),this.i);this.a-=7},function(){var a=this.o-1;if(this.ra.length)for(var b=0;b>>=f)&l;if(void 0!==g&&g[0])g[0](a,l,d);f+=h<<3;a+=h;e-=h}this.a-=10},function(){var a=O(this);J(this)||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this,Xb(this));this.a-=11},function(){this.b=M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,16);this.a-=11},function(){J(this)&&(E(this,P(this)),this.a-=6);this.a-=5},kc,function(){var a=O(this);J(this)&&E(this,a);this.a-=10},function(){for(var a=N(this),b=this.j,c=this.o+-2&65535,d=1,e=0, -f=0;0>8;this.a-=10},function(){var a=O(this);this.s&128||E(this,a);this.a-=10},function(){this.C&=-513;this.a-=4},function(){var a=O(this);this.s&128||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this, -Ub(this)&255|this.b<<8);this.a-=11},function(){this.b=dc(this,N(this));this.a-=7},function(){R(this,this.o);E(this,48);this.a-=11},function(){this.s&128&&(E(this,P(this)),this.a-=6);this.a-=5},function(){this.u=G(this)&65535;this.a-=5},function(){var a=O(this);this.s&128&&E(this,a);this.a-=10},function(){this.C|=512;this.a-=4;gc(this)},function(){var a=O(this);this.s&128&&(R(this,this.o),E(this,a),this.a-=6);this.a-=11},lc,function(){M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,56); -this.a-=11}];function T(a){r.call(this,"ChipSet",a,T);var b=a.model;b&&!mc[b]&&Aa("Unrecognized ChipSet model: "+b);this.c=mc[b]||{};a.sound&&(this.I=null,window&&(this.I=window.AudioContext||window.webkitAudioContext),this.I&&new this.I);B(this)}w(T); +L(this,this.J(G(this)));this.a-=7},function(){this.b=L(this,this.b);this.a-=4},function(){this.b=Zb(this,this.c);this.a-=4},function(){this.b=Zb(this,this.D);this.a-=4},function(){this.b=Zb(this,this.f);this.a-=4},function(){this.b=Zb(this,this.F);this.a-=4},function(){this.b=Zb(this,this.g);this.a-=4},function(){this.b=Zb(this,this.i);this.a-=4},function(){this.b=Zb(this,this.J(G(this)));this.a-=7},function(){this.b=Zb(this,this.b);this.a-=4},function(){this.b=M(this,this.c);this.a-=4},function(){this.b= +M(this,this.D);this.a-=4},function(){this.b=M(this,this.f);this.a-=4},function(){this.b=M(this,this.F);this.a-=4},function(){this.b=M(this,this.g);this.a-=4},function(){this.b=M(this,this.i);this.a-=4},function(){this.b=M(this,this.J(G(this)));this.a-=7},function(){this.b=M(this,this.b);this.a-=4},function(){this.b=dc(this,this.c);this.a-=4},function(){this.b=dc(this,this.D);this.a-=4},function(){this.b=dc(this,this.f);this.a-=4},function(){this.b=dc(this,this.F);this.a-=4},function(){this.b=dc(this, +this.g);this.a-=4},function(){this.b=dc(this,this.i);this.a-=4},function(){this.b=dc(this,this.J(G(this)));this.a-=7},function(){this.b=dc(this,this.b);this.a-=4},function(){this.b=$b(this,this.c);this.a-=4},function(){this.b=$b(this,this.D);this.a-=4},function(){this.b=$b(this,this.f);this.a-=4},function(){this.b=$b(this,this.F);this.a-=4},function(){this.b=$b(this,this.g);this.a-=4},function(){this.b=$b(this,this.i);this.a-=4},function(){this.b=$b(this,this.J(G(this)));this.a-=7},function(){this.b= +$b(this,this.b);this.a-=4},function(){this.b=ec(this,this.c);this.a-=4},function(){this.b=ec(this,this.D);this.a-=4},function(){this.b=ec(this,this.f);this.a-=4},function(){this.b=ec(this,this.F);this.a-=4},function(){this.b=ec(this,this.g);this.a-=4},function(){this.b=ec(this,this.i);this.a-=4},function(){this.b=ec(this,this.J(G(this)));this.a-=7},function(){this.b=ec(this,this.b);this.a-=4},function(){this.b=cc(this,this.c);this.a-=4},function(){this.b=cc(this,this.D);this.a-=4},function(){this.b= +cc(this,this.f);this.a-=4},function(){this.b=cc(this,this.F);this.a-=4},function(){this.b=cc(this,this.g);this.a-=4},function(){this.b=cc(this,this.i);this.a-=4},function(){this.b=cc(this,this.J(G(this)));this.a-=7},function(){this.b=cc(this,this.b);this.a-=4},function(){M(this,this.c);this.a-=4},function(){M(this,this.D);this.a-=4},function(){M(this,this.f);this.a-=4},function(){M(this,this.F);this.a-=4},function(){M(this,this.g);this.a-=4},function(){M(this,this.i);this.a-=4},function(){M(this, +this.J(G(this)));this.a-=7},function(){M(this,this.b);this.a-=4},function(){this.m&255&&(E(this,P(this)),this.a-=6);this.a-=5},function(){Vb(this,P(this));this.a-=10},function(){var a=O(this);this.m&255&&E(this,a);this.a-=10},ic,function(){var a=O(this);this.m&255&&(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this,Ub(this));this.a-=11},function(){this.b=L(this,N(this));this.a-=7},function(){R(this,this.o);E(this,0);this.a-=11},function(){this.m&255||(E(this,P(this)),this.a-=6);this.a-= +5},jc,function(){var a=O(this);this.m&255||E(this,a);this.a-=10},ic,function(){var a=O(this);this.m&255||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},kc,function(){this.b=Zb(this,N(this));this.a-=7},function(){R(this,this.o);E(this,8);this.a-=11},function(){J(this)||(E(this,P(this)),this.a-=6);this.a-=5},function(){Xb(this,P(this));this.a-=10},function(){var a=O(this);J(this)||E(this,a);this.a-=10},function(){for(var a=N(this),b=this.j,c=this.b,d=this.o+-2&65535,e=1,f=0;0>>=f)&l;if(void 0!==g&&g[0])g[0](a,l,d);f+=h<<3;a+=h;e-=h}this.a-=10},function(){var a=O(this);J(this)||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this,Wb(this));this.a-=11},function(){this.b=M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,16);this.a-=11},function(){J(this)&&(E(this,P(this)),this.a-=6);this.a-=5},jc,function(){var a=O(this);J(this)&&E(this,a);this.a-=10},function(){for(var a=N(this),b=this.j,c=this.o+-2&65535,d=1,e=0, +f=0;0>8;this.a-=10},function(){var a=O(this);this.s&128||E(this,a);this.a-=10},function(){this.C&=-513;this.a-=4},function(){var a=O(this);this.s&128||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this, +Tb(this)&255|this.b<<8);this.a-=11},function(){this.b=cc(this,N(this));this.a-=7},function(){R(this,this.o);E(this,48);this.a-=11},function(){this.s&128&&(E(this,P(this)),this.a-=6);this.a-=5},function(){this.u=G(this)&65535;this.a-=5},function(){var a=O(this);this.s&128&&E(this,a);this.a-=10},function(){this.C|=512;this.a-=4;fc(this)},function(){var a=O(this);this.s&128&&(R(this,this.o),E(this,a),this.a-=6);this.a-=11},kc,function(){M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,56); +this.a-=11}];function T(a){r.call(this,"ChipSet",a,T);var b=a.model;b&&!lc[b]&&Aa("Unrecognized ChipSet model: "+b);this.c=lc[b]||{};a.sound&&(this.I=null,window&&(this.I=window.AudioContext||window.webkitAudioContext),this.I&&new this.I);B(this)}w(T); var V={ba:1978.1,zc:{ca:0,td:1,xd:16,Ed:32,Nd:64,Md:128,Fa:14},za:{ca:1,Pb:1,sc:2,oc:4,pc:16,qc:32,rc:64,Fa:8},Ac:{ca:2,sd:3,Wd:4,ud:8,Id:16,Jd:32,Kd:64,vd:128,Fa:0},Rd:{ca:3},Pd:{ca:2,Fd:7},Td:{ca:3,Xd:1,Sd:2,Ld:4,Cd:8,wd:16,md:32},Qd:{ca:4},Ud:{ca:5,yd:1,zd:2,Ad:4,Bd:8,Yd:16}},W={ba:100,ka:{ca:66,vb:1,kc:2,lc:4,Hd:8,Gd:16,sb:32,rb:64,nb:128},Nb:{ca:66,INIT:0},wa:{ca:194,od:0,lb:16,uc:32,tb:48,Xb:0,Yb:32},Ra:{ca:162,Od:0,$b:0,Wb:0,Zb:0,Vb:0},ma:{Dd:{ca:98},Ba:{Kb:0,Jb:1,xc:2,Fc:4,Qb:5,vc:6,Vd:7}, -Ua:16383}},mc={SI1978:V,VT100:W};T.prototype.V=function(){return!1};T.prototype.qa=function(a,b,c,d){this.j=b;this.a=c;this.N=d;this.v=a;this.m=Va(a,"Keyboard");this.Z=Va(a,"SerialPort");this.video=Va(a,"Video");hb(b,this,this.c.$a);ib(b,this,this.c.ab)};T.prototype.ga=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ia=function(a){return a?this.save():!0};V.INIT=[[V.zc.Fa,V.za.Fa,V.Ac.Fa,0,0,0,0]]; +Ua:16383}},lc={SI1978:V,VT100:W};T.prototype.V=function(){return!1};T.prototype.qa=function(a,b,c,d){this.j=b;this.a=c;this.O=d;this.v=a;this.m=Va(a,"Keyboard");this.Z=Va(a,"SerialPort");this.video=Va(a,"Video");hb(b,this,this.c.$a);ib(b,this,this.c.ab)};T.prototype.ga=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ia=function(a){return a?this.save():!0};V.INIT=[[V.zc.Fa,V.za.Fa,V.Ac.Fa,0,0,0,0]]; W.INIT=[[W.Nb.INIT,W.ka.kc|W.ka.lc],[W.wa.Xb,W.wa.Yb],[W.Ra.$b,W.Ra.Wb,W.Ra.Zb,W.Ra.Vb],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11984,11888,11776,11808,11776,12E3,12E3,11901,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], -[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11808,11984,11856,11776,11808,11776,12E3,12E3,11881,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];k=T.prototype;k.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.M("reset error")}; -k.save=function(){var a=new F(this);switch(this.c.ba){case V.ba:a.set(0,[this.W,this.g,this.X,this.C,this.H,this.S,this.T]);break;case W.ba:a.set(0,[this.L,this.u]),a.set(1,[this.o,this.s]),a.set(2,[this.f,this.G,this.R,this.O]),a.set(3,[this.B,this.b,this.w,this.K,this.i])}return a.data()}; -k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.ba){case V.ba:return this.W=b[0],this.g=b[1],this.X=b[2],this.C=b[3],this.H=b[4],this.S=b[5],this.T=b[6],!0;case W.ba:return this.L=b[0],this.u=b[1],b=a[1],this.o=b[0],this.s=b[1],b=a[2],this.f=b[0],this.G=b[1],this.R=b[2],this.O=b[3],b=a[3],this.B=b[0],this.b=b[1],this.w=b[2],this.K=b[3],this.i=b[4],!0}return!1};k.start=function(){};k.stop=function(){};k.Sc=function(){return this.W};k.Tc=function(){return this.g};k.Uc=function(){return this.X}; -k.Rc=function(){return this.C>>8-this.H&255};k.$c=function(a,b){this.H=b};k.bd=function(a,b){this.S=b};k.ad=function(a,b){this.C=b<<8|this.C>>8};k.cd=function(a,b){this.T=b};k.dd=function(){};function nc(a){var b=0,c=0,d=~a.B;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} -k.Vc=function(){var a=this.u,a=a&~W.ka.rb;if((Hb(this.a)&64)<<1&&(a|=W.ka.rb,a!=this.u)){var b,c;b=this.w&1;switch(this.w>>1&7){case W.ma.Ba.Jb:this.B=this.B<<1|b;break;case W.ma.Ba.Qb:b=nc(this);this.i[b]=W.ma.Ua;break;case W.ma.Ba.Kb:this.b=this.b<<1|b;break;case W.ma.Ba.Fc:b=nc(this);c=this.b&W.ma.Ua;this.i[b]=c;break;case W.ma.Ba.vc:b=nc(this);c=this.i[b];null==c&&(c=W.ma.Ua);this.b=c;break;case W.ma.Ba.xc:this.b<<=1,this.K=this.b&W.ma.Ua+1}}a&=~W.ka.sb;this.K&&(a|=W.ka.sb);a&=~W.ka.nb;if(b=this.m){b= -this.m;if(c=b.f)c=b.a,c=Hb(b.a)>=b.m+c.la*c.I/1E3*1.2731488;c&&(b.f=!1);b=!b.f}b&&(a|=W.ka.nb);a&=~W.ka.vb;this.Z&&this.Z.fa&1&&(a|=W.ka.vb);return this.u=a};k.ed=function(a,b){this.L=b};k.hd=function(a,b){this.w=b};k.gd=function(a,b){a=b&3;switch(b>>2&3){case 0:this.f=this.f&-4|a;break;case 1:this.f=this.f&-13|a<<2;this.video&&(b=this.video,a=this.f,b.pa!==a&&((b.pa=a)?Nb(b,!0):b.sa=!0));break;case 2:switch(a){case 0:this.G=~this.G;break;case 2:case 3:this.R=3-a}break;case 3:this.O=a}}; -k.fd=function(a,b){b&W.wa.uc?(b&=W.wa.tb,this.s!=b&&(this.s=b,this.video&&(this.video.Db=this.s==W.wa.tb?50:60))):(b&=W.wa.lb,this.o!=b&&(this.o=b,this.video&&(a=this.video,b=this.o==W.wa.lb?132:80,a.K=b,a.U=a.xa,80>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.i=e.symbols;if(!a.b.length){q("Empty ROM: "+b);return}if(1==a.b.length){q(a.b[0]);return}}catch(h){a.M("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, -" ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.j;0>>=f.j;0>8-this.M&255};k.$c=function(a,b){this.M=b};k.bd=function(a,b){this.S=b};k.ad=function(a,b){this.C=b<<8|this.C>>8};k.cd=function(a,b){this.U=b};k.dd=function(){};function mc(a){var b=0,c=0,d=~a.B;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +k.Vc=function(){var a=this.u,a=a&~W.ka.rb;if((Gb(this.a)&64)<<1&&(a|=W.ka.rb,a!=this.u)){var b,c;b=this.w&1;switch(this.w>>1&7){case W.ma.Ba.Jb:this.B=this.B<<1|b;break;case W.ma.Ba.Qb:b=mc(this);this.i[b]=W.ma.Ua;break;case W.ma.Ba.Kb:this.b=this.b<<1|b;break;case W.ma.Ba.Fc:b=mc(this);c=this.b&W.ma.Ua;this.i[b]=c;break;case W.ma.Ba.vc:b=mc(this);c=this.i[b];null==c&&(c=W.ma.Ua);this.b=c;break;case W.ma.Ba.xc:this.b<<=1,this.H=this.b&W.ma.Ua+1}}a&=~W.ka.sb;this.H&&(a|=W.ka.sb);a&=~W.ka.nb;if(b=this.m){b= +this.m;if(c=b.f)c=b.a,c=Gb(b.a)>=b.m+c.la*c.K/1E3*1.2731488;c&&(b.f=!1);b=!b.f}b&&(a|=W.ka.nb);a&=~W.ka.vb;this.Z&&this.Z.fa&1&&(a|=W.ka.vb);return this.u=a};k.ed=function(a,b){this.K=b};k.hd=function(a,b){this.w=b};k.gd=function(a,b){a=b&3;switch(b>>2&3){case 0:this.f=this.f&-4|a;break;case 1:this.f=this.f&-13|a<<2;this.video&&(b=this.video,a=this.f,b.pa!==a&&((b.pa=a)?Mb(b,!0):b.sa=!0));break;case 2:switch(a){case 0:this.G=~this.G;break;case 2:case 3:this.R=3-a}break;case 3:this.N=a}}; +k.fd=function(a,b){b&W.wa.uc?(b&=W.wa.tb,this.s!=b&&(this.s=b,this.video&&(this.video.Db=this.s==W.wa.tb?50:60))):(b&=W.wa.lb,this.o!=b&&(this.o=b,this.video&&(a=this.video,b=this.o==W.wa.lb?132:80,a.H=b,a.T=a.xa,80>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.i=e.symbols;if(!a.b.length){q("Empty ROM: "+b);return}if(1==a.b.length){q(a.b[0]);return}}catch(h){a.L("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.j;0>>=f.j;0d?a.j.push({ib:b,fb:Date.now(),Ya:!1}):(a.j[d].fb=Date.now(),a.j[d].Ya=!1);else if(0<=d){if(!a.j[d].Ya){var e=a.j[d].fb;if(e&&100>Date.now()-e)return a.j[d].Ya=!0,Ec(a),!0}a.j.splice(d,1)}if(a.K){d=0;switch(b){case "1p":d=V.za.oc;break;case "2p":d=V.za.sc;break;case "coin":d=V.za.Pb;break;case "left":d=V.za.qc;break;case "right":d=V.za.rc;break;case "fire":d=V.za.pc}d&&(a=a.K,b=d,a.g&=~b,c&&(a.g|=b))}return!0} -function Ec(a){for(var b=0,c=-1;bc||c>e)c=e}else{Cc(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){Ec(a)},c)}k.Wc=function(){var a=this.g;0<=this.c&&(this.cd?a.j.push({ib:b,fb:Date.now(),Ya:!1}):(a.j[d].fb=Date.now(),a.j[d].Ya=!1);else if(0<=d){if(!a.j[d].Ya){var e=a.j[d].fb;if(e&&100>Date.now()-e)return a.j[d].Ya=!0,Dc(a),!0}a.j.splice(d,1)}if(a.M){d=0;switch(b){case "1p":d=V.za.oc;break;case "2p":d=V.za.sc;break;case "coin":d=V.za.Pb;break;case "left":d=V.za.qc;break;case "right":d=V.za.rc;break;case "fire":d=V.za.pc}d&&(a=a.M,b=d,a.g&=~b,c&&(a.g|=b))}return!0} +function Dc(a){for(var b=0,c=-1;bc||c>e)c=e}else{Bc(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){Dc(a)},c)}k.Wc=function(){var a=this.g;0<=this.c&&(this.c>3)*a.G,!Za(a.j,a.ea,a.B,3)))return!1;a.B?(a.Ja=a.f.createImageData(b,c),a.La=16/a.ja|0,Kc(a,a.B>>1)):Kc(a,(a.K+1)*a.W);a.s=document.createElement("canvas");a.s.width=b;a.s.height=c;a.ra=a.s.getContext("2d");a.I={};a.S=1<=a.xa?8:16,f=8>(7>4)*c)}return l}Fc.prototype.ga=function(){return!0};Fc.prototype.V=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.ua[b]=c,!0;switch(b){case "fullScreen":return this.A[b]=c,this.b&&this.b.Ea?c.onclick=function(){d.Ea()}:c.parentNode.removeChild(c),!0}return!1}; -Fc.prototype.Ea=function(){var a=!1;if(this.b){if(this.b.Ea){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.C/this.w;b>c&&(a=Math.round(c/b*100)+"%")}this.Ia?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Ea();a=!0}this.R&&this.R.focus()}return a}; -function Ic(a,b){!b&&a.b&&(a.Ia?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Kc(a,b){a.Ka=b;a.O=!1;if(void 0===a.i||a.i.length!=a.Ka)a.i=Array(a.Ka)}function Mc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.T&&(208<=c&&236>c?e=a.S+0:28<=c&&72>c&&(e=a.S+1));a=a.L[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} -function Nb(a,b){var c=!0;if(!b){a.la&&(120==a.la?a.Va&1?(hc(a.a,2),c=!1):hc(a.a,1):hc(a.a,4));if(c&&a.O&&a.B){for(var d=a.j,e=a.B,f=!0,g=a.ea>>>d.j;0>=1);;){var x=bb(a.j,u++);if(127==(x&127)){var t=bb(a.j,u++),d=t&96,c=(t&15)<<8|bb(a.j,u),c=c+(t&16? -8192:16384);break}if(n>4)*x.P,Z,sa,Ma,eb,yc=x.U,Kb=x.P;C?(Z=H*t.U,sa=e*t.P,Ma=t.U,eb=t.P):(Z=H*t.Ca,sa=e*t.Da,Ma=t.Ca,eb=t.Da);x.U>t.U&&(Z*=2,Ma*=2);x.P>t.P&&(y||(Q+=t.P),Kb=t.P);C?C.drawImage(x.canvas,U,Q,yc,Kb,Z,sa,Ma,eb):(Z+=0,sa+=0,t.f.drawImage(x.canvas,U,Q,yc,Kb,Z, -sa,Ma,eb))}h++}g++}e++}}a.O=!0;!b&&a.sa&&1==h&&(a.i[l]=-1,h=0);a.sa=!1;(h||b)&&a.ra&&a.f.drawImage(a.s,0,a.pa,a.o,a.G-a.P,0,0,a.Jc,a.Ib)}else{e=a.ea;f=e+a.B;l=h=g=0;b=a.o;n=0;c=a.G;y=d=0;u=a.ja;H=(1<>>t.j;t=x!=t.f?t.b[U].Eb(x,C):t.b[U++].bb(x,C)|t.b[U&t.o].bb(0,C+1)<<8;if(a.O&&t===a.i[g])h+=a.La;else{a.i[g]=t;(C=y)&&(t=t>>8|(t&255)<<8);h>C&H,Mc(a,a.Ja,h++,l,U),C+=u;h>n&&(n=h);l=d&&(d=l+1)}e+= -2;g++;if(h>=a.o&&(h=0,l++,l>a.G))break}a.O=!0;b>3)*a.G,!Za(a.j,a.ea,a.B,3)))return!1;a.B?(a.Ja=a.f.createImageData(b,c),a.La=16/a.ja|0,Jc(a,a.B>>1)):Jc(a,(a.H+1)*a.W);a.s=document.createElement("canvas");a.s.width=b;a.s.height=c;a.ra=a.s.getContext("2d");a.I={};a.S=1<=a.xa?8:16,f=8>(7>4)*c)}return l}Ec.prototype.ga=function(){return!0};Ec.prototype.V=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.ua[b]=c,!0;switch(b){case "fullScreen":return this.A[b]=c,this.b&&this.b.Ea?c.onclick=function(){d.Ea()}:c.parentNode.removeChild(c),!0}return!1}; +Ec.prototype.Ea=function(){var a=!1;if(this.b){if(this.b.Ea){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.C/this.w;b>c&&(a=Math.round(c/b*100)+"%")}this.Ia?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Ea();a=!0}this.R&&this.R.focus()}return a}; +function Hc(a,b){!b&&a.b&&(a.Ia?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Jc(a,b){a.Ka=b;a.N=!1;if(void 0===a.i||a.i.length!=a.Ka)a.i=Array(a.Ka)}function Lc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.U&&(208<=c&&236>c?e=a.S+0:28<=c&&72>c&&(e=a.S+1));a=a.K[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function Mb(a,b){var c=!0;if(!b){a.la&&(120==a.la?a.Va&1?(gc(a.a,2),c=!1):gc(a.a,1):gc(a.a,4));if(c&&a.N&&a.B){for(var d=a.j,e=a.B,f=!0,g=a.ea>>>d.j;0>=1);;){var x=bb(a.j,u++);if(127==(x&127)){var t=bb(a.j,u++),d=t&96,c=(t&15)<<8|bb(a.j,u),c=c+(t&16? +8192:16384);break}if(n>4)*x.P,Z,sa,Na,eb,xc=x.T,Jb=x.P;C?(Z=H*t.T,sa=e*t.P,Na=t.T,eb=t.P):(Z=H*t.Ca,sa=e*t.Da,Na=t.Ca,eb=t.Da);x.T>t.T&&(Z*=2,Na*=2);x.P>t.P&&(y||(Q+=t.P),Jb=t.P);C?C.drawImage(x.canvas,U,Q,xc,Jb,Z,sa,Na,eb):(Z+=0,sa+=0,t.f.drawImage(x.canvas,U,Q,xc,Jb,Z, +sa,Na,eb))}h++}g++}e++}}a.N=!0;!b&&a.sa&&1==h&&(a.i[l]=-1,h=0);a.sa=!1;(h||b)&&a.ra&&a.f.drawImage(a.s,0,a.pa,a.o,a.G-a.P,0,0,a.Jc,a.Ib)}else{e=a.ea;f=e+a.B;l=h=g=0;b=a.o;n=0;c=a.G;y=d=0;u=a.ja;H=(1<>>t.j;t=x!=t.f?t.b[U].Eb(x,C):t.b[U++].bb(x,C)|t.b[U&t.o].bb(0,C+1)<<8;if(a.N&&t===a.i[g])h+=a.La;else{a.i[g]=t;(C=y)&&(t=t>>8|(t&255)<<8);h>C&H,Lc(a,a.Ja,h++,l,U),C+=u;h>n&&(n=h);l=d&&(d=l+1)}e+= +2;g++;if(h>=a.o&&(h=0,l++,l>a.G))break}a.N=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= -(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Ea.aspect);f&&.3<=f&&3.33>=f&&(xa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");ra("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Fc(d,e,g,f,c);Pa(d,c)}}); -function Nc(a){this.I=+a.adapter;switch(this.I){case 0:this.L=0;this.R=2;break;default:q("Unrecognized serial adapter #"+this.I);return}this.b=this.c=null;this.O=a.tabSize;this.H=a.charBOL;this.f=0;this.C=!1;r.call(this,"SerialPort",a,Nc);var b=a.binding;if("console"==b)this.c="";else{var c;a=Oc;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.A[b])&&this.V(null,a,b))}this.g="";this.i=this.s=null;this.exports={connect:this.Cb,receiveData:this.gb}}w(Nc); -var Pc=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Qc=[!1,0,0,133,142,39,238],Oc="buffer";k=Nc.prototype; -k.V=function(a,b,c,d){var e=this;switch(b){case Oc:return this.A[b]=this.b=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Sa)return;b=ha(b[1]);if(this.i=Na(b)){var d=this.i.exports;if(d){var e=d.connect;e&&e.call(this.i);if(this.s=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ga=function(a,b){if(!b)if(this.Cb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ia=function(a){return a?this.save():!0};k.reset=function(){Uc(this)};k.save=function(){var a=new F(this),b=0,c=[];c[b++]=this.o;c[b++]=this.B;c[b++]=this.G;c[b++]=this.fa;c[b++]=this.m;c[b++]=this.w;c[b]=this.u;a.set(0,c);return a.data()};k.restore=function(a){return Uc(this,a[0])};function Uc(a,b){var c=0;b||(b=Qc);a.o=b[c++];a.B=b[c++];a.G=b[c++];a.fa=b[c++];a.m=b[c++];a.w=b[c++];a.u=b[c];return!0} -function Vc(a,b){var c=a.u&b;b&15||(c>>=4);b=Pc[c];c=((a.m&12)>>2)+6;a.m&16&&c++;c+=((a.m&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function Rc(a,b){return a.C||a.fa&2?!1:(a.B=b,a.fa|=2,hc(a.a,a.R),!0)}k.gb=function(a){null!=a&&(this.g="number"!=typeof a?a:this.g+String.fromCharCode(a));this.g&&(Rc(this,this.g.charCodeAt(0))&&(this.g=this.g.substr(1)),this.g&&this.a&&Lb(this.a,this.S,Vc(this,15)));return!0};k.Qc=function(){var a=this.B;this.fa&=-3;return a};k.Pc=function(){return this.fa}; -k.Zc=function(a,b){this.G=b;this.fa&=-6;if(19==b)this.C=!0;else if(17==b)this.C=!1;else if(this.s&&this.s.call(this.i,b),this.b)if(8==b)this.b.value=this.b.value.slice(0,-1),0":String.fromCharCode(b);var c=a.length;9==b?(b=this.O||8,c=b-this.f%b,this.O&&(a=" ".slice(0,c))):13==b&&(this.f=c=0,a="\n");this.H&&!this.f&&c&&(a=String.fromCharCode(this.H)+a);this.b.value+=a;this.b.scrollTop=this.b.scrollHeight;this.f+=c}else if(null!= -this.c){if(10==b||1024<=this.c.length)this.da(this.c),this.c="";10!=b&&(this.c+=String.fromCharCode(b))}this.a&&Lb(this.a,this.T,Vc(this,240))};k.Yc=function(a,b){this.o?(this.w=b,this.w&64&&(this.o=!1)):(this.m=b,this.o=!0)};k.Xc=function(a,b){this.u=b};var Sc={0:Nc.prototype.Qc,1:Nc.prototype.Pc},Tc={0:Nc.prototype.Zc,1:Nc.prototype.Yc,2:Nc.prototype.Xc};ya(function(){for(var a=A(document,"pc8080","serial"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bYc){if($c(d,this.s)){this.i=new F(this,"1.30.1","failsafe");$c(this.i)&&(ed(this,d),a=2,fd(this.i));this.i.set("timestamp",ka());gd(this.i);var e=this.b&&!this.v;if(1==a||ma("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=dd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?$c(d,g):("error"== -f&&"no machine state"!=g?(this.M("Error: "+g),"unable to verify user"==g&&(qa("user",""),this.c=null)):this.da(f+": "+g),fd(d),$c(d)?(c=dd(d),e=!0):c=!1))}e&&cd(this,c?d:null)}else 2==a&&d.clear()}else cd(this);delete this.s;delete this.u}e=La(this.id);for(f=0;fa[1];a=a[2];this.L=!0;this.l.Y=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(hd(this,this.a,b,c,a),this.a.Na());this.C&&(ed(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; -function ed(a,b){if(ma("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PC8080",ver:"1.30.1"};d.url=a.I;d.user=c;d.type="bug";d.data=b;la("http://www.pcjs.org/api/v1/report",d,!0)}} -function id(a,b,c){var d,e="none";if(a.f)return null;a.f--;var f=new F(a,"1.30.1"),g=new F(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&Db(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.Y=!1,!1===d&&(e=null)));for(var h=La(a.id),l=0;l=f&&(xa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");ra("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Ec(d,e,g,f,c);Pa(d,c)}}); +function Mc(a){this.I=+a.adapter;switch(this.I){case 0:this.K=0;this.R=2;break;default:q("Unrecognized serial adapter #"+this.I);return}this.b=this.c=null;this.N=a.tabSize;this.H=a.charBOL;this.f=0;this.C=!1;r.call(this,"SerialPort",a,Mc);var b=a.binding;if("console"==b)this.c="";else{var c;a=Nc;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.A[b])&&this.V(null,a,b))}this.g="";this.i=this.s=null;this.exports={connect:this.Cb,receiveData:this.gb}}w(Mc); +var Oc=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Pc=[!1,0,0,133,142,39,238],Nc="buffer";k=Mc.prototype; +k.V=function(a,b,c,d){var e=this;switch(b){case Nc:return this.A[b]=this.b=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Sa)return;b=ha(b[1]);if(this.i=Ma(b)){var d=this.i.exports;if(d){var e=d.connect;e&&e.call(this.i);if(this.s=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ga=function(a,b){if(!b)if(this.Cb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ia=function(a){return a?this.save():!0};k.reset=function(){Tc(this)};k.save=function(){var a=new F(this),b=0,c=[];c[b++]=this.o;c[b++]=this.B;c[b++]=this.G;c[b++]=this.fa;c[b++]=this.m;c[b++]=this.w;c[b]=this.u;a.set(0,c);return a.data()};k.restore=function(a){return Tc(this,a[0])};function Tc(a,b){var c=0;b||(b=Pc);a.o=b[c++];a.B=b[c++];a.G=b[c++];a.fa=b[c++];a.m=b[c++];a.w=b[c++];a.u=b[c];return!0} +function Uc(a,b){var c=a.u&b;b&15||(c>>=4);b=Oc[c];c=((a.m&12)>>2)+6;a.m&16&&c++;c+=((a.m&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function Qc(a,b){return a.C||a.fa&2?!1:(a.B=b,a.fa|=2,gc(a.a,a.R),!0)}k.gb=function(a){null!=a&&(this.g="number"!=typeof a?a:this.g+String.fromCharCode(a));this.g&&(Qc(this,this.g.charCodeAt(0))&&(this.g=this.g.substr(1)),this.g&&this.a&&Kb(this.a,this.S,Uc(this,15)));return!0};k.Qc=function(){var a=this.B;this.fa&=-3;return a};k.Pc=function(){return this.fa}; +k.Zc=function(a,b){this.G=b;this.fa&=-6;if(19==b)this.C=!0;else if(17==b)this.C=!1;else if(this.s&&this.s.call(this.i,b),this.b)if(8==b)this.b.value=this.b.value.slice(0,-1),0":String.fromCharCode(b);var c=a.length;9==b?(b=this.N||8,c=b-this.f%b,this.N&&(a=" ".slice(0,c))):13==b&&(this.f=c=0,a="\n");this.H&&!this.f&&c&&(a=String.fromCharCode(this.H)+a);this.b.value+=a;this.b.scrollTop=this.b.scrollHeight;this.f+=c}else if(null!= +this.c){if(10==b||1024<=this.c.length)this.da(this.c),this.c="";10!=b&&(this.c+=String.fromCharCode(b))}this.a&&Kb(this.a,this.U,Uc(this,240))};k.Yc=function(a,b){this.o?(this.w=b,this.w&64&&(this.o=!1)):(this.m=b,this.o=!0)};k.Xc=function(a,b){this.u=b};var Rc={0:Mc.prototype.Qc,1:Mc.prototype.Pc},Sc={0:Mc.prototype.Zc,1:Mc.prototype.Yc,2:Mc.prototype.Xc};ya(function(){for(var a=A(document,"pc8080","serial"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bXc){if(Zc(d,this.s)){this.i=new F(this,"1.30.1","failsafe");Zc(this.i)&&(dd(this,d),a=2,ed(this.i));this.i.set("timestamp",ka());fd(this.i);var e=this.b&&!this.v;if(1==a||ma("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=cd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Zc(d,g):("error"== +f&&"no machine state"!=g?(this.L("Error: "+g),"unable to verify user"==g&&(qa("user",""),this.c=null)):this.da(f+": "+g),ed(d),Zc(d)?(c=cd(d),e=!0):c=!1))}e&&bd(this,c?d:null)}else 2==a&&d.clear()}else bd(this);delete this.s;delete this.u}e=La(this.id);for(f=0;fa[1];a=a[2];this.K=!0;this.l.Y=!0;var d=this.A.power;d&&(d.textContent="Shutdown");this.a&&(gd(this,this.a,b,c,a),this.a.Na());this.C&&(dd(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; +function dd(a,b){if(ma("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PC8080",ver:"1.30.1"};d.url=a.I;d.user=c;d.type="bug";d.data=b;la("http://www.pcjs.org/api/v1/report",d,!0)}} +function hd(a,b,c){var d,e="none";if(a.f)return null;a.f--;var f=new F(a,"1.30.1"),g=new F(a,"1.30.1","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&Db(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.Y=!1,!1===d&&(e=null)));for(var h=La(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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(u){f=null,a=u.message}else a="unrecognized XML: "+(255f.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>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$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(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");la(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],n,u=/( [a-z]+=)(['"])(.*?)\2/g;n=u.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);pd(a,b,c)}})}else c(a,null)} -function qd(a,b,c,d){function e(a){if(void 0===h){var b=g&&A(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--md||Ba(!0));l=!1}var g,h,l=!0;md++;Ja[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=n:y.appendChild(document.createTextNode(n));u.appendChild(y)}c|| -(c="/versions/pc8080/1.30.1/components.xsl");n=function(d,h){h?nd(c,null,null,!1,e,function(d,l){l?(Ka(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--md||Ba(!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),--md||Ba(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?nd(b,a,d,!0,e,n):od(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return l}window.embedPC8080=function(a,b,c,d){Ba(!1);return qd(a,b,c,d)};window.enableEvents=Ba;window.sendEvent=Ca;})(); +function od(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");la(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],n,u=/( [a-z]+=)(['"])(.*?)\2/g;n=u.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);od(a,b,c)}})}else c(a,null)} +function pd(a,b,c,d){function e(a){if(void 0===h){var b=g&&A(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--ld||Ba(!0));l=!1}var g,h,l=!0;ld++;Ja[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=n:y.appendChild(document.createTextNode(n));u.appendChild(y)}c|| +(c="/versions/pc8080/1.30.1/components.xsl");n=function(d,h){h?md(c,null,null,!1,e,function(d,l){l?(Ka(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--ld||Ba(!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),--ld||Ba(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?md(b,a,d,!0,e,n):nd(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return l}window.embedPC8080=function(a,b,c,d){Ba(!1);return pd(a,b,c,d)};window.enableEvents=Ba;window.sendEvent=Ca;})(); diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 001c2de09..f9a251047 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -722,9 +722,9 @@ function Wb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Sb)){var function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Db:-1}}y(K);h=K.prototype; h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Db=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Db,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Db,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.D&62337|a.sa<<5|a.ta<<1}; h.gd=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.gb=4194303,b.va=3915776):(b.gb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} -h.Mc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.uc=function(a){return this.b.R[0][a>>1&7]}; -h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Sc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295}; -h.Qc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Ya=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.bb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; +h.Mc=function(a){return this.b.P[1][a>>1&7]};h.ud=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.P[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.uc=function(a){return this.b.P[0][a>>1&7]}; +h.dd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.P[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.Sc=function(a){return this.b.P[3][a>>1&7]};h.Ad=function(a,b){this.b.P[3][b>>1&7]=a&65295}; +h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Ya=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.bb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.Za=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Tb=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Wb};h.fd=function(a,b){b&1||(a&=255);this.b.Wb=a}; h.Bc=function(a){return a?this.b.Xb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Xb=a;b.F|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; @@ -742,160 +742,160 @@ var rc=0,sc=2,Pb=4,Rb=["NONE","RAM","ROM","VID","H/W"],qc=0; I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(lb)for(a=Array(this.size>>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, -1,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +1,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Fa=!0},ma:function(a,b,c){this.D[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&Yb(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Eb,a.bc=a.f?a.H:a.Fb):--a.i||(a.tb=a.yb,a.Ub=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Eb=b[1]||a.I,a.Fb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Ub=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} -var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.N,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; +var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.R,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Cb=!1;this.v.eb=a.autoStart;this.v.Va=!1;this.ib=this.ka=0;this.jb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Pb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.ib))}} h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ca/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.U);a.U=0;a.T=ra();a.ea=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c)} -function Oc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -h.Wc=function(){if(this.v.da){this.hb>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ea){var a=this.Da-this.ea;a>this.qb&&(this.T+=a,this.T>this.Da&&(this.T=this.Da))}try{do{var b=Oc(this,this.v.Va?1:this.La);try{this.ab(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.M-this.b;Pc(this,c);this.qa+=c;this.U+=c;Mc(this,0,!0);Jc(this,c);this.la-=c;if(0>=this.la){this.la+=this.La;15<=++this.Ob&&(this.B&&this.B.aa(),this.Ob=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(), -Kc(this));kb(this,e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Pb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ea-this.Da),d=this.ea-this.T;d&&(this.ca=Math.round(this.U/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.cac&&(this.T-=c),c=0;this.hb+=this.qa;this.ea+=c;a(b,c)}}}; -h.$a=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Cb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.T,Kc(this)));setTimeout(this.Pb,0);return!0};h.ab=function(){return 0};h.fa=function(a){if(this.v.da){this.M-=this.b;this.b=0;Mc(this,this.U);this.U=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; -function id(a){this.Sb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=jd.bind(this);this.jc=[];this.V=null;this.O=65536;this.P=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.F=this.Wb=0;this.ma=-1;kd(this);this.v.complete=this.v.fc=!1}y(id,Dc);h=id.prototype;h.reset=function(){this.v.da&&this.fa();kd(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; -function kd(a){a.Ka=255;a.Z=0;a.Xb=0;a.D=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.gb=262143;a.va=253952;a.F|=2;a.w&&kc(a)}function kc(a){a.sb?(a.ba=65536,a.K=a.ic,a.N=a.Vb,a.Rb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.ba=0,a.K=a.hc,a.N=a.Tc,a.Rb=a.Bd,Lb(a.w,16))}h.Lb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; -h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c(a.L&224)>>5?(a.F&4&&(a.u[7]=a.u[7]+2&65535,a.F&=-5),a.$(c,26),c=!0):c=!1;if(!c){if(b!=a.V)if(c=a.V,!c||c.lb<=b.lb)b.next=c,a.V=b;else{do{a=c.next;if(!a||a.lb<=b.lb){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Db(a){return a.L=a.L&63728|a.Aa()|nd(a)|md(a)|ld(a)} -function mc(a,b){a.S=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.S=a.X=b,a.P=0)}function qd(a,b,c){a.F&128||(a.S=a.X=a.O=b,a.P=c||0)}function rd(a,b,c,d){a.F&128||(a.S=a.X=a.O=b,a.P=(c^b)&(d^b))}function sd(a,b){a.F&128||(a.S=a.X=a.O=b,a.P=a.S^a.O>>1)}function td(a,b,c,d){a.F&128||(a.S=a.X=a.O=b,a.P=(c^d)&(d^b))} -h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,b=!0);this.D&57344||(this.Ia=63222,this.Bb=a);this.C=0;var c=this.N(a|this.ba),d=this.N(a+2&65535|this.ba);mc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);ud(this,this.ma);ud(this,this.u[7]);pd(this,c);this.F&=-113;this.ma=-1;throw a;};function vd(a){var b=wd(a),c=wd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);pd(a,b);mc(a,c);a.F&=-17} -function xd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.gb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.R[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.D&57344||(a.D=a.D|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.N(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.N(e)|g;a.b-= -8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=a.N(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.hc=function(a,b,c){return yd(this,a,b,c)};h.ic=function(a,b,c){return xd(this,yd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Vb=function(a){return this.w.ja(xd(this,a,2))}; -h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(xd(this,a,4),b)};function zd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=yd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.N(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function Ad(a,b,c,d){a.D&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=yd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=xd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Bd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Cd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Dd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return yd(a,b,c,8)} -function Ed(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Fd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Gd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Hd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(pd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.ab=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Id(this.j),c=a?this.v.Cb?0:1:-1;this.v.Cb=!1;this.M=this.b=a;do{if(b){if(Jd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){if(this.F&=-3,this.V&&hc(this,this.V)){var d=a=this.V;if(d==a)this.V=a.next;else{do{var e=d.next;if(e==a){d.next=e.next;break}d=e}while(1)}}}else this.F&1&&this.F++;this.D&57344||(this.Ia=0, -this.Bb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function Pd(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function Qd(a,b){a=b&~a;O(this,a);return a}function Rd(a,b){a=b&~a;O(this,a<<8);return a}function Sd(a,b){a|=b;O(this,a);return a}function Td(a,b){a|=b;O(this,a<<8);return a}function Ud(a,b){a=~b|65536;qd(this,a);return a&65535}function Vd(a,b){a=~b|256;qd(this,a<<8);return a&255}function Wd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.P=b&(b^a));return a&65535} -function Xd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.P=b&(b^c));return a&255}function Yd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.P=a&(b^a));return a&65535}function Zd(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.P=c&(b<<8^c));return a&255}function $d(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function ae(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function be(a,b){a=b<<1|this.O>>16&1;sd(this,a);return a&65535} -function ce(a,b){a=b<<1|this.O>>16&1;sd(this,a<<8);return a&255}function de(a,b){a=(this.O&65536|b)>>1|b<<16;sd(this,a);return a&65535}function ee(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function fe(a,b){var c=b-a;td(this,c,a,b);return c&65535}function ge(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function he(a,b){this.F&128||(this.S=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function ie(a,b){a^=b;O(this,a);return a&65535} -function je(a){var b=Fd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} -function ke(a){var b=Fd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function le(a){var b=Fd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.P=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.P=32768,this.O=65536,this.b-=7}var me=[0,7,7,10,7,11,9,13];function ne(a){var b=this.b;pd(this,Dd(this,a));this.b=b-me[this.i]} -var oe=[0,14,14,17,14,18,16,20];function pe(a){var b=this.b,c=Dd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];pd(this,c);this.b=b-oe[this.i]}var qe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],re=[7,13,13,17,14,18,17,21];function se(a){var b=Fd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.P=0,this.O=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)pd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ve(a){Q(this,a,0,he);this.b-=this.i?9:3+(7==this.f?2:0)}function we(a){Q(this,a,Cd(this,a),ie);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function jd(a){xe[a>>12].call(this,a)} -var xe=[function(a){ye[a>>8&15].call(this,a)},function(a){var b=Cd(this,a),c=this.b;O(this,Hd(this,a,b));this.b=c-qe[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Cd(this,a);a=Fd(this,a);td(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Cd(this,a)&Fd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Qd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Kd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Se[a>>8&15].call(this,a)},function(a){Te[a>>8&15].call(this,a)},function(a){var b=Bd(this,a);O(this,Gd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Bd(this,a)<<8;a=Ed(this,a)<<8;td(this,b-a,a,b);this.b-=this.i? -4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Bd(this,a)&Ed(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Bd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),fe);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ye= -[function(a){Ue[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!this.Aa()==!md(this))},function(a){R(this,a,!this.Aa()!=!md(this))},function(a){R(this,a,!nd(this)&&!this.Aa()==!md(this))},function(a){R(this,a,nd(this)||!this.Aa()!=!md(this))},pe,pe,function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},V,V],Ve=[function(a){qd(this, -Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],We=[function(a){Q(this,a,0,$d);this.b-=this.i?11:6},function(a){Q(this,a,ld(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);qd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],Xe=[function(a){Q(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Md);this.b-=this.i?9:3+(7==this.f?2:0)}],Ye=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Vb(a|65536);pd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=zd(this,a,0);ud(this,a);O(this,a);this.b-=11},function(a){var b=wd(this),c=this.b;Ad(this,a, -0,b);O(this,b);this.b=c-re[this.i]},function(a){O(this,Hd(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ue=[function(a){Ze[a&15].call(this,a)},V,V,V,ne,ne,ne,ne,function(a){if(a&8)this.$(8,6);else{var b=wd(this);a&=7;pd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){$e[a&15].call(this,a)},function(a){af[a&15].call(this,a)},ve,ve,ve,ve],Ze=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){vd(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.w.reset());this.b-=667},function(){vd(this);this.b-=13},V,V,V,V,V,V,V,V,V],$e=[te,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],af= -[te,function(){this.O=65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Se=[se,se,le,le,je,je,ke,ke,we,we,V,V,V,V,ue,ue],Te=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!ld(this)&&!nd(this))},function(a){R(this,a,ld(this)||nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(){this.$(24, -2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},V,V],bf=[function(a){qd(this,Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,ae);this.b-= -this.i?11:6},function(a){P(this,a,ld(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,ld(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);qd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,ee);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Pd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Nd);this.b-=this.i?9:3+(7== -this.f?2:0)}],ef=[V,function(a){a=zd(this,a,65536);ud(this,a);O(this,a);this.b-=11},function(a){var b=wd(this),c=this.b;Ad(this,a,65536,b);O(this,b);this.b=c-re[this.i]},V];function ff(a){r.call(this,"ROM",a,ff);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){gf(c,a,b,f)})}}y(ff); -ff.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;hf(this)};ff.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Hb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Gb:f})}delete this.za}return!0};ff.prototype.xa=function(){return!0}; -function gf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64a.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} +function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Qc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Oc(a,b){var c=a.ea-=a.b;a.b=0;b&&(a.ea=0);return c} +h.Wc=function(){if(this.v.da){this.hb>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.ab(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Ob&&(this.B&&this.B.aa(),this.Ob=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, +e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Pb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.hb+=this.qa;this.ca+=c;a(b,c)}}}; +h.$a=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Cb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Pb,0);return!0};h.ab=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; +function jd(a){this.Sb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.F=this.Wb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; +function ld(a){a.Ka=255;a.Z=0;a.Xb=0;a.D=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.gb=262143;a.va=253952;a.F|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Vb,a.Rb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Rb=a.Bd,Lb(a.w,16))}h.Lb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; +h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c(a.L&224)>>5?(a.F&4&&(a.u[7]=a.u[7]+2&65535,a.F&=-5),a.$(c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.lb<=b.lb)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.lb<=b.lb){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Db(a){return a.L=a.L&63728|a.Aa()|od(a)|nd(a)|md(a)} +function mc(a,b){a.S=b<<12;a.X=~b&4;a.O=b<<14;a.N=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.D&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.F&=-17} +function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.gb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.D&57344||(a.D=a.D|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.M(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.M(e)|g;a.b-= +8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Vb=function(a){return this.w.ja(yd(this,a,2))}; +h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(yd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.M(d|c&a.V),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} +function Bd(a,b,c,d){a.D&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} +function Fd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} +function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Id(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.ab=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Cb?0:1:-1;this.v.Cb=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){if(this.F&=-3,this.U&&hc(this,this.U)){var d=a=this.U;if(d==a)this.U=a.next;else{do{var e=d.next;if(e==a){d.next=e.next;break}d=e}while(1)}}}else this.F&1&&this.F++;this.D&57344||(this.Ia= +0,this.Bb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(this,a<<8);return a}function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535} +function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255}function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;td(this,a);return a&65535} +function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535}function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(this,a);return a&65535} +function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} +function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.i]} +var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){Q(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){Q(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function kd(a){ye[a>>12].call(this,a)} +var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;O(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? +2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);O(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.i? +4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ze= +[function(a){Ve[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!od(this))},function(a){R(this,a,od(this))},function(a){R(this,a,!this.Aa()==!nd(this))},function(a){R(this,a,!this.Aa()!=!nd(this))},function(a){R(this,a,!od(this)&&!this.Aa()==!nd(this))},function(a){R(this,a,od(this)||!this.Aa()!=!nd(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},V,V],We=[function(a){rd(this, +Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){Q(this,a,0,ae);this.b-=this.i?11:6},function(a){Q(this,a,md(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.i?4:3+(7==this.f? +2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Vb(a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, +0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= +[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Te=[te,te,me,me,ke,ke,le,le,xe,xe,V,V,V,V,ve,ve],Ue=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!md(this)&&!od(this))},function(a){R(this,a,md(this)||od(this))},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(){this.$(24, +2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},V,V],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,be);this.b-= +this.i?11:6},function(a){P(this,a,md(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,md(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){P(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9:3+(7== +this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Hb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Gb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; +function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){nf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return nf(this)};function nf(a){a.N=0;a.f=0;a.i=128;a.D=[];return!0}h.Ab=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var of={},mf=(of[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],of[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],of[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],of[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],of);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};pf.prototype.Mb=function(){return-1};pf.prototype.Nb=function(){}; -function rf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} -function sf(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; +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],pf[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],pf[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],pf[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Mb=function(){return-1};qf.prototype.Nb=function(){}; +function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} +function tf(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 tf(a,b,c){var d;if(b){b=uf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function xf(a,b){if(b)return wf(a,b,a.ba[b]);var c=0;for(b in a.ba)wf(a,b,a.ba[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ba[b]);var c=0;for(b in a.ba)xf(a,b,a.ba[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&Hf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Hf(a,b));return c}; -h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Hf(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Fb(f,b&65535,d);e.w--;c&&Hf(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function If(a){return[a.A,a.wa]}function Jf(a){return{A:a[0],wa:a[1]}} -function Gf(a,b,c){var d;c=(c?a.K:a.Ma).A;if(void 0!==b){d=b=uf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Nb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.M-=a.b,a.b=0,a.la=0,a.B.aa()))}; -function Af(a){var b;if(Id(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.La=0} -h.Na=function(a,b,c){var d=!0;c||Qf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Rf(this,a,a.length-1,"set"),Af(this)));return d};function Qf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||Af(a);break}}return f} -function Sf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Lf(C);break;case 8:x="@"+Lf(C);break;case 16:7>C?x="("+Lf(C)+ -")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Lf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Lf(C)+")";break;case 40:x="@-("+Lf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Lf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Lf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Lf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Xf(a){var b,c="";for(b=0;6>b;b++)c+=Wf(a,b);c=c+"\n"+(Wf(a,6)+Wf(a,7)+Wf(a,20));return c+=Vf(a,"T")+Vf(a,"N")+Vf(a,"Z")+Vf(a,"V")+Vf(a,"C")}h.Hb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Xf(a));c&&(a.K=X(d.u[7]),Of(a,J(a,a.K.A)))}}function bg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Uf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} -function Tf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Tc=[];"call"==Ee&&(nb=1E5,Tc=["CALL"]);for(void 0!==De&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;Ge++;nb--}}Ge||(a.g("no "+Fe+"history available"),a.Ta=void 0)}else{var pb=Gf(a,ha);if(pb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||vg),Zb=vf(a,za)>>>0,65536>4||1;xg--&&0<$b;){var ac=0,rb=0,sb,Uc="",Je="",ha=J(a,pb.A);for(sb=4==Ta?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}qb&&(qb+="\n");qb+=ha+" "+Uc+(0==sb?" "+Je:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Wc,Xc,Yc,Zc=g[0],$c=g[1];"eb"==Zc?(Ua=1,Wc=255,Xc=a.Pa,Yc=a.mb):"e"==Zc||"ew"==Zc?(Ua=2,Wc=65535,Xc=a.ja,Yc=a.Ra):$c=null;if(null==$c)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Gf(a,$c);if(cc)for(var dc=2;dc< -g.length;dc++){var tb=tf(a,g[dc]);if(void 0===tb){a.g("unrecognized value: "+g[dc]);break}tb&~Wc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var yg=Xc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,yg,Ua)+" to "+J(a,tb,Ua));Yc.call(a,cc,tb,Ua)}}break;case "g":a:{var Ke=g[1],zg=b;if(void 0!==Ke){var ad=Gf(a,Ke,!0);if(!ad)break a;Kf(a,ad,zg);a.Na(a.f,ad,!0)}a.$a(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var bd;var ub=b.substr(2),ub=oa(ub);tf(a,ub)?(c||a.g("true: "+ub),bd=!0):(c||a.g("false: "+ub),bd=!1);bd||(d=!1);break}f=!0;break;case "k":var Ag=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var cd=0,dd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>cd;){for(var Aa=null,Bg=256;65536>vb.A>>>0;){dd.A=a.ja(vb,2);if(null==vb.A||!Bg--)break;if(!(dd.A&1)){for(var Cg=a,ec=dd,Le=null,wb= -ec.A,Me=wb,ed=1;6>=ed&&wb;ed++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bgg){if(ig(d,this.J)){this.D=new N(this,"1.30.1","failsafe");ig(this.D)&&(ng(this,d),a=2,og(this.D));this.D.set("timestamp",ta());pg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=mg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ig(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),og(d),ig(d)?(c=mg(d),e=!0):c=!1))}e&&lg(this,c?d:null)}else 2==a&&d.clear()}else lg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(qg(this,this.b,b,c,a),this.b.eb());this.T&&(ng(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function ng(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function dg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Fb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} +function Hf(a,b,c){var d;c=(c?a.K:a.Ma).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Nb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Oc(a),a.la=0,a.B.aa()))}; +function Bf(a){var b;if(Jd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.La=0} +h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||Bf(a);break}}return f} +function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ +")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Hb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=X(d.u[7]),Pf(a,J(a,a.K.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} +function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Zb=wf(a,za)>>>0,65536>4||1;yg--&&0<$b;){var ac=0,rb=0,sb,Vc="",Ke="",ha=J(a,pb.A);for(sb=4==Ta?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Hf(a,ad);if(cc)for(var dc=2;dc< +g.length;dc++){var tb=uf(a,g[dc]);if(void 0===tb){a.g("unrecognized value: "+g[dc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,cc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.$a(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,ec=ed,Me=null,wb= +ec.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.J)){this.D=new N(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.eb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function og(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}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===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--ug||Na(!0));m=!1}var g,l,m=!0;ug++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Gg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--ug||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--ug||Na(!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,p):Hg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Jg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); +h.pa=function(a,b,c){var d=this;switch(b){case "power":return this.I[b]=c,c.onclick=function(){d.B||(d.v.ga?eg(d,!1,!0):lg(d,d.kb))},!0;case "reset":return this.I[b]=c,c.onclick=function(){if(d.v.ga&&!d.B)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");eg(d,a,!0);!a&&d.R?window&&window.location.reload():d.kb(hg)}else d.reset(),d.b&&d.b.eb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.I[b]= +c,c.onclick=function(){var a=ig(d,!0);if(a){var b=!!(d.f&&!d.H||d.R),c=eg(d,b);b?sg(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function ig(a,b){var c=a.i;c||((c=Ba("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=tg(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function tg(a,b){a.i=null;b=ua(ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ca("user",b.data),a.i=b.data)}catch(d){n(d.message+" ("+c+")")}return a.i}function kg(a){var b=null;a.i&&(b=ga()+"/api/v1/user?req=load&user="+a.i+"&state="+ug(a,"1.30.1"));return b} +function sg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=ug(a,"1.30.1");d.data=c;b=ua(ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Jg(a,b,c)}})}else c(a,null)} +function Kg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--vg||Na(!0));m=!1}var g,l,m=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Hg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--vg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--vg||Na(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,p):Ig(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Kg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 9cdc018c9..d915e0cce 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -688,38 +688,38 @@ function da(){var a=ea();return-1!==a.indexOf("pcjs.org",a.length-8)}var fa={"&" var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function m(a,b,c,d){var e=0,f=null,h=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)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",p;for(p in b)b.hasOwnProperty(p)&&(n&&(n+="&"),n+=p+"="+encodeURIComponent(b[p]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function q(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function p(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} -function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.j-1;this.s=this.D/this.j|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e)} -function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Oa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Oa){t=n.size-(f-p);t>h&&(t=h);n.Oa=f-n.xa+t;f=p+a.j;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.j,d,e);Ta(f,a.I,n);a.b[l++]=f;f=p+a.j;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Pa(a,b){var c=-1,d=this.controller,e=d.ga[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Oa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.xa+t;f=q+a.j;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.j,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.j;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=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)));fb(a,e,e,h,l,n,p,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a){a.o||H(a.a,4)} -function $a(a,b,c){q("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,Za:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;var e=this;this.b.Za=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.Za,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a,b){a.o||H(a.a,4,b)} +function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,Za:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;var e=this;this.b.Za=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.Za,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.Za,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Ua=4194303,b.Fa=3915776):(b.Ua=262143,b.Fa=253952),nb(b));ob(this)};function ob(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.$b=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Yb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.Zb=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; g.Xb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Ib=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Gb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Hb=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Fb=function(a){return this.a.P[0][(a>>1&7)+8]}; g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.fc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.dc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ec=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.cc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.ua=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.U[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.U[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.U[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.U[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.jb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; +g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.ua=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; +g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.jb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.lb};g.vc=function(a,b){b&1||(a&=255);this.a.lb=a};g.Pb=function(a){return a?this.a.mb:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.mb=a;b.l|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.l|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; var K={},J=(K[62592]=[null,null,I.prototype.$b,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Yb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.Zb,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Xb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Ib,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Gb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Hb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Fb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, I.prototype.Ob,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Jb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Lb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Mb,I.prototype.rb,"MMR1"],K[65406]=[null,null,I.prototype.Nb,I.prototype.rb,"MMR2"],K[65408]=[null,null,I.prototype.fc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.dc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.ec,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.cc,I.prototype.Mc,"UDSAR"], @@ -733,37 +733,38 @@ J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514] function G(a,b,c,d,e,f){this.j=a;this.id=tb+=2;this.a=null;this.xa=b;this.Oa=c;this.size=d||0;this.type=e||ub;this.v=e==vb;this.controller=null;Ta(this);this.ha=this.vb=!1;if(d)if(f)this.controller=f,this.a=null,wb(this,f.tb);else if(Ja)this.b=new ArrayBuffer(d),this.g=new DataView(this.b,0,d),this.c=new Uint8Array(this.b,0,d),this.o=new Uint16Array(this.b,0,d>>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a){a&1&&ib(this.j);var 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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.V(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a){a&1&&ib(this.j);return this.g.getUint16(a,!0)},W:function(a){a&1&&ib(this.j);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},$:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b){a&1&&ib(this.j);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b){a&1&&ib(this.j);this.o[a>>1]=b;this.ha= -!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.V=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)}var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa]; -if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.$,G.prototype.W,G.prototype.pa];function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.da=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.ya=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.hb=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; -g.ja=function(a,b,c,d){this.w=a;this.j=b;this.I=d;for(b=0;ba.W/a.da&&(b=1),a.Z=b,b=a.Ta*a.Z,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}Lb(a,a.N);a.N=0;a.M=ka();a.X=0;Mb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c)} -g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Mb(this,!0);this.wa=0;this.Ga=ka();if(this.X){var a=this.Ga-this.X;a>this.fb&&(this.M+=a,this.M>this.Ga&&(this.M=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(p){if("number"!=typeof p)throw p;}for(var f=this.Y-this.a,a=f,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.wa+=f;this.N+=f;Lb(this,0,!0);a=f;if(this.h.Ka){var n= -!1;this.Ba=this.Ba+this.bb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,n=!0);0<=this.pa&&this.pa<=Nb(this)&&(this.oa=this.pa=-1,Ib(this),F(this),n=!0);n&&this.O(Nb(this)+" cycles: checksum="+k(this.Ba))}this.qa-=f;if(0>=this.qa){this.qa+=this.Ja;15<=++this.gb&&(this.w&&this.w.ca(),this.gb=0);break}}while(this.h.S)}catch(p){F(this);this.w&&this.w.stop(ka(),Nb(this));b=p.stack||p.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.hb;this.X=ka();d=this.fb;this.wa&&(d=Math.round(d* -this.wa/this.Ja));d-=this.X-this.Ga;if(e=this.X-this.M)this.W=Math.round(this.N/(10*e))/100,864E5<=e&&(this.$=0,Kb(this));if(0>d||this.Wd&&(this.M-=d),d=0;this.Va+=this.wa;this.X+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.M,Nb(a));setTimeout(a.hb,0)}}g.pb=function(){return 0}; -function F(a){if(a.h.S){a.Y-=a.a;a.a=0;Lb(a,a.N);a.N=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Nb(a))}a.h.complete=void 0} -function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.R=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.U=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +b&255,c++);this.Pa(a,b>>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.j,b);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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.j,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.j,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.j,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.j,c);this.o[a>> +1]=b;this.ha=!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.U=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} +var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa];if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.ca,G.prototype.W,G.prototype.pa]; +function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.ca=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.ya=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.hb=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; +g.ja=function(a,b,c,d){this.w=a;this.j=b;this.I=d;for(b=0;ba.X/a.ca&&(b=1),a.Z=b,b=a.Ta*a.Z,a.ca!=b)){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.R;a.R=0;a.N=ka();a.Y=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.da-=a.a;a.a=0;b&&(a.da=0);return c} +g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.wa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.fb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.wa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.bb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& +(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.gb&&(this.w&&this.w.ba(),this.gb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.hb;this.Y=ka();d=this.fb;this.wa&&(d=Math.round(d*this.wa/ +this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.wa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.hb,0)}}g.pb=function(){return 0}; +function F(a){if(a.h.S){Nb(a);a.J+=a.R;a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0} +function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.U=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.V=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.l=this.lb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Qb(a){a.na=255;a.F=0;a.mb=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.l|=2;a.j&&nb(a)}function nb(a){a.Na?(a.V=65536,a.H=a.xb,a.J=a.kb,a.ib=a.Sc,Va(a.j,a.ma&16?22:18)):(a.V=0,a.H=a.wb,a.J=a.hc,a.ib=a.Rc,Va(a.j,16))}g.bb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.$,this.Z]);a.set(2,eb(this.j));return a.data()}; -g.restore=function(a){var b=a[1];this.$=b[1];Kb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c(a.u&224)>>5?(a.l&4&&(a.f[7]=a.f[7]+2&65535,a.l&=-5),H(a,c),c=!0):c=!1;if(!c){if(b!=a.R)if(c=a.R,!c||c.Aa<=b.Aa)b.next=c,a.R=b;else{do{a=c.next;if(!a||a.Aa<=b.Aa){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function pb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.s=b>>14&3;c=a.u>>14&3;a.s!=c&&(a.U[c]=a.f[6],a.f[6]=a.U[a.s]);a.l|=2;a.u=b}function N(a,b){a.l&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b){var c=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,c=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var d=a.J(b|a.V),e=a.J(b+2&65535|a.V);pb(a,e&-12289|a.fa>>2&12288);c&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=d&65535;a.l&=-113;a.fa=-1;throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.l&=-17} -function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; -default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.J(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.J(e)|h;a.a-=8;break; -case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.J(e|a.V)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4)):(a.F|=8,a.l|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.j,a)};g.kb=function(a){return cb(this.j,Xb(this,a,2))}; -g.Rc=function(a,b){db(this.j,a,b&65535)};g.Sc=function(a,b){db(this.j,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.J(d|c&a.V),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.U[a.u>>12&3];return c} -function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.j,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.U[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} +function Qb(a){a.na=255;a.F=0;a.mb=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.l|=2;a.j&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.kb,a.ib=a.Sc,Va(a.j,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.ib=a.Rc,Va(a.j,16))}g.bb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.j));return a.data()}; +g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c(a.u&224)>>5?(a.l&4&&(a.f[7]=a.f[7]+2&65535,a.l&=-5),H(a,c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.Aa<=b.Aa)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.Aa<=b.Aa){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} +function pb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.s=b>>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.l|=2;a.u=b}function N(a,b){a.l&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.l&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.l&=-17} +function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: +128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= +8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.l|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.j,a)};g.kb=function(a){return cb(this.j,Xb(this,a,2))}; +g.Rc=function(a,b){db(this.j,a,b&65535)};g.Sc=function(a,b){db(this.j,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} +function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.j,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.j,e)),e&1&&a.a--,a=a.j,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.j,e,d.call(a,c,cb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])} function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.j,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.j,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.Y=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?H(this,168):this.l&64?H(this,4):this.l&16&&H(this,12),this.l&=-113),this.l&7))if(this.l&2){if(this.l&=-3,this.R&&kb(this,this.R)){var b=a=this.R;if(b==a)this.R=a.next;else{do{var c=b.next;if(c==a){b.next=c.next;break}b=c}while(1)}}}else this.l&1&&this.l++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.l=this.l&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255} +g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?H(this,168,28):this.l&64?H(this,4,30):this.l&16&&H(this,12,32),this.l&=-113),this.l&7))if(this.l&2){if(this.l&=-3,this.U&&kb(this,this.U)){var b=a=this.U;if(b==a)this.U=a.next;else{do{var c=b.next;if(c==a){b.next=c.next;break}b=c}while(1)}}}else this.l&1&&this.l++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.l=this.l&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255} function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255}function rc(a,b){a=b-a;this.l&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.i=c,this.g=b&(b^c));return a&255} function tc(a,b){a=b+a;this.l&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535} function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.l&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Ec(a,b){a^=b;N(this,a);return a&65535} @@ -771,61 +772,61 @@ function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760) function Gc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} function Ic(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Jc=[0,7,7,10,7,11,9,13];function Kc(a){var b=this.a;a=bc(this,a);this.f[7]=a&65535;this.a=b-Jc[this.c]} var Lc=[0,14,14,17,14,18,16,20];function Mc(a){var b=this.a,c=bc(this,a);a=a>>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8)}function Pb(a){Uc[a>>12].call(this,a)} +function Qc(){this.a-=5}function W(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a&4&&(this.i=0);a&8&&(this.o=32768);this.a-=5}function Rc(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Uc[a>>12].call(this,a)} var Uc=[function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,ec(this,a,b));this.a=c-Nc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Tb(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),lc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Wc[a>>8&15].call(this,a)},function(a){Xc[a>>8&15].call(this,a)},function(a){var b=ac(this,a);N(this,dc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=ac(this,a)<<8;a=cc(this,a)<<8;Tb(this,b-a,a,b);this.a-=this.c?4+ (this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(ac(this,a)&cc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),mc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Vc=[function(a){Yc[a>> 4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Mc,Mc,function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>> 6&3].call(this,a)},X,X],Zc=[function(a){O(this,ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.kb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= -11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.l|=1),this.a-=5):H(this,8)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc,Sc, -Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4)):F(this);this.a-=7},function(){this.l&4||this.w.ca();this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.l|=this.u&16;this.a-=13},function(){H(this,12);this.a-=5},function(){H(this,16);this.a-=25},function(){this.u&49152||(Qb(this),this.j.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-=5},V,V,V, -function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],ed=[Qc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Wc=[Pc,Pc,Ic,Ic,Fc,Fc,Gc,Gc,Tc,Tc,X,X,X,X,Rc,Rc],Xc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a,this.g&32768? -2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24);this.a-=25},function(){H(this,28);this.a-=5},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, -a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,kc);this.a-=this.c? -9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; -function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;ld(this)};jd.prototype.ba=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; -jd.prototype.aa=function(){return!0}; -function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){q("Empty ROM: "+b); -return}if(1==a.b.length){q(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2: +0)},function(a){S(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, +a,0,kc);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; +function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +jd.prototype.$=function(){return!0}; +function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); +return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].qb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.eb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.aa=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.eb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.$=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var qd={},od=(qd[65392]=[null,null,Z.prototype.Wb,Z.prototype.Fc,"RCSR"],qd[65394]=[null,null,Z.prototype.Vb,Z.prototype.Ec,"RBUF"],qd[65396]=[null,null,Z.prototype.jc,Z.prototype.Uc,"XCSR"],qd[65398]=[null,null,Z.prototype.ic,Z.prototype.Tc,"XBUF"],qd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;btd){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.ya());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; function Ad(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Ed(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&F(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)n=0>n.indexOf(p[1])?n.replace(">",p[0]+">"):n.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, +function Ld(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],h);Ld(a,b,c)}})}else c(a,null)} -function Md(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Id||xa(!0));n=!1}var h,l,n=!0;Id++;Fa[a]={};try{if(h=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ha=document.createElement("style");ha.type="text/css";ha.styleSheet?ha.styleSheet.cssText=p:ha.appendChild(document.createTextNode(p));t.appendChild(ha)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Jd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Id||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Id||xa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Jd(b,a,d,!0,e,p):Kd(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(Hc){f(Hc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Md(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); +function Md(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Id||xa(!0));n=!1}var h,l,n=!0;Id++;Fa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ha=document.createElement("style");ha.type="text/css";ha.styleSheet?ha.styleSheet.cssText=q:ha.appendChild(document.createTextNode(q));t.appendChild(ha)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Jd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Id||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Id||xa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Jd(b,a,d,!0,e,q):Kd(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Hc){f(Hc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Md(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From 686396d72641587b88d235ab5972c3c7fa2d54da Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 13 Oct 2016 10:20:11 -0700 Subject: [PATCH 20/36] Switched interrupt management to a new set of Trigger functions and static Trigger objects, eliminating the old InterruptQueue of constantly created/destroyed InterruptEvents --- modules/pdp11/lib/cpu.js | 5 + modules/pdp11/lib/cpuops.js | 4 +- modules/pdp11/lib/cpustate.js | 185 +++++++++++++-------------- modules/pdp11/lib/defines.js | 2 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 195 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 132 +++++++++---------- 6 files changed, 262 insertions(+), 261 deletions(-) diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 65d3f58eb..85930a886 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -898,6 +898,11 @@ CPUPDP11.prototype.calcRemainingTime = function() * * Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below. * + * TODO: Consider making the addTimer() and setTimer() interfaces more like the addTrigger() and setTrigger() + * interfaces (which return the underlying object instead of an array index) and maintaining a separate list + * of active timers, in order of highest to lowest cycle countdown values, as this could speed up getBurstCycles() + * and updateTimers() functions ever so slightly. + * * @this {CPUPDP11} * @param {function()} callBack * @return {number} timer index diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 1148b9942..7b3bda5fc 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1704,8 +1704,8 @@ PDP11.opWAIT = function(opCode) * * 1) opWAIT() sets a new opFlags bit (OPFLAG.WAIT) * 2) Rewind the PC back to the WAIT instruction - * 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterruptQueue() - * 4) If checkInterruptQueue() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt + * 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterrupts() + * 4) If checkInterrupts() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt * * Technically, the PC is already exactly where it's supposed to be, so why are we wasting time with steps * 2 and 4? It's largely for the Debugger's sake, so that as long as execution is "blocked" by a WAIT, that's diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 1d07478c5..98fe47a80 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -87,29 +87,30 @@ Component.subclass(CPUStatePDP11, CPUPDP11); * Overview of Device Interrupt Support * * Originally, the CPU maintained a queue of requested interrupts. Entries in this queue recorded a device's - * priority, vector, and delay (ie, a number of instructions to process before issuing the interrupt). This queue - * would constantly grow and shrink as requests were issued and dispatched, and as long as there was something + * priority, vector, and delay (ie, a number of instructions to execute before dispatching the interrupt). This + * queue would constantly grow and shrink as requests were issued and dispatched, and as long as there was something * in the queue, the CPU was constantly examining it. * - * Now we are trying something simpler. First, the CPU offers timer services to any device that wants a callback - * after a specified delay, which are much more efficient than requiring the CPU to dive into an interrupt queue and - * look for (and decrement) delay counts on every instruction. + * Now we are trying something more efficient. First, for devices that require delays (like a serial port's receiver + * and transmitter buffer registers that are supposed to "clock" the data in and out at a specific baud rate), the + * CPU offers timer services that will "fire" a callback after a specified delay, which are much more efficient than + * requiring the CPU to dive into an interrupt queue and decrement delay counts on every instruction. * - * Second, when a device decides it's time to interrupt (either at the end of some operation or when its delay timer - * has fired), it will simply request the interrupt, and CPU priority permitting, the interrupt will be dispatched. - * If CPU priority is NOT permitting, then the interrupt will remain pending until the priority drops. This means - * that the CPU need not check for any pending interrupts until/unless the CPU priority changes. + * Second, devices that generate interrupts will allocate a trigger object during initialization; we will no longer + * be creating and destroying interrupt event objects and inserting/deleting them in a constantly changing queue. Each + * trigger contains properties that never change (eg, the vector and priority), along with a "next" pointer that's + * only used when the trigger is active. * - * All this will be managed with "triggers". Every device that wants to interrupt must register via addTrigger(). - * This will add a Trigger object to an array, and each object will contain the (self) assigned vector, the priority, - * the interrupt request status, and a next pointer. + * When a device decides it's time to interrupt (either at the end of some I/O operation or when a timer has "fired"), + * it will simply "pull the trigger", which basically means that its trigger will be linked onto a list of active + * triggers, and in priority order, so that when the CPU is ready to acknowledge interrupts, it need only check the + * top of the active trigger list. */ /** * @typedef {{ * vector: number, * priority: number, - * request: number, * next: (Trigger|null) * }} Trigger */ @@ -125,10 +126,10 @@ CPUStatePDP11.prototype.initProcessor = function() this.decode = PDP11.op1170.bind(this); /** @type {Array.} */ - this.aTriggers = []; + this.aTriggers = []; // list of all triggers, active or not (TODO: DEBUG-only?) /** @type {Trigger|null} */ - this.triggerNext = null; + this.triggerNext = null; // the head of the active triggers list, in priority order this.initRegs(); @@ -599,23 +600,11 @@ CPUStatePDP11.prototype.setSP = function(addr) */ CPUStatePDP11.prototype.addTrigger = function(vector, priority) { - var trigger = {vector: vector, priority: priority, request: -1, next: null}; + var trigger = {vector: vector, priority: priority, next: null}; this.aTriggers.push(trigger); return trigger; }; -/** - * checkTriggers() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.checkTriggers = function() -{ - if (this.triggerNext && this.setTrigger(this.triggerNext)) { - this.removeTrigger(this.triggerNext); - } -}; - /** * insertTrigger(trigger) * @@ -638,7 +627,7 @@ CPUStatePDP11.prototype.insertTrigger = function(trigger) break; } triggerPrev = triggerNext; - } while (true); + } while (triggerPrev); } } }; @@ -655,14 +644,14 @@ CPUStatePDP11.prototype.removeTrigger = function(trigger) if (triggerPrev == trigger) { this.triggerNext = trigger.next; } else { - do { + while (triggerPrev) { var triggerNext = triggerPrev.next; if (triggerNext == trigger) { triggerPrev.next = triggerNext.next; break; } triggerPrev = triggerNext; - } while (true); + } } }; @@ -670,16 +659,65 @@ CPUStatePDP11.prototype.removeTrigger = function(trigger) * setTrigger(trigger) * * @this {CPUStatePDP11} - * @param {Trigger|null} trigger + * @param {Trigger} trigger * @return {boolean} (true if interrupt dispatched, false if not) */ CPUStatePDP11.prototype.setTrigger = function(trigger) { - if (!this.dispatchInterrupt(trigger.vector, trigger.priority)) { - this.insertTrigger(trigger); - return false; + /* + * For now, we will not dispatch interrupts immediately, but always defer to checkInterrupts() instead. + * + if (this.dispatchInterrupt(trigger.vector, trigger.priority)) { + return true; + } + */ + this.insertTrigger(trigger); + this.opFlags |= PDP11.OPFLAG.INTQ; + return false; +}; + +/** + * checkTriggers(priority) + * + * @this {CPUStatePDP11} + * @param {number} priority + * @return {Trigger|null} + */ +CPUStatePDP11.prototype.checkTriggers = function(priority) +{ + return (this.triggerNext && this.triggerNext.priority > priority)? this.triggerNext : null; +}; + +/** + * checkInterrupts() + * + * @this {CPUStatePDP11} + */ +CPUStatePDP11.prototype.checkInterrupts = function() +{ + if (this.opFlags & PDP11.OPFLAG.INTQ) { + this.opFlags &= ~PDP11.OPFLAG.INTQ; + + var vector = PDP11.TRAP.PIRQ; + var priority = (this.regPIR & PDP11.PSW.PRI) >> PDP11.PSW.SHIFT.PRI; + + var trigger = this.checkTriggers(priority); + if (trigger) { + vector = trigger.vector; + priority = trigger.priority; + } + + if (this.dispatchInterrupt(vector, priority)) { + if (trigger) this.removeTrigger(trigger); + } + } + else if (this.opFlags & PDP11.OPFLAG.INTQ_SPL) { + /* + * We know that INTQ (bit 1) is clear, so since INTQ_SPL (bit 0) is set, incrementing opFlags + * will transform INTQ_SPL into INTQ, without affecting any other (higher) bits. + */ + this.opFlags++; } - return true; }; /** @@ -704,61 +742,6 @@ CPUStatePDP11.prototype.dispatchInterrupt = function(vector, priority) return false; }; -/** - * checkInterrupts() - * - * @this {CPUStatePDP11} - */ -CPUStatePDP11.prototype.checkInterrupts = function() -{ - if (this.opFlags & PDP11.OPFLAG.INTQ) { - this.opFlags &= ~PDP11.OPFLAG.INTQ; - this.checkTriggers(); - /* - var interruptEvent = null; - var savePSW = this.regPIR & 0xe0; - for (var i = this.interruptQueue.length; --i >= 0;) { - if (this.interruptQueue[i].delay > 0) { - this.interruptQueue[i].delay--; - this.opFlags |= PDP11.OPFLAG.INTQ; - break; // Decrement only one delay 'difference' per cycle - } - if (this.interruptQueue[i].callback) { - if (!this.interruptQueue[i].callback()) { - this.interruptQueue.splice(i, 1); - continue; - } - //delete - this.interruptQueue[i].callback = null; - } - if (this.interruptQueue[i].priority > savePSW) { - savePSW = this.interruptQueue[i].priority; - interruptEvent = this.interruptQueue[i]; - this.interruptQueue.splice(i, 1); - } - } - if (savePSW > (this.regPSW & 0xe0)) { - if (this.opFlags & PDP11.OPFLAG.WAIT) { - this.advancePC(2); - this.opFlags &= ~PDP11.OPFLAG.WAIT; - } - if (!interruptEvent) { - this.trap(PDP11.TRAP.PIRQ, PDP11.REASON.INTERRUPT); - } else { - this.trap(interruptEvent.vector, PDP11.REASON.INTERRUPT); - } - } - */ - } - else if (this.opFlags & PDP11.OPFLAG.INTQ_SPL) { - /* - * We know that INTQ (bit 1) is clear, so since INTQ_SPL (bit 0) is set, incrementing opFlags - * will transform INTQ_SPL into INTQ, without affecting any other (higher) bits. - */ - this.opFlags++; - } -}; - /** * getPSW() * @@ -768,11 +751,11 @@ CPUStatePDP11.prototype.checkInterrupts = function() CPUStatePDP11.prototype.getPSW = function() { /* - * I'm not sure why this function can't simply be written as: + * TODO: I'm not sure why this function can't simply be written as: * * return (this.regPSW & ~PDP11.PSW.FLAGS) | (this.getNF() | this.getZF() | this.getVF() | this.getCF()); * - * but for now, I'm keeping the same masking logic as pdp11.js. + * but for now, I'm keeping the same masking logic as the original pdp11.js. */ var mask = PDP11.PSW.CMODE | PDP11.PSW.PMODE | PDP11.PSW.REGSET | PDP11.PSW.PRI | PDP11.PSW.TF; return this.regPSW = (this.regPSW & mask) | this.getNF() | this.getZF() | this.getVF() | this.getCF(); @@ -817,11 +800,23 @@ CPUStatePDP11.prototype.setPSW = function(newPSW) this.regsAltStack[oldMode] = this.regsGen[6]; this.regsGen[6] = this.regsAltStack[this.mmuMode]; } + this.regPSW = newPSW; + /* - * Trigger a call to checkInterrupts() + * Trigger a call to checkInterrupts(), just in case. + * + * TODO: I think this is overdone; if you set a breakpoint on checkInterrupts(), you'll see that a significant + * percentage of calls do nothing. For example, you'll usually see a spurious checkInterrupts() immediately after + * an interrupt has been dispatched, because it's dispatched via trap(), and trap() calls setPSW(). + * + * I mean, sure, it's POSSIBLE that the new PSW loaded by trap() actually set a lower priority, allowing a lower + * priority interrupt to immediately be acknowledged. But perhaps we should a bit more rigorous here. + * + * For example, we could avoid setting INTQ unless 1) there's actually an active interrupt trigger (ie, triggerNext + * is not null) or 2) an optional fCheckInterrupts flag is passed to us, because the caller has some knowledge + * that priority could be changing. Just throwing out some ideas.... */ this.opFlags |= PDP11.OPFLAG.INTQ; - this.regPSW = newPSW; }; /** diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index e1581ea45..4ec828132 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -186,7 +186,7 @@ var PDP11 = { */ OPFLAG: { INTQ_SPL: 0x01, // INTQ triggered by SPL - INTQ: 0x02, // call checkInterruptQueue() + INTQ: 0x02, // call checkInterrupts() WAIT: 0x04, // WAIT operation in progress TRAP_TF: 0x10, // aka PDP11.PSW.TF TRAP_MMU: 0x20, diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index f9a251047..9af43aa23 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -693,7 +693,7 @@ function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window. function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,fb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.mc=b;b=this.id.indexOf(".");0>b?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.D=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.F=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ea[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ea[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ea[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} function Hb(a,b){var c=-1,d=this.controller;(a=d.Ea[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ea[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} function Lb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Ub(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Eb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;d>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Vb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; +function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Fb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Sb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} -function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Db:-1}}y(K);h=K.prototype; -h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Db=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Db,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Db,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.D&62337|a.sa<<5|a.ta<<1}; -h.gd=function(a){var b=this.b;a&=62337;if(b.D!=a){b.D=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.gb=4194303,b.va=3915776):(b.gb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} +function Wb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Tb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} +function fc(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Eb:-1}}y(K);h=K.prototype; +h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Eb=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Eb,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Eb,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.F&62337|a.sa<<5|a.ta<<1}; +h.gd=function(a){var b=this.b;a&=62337;if(b.F!=a){b.F=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} h.Mc=function(a){return this.b.P[1][a>>1&7]};h.ud=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.P[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.uc=function(a){return this.b.P[0][a>>1&7]}; h.dd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.P[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.Sc=function(a){return this.b.P[3][a>>1&7]};h.Ad=function(a,b){this.b.P[3][b>>1&7]=a&65295}; -h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Ya=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.bb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; -h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.Za=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; -h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Tb=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Wb};h.fd=function(a,b){b&1||(a&=255);this.b.Wb=a}; -h.Bc=function(a){return a?this.b.Xb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Xb=a;b.F|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; +h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Za=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; +h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; +h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Ub=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Xb};h.fd=function(a,b){b&1||(a&=255);this.b.Xb=a}; +h.Bc=function(a){return a?this.b.Cb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Cb=a;b.D|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.D|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; var M={},L=(M[62592]=[null,null,K.prototype.Mc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Kc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Lc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Jc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.uc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.sc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.tc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.rc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, K.prototype.Ac,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.vc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.xc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.yc,K.prototype.$b,"MMR1"],M[65406]=[null,null,K.prototype.zc,K.prototype.$b,"MMR2"],M[65408]=[null,null,K.prototype.Sc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Qc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Rc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Pc,K.prototype.xd,"UDSAR"], -M[65472]=[null,null,K.prototype.Ya,K.prototype.bb,"R0SET0"],M[65473]=[null,null,K.prototype.Ya,K.prototype.bb,"R1SET0"],M[65474]=[null,null,K.prototype.Ya,K.prototype.bb,"R2SET0"],M[65475]=[null,null,K.prototype.Ya,K.prototype.bb,"R3SET0"],M[65476]=[null,null,K.prototype.Ya,K.prototype.bb,"R4SET0"],M[65477]=[null,null,K.prototype.Ya,K.prototype.bb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, -K.prototype.Za,K.prototype.cb,"R0SET1"],M[65481]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET1"],M[65482]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET1"],M[65483]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET1"],M[65484]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET1"],M[65485]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, -"CTRL",1170],M[65520]=[null,null,K.prototype.Tb,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Tb,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], +M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, +K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, +"CTRL",1170],M[65520]=[null,null,K.prototype.Ub,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Ub,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; 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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, -1,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Fa=!0},ma:function(a,b,c){this.D[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&Yb(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Eb,a.bc=a.f?a.H:a.Fb):--a.i||(a.tb=a.yb,a.Ub=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Eb=b[1]||a.I,a.Fb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Ub=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} +k(this.A),!0),this.j.fa());return 255},I:function(a,b){this.j&&E(this.j,128)&&(B(this.j,"attempt to write "+k(b,4,!0)+" to invalid block %"+k(this.A),!0),this.j.fa())},M:function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8},H:function(a,b,c){this.ub(a++,b&255,c++);this.ub(a,b>>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&fc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, +1,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Gb(a,b,c)},R:function(a){return this.F[a]},U:function(a,b){a=this.F[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&fc(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&fc(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.F[a]=b;this.Fa=!0},ma:function(a,b,c){this.F[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&fc(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&fc(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Fb,a.bc=a.f?a.H:a.Gb):--a.i||(a.tb=a.yb,a.Vb=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Fb=b[1]||a.I,a.Gb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Vb=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.R,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; -function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Cb=!1;this.v.eb=a.autoStart;this.v.Va=!1;this.ib=this.ka=0;this.jb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Pb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; -h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.ib))}} -h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} +function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Db=!1;this.v.fb=a.autoStart;this.v.Va=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Qb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; +h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.jb))}} +h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Qc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Oc(a,b){var c=a.ea-=a.b;a.b=0;b&&(a.ea=0);return c} -h.Wc=function(){if(this.v.da){this.hb>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.ab(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Ob&&(this.B&&this.B.aa(),this.Ob=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, -e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Pb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.hb+=this.qa;this.ca+=c;a(b,c)}}}; -h.$a=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Cb=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Pb,0);return!0};h.ab=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; -function jd(a){this.Sb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.F=this.Wb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ld(a){a.Ka=255;a.Z=0;a.Xb=0;a.D=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.gb=262143;a.va=253952;a.F|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Vb,a.Rb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Rb=a.Bd,Lb(a.w,16))}h.Lb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; +h.Wc=function(){if(this.v.da){this.ib>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Pb&&(this.B&&this.B.aa(),this.Pb=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, +e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Qb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.ib+=this.qa;this.ca+=c;a(b,c)}}}; +h.ab=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Db=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Qb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; +function jd(a){this.Tb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.D=this.Xb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; +function ld(a){a.Ka=255;a.Z=0;a.Cb=0;a.F=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.D|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Wb,a.Sb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Sb=a.Bd,Lb(a.w,16))}h.Mb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c(a.L&224)>>5?(a.F&4&&(a.u[7]=a.u[7]+2&65535,a.F&=-5),a.$(c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.lb<=b.lb)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.lb<=b.lb){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Db(a){return a.L=a.L&63728|a.Aa()|od(a)|nd(a)|md(a)} -function mc(a,b){a.S=b<<12;a.X=~b&4;a.O=b<<14;a.N=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.D&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.F&=-17} -function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.gb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.D&57344||(a.D=a.D|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.M(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.M(e)|g;a.b-= -8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Vb=function(a){return this.w.ja(yd(this,a,2))}; +function pd(a){var b=a.M(a.u[7]);a.u[7]=a.u[7]+2&65535;return b}function qd(a,b){a.u[7]=b&65535}function jc(a,b,c){b={Yc:b,Ya:c,next:null};a.jc.push(b);return b}function hc(a,b){if(b!=a.U){var c=a.U;if(!c||c.Ya<=b.Ya)b.next=c,a.U=b;else{do{var d=c.next;if(!d||d.Ya<=b.Ya){b.next=d;c.next=b;break}c=d}while(c)}}a.D|=2}function Db(a){return a.L=a.L&63728|a.Aa()|od(a)|nd(a)|md(a)} +function mc(a,b){a.S=b<<12;a.X=~b&4;a.O=b<<14;a.N=b<<16;if((b^a.L)&2048)for(var c=a.Ca.length;0<=--c;){var d=a.u[c];a.u[c]=a.Ca[c];a.Ca[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.L=b;a.D|=2}function O(a,b){a.D&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.D&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.D&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.F&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.D&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.D&=-17} +function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.F&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.M(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.M(e)|g;a.b-= +8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Wb=function(a){return this.w.ja(yd(this,a,2))}; h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(yd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.M(d|c&a.V),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function Bd(a,b,c,d){a.D&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} +function Bd(a,b,c,d){a.F&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} function Fd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Id(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.ab=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Cb?0:1:-1;this.v.Cb=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){if(this.F&=-3,this.U&&hc(this,this.U)){var d=a=this.U;if(d==a)this.U=a.next;else{do{var e=d.next;if(e==a){d.next=e.next;break}d=e}while(1)}}}else this.F&1&&this.F++;this.D&57344||(this.Ia= -0,this.Bb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(this,a<<8);return a}function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535} -function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255}function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;td(this,a);return a&65535} -function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535}function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(this,a);return a&65535} +h.bb=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Db?0:1:-1;this.v.Db=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;var d=160,e=(this.Cb&224)>>5;if(a=this.U&&this.U.Ya>e?this.U:null)d=a.Yc,e=a.Ya;e>(this.L&224)>>5?(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),this.$(d,26),e=!0):e=!1;if(e&& +a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.D&1&&this.D++;this.F&57344||(this.Ia=0,this.Bb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(this,a<<8);return a} +function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.D&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} +function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535} +function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.D&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(this,a);return a&65535} function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.i]} -var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){Q(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){Q(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function kd(a){ye[a>>12].call(this,a)} var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;O(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? 2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);O(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.i? 4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ze= [function(a){Ve[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!od(this))},function(a){R(this,a,od(this))},function(a){R(this,a,!this.Aa()==!nd(this))},function(a){R(this,a,!this.Aa()!=!nd(this))},function(a){R(this,a,!od(this)&&!this.Aa()==!nd(this))},function(a){R(this,a,od(this)||!this.Aa()!=!nd(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},V,V],We=[function(a){rd(this, Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){Q(this,a,0,ae);this.b-=this.i?11:6},function(a){Q(this,a,md(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Vb(a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, -0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= +2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Wb(a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, +0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, +3)):this.fa();this.b-=7},function(){this.D&4||this.B.aa();this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= [ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Te=[te,te,me,me,ke,ke,le,le,xe,xe,V,V,V,V,ve,ve],Ue=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!md(this)&&!od(this))},function(a){R(this,a,md(this)||od(this))},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(){this.$(24, 2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},V,V],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,be);this.b-= this.i?11:6},function(a){P(this,a,md(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,md(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){P(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9:3+(7== -this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Hb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Gb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; +this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.F=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.F,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Ib);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Hb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Ab=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Rb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.F=[];return!0}h.Ab=function(a){if("number"==typeof a)this.F.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],pf[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],pf[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],pf[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Mb=function(){return-1};qf.prototype.Nb=function(){}; +function qf(a){r.call(this,"Debugger",a,qf);this.ha=a.base||16;this.ta=!1;this.R=this.sa=this.H=0;this.U=!1;this.C=-1;this.i=[];this.ba={}}y(qf);var rf={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Nb=function(){return-1};qf.prototype.Ob=function(){}; function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} function tf(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ba[b]);var c=0;for(b in a.ba)xf(a,b,a.ba[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; -h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Fb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} +d.ka.value="";Ic(d,a,!0);return!0}return!1}),!0;case "step":return this.I[b]=c,Fa(c,function(a){var b=!1;hb(d,!0)||(gb(d,!0),b=d.bb(a?1:0),gb(d,!1));return b}),!0}return!1};h.nb=function(){this.ka&&this.ka.focus()};function Z(a){a=a&&a.A;null==a&&(a=-1);return a}h.Pa=function(a,b){var c=255,d=Z(a);-1!==d&&(c=this.w,c.w++,d=c.W[(d&c.i)>>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; +h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Gb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} function Hf(a,b,c){var d;c=(c?a.K:a.Ma).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Nb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; +h.Nb=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7a?"R"+a:6==a?"SP":"PC"}h.Ob=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Oc(a),a.la=0,a.B.aa()))}; -function Bf(a){var b;if(Jd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Y],!0);a.D=["bw"];a.La=0} -h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.D));l.wa||Bf(a);break}}return f} +h.save=function(){var a=new N(this);a.set(0,Jf(this.K));a.set(1,Jf(this.T));a.set(2,[this.i,this.U,this.ia]);a.set(3,this.G);return a.data()};h.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Kf(a[b++]),this.T=Kf(a[b++]),this.i=a[b][0],"string"==typeof this.i&&(this.i=[this.i]),this.U=a[b][1],this.ia|=a[b][2]);a[3]&&(this.G=a[3]);return!0};h.start=function(a,b){this.V||this.g("running");this.v.da=!0;this.hb=a;this.ib=b}; +h.stop=function(a,b){if(this.v.da){this.v.da=!1;this.H=b-this.ib;if(!this.V){b="stopped";if(this.H){a-=this.hb;var c=0>>d.Y],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.Y],!0);a.F=["bw"];a.La=0} +h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.F)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.F));l.wa||Bf(a);break}}return f} function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ ")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Hb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Ib=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=X(d.u[7]),Pf(a,J(a,a.K.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Zb=wf(a,za)>>>0,65536>4||1;yg--&&0<$b;){var ac=0,rb=0,sb,Vc="",Ke="",ha=J(a,pb.A);for(sb=4==Ta?16:a.ha;0bc?String.fromCharCode(bc):".";$b--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Hf(a,ad);if(cc)for(var dc=2;dc< -g.length;dc++){var tb=uf(a,g[dc]);if(void 0===tb){a.g("unrecognized value: "+g[dc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,cc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.$a(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,ec=ed,Me=null,wb= -ec.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< +g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); +break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,dc=ed,Me=null,wb= +dc.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.J)){this.D=new N(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.eb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +h.lb=function(a){void 0===a&&(a=this.f||(this.J?1:hg));if(!this.B){this.B++;var b=!1,c=!1;this.T=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>hg){if(jg(d,this.J)){this.F=new N(this,"1.30.1","failsafe");jg(this.F)&&(og(this,d),a=2,pg(this.F));this.F.set("timestamp",ta());qg(this.F);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.fb());this.T&&(og(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.B=0}; function og(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mb?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.eb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.j-1;this.s=this.D/this.j|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.s=this.D/this.l|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Oa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.xa+t;f=q+a.j;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.j,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.j;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} -function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} +function Ya(a,b,c,d,e){for(var f=b,h=c,l=f>>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.ya+t;f=q+a.l;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.l;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a,b){a.o||H(a.a,4,b)} -function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,Za:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;var e=this;this.b.Za=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.Za,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.Za,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; +function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,$a:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.$a=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.$a,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; +g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.$a,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Ua=4194303,b.Fa=3915776):(b.Ua=262143,b.Fa=253952),nb(b));ob(this)};function ob(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.$b=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Yb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.Zb=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; g.Xb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Ib=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Gb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Hb=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Fb=function(a){return this.a.P[0][(a>>1&7)+8]}; g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.fc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.dc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ec=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.cc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.sa=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.ua=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ta=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.jb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; -g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.lb};g.vc=function(a,b){b&1||(a&=255);this.a.lb=a};g.Pb=function(a){return a?this.a.mb:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.mb=a;b.l|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.l|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; +g.ta=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; +g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.kb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; +g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.mb};g.vc=function(a,b){b&1||(a&=255);this.a.mb=a};g.Pb=function(a){return a?this.a.Za:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Za=a;b.j|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; var K={},J=(K[62592]=[null,null,I.prototype.$b,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Yb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.Zb,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Xb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Ib,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Gb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Hb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Fb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, I.prototype.Ob,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Jb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Lb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Mb,I.prototype.rb,"MMR1"],K[65406]=[null,null,I.prototype.Nb,I.prototype.rb,"MMR2"],K[65408]=[null,null,I.prototype.fc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.dc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.ec,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.cc,I.prototype.Mc,"UDSAR"], -K[65472]=[null,null,I.prototype.sa,I.prototype.ua,"R0SET0"],K[65473]=[null,null,I.prototype.sa,I.prototype.ua,"R1SET0"],K[65474]=[null,null,I.prototype.sa,I.prototype.ua,"R2SET0"],K[65475]=[null,null,I.prototype.sa,I.prototype.ua,"R3SET0"],K[65476]=[null,null,I.prototype.sa,I.prototype.ua,"R4SET0"],K[65477]=[null,null,I.prototype.sa,I.prototype.ua,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, -I.prototype.ta,I.prototype.va,"R0SET1"],K[65481]=[null,null,I.prototype.ta,I.prototype.va,"R1SET1"],K[65482]=[null,null,I.prototype.ta,I.prototype.va,"R2SET1"],K[65483]=[null,null,I.prototype.ta,I.prototype.va,"R3SET1"],K[65484]=[null,null,I.prototype.ta,I.prototype.va,"R4SET1"],K[65485]=[null,null,I.prototype.ta,I.prototype.va,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, -"CTRL",1170],K[65520]=[null,null,I.prototype.jb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.jb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], +K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.kb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.kb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.j,b);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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.j,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.j,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.j,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.j,c);this.o[a>> +b&255,c++);this.Pa(a,b>>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.l,b);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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, +R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> 1]=b;this.ha=!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.U=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa];if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.ca,G.prototype.W,G.prototype.pa]; -function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.ca=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.ya=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.hb=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; -g.ja=function(a,b,c,d){this.w=a;this.j=b;this.I=d;for(b=0;ba.X/a.ca&&(b=1),a.Z=b,b=a.Ta*a.Z,a.ca!=b)){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.R;a.R=0;a.N=ka();a.Y=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.da-=a.a;a.a=0;b&&(a.da=0);return c} -g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.wa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.fb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.wa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.bb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& -(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.gb&&(this.w&&this.w.ba(),this.gb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.hb;this.Y=ka();d=this.fb;this.wa&&(d=Math.round(d*this.wa/ -this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.wa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.hb,0)}}g.pb=function(){return 0}; +g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.gb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.xa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.cb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& +(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.hb&&(this.w&&this.w.ba(),this.hb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.ib;this.Y=ka();d=this.gb;this.xa&&(d=Math.round(d*this.xa/ +this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.xa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.ib,0)}}g.pb=function(){return 0}; function F(a){if(a.h.S){Nb(a);a.J+=a.R;a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0} function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.U=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.V=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.l=this.lb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Qb(a){a.na=255;a.F=0;a.mb=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.l|=2;a.j&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.kb,a.ib=a.Sc,Va(a.j,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.ib=a.Rc,Va(a.j,16))}g.bb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.j));return a.data()}; -g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c(a.u&224)>>5?(a.l&4&&(a.f[7]=a.f[7]+2&65535,a.l&=-5),H(a,c,26),c=!0):c=!1;if(!c){if(b!=a.U)if(c=a.U,!c||c.Aa<=b.Aa)b.next=c,a.U=b;else{do{a=c.next;if(!a||a.Aa<=b.Aa){b.next=a;c.next=b;break}c=a}while(1)}return!1}return!0}function Na(a){return a.u=a.u&63728|a.ia()|(a.i&65535?0:4)|(a.g&32768?2:0)|M(a)} -function pb(a,b){a.o=b<<12;a.i=~b&4;a.g=b<<14;a.m=b<<16;if((b^a.u)&2048)for(var c=a.ra.length;0<=--c;){var d=a.f[c];a.f[c]=a.ra[c];a.ra[c]=d}a.s=b>>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.l|=2;a.u=b}function N(a,b){a.l&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.l&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.l&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.l&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.l&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.l&=-17} +0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.j=this.mb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Qb(a){a.na=255;a.F=0;a.Za=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.lb,a.jb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.jb=a.Rc,Va(a.l,16))}g.cb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.l));return a.data()}; +g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: -128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= -8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.l|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.j,a)};g.kb=function(a){return cb(this.j,Xb(this,a,2))}; -g.Rc=function(a,b){db(this.j,a,b&65535)};g.Sc=function(a,b){db(this.j,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} -function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.j,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} -function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.j,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.j,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.j,e)),e&1&&a.a--,a=a.j,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.j,e,d.call(a,c,cb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])} -function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.j,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.j,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.l&&(this.l&112&&(this.l&32?H(this,168,28):this.l&64?H(this,4,30):this.l&16&&H(this,12,32),this.l&=-113),this.l&7))if(this.l&2){if(this.l&=-3,this.U&&kb(this,this.U)){var b=a=this.U;if(b==a)this.U=a.next;else{do{var c=b.next;if(c==a){b.next=c.next;break}b=c}while(1)}}}else this.l&1&&this.l++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.l=this.l&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255} -function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255}function rc(a,b){a=b-a;this.l&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.l&128||(this.o=this.i=c,this.g=b&(b^c));return a&255} -function tc(a,b){a=b+a;this.l&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.l&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255}function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535} -function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.l&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535}function Ec(a,b){a^=b;N(this,a);return a&65535} -function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= +8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.l,a)};g.lb=function(a){return cb(this.l,Xb(this,a,2))}; +g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} +function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} +function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.Za&224)>>5;if(a=this.U&&this.U.sa>c?this.U:null)b=a.nc,c=a.sa;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.U,c==a)this.U=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +1&&this.j++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255} +function rc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function tc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} +function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} +function Ec(a,b){a^=b;N(this,a);return a&65535}function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} function Gc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} function Ic(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Jc=[0,7,7,10,7,11,9,13];function Kc(a){var b=this.a;a=bc(this,a);this.f[7]=a&65535;this.a=b-Jc[this.c]} -var Lc=[0,14,14,17,14,18,16,20];function Mc(a){var b=this.a,c=bc(this,a);a=a>>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.l&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Uc[a>>12].call(this,a)} var Uc=[function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,ec(this,a,b));this.a=c-Nc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Tb(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),lc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? 2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Wc[a>>8&15].call(this,a)},function(a){Xc[a>>8&15].call(this,a)},function(a){var b=ac(this,a);N(this,dc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=ac(this,a)<<8;a=cc(this,a)<<8;Tb(this,b-a,a,b);this.a-=this.c?4+ (this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(ac(this,a)&cc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),mc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Vc=[function(a){Yc[a>> 4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Mc,Mc,function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>> 6&3].call(this,a)},X,X],Zc=[function(a){O(this,ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.kb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= -11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8,6);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.l|=1),this.a-=5):H(this,8,6)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc, -Sc,Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.l&4||this.w.ba();this.l|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.l|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Qb(this),this.j.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.lb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= +11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8,6);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc, +Sc,Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.j&4||this.w.ba();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.j|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Qb(this),this.l.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= 5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],ed=[Qc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Wc=[Pc,Pc,Ic,Ic,Fc,Fc,Gc,Gc,Tc,Tc,X,X,X,X,Rc,Rc],Xc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a, this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24,2);this.a-=25},function(){H(this,28,5);this.a-=5},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2: 0)},function(a){S(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, a,0,kc);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; -function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.j=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; jd.prototype.$=function(){return!0}; function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].qb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c>>d.c].qb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.eb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.ja=function(a,b,c,d){this.w=a;this.l=b;this.a=c;this.I=d;var e=this;this.M=mb(this.a,48,4);this.H=jb(this.a,function(){e.b&128||!e.i.length||(e.D=e.i.shift(),e.b|=128,e.b&64&&kb(e.a,e.M))});this.N=mb(this.a,52,4);this.J=jb(this.a,function(){e.c|=128;e.c&64&&kb(e.a,e.N)});gb(b,this,od);D(this)}; +g.fb=function(){if(!this.s){var a=Gb(this.w,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.fb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; g.$=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var qd={},od=(qd[65392]=[null,null,Z.prototype.Wb,Z.prototype.Fc,"RCSR"],qd[65394]=[null,null,Z.prototype.Vb,Z.prototype.Ec,"RBUF"],qd[65396]=[null,null,Z.prototype.jc,Z.prototype.Uc,"XCSR"],qd[65398]=[null,null,Z.prototype.ic,Z.prototype.Tc,"XBUF"],qd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;btd){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.ya());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +g.Aa=function(a){void 0===a&&(a=this.b||(this.s?1:td));if(!this.g){this.g++;var b=!1,c=!1;this.G=!1;var d=this.A||new L(this,"1.30.1");if(-1==a)b=!0;else if(a>td){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.za());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; function Ad(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} function Ed(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.$&&(c&&F(a.a),d=a.a.$(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n Date: Thu, 13 Oct 2016 13:11:11 -0700 Subject: [PATCH 21/36] In the spirit of the PCx86 Debugger, the PDP11 Debugger can now distinguish between virtual and physical addresses; physical addresses are specified with a leading '%'; this necessitated special CPU memory interfaces that mirror the Bus memory interfaces, which perform mapVirtualToPhysical() as needed, with traps disabled. --- modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/cpustate.js | 253 +++++++++++++------- modules/pdp11/lib/debugger.js | 61 +++-- versions/pdpjs/1.30.1/pdp11-dbg.js | 365 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 257 ++++++++++---------- 5 files changed, 518 insertions(+), 420 deletions(-) diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 7b3bda5fc..8556cfbcc 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1201,7 +1201,7 @@ PDP11.opJSR = function(opCode) PDP11.opMARK = function(opCode) { var addr = (this.getPC() + ((opCode & 0x3F) << 1)) & 0xffff; - var src = this.readWordFromVirtual(addr | 0x10000); + var src = this.readWord(addr | this.addrDSpace); this.setPC(this.regsGen[5]); this.setSP(addr + 2); this.regsGen[5] = src; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 98fe47a80..78a8a57b3 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -125,13 +125,17 @@ CPUStatePDP11.prototype.initProcessor = function() { this.decode = PDP11.op1170.bind(this); - /** @type {Array.} */ - this.aTriggers = []; // list of all triggers, active or not (TODO: DEBUG-only?) + this.initRegs(); + + this.nDisableTraps = 0; /** @type {Trigger|null} */ this.triggerNext = null; // the head of the active triggers list, in priority order - this.initRegs(); + if (DEBUG) { + /** @type {Array.} */ + this.aTriggers = []; // list of all triggers, active or not (just for debugging) + } this.flags.complete = this.flags.debugCheck = false; }; @@ -144,9 +148,9 @@ CPUStatePDP11.prototype.initProcessor = function() CPUStatePDP11.prototype.reset = function() { if (this.flags.running) this.stopCPU(); - this.resetRegs(); + this.initRegs(); this.resetCycles(); - this.clearError(); // clear any fatal error/exception that setError() may have flagged + this.clearError(); // clear any fatal error/exception that setError() may have flagged this.parent.reset.call(this); }; @@ -200,7 +204,7 @@ CPUStatePDP11.prototype.initRegs = function() this.regMB = 0; /* - * opFlags contains various conditions that stepCPU() needs to be aware of + * opFlags contains various conditions that stepCPU() needs to be aware of. */ this.opFlags = 0; @@ -213,9 +217,7 @@ CPUStatePDP11.prototype.initRegs = function() this.srcMode = this.srcReg = 0; this.dstMode = this.dstReg = this.dstAddr = 0; - this.cpuType = 70; this.trapPSW = -1; - this.loopRate = 9999; // instructions we can execute in 12ms this.resetRegs(); }; @@ -250,9 +252,8 @@ CPUStatePDP11.prototype.resetRegs = function() * Define handlers and DSPACE setting appropriate for the current MMU mode, in order to eliminate * unnecessary calls to mapVirtualToPhysical(). * - * TODO: We could further optimize readWordFromAddr(), splitting it into readWordFromDSpace() and - * readWordFromISpace(), eliminating the need to OR the addrDSpace bit when we know that bit is zero, - * but that seems like a pretty tiny optimization. + * TODO: We could further optimize readWord(), splitting it into readWordFromDSpace() and readWordFromISpace(), + * eliminating the need to OR the addrDSpace bit when we know that bit is zero, but that's a pretty tiny optimization. * * @this {CPUStatePDP11} */ @@ -260,15 +261,15 @@ CPUStatePDP11.prototype.setMemoryAccess = function() { if (this.mmuEnable) { this.addrDSpace = PDP11.ACCESS.DSPACE; - this.getAddrByMode = this.getVirtualAddrByMode; - this.readWordFromAddr = this.readWordFromVirtual; - this.writeWordToAddr = this.writeWordToVirtual; + this.getAddr = this.getVirtualAddrByMode; + this.readWord = this.readWordFromVirtual; + this.writeWord = this.writeWordToVirtual; this.bus.setIOPageRange((this.regMMR3 & PDP11.MMR3.MMU_22BIT)? 22 : 18); } else { this.addrDSpace = 0; - this.getAddrByMode = this.getPhysicalAddrByMode; - this.readWordFromAddr = this.readWordFromPhysical; - this.writeWordToAddr = this.writeWordToPhysical; + this.getAddr = this.getPhysicalAddrByMode; + this.readWord = this.readWordFromPhysical; + this.writeWord = this.writeWordToPhysical; this.bus.setIOPageRange(16); } }; @@ -335,9 +336,9 @@ CPUStatePDP11.prototype.getMMR1 = function() CPUStatePDP11.prototype.setMMR3 = function(newMMR3) { /* - * Don't allow 11/45 to do 22 bit or use unibus map + * Don't allow the 11/45 to use 22-bit addressing or the UNIBUS map */ - if (this.cpuType !== 70) { + if (this.model < PDP11.MODEL_1170) { newMMR3 &= ~(PDP11.MMR3.MMU_22BIT | PDP11.MMR3.UNIBUS_MAP); } if (this.regMMR3 != newMMR3) { @@ -541,7 +542,7 @@ CPUStatePDP11.prototype.getPC = function() */ CPUStatePDP11.prototype.getPCWord = function() { - var data = this.readWordFromAddr(this.regsGen[PDP11.REG.PC]); + var data = this.readWord(this.regsGen[PDP11.REG.PC]); this.advancePC(2); return data; }; @@ -601,7 +602,7 @@ CPUStatePDP11.prototype.setSP = function(addr) CPUStatePDP11.prototype.addTrigger = function(vector, priority) { var trigger = {vector: vector, priority: priority, next: null}; - this.aTriggers.push(trigger); + if (DEBUG) this.aTriggers.push(trigger); return trigger; }; @@ -653,6 +654,7 @@ CPUStatePDP11.prototype.removeTrigger = function(trigger) triggerPrev = triggerNext; } } + // We could also set trigger.next to null now, but strictly speaking, that shouldn't be necessary }; /** @@ -1051,6 +1053,14 @@ CPUStatePDP11.prototype.panic = function(reason) */ CPUStatePDP11.prototype.trap = function(vector, reason) { + if (DEBUG && this.dbg) { + if (this.messageEnabled(MessagesPDP11.TRAP)) { + this.printMessage("trap to vector " + this.dbg.toStrBase(vector, 0, true) + (reason? " (" + this.dbg.toStrBase(reason) + ")" : ""), MessagesPDP11.TRAP, true); + } + } + + if (this.nDisableTraps) return; + var doubleTrap = false; if (this.trapPSW < 0) { @@ -1069,8 +1079,8 @@ CPUStatePDP11.prototype.trap = function(vector, reason) * Read from kernel D space */ this.mmuMode = 0; - var newPC = this.readWordFromAddr(vector | this.addrDSpace); - var newPSW = this.readWordFromAddr(((vector + 2) & 0xffff) | this.addrDSpace); + var newPC = this.readWord(vector | this.addrDSpace); + var newPSW = this.readWord(((vector + 2) & 0xffff) | this.addrDSpace); /* * Set new PSW with previous mode @@ -1089,12 +1099,6 @@ CPUStatePDP11.prototype.trap = function(vector, reason) this.opFlags &= ~PDP11.OPFLAG.TRAP_MASK; // lose interest in traps after an abort this.trapPSW = -1; // reset flag that we have a trap within a trap - if (DEBUG && this.dbg) { - if (this.messageEnabled(MessagesPDP11.TRAP)) { - this.printMessage("trap to vector " + this.dbg.toStrBase(vector, 0, true) + (reason? " (" + this.dbg.toStrBase(reason) + ")" : ""), MessagesPDP11.TRAP, true); - } - } - if (reason != PDP11.REASON.INTERRUPT) throw vector; }; @@ -1149,33 +1153,31 @@ CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) /** * mapVirtualToPhysical(virtualAddress, accessFlags) * - * mapVirtualToPhysical() does memory management. It converts a 17 bit I/D - * virtual address to a 22 bit physical address. A real PDP 11/70 memory management - * unit can be enabled separately for read and write for diagnostic purposes. - * This is handled here by having an enable mask (mmuEnable) which is tested against - * the operation access mask (accessFlags). If there is no match then the virtual - * address is simply mapped as a 16 bit physical address with the upper page going - * to the IO address space. Significant access mask values used are PDP11.ACCESS.READ + * mapVirtualToPhysical() does memory management. It converts a 17-bit I/D virtual address to a + * 22-bit physical address. A real PDP 11/70 memory management unit can be enabled separately + * for read and write for diagnostic purposes. This is handled here by having an enable mask + * (mmuEnable) which is tested against the operation access mask (accessFlags). If there is no + * match, then the virtual address is simply mapped as a 16 bit physical address with the upper + * page going to the IO address space. Significant access mask values used are PDP11.ACCESS.READ * and PDP11.ACCESS.WRITE. * - * As an aside it turns out that it is the memory management unit that does odd address - * and non-existent memory trapping: who knew? :-) I thought these would have been - * handled at access time. + * As an aside it turns out that it is the memory management unit that does odd address and + * non-existent memory trapping: who knew? :-) I thought these would have been handled at + * access time. * - * When doing mapping, mmuMode is used to decide what address space is to be - * used. 0 = kernel, 1 = supervisor, 2 = illegal, 3 = user. Normally, mmuMode is - * set by the setPSW() function but there are exceptions for instructions which - * move data between address spaces (MFPD, MFPI, MTPD, and MTPI) and trap(). These will - * modify mmuMode outside of setPSW() and then restore it again if all worked. If - * however something happens to cause a trap then no restore is done as setPSW() - * will have been invoked as part of the trap, which will resynchronize mmuMode + * When doing mapping, mmuMode is used to decide what address space is to be used (0 = kernel, + * 1 = supervisor, 2 = illegal, 3 = user). Normally, mmuMode is set by the setPSW() function, + * but there are exceptions for instructions which move data between address spaces (MFPD, MFPI, + * MTPD, and MTPI) and trap(). These will modify mmuMode outside of setPSW() and then restore + * it again if all worked. If however something happens to cause a trap then no restore is + * done as setPSW() will have been invoked as part of the trap, which will resynchronize mmuMode. * - * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 - * & above) maps directly to UNIBUS space - including low memory. This doesn't appear to - * be particularly useful as it restricts maximum system memory - although it does appear - * to allow software testing of the unibus map. This feature also appears to confuse some - * OSes which test consecutive memory locations to find maximum memory - and on a full - * memory system find themselves accessing low memory again at high addresses. + * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 & above) + * maps directly to UNIBUS space - including low memory. This doesn't appear to be particularly + * useful as it restricts maximum system memory - although it does appear to allow software + * testing of the unibus map. This feature also appears to confuse some OSes which test consecutive + * memory locations to find maximum memory - and on a full memory system find themselves accessing + * low memory again at high addresses. * * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 * nonr leng read trap unus unus ena mnt cmp -mode- i/d --page-- enable @@ -1324,7 +1326,7 @@ CPUStatePDP11.prototype.writeByteToPhysical = function(physicalAddress, data) */ CPUStatePDP11.prototype.popWord = function() { - var result = this.readWordFromAddr(this.regsGen[6] | this.addrDSpace); + var result = this.readWord(this.regsGen[6] | this.addrDSpace); this.regsGen[6] = (this.regsGen[6] + 2) & 0xffff; return result; }; @@ -1355,18 +1357,18 @@ CPUStatePDP11.prototype.pushWord = function(data) this.opFlags |= 4; } } - this.writeWordToAddr(virtualAddress, data); + this.writeWord(virtualAddress, data); }; /** - * getAddress(mode, reg, accessFlags) + * getAddrByMode(mode, reg, accessFlags) * - * getAddress() maps a six bit operand to a 17 bit I/D virtual address space. + * getAddrByMode() maps a six bit operand to a 17 bit I/D virtual address space. * * Instruction operands are six bits in length - three bits for the mode and three * for the register. The 17th I/D bit in the resulting virtual address represents * whether the reference is to Instruction space or Data space - which depends on - * combination of the mode and whether the register is the Program Counter (register 7). + * combination of the mode and whether the register is the Program Counter (R7). * * The eight modes are:- * 0 R no valid virtual address @@ -1388,7 +1390,7 @@ CPUStatePDP11.prototype.pushWord = function(data) * @param {number} accessFlags * @return {number} */ -CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) +CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) { var virtualAddress, stepSize; var addrDSpace = (accessFlags & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace; @@ -1401,7 +1403,7 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) /* * Mode 0: Registers don't have a virtual address, so trap. * - * NOTE: Most instruction code paths never call getAddress() when the mode is zero; + * NOTE: Most instruction code paths never call getAddrByMode() when the mode is zero; * JMP and JSR instructions are exceptions, but that's OK, because those are documented to * "cause an 'illegal' instruction" condition", which presumably means a BUS_ERROR trap. */ @@ -1449,8 +1451,7 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) stepSize = 2; virtualAddress = this.regsGen[reg]; if (reg !== 7) virtualAddress |= addrDSpace; - virtualAddress = this.readWordFromAddr(virtualAddress); - // if (reg === 7) LOG_ADDRESS(virtualAddress); // @#n not operational + virtualAddress = this.readWord(virtualAddress); virtualAddress |= addrDSpace; this.nStepCycles -= (5 + 2); break; @@ -1473,7 +1474,7 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) stepSize = -2; virtualAddress = (this.regsGen[reg] - 2) & 0xffff; if (reg !== 7) virtualAddress |= addrDSpace; - virtualAddress = this.readWordFromAddr(virtualAddress) | addrDSpace; + virtualAddress = this.readWord(virtualAddress) | addrDSpace; this.nStepCycles -= (6 + 2); break; @@ -1492,7 +1493,7 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) case 7: virtualAddress = this.getPCWord(); virtualAddress = (virtualAddress + this.regsGen[reg]) & 0xffff; - virtualAddress = this.readWordFromAddr(virtualAddress | this.addrDSpace) | addrDSpace; + virtualAddress = this.readWord(virtualAddress | this.addrDSpace) | addrDSpace; this.nStepCycles -= (7 + 3); return virtualAddress; } @@ -1516,10 +1517,94 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) return virtualAddress; }; +/** + * getByteDirect(addr) + * + * This interface is expressly for the Debugger, to access virtual memory without faulting; + * note that if the MMU is not enabled, this is effectively the same as using the Bus interface. + * + * @this {CPUStatePDP11} + * @param {number} addr + * @return {number} + */ +CPUStatePDP11.prototype.getByteDirect = function(addr) +{ + if (!this.mmuEnable) { + return this.bus.getByteDirect(addr); + } + this.nDisableTraps++; + var b = this.readByteFromPhysical(this.mapVirtualToPhysical(addr, PDP11.ACCESS.READ_BYTE)); + this.nDisableTraps--; + return b; +}; + +/** + * getWordDirect(addr) + * + * This interface is expressly for the Debugger, to access virtual memory without faulting; + * note that if the MMU is not enabled, this is effectively the same as using the Bus interface. + * + * @this {CPUStatePDP11} + * @param {number} addr + * @return {number} + */ +CPUStatePDP11.prototype.getWordDirect = function(addr) +{ + if (!this.mmuEnable) { + return this.bus.getWordDirect(addr); + } + this.nDisableTraps++; + var w = this.readWordFromPhysical(this.mapVirtualToPhysical(addr, PDP11.ACCESS.READ_WORD)); + this.nDisableTraps--; + return w; +}; + +/** + * setByteDirect(addr, data) + * + * This interface is expressly for the Debugger, to access virtual memory without faulting; + * note that if the MMU is not enabled, this is effectively the same as using the Bus interface. + * + * @this {CPUStatePDP11} + * @param {number} addr + * @param {number} data + */ +CPUStatePDP11.prototype.setByteDirect = function(addr, data) +{ + if (!this.mmuEnable) { + this.bus.setByteDirect(addr, data); + return; + } + this.nDisableTraps++; + this.writeByteToPhysical(this.mapVirtualToPhysical(addr, PDP11.ACCESS.WRITE_BYTE), data); + this.nDisableTraps--; +}; + +/** + * setWordDirect(addr, data) + * + * This interface is expressly for the Debugger, to access virtual memory without faulting; + * note that if the MMU is not enabled, this is effectively the same as using the Bus interface. + * + * @this {CPUStatePDP11} + * @param {number} addr + * @param {number} data + */ +CPUStatePDP11.prototype.setWordDirect = function(addr, data) +{ + if (!this.mmuEnable) { + this.bus.setWordDirect(addr, data); + return; + } + this.nDisableTraps++; + this.writeWordToPhysical(this.mapVirtualToPhysical(addr, PDP11.ACCESS.WRITE_WORD), data); + this.nDisableTraps--; +}; + /** * getPhysicalAddrByMode(mode, reg, accessFlags) * - * This is a handler set up by setMemoryAccess(). All calls should go through getAddrByMode(). + * This is a handler set up by setMemoryAccess(). All calls should go through getAddr(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1529,13 +1614,13 @@ CPUStatePDP11.prototype.getAddress = function(mode, reg, accessFlags) */ CPUStatePDP11.prototype.getPhysicalAddrByMode = function(mode, reg, accessFlags) { - return this.getAddress(mode, reg, accessFlags); + return this.getAddrByMode(mode, reg, accessFlags); }; /** * getVirtualAddrByMode(mode, reg, accessFlags) * - * This is a handler set up by setMemoryAccess(). All calls should go through getAddrByMode(). + * This is a handler set up by setMemoryAccess(). All calls should go through getAddr(). * * @this {CPUStatePDP11} * @param {number} mode @@ -1545,13 +1630,13 @@ CPUStatePDP11.prototype.getPhysicalAddrByMode = function(mode, reg, accessFlags) */ CPUStatePDP11.prototype.getVirtualAddrByMode = function(mode, reg, accessFlags) { - return this.mapVirtualToPhysical(this.getAddress(mode, reg, accessFlags), accessFlags); + return this.mapVirtualToPhysical(this.getAddrByMode(mode, reg, accessFlags), accessFlags); }; /** * readWordFromPhysical(physicalAddress) * - * This is a handler set up by setMemoryAccess(). All calls should go through readWordFromAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through readWord(). * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1565,7 +1650,7 @@ CPUStatePDP11.prototype.readWordFromPhysical = function(physicalAddress) /** * readWordFromVirtual(virtualAddress) * - * This is a handler set up by setMemoryAccess(). All calls should go through readWordFromAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through readWord(). * * @this {CPUStatePDP11} * @param {number} virtualAddress (input address is 17 bit (I&D)) @@ -1579,7 +1664,7 @@ CPUStatePDP11.prototype.readWordFromVirtual = function(virtualAddress) /** * writeWordToPhysical(physicalAddress, data) * - * This is a handler set up by setMemoryAccess(). All calls should go through writeWordToAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through writeWord(). * * @this {CPUStatePDP11} * @param {number} physicalAddress @@ -1593,7 +1678,7 @@ CPUStatePDP11.prototype.writeWordToPhysical = function(physicalAddress, data) /** * writeWordToVirtual(virtualAddress, data) * - * This is a handler set up by setMemoryAccess(). All calls should go through writeWordToAddr(). + * This is a handler set up by setMemoryAccess(). All calls should go through writeWord(). * * @this {CPUStatePDP11} * @param {number} virtualAddress (input address is 17 bit (I&D)) @@ -1624,12 +1709,12 @@ CPUStatePDP11.prototype.readWordFromPrevSpace = function(opCode, accessFlags) src = this.regsAltStack[(this.regPSW >> 12) & 3]; } } else { - var addr = this.getAddress(mode, reg, PDP11.ACCESS.READ_WORD); + var addr = this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD); if (!(accessFlags & PDP11.ACCESS.DSPACE)) { if ((this.regPSW & 0xf000) !== 0xf000) addr &= 0xffff; } this.mmuMode = (this.regPSW >> 12) & 3; - src = this.readWordFromAddr(addr | (accessFlags & this.addrDSpace)); + src = this.readWord(addr | (accessFlags & this.addrDSpace)); this.mmuMode = (this.regPSW >> 14) & 3; } return src; @@ -1657,10 +1742,10 @@ CPUStatePDP11.prototype.writeWordToPrevSpace = function(opCode, accessFlags, dat this.regsAltStack[(this.regPSW >> 12) & 3] = data; } } else { - var addr = this.getAddress(mode, reg, PDP11.ACCESS.WRITE_WORD); + var addr = this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_WORD); if (!(accessFlags & PDP11.ACCESS.DSPACE)) addr &= 0xffff; /* - * TODO: Consider replacing the following code with writeWordToAddr(), by adding optional mmuMode + * TODO: Consider replacing the following code with writeWord(), by adding optional mmuMode * parameters for each of the discrete mapVirtualToPhysical() and bus.setWord() operations, because * as it stands, this is the only remaining call to mapVirtualToPhysical() outside of our * setMemoryAccess() handlers. @@ -1688,7 +1773,7 @@ CPUStatePDP11.prototype.readSrcByte = function(opCode) if (!mode) { result = this.regsGen[reg] & 0xff; } else { - result = this.readByteFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_BYTE)); + result = this.readByteFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_BYTE)); } return result; }; @@ -1709,7 +1794,7 @@ CPUStatePDP11.prototype.readSrcWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.bus.getWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.bus.getWord(this.getAddr(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1725,7 +1810,7 @@ CPUStatePDP11.prototype.readDstAddr = function(opCode) { var reg = this.dstReg = opCode & PDP11.OPREG.MASK; var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT; - return this.getAddress(mode, reg, PDP11.ACCESS.VIRT); + return this.getAddrByMode(mode, reg, PDP11.ACCESS.VIRT); }; /** @@ -1743,7 +1828,7 @@ CPUStatePDP11.prototype.readDstByte = function(opCode) if (!mode) { result = this.regsGen[reg] & 0xff; } else { - result = this.readByteFromPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_BYTE)); + result = this.readByteFromPhysical(this.getAddr(mode, reg, PDP11.ACCESS.READ_BYTE)); } return result; }; @@ -1763,7 +1848,7 @@ CPUStatePDP11.prototype.readDstWord = function(opCode) if (!mode) { result = this.regsGen[reg]; } else { - result = this.bus.getWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.READ_WORD)); + result = this.bus.getWord(this.getAddr(mode, reg, PDP11.ACCESS.READ_WORD)); } return result; }; @@ -1785,7 +1870,7 @@ CPUStatePDP11.prototype.updateDstByte = function(opCode, src, fnOp) if (!mode) { this.regsGen[reg] = (this.regsGen[reg] & 0xff00) | fnOp.call(this, src, this.regsGen[reg]); } else { - var addr = this.dstAddr = this.getAddrByMode(mode, reg, PDP11.ACCESS.UPDATE_BYTE); + var addr = this.dstAddr = this.getAddr(mode, reg, PDP11.ACCESS.UPDATE_BYTE); this.writeByteToPhysical(addr, fnOp.call(this, src, this.readByteFromPhysical(addr))); } }; @@ -1807,7 +1892,7 @@ CPUStatePDP11.prototype.updateDstWord = function(opCode, src, fnOp) if (!mode) { this.regsGen[reg] = fnOp.call(this, src, this.regsGen[reg]); } else { - var addr = this.getAddrByMode(mode, reg, PDP11.ACCESS.UPDATE_WORD); + var addr = this.getAddr(mode, reg, PDP11.ACCESS.UPDATE_WORD); this.bus.setWord(addr, fnOp.call(this, src, this.bus.getWord(addr))); } }; @@ -1836,7 +1921,7 @@ CPUStatePDP11.prototype.writeDstByte = function(opCode, data, writeFlags) this.regsGen[reg] = (this.regsGen[reg] & ~0xff) | (data & 0xff); } } else { - this.writeByteToPhysical(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_BYTE), data); + this.writeByteToPhysical(this.getAddr(mode, reg, PDP11.ACCESS.WRITE_BYTE), data); } return data; }; @@ -1858,7 +1943,7 @@ CPUStatePDP11.prototype.writeDstWord = function(opCode, data) if (!mode) { this.regsGen[reg] = data & 0xffff; } else { - this.bus.setWord(this.getAddrByMode(mode, reg, PDP11.ACCESS.WRITE_WORD), data); + this.bus.setWord(this.getAddr(mode, reg, PDP11.ACCESS.WRITE_WORD), data); } return data; }; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 80ed0b66a..2b5c1da8b 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -52,12 +52,14 @@ if (DEBUGGER) { * DebuggerPDP11 Address Object * * addr address + * fPhysical true if this is a physical address * fTemporary true if this is a temporary breakpoint address * sCmd set for breakpoint addresses if there's an associated command string * aCmds preprocessed commands (from sCmd) * * @typedef {{ * addr:(number|undefined), + * fPhysical:(boolean|undefined), * fTemporary:(boolean|undefined), * sCmd:(string|undefined), * aCmds:(Array.|undefined) @@ -587,7 +589,7 @@ if (DEBUGGER) { var b = 0xff; var addr = this.getAddr(dbgAddr, false, 1); if (addr !== PDP11.ADDR_INVALID) { - b = this.bus.getByteDirect(addr); + b = dbgAddr.fPhysical? this.bus.getByteDirect(addr) : this.cpu.getByteDirect(addr); if (inc) this.incAddr(dbgAddr, inc); } return b; @@ -606,7 +608,7 @@ if (DEBUGGER) { var w = 0xffff; var addr = this.getAddr(dbgAddr, false, 2); if (addr !== PDP11.ADDR_INVALID) { - w = this.bus.getWordDirect(addr); + w = dbgAddr.fPhysical? this.bus.getWordDirect(addr) : this.cpu.getWordDirect(addr); if (inc) this.incAddr(dbgAddr, inc); } return w; @@ -624,7 +626,11 @@ if (DEBUGGER) { { var addr = this.getAddr(dbgAddr, true, 1); if (addr !== PDP11.ADDR_INVALID) { - this.bus.setByteDirect(addr, b); + if (dbgAddr.fPhysical) { + this.bus.setByteDirect(addr, b); + } else { + this.cpu.setByteDirect(addr, b); + } if (inc) this.incAddr(dbgAddr, inc); this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } @@ -642,24 +648,29 @@ if (DEBUGGER) { { var addr = this.getAddr(dbgAddr, true, 2); if (addr !== PDP11.ADDR_INVALID) { - this.bus.setWordDirect(addr, w); + if (dbgAddr.fPhysical) { + this.bus.setWordDirect(addr, w); + } else { + this.cpu.setWordDirect(addr, w); + } if (inc) this.incAddr(dbgAddr, inc); this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target } }; /** - * newAddr(addr) + * newAddr(addr, fPhysical) * * Returns a NEW DbgAddrPDP11 object, initialized with specified values and/or defaults. * * @this {DebuggerPDP11} * @param {number} [addr] + * @param {boolean} [fPhysical] * @return {DbgAddrPDP11} */ - DebuggerPDP11.prototype.newAddr = function(addr) + DebuggerPDP11.prototype.newAddr = function(addr, fPhysical) { - return {addr: addr, fTemporary: false}; + return {addr: addr, fPhysical: fPhysical, fTemporary: false}; }; /** @@ -729,14 +740,20 @@ if (DEBUGGER) { var dbgAddr; var dbgAddrNext = (fCode? this.dbgAddrNextCode : this.dbgAddrNextData); var addr = dbgAddrNext.addr; + var fPhysical = false; if (sAddr !== undefined) { sAddr = this.parseReference(sAddr); + var ch = sAddr.charAt(0); + if (ch == '%') { + fPhysical = true; + sAddr = sAddr.substr(1); + } dbgAddr = this.findSymbolAddr(sAddr); if (dbgAddr) return dbgAddr; addr = this.parseExpression(sAddr, fPrint); } if (addr != null) { - dbgAddr = this.newAddr(addr); + dbgAddr = this.newAddr(addr, fPhysical); } return dbgAddr; }; @@ -1228,15 +1245,16 @@ if (DEBUGGER) { }; /** - * startCPU(fUpdateFocus) + * startCPU(fUpdateFocus, fQuiet) * * @this {DebuggerPDP11} * @param {boolean} [fUpdateFocus] is true to update focus + * @param {boolean} [fQuiet] * @return {boolean} true if run request successful, false if not */ - DebuggerPDP11.prototype.startCPU = function(fUpdateFocus) + DebuggerPDP11.prototype.startCPU = function(fUpdateFocus, fQuiet) { - if (!this.checkCPU()) return false; + if (!this.checkCPU(fQuiet)) return false; this.cpu.startCPU(fUpdateFocus); return true; }; @@ -1336,23 +1354,20 @@ if (DEBUGGER) { }; /** - * checkCPU() + * checkCPU(fQuiet) * * Make sure the CPU is ready (finished initializing), powered, not already running, and not in an error state. * * @this {DebuggerPDP11} + * @param {boolean} [fQuiet] * @return {boolean} */ - DebuggerPDP11.prototype.checkCPU = function() + DebuggerPDP11.prototype.checkCPU = function(fQuiet) { - if (!this.cpu) - return false; - if (!this.cpu.isReady()) - return false; - if (!this.cpu.isPowered()) - return false; - if (this.cpu.isRunning()) + if (!this.cpu || !this.cpu.isReady() || !this.cpu.isPowered() || this.cpu.isRunning()) { + if (!fQuiet) this.println("cpu busy or unavailable, command ignored"); return false; + } return !this.cpu.isError(); }; @@ -1581,7 +1596,7 @@ if (DEBUGGER) { */ if (nState >= 0 && this.aaOpcodeCounts.length) { this.cOpcodes++; - var opCode = this.bus.getWordDirect(addr); + var opCode = this.cpu.getWordDirect(addr); if (opCode != null) { var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory]; this.setAddr(dbgAddr, cpu.getPC()); @@ -3279,9 +3294,7 @@ if (DEBUGGER) { this.parseAddrOptions(dbgAddr, sOptions); this.setTempBreakpoint(dbgAddr); } - if (!this.startCPU(true)) { - if (!fQuiet) this.println("cpu busy or unavailable, run command ignored"); - } + this.startCPU(true, fQuiet); }; /** diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 9af43aa23..49fa0342e 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -682,214 +682,215 @@ as to their contents. */ var h; -function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} +function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ua(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")} +typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ka(){return"http://"+(window?window.location.host:"www.pcjs.org")} function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Sa=this.id:(this.vb=this.id.substr(0,b),this.Sa=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.I={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ub=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ua=this.id:(this.Db=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Eb:!1,ha:!1,error:!1};this.vb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Y&&(this.Y=10);15>2;this.f=this.ua-1;this.F=this.J/this.ua|0;this.Ea=[];this.w=0;this.C=[];this.dc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ea[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ea[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ea[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Hb(a,b){var c=-1,d=this.controller;(a=d.Ea[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ea[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Lb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.Y;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Y;0>>=a.Y;0>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Vb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].zb(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)}; -function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Fb(b&a.f,c&255,b);a.w--}h.Ra=function(a,b){this.W[(a&this.i)>>>this.Y].bc(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;da.b.Tb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.C.push(b)} -function fc(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Eb:-1}}y(K);h=K.prototype; -h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Eb=gc(c,function(){e.f.Ga|=128;e.f.Ga&64&&(hc(e.b,e.f.Xc),ic(e.b,e.f.Eb,1E3/60))});this.f.Xc=jc(c,64,6);Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};h.vc=function(){var a=this.f.Ga;this.f.Ga&=-129;return a};h.ed=function(a){this.f.Ga=a;a&64&&ic(this.b,this.f.Eb,1E3/60);this.f.Ga=a&-129};h.xc=function(){var a=this.b;return a.F&62337|a.sa<<5|a.ta<<1}; -h.gd=function(a){var b=this.b;a&=62337;if(b.F!=a){b.F=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,kc(b))}lc(this)};h.yc=function(){var a=this.b.Ia;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.zc=function(){return this.b.Bb};h.Ac=function(){return this.b.Ja};h.hd=function(a){var b=this.b;b.Ja!=a&&(b.Ja=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),kc(b));lc(this)};function lc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ja&16?1:2:4)} -h.Mc=function(a){return this.b.P[1][a>>1&7]};h.ud=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Kc=function(a){return this.b.P[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Lc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.Jc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.P[1][b]&=65295};h.uc=function(a){return this.b.P[0][a>>1&7]}; -h.dd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.sc=function(a){return this.b.P[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.tc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.rc=function(a){return this.b.oa[0][(a>>1&7)+8]};h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.P[0][b]&=65295};h.Sc=function(a){return this.b.P[3][a>>1&7]};h.Ad=function(a,b){this.b.P[3][b>>1&7]=a&65295}; -h.Qc=function(a){return this.b.P[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Rc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Pc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.P[3][b]&=65295};h.Za=function(a){a&=7;return this.b.L&2048?this.b.Ca[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Ca[b]=a:this.b.u[b]=a}; -h.Dc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Gc=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ca[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ca[b]=a};h.Ec=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a}; -h.Fc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.qc=function(a){return this.b.Yb[a-65504>>1]};h.$c=function(a,b){this.b.Yb[b-65504>>1]=a};h.Ub=function(a){return 65520==a?61183:0};h.ac=function(){};h.Oc=function(){return 1};h.wd=function(){};h.pc=function(){return this.b.Z};h.Zc=function(){this.b.Z=0};h.wc=function(){return this.b.Xb};h.fd=function(a,b){b&1||(a&=255);this.b.Xb=a}; -h.Bc=function(a){return a?this.b.Cb:0};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Cb=a;b.D|=2};h.Nc=function(a){return a?this.b.Ka&65280:0};h.vd=function(a){this.b.Ka=a|255};h.Cc=function(){return Db(this.b)};h.kd=function(a){mc(this.b,a&-1809|Db(this.b)&1808);this.b.D|=128};h.$b=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ga=0}; -var M={},L=(M[62592]=[null,null,K.prototype.Mc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Kc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Lc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Jc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.uc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.sc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.tc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.rc,K.prototype.ad,"KDSAR"],M[62798]=[null,null, -K.prototype.Ac,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.vc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.xc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.yc,K.prototype.$b,"MMR1"],M[65406]=[null,null,K.prototype.zc,K.prototype.$b,"MMR2"],M[65408]=[null,null,K.prototype.Sc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Qc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Rc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Pc,K.prototype.xd,"UDSAR"], -M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Dc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.od,"R7KERNEL"],M[65480]=[null,null, -K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Ec,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Fc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.qc,K.prototype.$c, -"CTRL",1170],M[65520]=[null,null,K.prototype.Ub,K.prototype.ac,"LSIZE",1170],M[65522]=[null,null,K.prototype.Ub,K.prototype.ac,"HSIZE",1170],M[65524]=[null,null,K.prototype.Oc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.pc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.wc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Bc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Nc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.kd,"PSW"], +var lb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function mb(a){r.call(this,"Panel",a,mb);this.f=0;this.v.Sb=!0}y(mb);h=mb.prototype; +h.ra=function(a,b,c,d){if(this.B&&this.B.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d)||this.i&&this.i.ra(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.ra.call(this,a,b,c,d)}};h.Da=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.i=d};h.Aa=function(a,b){b||Ab();return!0};h.za=function(){return!0}; +function Bb(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.b.ga());var e=a.i&&a.i.ja||8;c=!a.b.v.ea||a.v.Sb?8==e?ca(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Cb(a,b,c,d){for(var e=0;e>1)+2;10>this.Z&&(this.Z=10);15>2;this.A=this.wa-1;this.D=this.I/this.wa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Hb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Lb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.Z;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.rb+=m.w-f,m.w=f,!0;if(f>=m.w+m.rb){q=m.size-(f-p);q>g&&(q=g);m.rb=f-m.w+q;f=p+a.wa;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.wa,d,e);Jb(f,a.i,m);a.W[l++]=f;f=p+a.wa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} +function Nb(a,b,c){var d=[];for(b>>>=a.Z;0>>=a.Z;0>>this.Z].zb(a&this.A,a)};h.xb=function(a){this.C++;a=this.W[(a&this.f)>>>this.Z].Hb(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.Z].qa(a&this.A,a)}; +h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.Z;this.C++;a=this.W[c].Ib(b,a);this.C--;return a};h.Ab=function(a,b){this.W[(a&this.f)>>>this.Z].Cb(a&this.A,b&255,a)};h.pb=function(a,b){this.C++;this.W[(a&this.f)>>>this.Z].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.Z].sb(a&this.A,b&65535,a)};h.Bb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.Z;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; +function Sb(a){for(var b=0,c=[],d=0;da.b.Gb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} +function Wb(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.aa(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Id:0,yb:20,Ld:0};this.f={Jd:0,Nb:-1}}y(K);h=K.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Nb=Xb(c,function(){e.f.Ia|=128;e.f.Ia&64&&(fc(e.b,e.f.ad),gc(e.b,e.f.Nb,1E3/60))});this.f.ad=hc(64,6);Ub(b,this,L);Vb(b,this.reset.bind(this));G(this)};h.zc=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.jd=function(a){this.f.Ia=a;a&64&&gc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.Bc=function(){var a=this.b;return a.G&62337|a.ta<<5|a.ua<<1}; +h.ld=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ta=a>>5&3;b.ua=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,ic(b))}jc(this)};h.Cc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Dc=function(){return this.b.Kb};h.Ec=function(){return this.b.Ma};h.md=function(a){var b=this.b;1170>b.Gb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.va=3915776):(b.Wa=262143,b.va=253952),ic(b));jc(this)};function jc(a){a.j.yb=a.j.yb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)} +h.Qc=function(a){return this.b.P[1][a>>1&7]};h.yd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Oc=function(a){return this.b.P[1][(a>>1&7)+8]};h.wd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Pc=function(a){return this.b.pa[1][a>>1&7]};h.xd=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Nc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.vd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.yc=function(a){return this.b.P[0][a>>1&7]}; +h.hd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.wc=function(a){return this.b.P[0][(a>>1&7)+8]};h.fd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.xc=function(a){return this.b.pa[0][a>>1&7]};h.gd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.vc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.ed=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Wc=function(a){return this.b.P[3][a>>1&7]};h.Ed=function(a,b){this.b.P[3][b>>1&7]=a&65295}; +h.Uc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Cd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Vc=function(a){return this.b.pa[3][a>>1&7]};h.Dd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Tc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Bd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a}; +h.Hc=function(){return this.b.L&49152?this.b.sa[0]:this.b.u[6]};h.pd=function(a){this.b.L&49152?this.b.sa[0]=a:this.b.u[6]=a};h.Kc=function(){return this.b.u[7]};h.sd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Ic=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[1]};h.qd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[1]=a}; +h.Jc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[3]};h.rd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[3]=a};h.uc=function(a){return this.b.cc[a-65504>>1]};h.dd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Sc=function(){return 1};h.Ad=function(){};h.tc=function(){return this.b.$};h.cd=function(){this.b.$=0};h.Ac=function(){return this.b.bc};h.kd=function(a,b){b&1||(a&=255);this.b.bc=a}; +h.Fc=function(a){return a?this.b.Lb:0};h.nd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Rc=function(a){return a?this.b.Na&65280:0};h.zd=function(a){this.b.Na=a|255};h.Gc=function(){return Db(this.b)};h.od=function(a){kc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.j.yb=this.j.yb&-120|20;this.f.Ia=0}; +var M={},L=(M[62592]=[null,null,K.prototype.Qc,K.prototype.yd,"SISDR"],M[62608]=[null,null,K.prototype.Oc,K.prototype.wd,"SDSDR"],M[62624]=[null,null,K.prototype.Pc,K.prototype.xd,"SISAR"],M[62640]=[null,null,K.prototype.Nc,K.prototype.vd,"SDSAR"],M[62656]=[null,null,K.prototype.yc,K.prototype.hd,"KISDR"],M[62672]=[null,null,K.prototype.wc,K.prototype.fd,"KDSDR"],M[62688]=[null,null,K.prototype.xc,K.prototype.gd,"KISAR"],M[62704]=[null,null,K.prototype.vc,K.prototype.ed,"KDSAR"],M[62798]=[null,null, +K.prototype.Ec,K.prototype.md,"MMR3"],M[65382]=[null,null,K.prototype.zc,K.prototype.jd,"LKS"],M[65402]=[null,null,K.prototype.Bc,K.prototype.ld,"MMR0"],M[65404]=[null,null,K.prototype.Cc,K.prototype.ec,"MMR1"],M[65406]=[null,null,K.prototype.Dc,K.prototype.ec,"MMR2"],M[65408]=[null,null,K.prototype.Wc,K.prototype.Ed,"UISDR"],M[65424]=[null,null,K.prototype.Uc,K.prototype.Cd,"UDSDR"],M[65440]=[null,null,K.prototype.Vc,K.prototype.Dd,"UISAR"],M[65456]=[null,null,K.prototype.Tc,K.prototype.Bd,"UDSAR"], +M[65472]=[null,null,K.prototype.ab,K.prototype.fb,"R0SET0"],M[65473]=[null,null,K.prototype.ab,K.prototype.fb,"R1SET0"],M[65474]=[null,null,K.prototype.ab,K.prototype.fb,"R2SET0"],M[65475]=[null,null,K.prototype.ab,K.prototype.fb,"R3SET0"],M[65476]=[null,null,K.prototype.ab,K.prototype.fb,"R4SET0"],M[65477]=[null,null,K.prototype.ab,K.prototype.fb,"R5SET0"],M[65478]=[null,null,K.prototype.Hc,K.prototype.pd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Kc,K.prototype.sd,"R7KERNEL"],M[65480]=[null,null, +K.prototype.bb,K.prototype.gb,"R0SET1"],M[65481]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET1"],M[65482]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET1"],M[65483]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET1"],M[65484]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET1"],M[65485]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET1"],M[65486]=[null,null,K.prototype.Ic,K.prototype.qd,"R6SUPER"],M[65487]=[null,null,K.prototype.Jc,K.prototype.rd,"R6USER"],M[65504]=[null,null,K.prototype.uc,K.prototype.dd, +"CTRL",1170],M[65520]=[null,null,K.prototype.$b,K.prototype.fc,"LSIZE",1170],M[65522]=[null,null,K.prototype.$b,K.prototype.fc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Sc,K.prototype.Ad,"SYSID",1170],M[65526]=[null,null,K.prototype.tc,K.prototype.cd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Ac,K.prototype.kd,"MB",1170],M[65530]=[null,null,K.prototype.Fc,K.prototype.nd,"PIR"],M[65532]=[null,null,K.prototype.Rc,K.prototype.zd,"SL"],M[65534]=[null,null,K.prototype.Gc,K.prototype.od,"PSW"], M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; -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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),tc(this,pc?uc:vc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&fc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Fa=!0},T:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,1,c.M)&&c.fa(!0)}return this.yb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;Ac(c,this.A+a,2,c.M)&&c.fa(!0)}return this.zb(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a, -1,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Fb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;Ac(d,this.A+a,2,d.F)&&d.fa(!0)}this.f?this.I(a,b,c):this.Gb(a,b,c)},R:function(a){return this.F[a]},U:function(a,b){a=this.F[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&fc(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&fc(this.w,b);a=this.J[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.F[a]=b;this.Fa=!0},ma:function(a,b,c){this.F[a]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&fc(this.w,c);this.G.setUint16(a,b,!0);this.Fa=!0},Sa:function(a,b,c){a&1&&fc(this.w,c);this.J[a>>1]=b;this.Fa=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&zc(a,yc,!1),(a.B=c.B)&&xc(a,yc,!1))}function Bc(a,b){b?--a.B||(a.ub=a.f?a.I:a.Fb,a.bc=a.f?a.H:a.Gb):--a.i||(a.tb=a.yb,a.Vb=a.zb)}function xc(a,b,c){c&&a.B||(a.ub=!a.f&&b[1]||a.I,a.bc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Fb=b[1]||a.I,a.Gb=b[3]||a.H}function zc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Vb=b[2]||a.M);if(c||void 0===c)a.yb=b[0]||a.K,a.zb=b[2]||a.M}function tc(a,b){b||(b=Cc);zc(a,b,void 0);xc(a,b,void 0)} -var Cc=[],wc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],yc=[I.prototype.T,I.prototype.la,I.prototype.ca,I.prototype.ta];if(lb)var vc=[I.prototype.R,I.prototype.ka,I.prototype.ba,I.prototype.sa],uc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Sa]; -function Dc(a,b){r.call(this,"CPU",a,Dc,1);var c=a.multiplier||1;this.Ma=a.cycles||b;this.Ha=c;this.Ua=Math.round(this.Ma/1E4)/100;this.Qa=this.Ua*this.Ha;this.v.da=!1;this.v.Db=!1;this.v.fb=a.autoStart;this.v.Va=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Wa=a.csInterval;this.Xa=a.csStop;this.J=[];this.Qb=this.Wc.bind(this);G(this)}y(Dc);var Ec=["power","reset"];h=Dc.prototype; -h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.j=d;for(b=0;b=a.ka&&(a.ka+=a.Wa,c=!0);0<=a.Xa&&a.Xa<=Kc(a)&&(a.Wa=a.Xa=-1,Hc(a),a.fa(),c=!0);c&&a.g(Kc(a)+" cycles: checksum="+k(a.jb))}} -h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.ba/a.Qa?b=1:d=!0;a.Ha=b;b=a.Ua*a.Ha;if(a.Qa!=b){a.Qa=b;b=a.Qa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.nb()}Mc(a,a.T);a.T=0;a.R=ra();a.ca=0;Nc(a);return d}function gc(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function ic(a,b,c){0<=b&&ba.J[b][0]&&(c*=a.Ma*a.Ha/1E3,a.J[b][0]=c+Oc(a))} -function Pc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Qc(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Oc(a,b){var c=a.ea-=a.b;a.b=0;b&&(a.ea=0);return c} -h.Wc=function(){if(this.v.da){this.ib>=this.Ma&&Nc(this,!0);this.qa=0;this.Da=ra();if(this.ca){var a=this.Da-this.ca;a>this.qb&&(this.R+=a,this.R>this.Da&&(this.R=this.Da))}try{do{var b=Pc(this,this.v.Va?1:this.La);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}b=Oc(this,!0);this.qa+=b;this.T+=b;Jc(this,b);Qc(this,b);this.la-=b;if(0>=this.la){this.la+=this.La;15<=++this.Pb&&(this.B&&this.B.aa(),this.Pb=0);break}}while(this.v.da)}catch(e){this.fa();this.B&&this.B.stop(ra(),Kc(this));kb(this, -e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Qb;this.ca=ra();var c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.La));var c=c-(this.ca-this.Da),d=this.ca-this.R;d&&(this.ba=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ha=0,Lc(this)));if(0>c||this.bac&&(this.R-=c),c=0;this.ib+=this.qa;this.ca+=c;a(b,c)}}}; -h.ab=function(a){if(jb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Lc(this);this.v.da=!0;this.v.Db=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.nb(!0),this.B.start(this.R,Kc(this)));setTimeout(this.Qb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.da){Oc(this);Mc(this,this.T);this.T=0;this.v.da=!1;var b=this.I.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Kc(this))}this.v.complete=a}; -function jd(a){this.Tb=+a.model||1170;this.nc=a.resetAddr||0;Dc.call(this,a,6666667);this.decode=kd.bind(this);this.jc=[];this.U=null;this.N=65536;this.O=32768;this.X=65535;this.S=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.nc];this.Ca=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.C=0;this.kc=[4,2,0,1];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Yb=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ta=this.G=this.H=this.D=this.Xb=0;this.ma=-1;ld(this);this.v.complete=this.v.fc=!1}y(jd,Dc);h=jd.prototype;h.reset=function(){this.v.da&&this.fa();ld(this);Gc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ld(a){a.Ka=255;a.Z=0;a.Cb=0;a.F=0;a.Ia=0;a.Bb=0;a.Ja=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.D|=2;a.w&&kc(a)}function kc(a){a.sb?(a.V=65536,a.K=a.ic,a.M=a.Wb,a.Sb=a.Cd,Lb(a.w,a.Ja&16?22:18)):(a.V=0,a.K=a.hc,a.M=a.Tc,a.Sb=a.Bd,Lb(a.w,16))}h.Mb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ha]);a.set(2,Ub(this.w));return a.data()}; -h.restore=function(a){var b=a[1];this.ha=b[1];Lc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.C!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.C]);a.L=b;a.D|=2}function O(a,b){a.D&128||(a.S=a.X=b,a.O=0)}function rd(a,b,c){a.D&128||(a.S=a.X=a.N=b,a.O=c||0)}function sd(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function td(a,b){a.D&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function ud(a,b,c,d){a.D&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.$=function(a,b){var c=!1;0>this.ma?this.ma=Db(this):this.C||(a=4,c=!0);this.F&57344||(this.Ia=63222,this.Bb=a);this.C=0;var d=this.M(a|this.V),e=this.M(a+2&65535|this.V);mc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.ma);vd(this,this.u[7]);qd(this,d);this.D&=-113;this.ma=-1;if(26!=b)throw a;};function wd(a){var b=xd(a),c=xd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);qd(a,b);mc(a,c);a.D&=-17} -function yd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ja&a.kc[a.C]||(d&=7);e=a.P[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ja&32&&(f=a.oc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.C][d]=e;if(4194170!==f||a.C)a.sa=a.C,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.F&57344||(a.F=a.F|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.F&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.M(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.M(e)|g;a.b-= -8;break;case 6:return e=pd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=pd(a),e=e+a.u[c]&65535,e=a.M(e|a.V)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.F&57344||(a.Ia=a.Ia<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.Ka||65534<=a.u[6])&&(a.u[6]<=a.Ka-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.hc=function(a,b,c){return zd(this,a,b,c)};h.ic=function(a,b,c){return yd(this,zd(this,a,b,c),c)};h.Tc=function(a){return this.w.ja(a)};h.Wb=function(a){return this.w.ja(yd(this,a,2))}; -h.Bd=function(a,b){this.w.Ra(a,b&65535)};h.Cd=function(a,b){this.w.Ra(yd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.M(d|c&a.V),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c} -function Bd(a,b,c,d){a.F&57344||(a.Ia=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=yd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Ra(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Cd(a,b){b>>=6;var c=a.H=b&7;(b=a.G=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Dd(a,b){b>>=6;var c=a.H=b&7;return(b=a.G=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)} -function Fd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.K(b,c,3),a=a.w.Pa(c)):a=a.u[c]&255;return a}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.K(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.K(b,e,7),c=d.call(a,c,a.w.Pa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.K(b,e,6),a.w.Ra(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])} -function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.K(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Id(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Ra(a.K(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(qd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.bb=function(a){this.v.complete=!0;var b=this.v.fc=this.j&&Jd(this.j),c=a?this.v.Db?0:1:-1;this.v.Db=!1;this.ea=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;var d=160,e=(this.Cb&224)>>5;if(a=this.U&&this.U.Ya>e?this.U:null)d=a.Yc,e=a.Ya;e>(this.L&224)>>5?(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),this.$(d,26),e=!0):e=!1;if(e&& -a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.D&1&&this.D++;this.F&57344||(this.Ia=0,this.Bb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function Rd(a,b){a=b&~a;O(this,a);return a}function Sd(a,b){a=b&~a;O(this,a<<8);return a}function Td(a,b){a|=b;O(this,a);return a}function Ud(a,b){a|=b;O(this,a<<8);return a} -function Vd(a,b){a=~b|65536;rd(this,a);return a&65535}function Wd(a,b){a=~b|256;rd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.D&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.D&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.D&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} -function ae(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;td(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;td(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;td(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function ge(a,b){var c=b-a;ud(this,c,a,b);return c&65535} -function he(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.D&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;O(this,a);return a&65535} -function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} -function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;qd(this,Ed(this,a));this.b=b-ne[this.i]} -var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];qd(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)qd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){Q(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){Q(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function kd(a){ye[a>>12].call(this,a)} -var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;O(this,Id(this,a,b));this.b=c-re[(this.G?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);ud(this,b-a,a,b);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f? -2:0)},function(a){Q(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);O(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.i? -4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){O(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.H&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){P(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.H&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)},V],ze= -[function(a){Ve[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!od(this))},function(a){R(this,a,od(this))},function(a){R(this,a,!this.Aa()==!nd(this))},function(a){R(this,a,!this.Aa()!=!nd(this))},function(a){R(this,a,!od(this)&&!this.Aa()==!nd(this))},function(a){R(this,a,od(this)||!this.Aa()!=!nd(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},V,V],We=[function(a){rd(this, -Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){Q(this,a,0,ae);this.b-=this.i?11:6},function(a){Q(this,a,md(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,md(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);rd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],Ye=[function(a){Q(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Wb(a|65536);qd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a, -0,b);O(this,b);this.b=c-se[this.i]},function(a){O(this,Id(this,a,this.Aa?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},V,V,V,oe,oe,oe,oe,function(a){if(a&8)this.$(8,6);else{var b=xd(this);a&=7;qd(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.Z|=128,this.$(4, -3)):this.fa();this.b-=7},function(){this.D&4||this.B.aa();this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){wd(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(ld(this),this.w.reset());this.b-=667},function(){wd(this);this.b-=13},V,V,V,V,V,V,V,V,V],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.S=0;this.b-=5},S,S,S,S,S,S,S],bf= -[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.S=32768;this.b-=5},T,T,T,T,T,T,T],Te=[te,te,me,me,ke,ke,le,le,xe,xe,V,V,V,V,ve,ve],Ue=[function(a){R(this,a,!this.Aa())},function(a){R(this,a,this.Aa())},function(a){R(this,a,!md(this)&&!od(this))},function(a){R(this,a,md(this)||od(this))},function(a){R(this,a,!nd(this))},function(a){R(this,a,nd(this))},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(){this.$(24, -2);this.b-=25},function(){this.$(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},V,V],cf=[function(a){rd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){P(this,a,0,be);this.b-= -this.i?11:6},function(a){P(this,a,md(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,md(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);rd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){P(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9:3+(7== -this.f?2:0)}],ff=[V,function(a){a=Ad(this,a,65536);vd(this,a);O(this,a);this.b-=11},function(a){var b=xd(this),c=this.b;Bd(this,a,65536,b);O(this,b);this.b=c-se[this.i]},V];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.F=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.j=d;jf(this)};gf.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.F,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Ib);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,lc:d,za:e,Hb:f})}delete this.za}return!0};gf.prototype.xa=function(){return!0}; -function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Sa)return;b=oa(b[1]);if(this.J=db(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Rb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.F=[];return!0}h.Ab=function(a){if("number"==typeof a)this.F.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;ic(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,W.prototype.Ic,W.prototype.qd,"RCSR"],pf[65394]=[null,null,W.prototype.Hc,W.prototype.pd,"RBUF"],pf[65396]=[null,null,W.prototype.Vc,W.prototype.Ed,"XCSR"],pf[65398]=[null,null,W.prototype.Uc,W.prototype.Dd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Nb=function(){return-1};qf.prototype.Ob=function(){}; -function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} +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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&Wb(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;yc(c,this.w+a,1,c.M)&&c.ga(!0)}return this.Hb(a,b)},da:function(a,b){if(this.i&&null!=this.w){var c=this.i;yc(c,this.w+a,2,c.M)&&c.ga(!0)}return this.Ib(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;yc(d,this.w+a, +1,d.D)&&d.ga(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},va:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;yc(d,this.w+a,2,d.D)&&d.ga(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ca:function(a,b){a&1&&Wb(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&Wb(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ +J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},ua:function(a,b,c){a&1&&Wb(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&Wb(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; +function Jb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&xc(a,wc,!1),(a.B=c.B)&&vc(a,wc,!1))}function zc(a,b){b?--a.B||(a.Cb=a.f?a.J:a.Ob,a.sb=a.f?a.H:a.Pb):--a.j||(a.zb=a.Hb,a.qa=a.Ib)}function vc(a,b,c){c&&a.B||(a.Cb=!a.f&&b[1]||a.J,a.sb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function xc(a,b,c){c&&a.j||(a.zb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Hb=b[0]||a.K,a.Ib=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} +var Ac=[],uc=[I.prototype.V,I.prototype.ta,I.prototype.ja,I.prototype.xa],wc=[I.prototype.T,I.prototype.ma,I.prototype.da,I.prototype.va];if(lb)var tc=[I.prototype.R,I.prototype.la,I.prototype.ca,I.prototype.ua],sc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; +function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ea=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.mb=this.ja=0;this.nb=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.$c.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; +h.Da=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Ic(a)&&(a.Ya=a.Za=-1,Fc(a),a.ga(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.mb))}} +h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.qb()}Kc(a,a.T);a.T=0;a.R=ra();a.ca=0;Lc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function gc(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Fa*a.Ka/1E3,a.K[b][0]=c+Mc(a))} +function Nc(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 Oc(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 Mc(a,b){var c=a.da-=a.b;a.b=0;b&&(a.da=0);return c} +h.$c=function(){if(this.v.ea){this.jb>=this.Fa&&Lc(this,!0);this.oa=0;this.xa=ra();if(this.ca){var a=this.xa-this.ca;a>this.ub&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Nc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Mc(this,!0);this.oa+=b;this.T+=b;Hc(this,b);Oc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.wb&&(this.B&&this.B.ba(),this.wb=0);break}}while(this.v.ea)}catch(e){this.ga();this.B&&this.B.stop(ra(),Ic(this));kb(this, +e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.Yb;this.ca=ra();var c=this.ub;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ca-this.xa),d=this.ca-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Jc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ca+=c;a(b,c)}}}; +h.cb=function(a){if(jb(this))return!1;if(this.v.ea)return this.g(this.toString()+" busy"),!1;Jc(this);this.v.ea=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.qb(!0),this.B.start(this.R,Ic(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.ga=function(a){if(this.v.ea){Mc(this);Kc(this,this.T);this.T=0;this.v.ea=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Ic(this))}this.v.complete=a}; +function Pc(a){this.Gb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.decode=Qc.bind(this);jd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}y(Pc,Bc);h=Pc.prototype;h.reset=function(){this.v.ea&&this.ga();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +function jd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.sa=[0,0,0,0];a.D=0;a.ua=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;kd(a)}function kd(a){a.Na=255;a.$=0;a.Lb=0;a.G=0;a.La=0;a.Kb=0;a.Ma=0;a.Ja=0;a.ta=0;a.Wa=262143;a.va=253952;a.F|=2;a.A&&ic(a)}function ic(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Xc,a.sb=a.Fd,Lb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.sb=a.gc,Lb(a.A,16))}h.Vb=function(){return 0}; +h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,Sb(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Jc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.sa[c]=a.u[6],a.u[6]=a.sa[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function pd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function qd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.aa=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.Kb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);kc(this,e&-12289|this.ma>>2&12288);c&&(this.$|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.F&=-17} +function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.$|=32,a.aa(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ta=a.D,a.ua=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ta<<5|a.ua<<1),a.aa(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; +a.b-=8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.$|=4,a.u[6]=4,a.aa(4,24)):(a.$|=8,a.F|=64));return e}h.xb=function(a){if(!this.Ja)return this.A.xb(a);this.C++;a=xd(this,wd(this,a,3));this.C--;return a}; +h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(wd(this,a,2));this.C--;return a};h.pb=function(a,b){this.Ja?(this.C++,yd(this,wd(this,a,5),b),this.C--):this.A.pb(a,b)};h.Bb=function(a,b){this.Ja?(this.C++,this.gc(wd(this,a,4),b),this.C--):this.A.Bb(a,b)};h.mc=function(a,b,c){return zd(this,a,b,c)};h.nc=function(a,b,c){return wd(this,zd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Xc=function(a){return this.A.ka(wd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; +h.Fd=function(a,b){this.A.Sa(wd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.sa[a.L>>12&3];return c}function Bd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.sa[a.L>>12&3]=d} +function Cd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Dd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Gd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),yd(a,e,d.call(a,c,xd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?yd(a,a.Y(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 Id(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +function S(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Jd(this.i),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.da=this.b=a;do{if(b){if(Kd(this.i,this.u[7],c)){this.ga();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.aa(168,28):this.F&64?this.aa(4,30):this.F&16&&this.aa(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.bd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.aa(d,26),e=!0):e=!1; +if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.Kb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a}function Ud(a,b){a|=b;P(this,a<<8);return a} +function Vd(a,b){a=~b|65536;pd(this,a);return a&65535}function Wd(a,b){a=~b|256;pd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} +function ae(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;rd(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;rd(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;rd(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255}function ge(a,b){var c=b-a;sd(this,c,a,b);return c&65535} +function he(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} +function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} +function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;od(this,Ed(this,a));this.b=b-ne[this.j]} +var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-pe[this.j]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){R(this,a,0,ie);this.b-=this.j?9:3+(7==this.f?2:0)}function xe(a){R(this,a,Dd(this,a),je);this.b-=this.j?9:3+(7==this.f?2:0)}function W(){this.aa(8,6)}function Qc(a){ye[a>>12].call(this,a)} +var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);sd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.j? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],ze= +[function(a){Ve[a>>4&15].call(this,a)},function(a){S(this,a,!0)},function(a){S(this,a,!md(this))},function(a){S(this,a,md(this))},function(a){S(this,a,!this.Ca()==!ld(this))},function(a){S(this,a,!this.Ca()!=!ld(this))},function(a){S(this,a,!md(this)&&!this.Ca()==!ld(this))},function(a){S(this,a,md(this)||!this.Ca()!=!ld(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){pd(this, +Id(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.j?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Ld);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);pd(this,a);this.b-=this.j?4:3+(7==this.f? +2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.j?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a, +0,b);P(this,b);this.b=c-se[this.j]},function(a){P(this,Id(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.aa(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.aa(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.$|=128,this.aa(4, +3)):this.ga();this.b-=7},function(){this.F&4||this.B.ba();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.aa(12,1);this.b-=5},function(){this.aa(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.A.reset());this.b-=667},function(){ud(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],bf= +[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,xe,xe,W,W,W,W,ve,ve],Ue=[function(a){S(this,a,!this.Ca())},function(a){S(this,a,this.Ca())},function(a){S(this,a,!O(this)&&!md(this))},function(a){S(this,a,O(this)||md(this))},function(a){S(this,a,!ld(this))},function(a){S(this,a,ld(this))},function(a){S(this,a,!O(this))},function(a){S(this,a,O(this))},function(){this.aa(24, +2);this.b-=25},function(){this.aa(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){pd(this,Hd(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.j?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= +this.j?11:6},function(a){Q(this,a,O(this)?1:0,Md);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,O(this)?1:0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);pd(this,a<<8);this.b-=this.j?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.j?9:3+(7== +this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.j]},W];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;jf(this)};gf.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Rb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Kd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};gf.prototype.za=function(){return!0}; +function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Db,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ua)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Db+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.za=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Jb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;gc(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.Mc,Y.prototype.ud,"RCSR"],pf[65394]=[null,null,Y.prototype.Lc,Y.prototype.td,"RBUF"],pf[65396]=[null,null,Y.prototype.Zc,Y.prototype.Hd,"XCSR"],pf[65398]=[null,null,Y.prototype.Yc,Y.prototype.Gd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Wb=function(){return-1};qf.prototype.Xb=function(){}; +function sf(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(oa(b.substring(c,f))),c=f+1}}return a} function tf(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ba[b]);var c=0;for(b in a.ba)xf(a,b,a.ba[b]),c++;return 0>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ca[b]);var c=0;for(b in a.ca)xf(a,b,a.ca[b]),c++;return 0>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>c.Y].yb(d&c.f,d),c.w--,c=d,b&&If(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&If(a,b));return c}; -h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&If(a,c),this.B.aa(!0))};h.Ra=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Gb(f,b&65535,d);e.w--;c&&If(a,c);this.B.aa(!0)}};function X(a){return{A:a,wa:!1}}function Jf(a){return[a.A,a.wa]}function Kf(a){return{A:a[0],wa:a[1]}} -function Hf(a,b,c){var d;c=(c?a.K:a.Ma).A;if(void 0!==b){d=b=vf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Ob=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ca[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Oc(a),a.la=0,a.B.aa()))}; -function Bf(a){var b;if(Jd(a)){if(!a.J||!a.J.length){a.J=Array(1E3);for(b=0;b>>d.Y],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.Y],!0);a.F=["bw"];a.La=0} -h.Na=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Na(e&f.f,a==this.F)}}d&&(a.push(b),c?b.wa=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g>>d.Y],b==a.F));l.wa||Bf(a);break}}return f} -function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ -")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ca[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Ib=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.lc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=X(d.u[7]),Pf(a,J(a,a.K.A)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}} -function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(Y+" instructions earlier:");0=ia.length&&(ba=0);a.Ta=Y;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Ta=void 0)}else{var pb=Hf(a,ha);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ha+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Ma=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.Pa,Zc=a.mb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ja,Zc=a.Ra):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< -g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.A)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Na(a.f,bd,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.da?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted"); -break;case "i":if("if"==g[0]){var cd;var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.A));10>dd;){for(var Aa=null,Cg=256;65536>vb.A>>>0;){ed.A=a.ja(vb,2);if(null==vb.A||!Cg--)break;if(!(ed.A&1)){for(var Dg=a,dc=ed,Me=null,wb= -dc.A,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b>>d.A.Z;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.sa[a-16]:20==a&&(b=Db(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.u[7]).w));this.ia&1073741824?this.ta.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.ga(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Mc(a),a.la=0,a.B.ba()))}; +function Bf(a){var b;if(Jd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Z],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Z],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.Z].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.Z],b==a.D));l.ya||Bf(a);break}}return f} +function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.w-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ +")+":(D=v.ka(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ka(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ka(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.w&65535)]);break;case 56:D=v.ka(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.w&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.sa[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.ba();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=Z(d.u[7]),Pf(a,J(a,a.K.w)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} +function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(ib(a)&&0q||"z"ha.length&&(a.g("note: only "+ha.length+" available"),X=ha.length);aa-=X;0>aa&&(null==ha[ha.length-1].w?(X=aa+X,aa=0):aa+=ha.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(X+" instructions earlier:");0=ha.length&&(aa=0);a.Va=X;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Va=void 0)}else{var pb=Hf(a,ga);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ga+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Oa=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.kb,Zc=a.Ab):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ka,Zc=a.Sa):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< +g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.w)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Pa(a.f,bd,!0)}a.cb(!0,c)}break;case "h":a.v.ea?(c||a.g("halting"),a.ga()):hb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var cd; +var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=Z(),vb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.w));10>dd;){for(var Aa=null,Cg=256;65536>vb.w>>>0;){ed.w=a.ka(vb,2);if(null==vb.w||!Cg--)break;if(!(ed.w&1)){for(var Dg=a,dc=ed,Me=null,wb=dc.w,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2< +fd){dc.w=wb;var ec=Vf(Dg,dc);if(0<=ec.indexOf("JSR")){var Oe=ec.indexOf(" ");if(wb+(ec.indexOf(" ",Oe+1)-Oe-1)/2==Ne){Me=ec;break}}}wb-=2}dc.w=Ne;if(Aa=Me)break}}if(!Aa||null==Aa)break;var Pe=null;if("ks"==Bg){var Qe=Aa.match(/[0-9A-F]+$/);Qe&&(Pe=bg(a,Qe[0]))}Aa=na(Aa,50)+" ;"+(Pe||"stack="+J(a,vb.w));a.g(Aa);dd++}dd||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){bg(a,g[1],!0);break}f=!0;break;case "m":a:{var ia,ja=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var sa=0;if("all"== +F)sa=1878917119,F=null;else if("on"==F)ja=!0,F=null;else if("off"==F)ja=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ia in H)if(F==ia){sa=H[ia];ja=!!(a.ia&sa);break}if(!sa){a.g("unknown message category: "+F);break a}}if(sa)if("on"==g[2])a.ia|=sa,ja=!0;else if("off"==g[2]&&(a.ia&=~sa,ja=!1,1073741824==sa)){for(var gd=0;gd\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.J)){this.F=new N(this,"1.30.1","failsafe");jg(this.F)&&(og(this,d),a=2,pg(this.F));this.F.set("timestamp",ta());qg(this.F);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.J;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.fb());this.T&&(og(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.B=0}; -function og(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mhg){if(jg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.j=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.hb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function og(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.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ga(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ia(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +function da(){var a=ea();return-1!==a.indexOf("pcjs.org",a.length-8)}var fa={"&":"&","<":"<",">":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function m(a,b,c,d){var e=0,f=null,h=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)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== @@ -692,141 +692,140 @@ typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encod function p(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} function wa(a){if(ua)try{for(var b=0;bb?this.Ca=this.id:(this.Sa=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Wc:!1,Xc:!1,L:!1,error:!1};this.La=null;this.h.error=!1;this.v={};this.I=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.hb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ea=this.id:(this.Ta=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Vc:!1,Wc:!1,L:!1,error:!1};this.Na=null;this.h.error=!1;this.v={};this.H=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.s=this.D/this.l|0;this.ga=[];this.o=0;this.w=[];this.tb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.I);this.b=Array(this.s);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} -function Ra(a,b){var c=-1,d=this.controller;(a=d.ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.ya)return n.Oa+=n.ya-f,n.ya=f,!0;if(f>=n.ya+n.Oa){t=n.size-(f-q);t>h&&(t=h);n.Oa=f-n.ya+t;f=q+a.l;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.l,d,e);Ta(f,a.I,n);a.b[l++]=f;f=q+a.l;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} -function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Wa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].gc(b&a.g,b)}function db(a,b,c){a.b[(b&a.i)>>>a.c].Qc(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.Ab)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.w.push(b)}function ib(a,b){a.o||H(a.a,4,b)} -function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Vc:0,Ma:20,Zc:0};this.b={Yc:0,$a:-1}}x(I);g=I.prototype;g.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;var e=this;this.b.$a=jb(c,function(){e.b.ka|=128;e.b.ka&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.$a,1E3/60))});this.b.mc=mb(c,64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Jb=function(){var a=this.b.ka;this.b.ka&=-129;return a}; -g.uc=function(a){this.b.ka=a;a&64&&lb(this.a,this.b.$a,1E3/60);this.b.ka=a&-129};g.Lb=function(){var a=this.a;return a.A&62337|a.Da<<5|a.Ea<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Da=a>>5&3;b.Ea=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Na!=c&&(b.Na=c,nb(b))}ob(this)};g.Mb=function(){var a=this.a.la;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Nb=function(){return this.a.Ya};g.Ob=function(){return this.a.ma}; -g.xc=function(a){var b=this.a;b.ma!=a&&(b.ma=a,a&16?(b.Ua=4194303,b.Fa=3915776):(b.Ua=262143,b.Fa=253952),nb(b));ob(this)};function ob(a){a.c.Ma=a.c.Ma&-8|(a.a.Na?a.a.ma&16?1:2:4)}g.$b=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Yb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.Zb=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; -g.Xb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Ib=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Gb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Hb=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Fb=function(a){return this.a.P[0][(a>>1&7)+8]}; -g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.fc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.dc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ec=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.cc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.ta=function(a){a&=7;return this.a.u&2048?this.a.ra[a]:this.a.f[a]};g.va=function(a,b){b&=7;this.a.u&2048?this.a.ra[b]=a:this.a.f[b]=a};g.Rb=function(){return this.a.u&49152?this.a.V[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.V[0]=a:this.a.f[6]=a};g.Ub=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.ua=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.ra[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.ra[b]=a}; -g.Sb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[1]=a};g.Tb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.V[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.V[3]=a};g.Eb=function(a){return this.a.nb[a-65504>>1]};g.pc=function(a,b){this.a.nb[b-65504>>1]=a};g.kb=function(a){return 65520==a?61183:0};g.sb=function(){};g.bc=function(){return 1};g.Lc=function(){};g.Db=function(){return this.a.F}; -g.oc=function(){this.a.F=0};g.Kb=function(){return this.a.mb};g.vc=function(a,b){b&1||(a&=255);this.a.mb=a};g.Pb=function(a){return a?this.a.Za:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Za=a;b.j|=2};g.ac=function(a){return a?this.a.na&65280:0};g.Kc=function(a){this.a.na=a|255};g.Qb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.rb=function(){};g.reset=function(){this.c.Ma=this.c.Ma&-120|20;this.b.ka=0}; -var K={},J=(K[62592]=[null,null,I.prototype.$b,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Yb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.Zb,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Xb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Ib,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Gb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Hb,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Fb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, -I.prototype.Ob,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Jb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Lb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Mb,I.prototype.rb,"MMR1"],K[65406]=[null,null,I.prototype.Nb,I.prototype.rb,"MMR2"],K[65408]=[null,null,I.prototype.fc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.dc,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.ec,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.cc,I.prototype.Mc,"UDSAR"], -K[65472]=[null,null,I.prototype.ta,I.prototype.va,"R0SET0"],K[65473]=[null,null,I.prototype.ta,I.prototype.va,"R1SET0"],K[65474]=[null,null,I.prototype.ta,I.prototype.va,"R2SET0"],K[65475]=[null,null,I.prototype.ta,I.prototype.va,"R3SET0"],K[65476]=[null,null,I.prototype.ta,I.prototype.va,"R4SET0"],K[65477]=[null,null,I.prototype.ta,I.prototype.va,"R5SET0"],K[65478]=[null,null,I.prototype.Rb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Ub,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, -I.prototype.ua,I.prototype.wa,"R0SET1"],K[65481]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET1"],K[65482]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET1"],K[65483]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET1"],K[65484]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET1"],K[65485]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET1"],K[65486]=[null,null,I.prototype.Sb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Tb,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Eb,I.prototype.pc, -"CTRL",1170],K[65520]=[null,null,I.prototype.kb,I.prototype.sb,"LSIZE",1170],K[65522]=[null,null,I.prototype.kb,I.prototype.sb,"HSIZE",1170],K[65524]=[null,null,I.prototype.bc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Db,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Kb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Pb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.ac,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Qb,I.prototype.zc,"PSW"], +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ja="undefined"!==typeof ArrayBuffer;function Ka(a){v.call(this,"Panel",a,Ka);this.b=0;this.h.eb=!0}x(Ka);g=Ka.prototype; +g.U=function(a,b,c,d){if(this.w&&this.w.U(a,b,c,d)||this.a&&this.a.U(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.v[b]=c,this.b++,!0;default:return"rled"==a?(this.v[b]=c,this.b++,!0):this.parent.U.call(this,a,b,c,d)}};g.ka=function(a,b,c,d){this.w=a;this.l=b;this.a=c;this.H=d};g.ba=function(a,b){b||La();return!0};g.aa=function(){return!0}; +function E(a,b,c,d){if(a.v[b]){void 0===c&&(a.h.error=!0,a.K("Value for "+b+" is invalid"),F(a.a));var e=a.H&&a.H.b||8;if(!a.a.h.T||a.h.eb)if(8==e){e="";d?11>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.w=this.B/this.l|0;this.ha=[];this.R=0;this.o=[];this.vb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.H);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} +function Ra(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>h&&(t=h);n.Pa=f-n.za+t;f=q+a.l;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.l,d,e);Ta(f,a.H,n);a.b[l++]=f;f=q+a.l;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].S(b&a.g,b)}Oa.prototype.ab=function(a,b){this.R++;this.b[(a&this.i)>>>this.c].sb(a&this.g,b&255,a);this.R--};function db(a,b,c){a.b[(b&a.i)>>>a.c].Qa(b&a.g,c&65535,b)} +function eb(a){for(var b=0,c=[],d=0;da.a.jb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.o.push(b)}function ib(a,b){a.R||H(a.a,4,b)} +function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Uc:0,Oa:20,Yc:0};this.b={Xc:0,bb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;var e=this;this.b.bb=jb(c,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.bb,1E3/60))});this.b.mc=mb(64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Kb=function(){var a=this.b.la;this.b.la&=-129;return a}; +g.uc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.bb,1E3/60);this.b.la=a&-129};g.Mb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,nb(b))}ob(this)};g.Nb=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Ob=function(){return this.a.Za};g.Pb=function(){return this.a.na}; +g.xc=function(a){var b=this.a;1170>b.jb&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Ha=3915776):(b.Va=262143,b.Ha=253952),nb(b));ob(this)};function ob(a){a.c.Oa=a.c.Oa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.ac=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Zb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.$b=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; +g.Yb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Jb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Hb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Ib=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Gb=function(a){return this.a.P[0][(a>>1&7)+8]}; +g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.gc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.ec=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.fc=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.dc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; +g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Sb=function(){return this.a.u&49152?this.a.X[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.X[0]=a:this.a.f[6]=a};g.Vb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; +g.Tb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[1]=a};g.Ub=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[3]=a};g.Fb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.cc=function(){return 1};g.Lc=function(){};g.Eb=function(){return this.a.F}; +g.oc=function(){this.a.F=0};g.Lb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Qb=function(a){return a?this.a.$a:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.bc=function(a){return a?this.a.oa&65280:0};g.Kc=function(a){this.a.oa=a|255};g.Rb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.la=0}; +var K={},J=(K[62592]=[null,null,I.prototype.ac,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Zb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.$b,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Yb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Jb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Hb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Ib,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Gb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, +I.prototype.Pb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Kb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Mb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Nb,I.prototype.tb,"MMR1"],K[65406]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR2"],K[65408]=[null,null,I.prototype.gc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.ec,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.fc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.dc,I.prototype.Mc,"UDSAR"], +K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]=[null,null,I.prototype.Sb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Vb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, +I.prototype.va,I.prototype.xa,"R0SET1"],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1"],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1"],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1"],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1"],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1"],K[65486]=[null,null,I.prototype.Tb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Ub,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Fb,I.prototype.pc, +"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.cc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Eb,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Lb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Qb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.bc,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Rb,I.prototype.zc,"PSW"], K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},X:function(a,b){a&1&&ib(this.l,b);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},da: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.ha=!0},G:function(a,b){return this.H(a,b)}, -R:function(a,b){return this.U(a,b)},Z:function(a,b,c){this.v||this.qb(a,b,c)},fa:function(a,b,c){this.v||this.oa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Y:function(a,b){this.c[a]=b;this.ha=!0},ca:function(a,b){this.c[a]=b;this.ha=!0},ea:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ha=!0},pa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> -1]=b;this.ha=!0}};function Ta(a,b,c){a.I=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.Pa=!a.v&&b[1]||a.A,a.Qc=!a.v&&b[3]||a.B);if(c||void 0===c)a.qb=b[1]||a.A,a.oa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Wa=b[0]||a.w,a.gc=b[2]||a.s);if(c||void 0===c)a.H=b[0]||a.w,a.U=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} -var Db=[],zb=[G.prototype.M,G.prototype.da,G.prototype.X,G.prototype.qa],Bb=[G.prototype.G,G.prototype.Z,G.prototype.R,G.prototype.fa];if(Ja)var yb=[G.prototype.D,G.prototype.Y,G.prototype.N,G.prototype.ea],xb=[G.prototype.J,G.prototype.ca,G.prototype.W,G.prototype.pa]; -function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ia=a.cycles||b;this.Z=c;this.Ta=Math.round(this.Ia/1E4)/100;this.ca=this.Ta*this.Z;this.h.S=!1;this.h.ob=!1;this.h.za=a.autoStart;this.h.Ka=!1;this.Ba=this.ea=0;this.Ha=a.csStart;this.oa=a.csInterval;this.pa=a.csStop;this.G=[];this.ib=this.kc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; -g.ja=function(a,b,c,d){this.w=a;this.l=b;this.I=d;for(b=0;ba.X/a.ca&&(b=1),a.Z=b,b=a.Ta*a.Z,a.ca!=b)){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.R;a.R=0;a.N=ka();a.Y=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ia*a.Z/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.da-=a.a;a.a=0;b&&(a.da=0);return c} -g.kc=function(){if(this.h.S){this.Va>=this.Ia&&Lb(this,!0);this.xa=0;this.Ga=ka();if(this.Y){var a=this.Ga-this.Y;a>this.gb&&(this.N+=a,this.N>this.Ga&&(this.N=this.Ga))}try{do{for(var b,c=this.h.Ka?1:this.Ja,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.pb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.xa+=b;this.R+=b;a=b;if(this.h.Ka){var f=!1;this.Ba=this.Ba+this.cb()|0;this.ea-=a;0>=this.ea&&(this.ea+=this.oa,f=!0);0<=this.pa&&this.pa<=Mb(this)&& -(this.oa=this.pa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Ba))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.qa-=b;if(0>=this.qa){this.qa+=this.Ja;15<=++this.hb&&(this.w&&this.w.ba(),this.hb=0);break}}while(this.h.S)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.S){b=setTimeout;c=this.ib;this.Y=ka();d=this.gb;this.xa&&(d=Math.round(d*this.xa/ -this.Ja));d-=this.Y-this.Ga;if(e=this.Y-this.N)this.X=Math.round(this.R/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Xd&&(this.N-=d),d=0;this.Va+=this.xa;this.Y+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.S)a.O(a.toString()+" busy");else{Kb(a);a.h.S=!0;a.h.ob=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.ib,0)}}g.pb=function(){return 0}; -function F(a){if(a.h.S){Nb(a);a.J+=a.R;a.R=0;a.h.S=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0} -function Ob(a){this.Ab=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);this.yb=[];this.U=null;this.m=65536;this.g=32768;this.i=65535;this.o=32768;this.u=15;this.f=[0,0,0,0,0,0,0,this.Cb];this.ra=[0,0,0,0,0,0];this.V=[0,0,0,0];this.Ea=this.s=0;this.zb=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.lc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nb=[0,0,0,0,0,0,0,0];this.c=this.b=this.Ra=this.B=this.D=this.j=this.mb=0;this.fa=-1;Qb(this);this.h.complete=this.h.ub=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.S&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Qb(a){a.na=255;a.F=0;a.Za=0;a.A=0;a.la=0;a.Ya=0;a.ma=0;a.Na=0;a.Da=0;a.Ua=262143;a.Fa=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Na?(a.W=65536,a.H=a.xb,a.M=a.lb,a.jb=a.Sc,Va(a.l,a.ma&16?22:18)):(a.W=0,a.H=a.wb,a.M=a.hc,a.jb=a.Rc,Va(a.l,16))}g.cb=function(){return 0};g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.Z]);a.set(2,eb(this.l));return a.data()}; -g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.V[c]=a.f[6],a.f[6]=a.V[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Sb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b,c){var d=!1;0>a.fa?a.fa=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.la=63222,a.Ya=b);a.s=0;var e=a.M(b|a.W),f=a.M(b+2&65535|a.W);pb(a,f&-12289|a.fa>>2&12288);d&&(a.F|=4,a.f[6]=4);Ub(a,a.fa);Ub(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.fa=-1;if(26!=c)throw b;}function Vb(a){var b=Wb(a),c=Wb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} -function Xb(a,b,c){var d,e,f,h=0;d=b>>13;a.ma&a.zb[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Ua;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ma&32&&(f=a.lc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Fa&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: -128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Da=a.s,a.Ea=d;h&&(h&57344&&(0<=a.fa&&(h|=128),a.A&57344||(a.A=a.A|h|a.Da<<5|a.Ea<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.M(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.M(e)|h;a.a-= -8;break;case 6:return e=Rb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Rb(a),e=e+a.f[c]&65535,e=a.M(e|a.W)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.la=a.la<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.na||65534<=a.f[6])&&(a.f[6]<=a.na-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.wb=function(a,b,c){return Yb(this,a,b,c)};g.xb=function(a,b,c){return Xb(this,Yb(this,a,b,c),c)};g.hc=function(a){return cb(this.l,a)};g.lb=function(a){return cb(this.l,Xb(this,a,2))}; -g.Rc=function(a,b){db(this.l,a,b&65535)};g.Sc=function(a,b){db(this.l,Xb(this,a,4),b)};function Zb(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Yb(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.M(d|c&a.W),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.V[a.u>>12&3];return c} -function $b(a,b,c,d){a.A&57344||(a.la=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Yb(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Xb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.V[a.u>>12&3]=d}function ac(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Yb(a,b,c,8)} -function cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.H(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.H(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ra=a.H(b,e,7),c=d.call(a,c,bb(a.l,e)),e&1&&a.a--,a=a.l,a.b[(e&a.i)>>>a.c].Pa(e&a.g,c&255,e)):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.H(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function dc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.H(b,e,5),d&1&&a.a--,a=a.l,a.b[(d&a.i)>>>a.c].Pa(d&a.g,c&255,d)):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.H(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.pb=function(a){this.h.complete=!0;this.h.ub=!1;this.h.ob=!1;this.da=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.Za&224)>>5;if(a=this.U&&this.U.sa>c?this.U:null)b=a.nc,c=a.sa;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.U,c==a)this.U=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& -1&&this.j++;this.A&57344||(this.la=0,this.Ya=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Rb(this))}while(0>1|b<<16;P(this,a);return a&65535}function kc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function lc(a,b){a=b&~a;N(this,a);return a}function mc(a,b){a=b&~a;N(this,a<<8);return a}function nc(a,b){a|=b;N(this,a);return a}function oc(a,b){a|=b;N(this,a<<8);return a}function pc(a,b){a=~b|65536;O(this,a);return a&65535}function qc(a,b){a=~b|256;O(this,a<<8);return a&255} -function rc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function sc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function tc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function uc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function vc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function wc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} -function xc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function yc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function zc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Ac(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){var c=b-a;Tb(this,c,a,b);return c&65535}function Cc(a,b){var c=b-a;Tb(this,c<<8,a<<8,b<<8);return c&255}function Dc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} -function Ec(a,b){a^=b;N(this,a);return a&65535}function Fc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} -function Gc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} -function Ic(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Jc=[0,7,7,10,7,11,9,13];function Kc(a){var b=this.a;a=bc(this,a);this.f[7]=a&65535;this.a=b-Jc[this.c]} -var Lc=[0,14,14,17,14,18,16,20];function Mc(a){var b=this.a,c=bc(this,a);a=a>>6&7;Ub(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Lc[this.c]}var Nc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Oc=[7,13,13,17,14,18,17,21];function Pc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Sc(a){T(this,a,0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)}function Tc(a){T(this,a,Q(this,a),Ec);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Uc[a>>12].call(this,a)} -var Uc=[function(a){Vc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,ec(this,a,b));this.a=c-Nc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Tb(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),lc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? -2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),fc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Wc[a>>8&15].call(this,a)},function(a){Xc[a>>8&15].call(this,a)},function(a){var b=ac(this,a);N(this,dc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=ac(this,a)<<8;a=cc(this,a)<<8;Tb(this,b-a,a,b);this.a-=this.c?4+ -(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(ac(this,a)&cc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),mc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,ac(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Vc=[function(a){Yc[a>> -4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ia()==!(this.g&32768))},function(a){U(this,a,!this.ia()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ia()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ia()!=!(this.g&32768))},Mc,Mc,function(a){Zc[a>>6&3].call(this,a)},function(a){$c[a>>6&3].call(this,a)},function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>> -6&3].call(this,a)},X,X],Zc=[function(a){O(this,ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,rc);this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){T(this,a,0,vc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ad=[function(a){T(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.lb(a|65536);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Zb(this,a,0);Ub(this,a);N(this,a);this.a-= -11},function(a){var b=Wb(this),c=this.a;$b(this,a,0,b);N(this,b);this.a=c-Oc[this.c]},function(a){N(this,ec(this,a,this.ia?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Yc=[function(a){cd[a&15].call(this,a)},X,X,X,Kc,Kc,Kc,Kc,function(a){if(a&8)H(this,8,6);else{var b=Wb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},function(a){dd[a&15].call(this,a)},function(a){ed[a&15].call(this,a)},Sc, -Sc,Sc,Sc],cd=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.j&4||this.w.ba();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Vb(this);this.j|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Qb(this),this.l.reset());this.a-=667},function(){Vb(this);this.a-=13},X,X,X,X,X,X,X,X,X],dd=[Qc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= -5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],ed=[Qc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Wc=[Pc,Pc,Ic,Ic,Fc,Fc,Gc,Gc,Tc,Tc,X,X,X,X,Rc,Rc],Xc=[function(a){U(this,a,!this.ia())},function(a){U(this,a,this.ia())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a, -this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24,2);this.a-=25},function(){H(this,28,5);this.a-=5},function(a){fd[a>>6&3].call(this,a)},function(a){gd[a>>6&3].call(this,a)},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},X,X],fd=[function(a){O(this,dc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2: -0)},function(a){S(this,a,1,sc);this.a-=this.c?9:3+(7==this.b?2:0)}],gd=[function(a){S(this,a,0,wc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Cc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],hd=[function(a){S(this,a,0,Ac);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, -a,0,kc);this.a-=this.c?9+(this.Ra&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ic);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[X,function(a){a=Zb(this,a,65536);Ub(this,a);N(this,a);this.a-=11},function(a){var b=Wb(this),c=this.a;$b(this,a,65536,b);N(this,b);this.a=c-Oc[this.c]},X]; -function jd(a){v.call(this,"ROM",a,jd);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){kd(c,a,b,f)})}}x(jd);jd.prototype.ja=function(a,b,c,d){this.l=b;this.a=c;this.I=d;ld(this)};jd.prototype.aa=function(){this.m&&(this.I&&this.I.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; -jd.prototype.$=function(){return!0}; -function kd(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Sa,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); -return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>d.c].qb(e&d.g,f&255,e);d.o--}b=!0}else b=!1;if(b){b=[];"number"==typeof a.g?b.push(a.g):null!=a.g&&a.g.length&&(b=a.g);for(c=0;c=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ia(b[0]);if(c!=this.Ca)return;b=ia(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.aa=function(a,b){if(!b)if(this.fb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.$=function(a){return a?this.save():!0};g.reset=function(){pd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return pd(this)};function pd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Xa=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var qd={},od=(qd[65392]=[null,null,Z.prototype.Wb,Z.prototype.Fc,"RCSR"],qd[65394]=[null,null,Z.prototype.Vb,Z.prototype.Ec,"RBUF"],qd[65396]=[null,null,Z.prototype.jc,Z.prototype.Uc,"XCSR"],qd[65398]=[null,null,Z.prototype.ic,Z.prototype.Tc,"XBUF"],qd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;btd){if(vd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");vd(this.m)&&(Ad(this,d),a=2,Bd(this.m));this.m.set("timestamp",la());Cd(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?vd(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Bd(d),vd(d)?(c=zd(d),e=!0):c=!1))}e&&yd(this,c?d:null)}else 2==a&&d.clear()}else yd(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Dd(this,this.a,b,c,a),this.a.za());this.G&&(Ad(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function Ad(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Ed(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.$&&(c&&F(a.a),d=a.a.$(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);Ld(a,b,c)}})}else c(a,null)} -function Md(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Id||xa(!0));n=!1}var h,l,n=!0;Id++;Fa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ha=document.createElement("style");ha.type="text/css";ha.styleSheet?ha.styleSheet.cssText=q:ha.appendChild(document.createTextNode(q));t.appendChild(ha)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Jd(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Id||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Id||xa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Jd(b,a,d,!0,e,q):Kd(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Hc){f(Hc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Md(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); +G.prototype={constructor:G,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ja)for(a=Array(this.size>>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Y:function(a,b){a&1&&ib(this.l,b);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},ea: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.ia=!0},G:function(a,b){return this.I(a,b)}, +R:function(a,b){return this.V(a,b)},$:function(a,b,c){this.v||this.sb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Z:function(a,b){this.c[a]=b;this.ia=!0},da:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> +1]=b;this.ia=!0}};function Ta(a,b,c){a.H=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.cb=!a.v&&b[1]||a.A,a.Qa=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Xa=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} +var Db=[],zb=[G.prototype.M,G.prototype.ea,G.prototype.Y,G.prototype.ra],Bb=[G.prototype.G,G.prototype.$,G.prototype.R,G.prototype.ga];if(Ja)var yb=[G.prototype.D,G.prototype.Z,G.prototype.N,G.prototype.fa],xb=[G.prototype.J,G.prototype.da,G.prototype.W,G.prototype.qa]; +function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ka=a.cycles||b;this.$=c;this.Ua=Math.round(this.Ka/1E4)/100;this.da=this.Ua*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Da=this.fa=0;this.Ja=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.G=[];this.mb=this.lc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; +g.ka=function(a,b,c,d){this.w=a;this.l=b;this.H=d;for(b=0;ba.Y/a.da&&(b=1),a.$=b,b=a.Ua*a.$,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=ka();a.Z=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ka*a.$/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.ea-=a.a;a.a=0;b&&(a.ea=0);return c} +g.lc=function(){if(this.h.T){this.Wa>=this.Ka&&Lb(this,!0);this.ya=0;this.Ia=ka();if(this.Z){var a=this.Ia-this.Z;a>this.kb&&(this.N+=a,this.N>this.Ia&&(this.N=this.Ia))}try{do{for(var b,c=this.h.Ma?1:this.La,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Da=this.Da+this.gb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Mb(this)&& +(this.pa=this.qa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Da))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.La;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=ka();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ +this.La));d-=this.Z-this.Ia;if(e=this.Z-this.N)this.Y=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Yd&&(this.N-=d),d=0;this.Wa+=this.ya;this.Z+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Kb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; +function F(a){if(a.h.T){Nb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0}function Ob(a){this.jb=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);Qb(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.T&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Qb(a){a.m=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.X=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Sa=0;a.ga=-1;Rb(a)}function Rb(a){a.oa=255;a.F=0;a.$a=0;a.A=0;a.ma=0;a.Za=0;a.na=0;a.Ba=0;a.Fa=0;a.Va=262143;a.Ha=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.ic,a.Qa=a.Rc,Va(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.hc,a.Qa=a.Qc,Va(a.l,16))}g.gb=function(){return 0}; +g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.$]);a.set(2,eb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.X[c]=a.f[6],a.f[6]=a.X[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Ub(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b,c){if(!a.R){var d=!1;0>a.ga?a.ga=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.Za=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);pb(a,f&-12289|a.ga>>2&12288);d&&(a.F|=4,a.f[6]=4);Vb(a,a.ga);Vb(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ga=-1;if(26!=c)throw b;}}function Wb(a){var b=Xb(a),c=Xb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} +function Yb(a,b,c){var d,e,f,h=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: +128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;h&&(h&57344&&(0<=a.ga&&(h|=128),a.A&57344||(a.A=a.A|h|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.c].cb(b&a.g,c&255,b)}function Xb(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} +function Vb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.S(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.S(e)|h;a.a-= +8;break;case 6:return e=Sb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Sb(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.ab=function(a,b){this.Ba?(this.R++,Zb(this,Yb(this,a,5),b),this.R--):this.l.ab(a,b)};g.yb=function(a,b,c){return $b(this,a,b,c)};g.zb=function(a,b,c){return Yb(this,$b(this,a,b,c),c)}; +g.hc=function(a){return cb(this.l,a)};g.ic=function(a){return cb(this.l,Yb(this,a,2))};g.Qc=function(a,b){db(this.l,a,b&65535)};g.Rc=function(a,b){db(this.l,Yb(this,a,4),b)};function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} +function bc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Yb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.X[a.u>>12&3]=d}function cc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)} +function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.I(b,e,7),Zb(a,e,d.call(a,c,bb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Zb(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.$a&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.nc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +1&&this.j++;this.A&57344||(this.ma=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Sb(this))}while(0>1|b<<16;P(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function nc(a,b){a=b&~a;N(this,a);return a}function oc(a,b){a=b&~a;N(this,a<<8);return a}function pc(a,b){a|=b;N(this,a);return a}function qc(a,b){a|=b;N(this,a<<8);return a}function rc(a,b){a=~b|65536;O(this,a);return a&65535}function sc(a,b){a=~b|256;O(this,a<<8);return a&255} +function tc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function yc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} +function zc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function Ac(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function Bc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Cc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Ub(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Ub(this,c<<8,a<<8,b<<8);return c&255}function Fc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} +function Gc(a,b){a^=b;N(this,a);return a&65535}function Hc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +function Ic(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} +function Kc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Lc=[0,7,7,10,7,11,9,13];function Mc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Lc[this.c]} +var Nc=[0,14,14,17,14,18,16,20];function Oc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Vb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Nc[this.c]}var Pc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Qc=[7,13,13,17,14,18,17,21];function Rc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Uc(a){T(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Vc(a){T(this,a,Q(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Wc[a>>12].call(this,a)} +var Wc=[function(a){Xc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,gc(this,a,b));this.a=c-Pc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Ub(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? +2:0)},function(a){T(this,a,Q(this,a),pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),hc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Yc[a>>8&15].call(this,a)},function(a){Zc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);N(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Ub(this,b-a,a,b);this.a-=this.c?4+ +(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,cc(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,cc(this,a),qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Xc=[function(a){$c[a>> +4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ja()==!(this.g&32768))},function(a){U(this,a,!this.ja()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))},Oc,Oc,function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>>6&3].call(this,a)},function(a){dd[a>> +6&3].call(this,a)},X,X],ad=[function(a){O(this,gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){T(this,a,0,xc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, +a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],cd=[function(a){T(this,a,0,Bc);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)},function(a){T(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],dd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Vb(this,a);N(this,a);this.a-= +11},function(a){var b=Xb(this),c=this.a;bc(this,a,0,b);N(this,b);this.a=c-Qc[this.c]},function(a){N(this,gc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){ed[a&15].call(this,a)},X,X,X,Mc,Mc,Mc,Mc,function(a){if(a&8)H(this,8,6);else{var b=Xb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},function(a){fd[a&15].call(this,a)},function(a){gd[a&15].call(this,a)},Uc, +Uc,Uc,Uc],ed=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.j&4||this.w.ca();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Wb(this);this.j|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Rb(this),this.l.reset());this.a-=667},function(){Wb(this);this.a-=13},X,X,X,X,X,X,X,X,X],fd=[Sc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= +5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],gd=[Sc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Yc=[Rc,Rc,Kc,Kc,Hc,Hc,Ic,Ic,Vc,Vc,X,X,X,X,Tc,Tc],Zc=[function(a){U(this,a,!this.ja())},function(a){U(this,a,this.ja())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a, +this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24,2);this.a-=25},function(){H(this,28,5);this.a-=5},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},function(a){kd[a>>6&3].call(this,a)},X,X],hd=[function(a){O(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2: +0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[function(a){S(this,a,0,yc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],jd=[function(a){S(this,a,0,Cc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, +a,0,mc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],kd=[X,function(a){a=ac(this,a,65536);Vb(this,a);N(this,a);this.a-=11},function(a){var b=Xb(this),c=this.a;bc(this,a,65536,b);N(this,b);this.a=c-Qc[this.c]},X]; +function ld(a){v.call(this,"ROM",a,ld);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){md(c,a,b,f)})}}x(ld);ld.prototype.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;nd(this)};ld.prototype.ba=function(){this.m&&(this.H&&this.H.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; +ld.prototype.aa=function(){return!0}; +function md(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); +return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Ea)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.aa=function(a){return a?this.save():!0};g.reset=function(){rd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return rd(this)};function rd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.Xb,Z.prototype.Fc,"RCSR"],sd[65394]=[null,null,Z.prototype.Wb,Z.prototype.Ec,"RBUF"],sd[65396]=[null,null,Z.prototype.kc,Z.prototype.Tc,"XCSR"],sd[65398]=[null,null,Z.prototype.jc,Z.prototype.Sc,"XBUF"],sd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");xd(this.m)&&(Cd(this,d),a=2,Dd(this.m));this.m.set("timestamp",la());Ed(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?xd(d,h):("error"== +f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Aa());this.G&&(Cd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function Cd(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&F(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],h);Nd(a,b,c)}})}else c(a,null)} +function Od(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Kd||xa(!0));n=!1}var h,l,n=!0;Kd++;Fa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ia=document.createElement("style");ia.type="text/css";ia.styleSheet?ia.styleSheet.cssText=q:ia.appendChild(document.createTextNode(q));t.appendChild(ia)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Ld(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Kd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Kd||xa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,q):Md(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Jc){f(Jc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Od(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From 854b40c419322c61b3d12b921068756b37f1512f Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 13 Oct 2016 16:35:10 -0700 Subject: [PATCH 22/36] Cleaned up PDP-11/70 configs --- devices/pdp11/machine/1170/README.md | 5 +- devices/pdp11/machine/1170/panel/README.md | 10 + .../machine/1170/panel/debugger/README.md | 11 + .../machine/1170/panel/debugger/machine.xml | 14 + devices/pdp11/machine/1170/panel/machine.xml | 13 + devices/pdp11/machine/1170/test/README.md | 4 - .../machine/1170/test/debugger/README.md | 11 + .../1170/{ => test/debugger}/machine.xml | 6 +- devices/pdp11/machine/1170/test/machine.xml | 5 +- devices/pdp11/machine/1170/vt100/README.md | 6 +- .../machine/1170/vt100/debugger/README.md | 19 ++ .../machine/1170/vt100/debugger/machine.xml | 14 + devices/pdp11/machine/1170/vt100/machine.xml | 13 + .../panel/1170/{led.xml => debugger/leds.xml} | 0 devices/pdp11/panel/1170/debugger/test.xml | 35 +++ devices/pdp11/panel/1170/leds.xml | 96 ++++++ devices/pdp11/panel/1170/test.xml | 23 -- modules/pdp11/README.md | 3 + modules/pdp11/lib/bus.js | 13 +- modules/pdp11/lib/cpuops.js | 14 + modules/pdp11/lib/cpustate.js | 14 + modules/pdp11/lib/debugger.js | 2 +- modules/pdp11/lib/defines.js | 11 +- modules/pdp11/lib/device.js | 52 +++- modules/pdp11/lib/serialport.js | 4 +- modules/shared/lib/strlib.js | 2 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 278 +++++++++--------- versions/pdpjs/1.30.1/pdp11.js | 114 +++---- 28 files changed, 531 insertions(+), 261 deletions(-) create mode 100644 devices/pdp11/machine/1170/panel/README.md create mode 100644 devices/pdp11/machine/1170/panel/debugger/README.md create mode 100644 devices/pdp11/machine/1170/panel/debugger/machine.xml create mode 100644 devices/pdp11/machine/1170/panel/machine.xml create mode 100644 devices/pdp11/machine/1170/test/debugger/README.md rename devices/pdp11/machine/1170/{ => test/debugger}/machine.xml (77%) create mode 100644 devices/pdp11/machine/1170/vt100/debugger/README.md create mode 100644 devices/pdp11/machine/1170/vt100/debugger/machine.xml create mode 100644 devices/pdp11/machine/1170/vt100/machine.xml rename devices/pdp11/panel/1170/{led.xml => debugger/leds.xml} (100%) create mode 100644 devices/pdp11/panel/1170/debugger/test.xml create mode 100644 devices/pdp11/panel/1170/leds.xml diff --git a/devices/pdp11/machine/1170/README.md b/devices/pdp11/machine/1170/README.md index 59f53c72e..a76320cc6 100644 --- a/devices/pdp11/machine/1170/README.md +++ b/devices/pdp11/machine/1170/README.md @@ -9,5 +9,6 @@ PDP-11/70 Machine Configurations PCjs is adding support the following PDP-11/70 configurations: -* [PDP-11/70 Test Machine](/devices/pdp11/machine/1170/test/) -* [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/) +* [PDP-11/70 Test Machine](/devices/pdp11/machine/1170/test/) ([Debugger](/devices/pdp11/machine/1170/test/debugger/)) +* [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel) ([Debugger](/devices/pdp11/machine/1170/panel/debugger/)) +* [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/) ([Debugger](/devices/pdp11/machine/1170/vt100/debugger/)) diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md new file mode 100644 index 000000000..820a36b2d --- /dev/null +++ b/devices/pdp11/machine/1170/panel/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11/70 with Front Panel +permalink: /devices/pdp11/machine/1170/panel/ +machines: + - id: test1170 + type: pdp11 +--- + +{% include machine.html id="test1170" %} diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md new file mode 100644 index 000000000..3c0448f6a --- /dev/null +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -0,0 +1,11 @@ +--- +layout: page +title: PDP-11/70 with Front Panel and Debugger +permalink: /devices/pdp11/machine/1170/panel/debugger/ +machines: + - id: test1170 + type: pdp11 + debugger: true +--- + +{% include machine.html id="test1170" %} diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml new file mode 100644 index 000000000..9884fa131 --- /dev/null +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -0,0 +1,14 @@ + + + + PDP-11/70 with Front Panel and Debugger + + + + + + + + + + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml new file mode 100644 index 000000000..9232b558f --- /dev/null +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -0,0 +1,13 @@ + + + + PDP-11/70 with Front Panel + + + + + + + + + diff --git a/devices/pdp11/machine/1170/test/README.md b/devices/pdp11/machine/1170/test/README.md index bb97fc5be..6bda346ad 100644 --- a/devices/pdp11/machine/1170/test/README.md +++ b/devices/pdp11/machine/1170/test/README.md @@ -5,10 +5,6 @@ permalink: /devices/pdp11/machine/1170/test/ machines: - id: test1170 type: pdp11 - debugger: true --- -PDP-11/70 Test Machine ----------------------- - {% include machine.html id="test1170" %} diff --git a/devices/pdp11/machine/1170/test/debugger/README.md b/devices/pdp11/machine/1170/test/debugger/README.md new file mode 100644 index 000000000..8c7bdde0e --- /dev/null +++ b/devices/pdp11/machine/1170/test/debugger/README.md @@ -0,0 +1,11 @@ +--- +layout: page +title: PDP-11/70 Test Machine with Debugger +permalink: /devices/pdp11/machine/1170/test/ +machines: + - id: test1170 + type: pdp11 + debugger: true +--- + +{% include machine.html id="test1170" %} diff --git a/devices/pdp11/machine/1170/machine.xml b/devices/pdp11/machine/1170/test/debugger/machine.xml similarity index 77% rename from devices/pdp11/machine/1170/machine.xml rename to devices/pdp11/machine/1170/test/debugger/machine.xml index b8805f8d0..1663c4a2e 100644 --- a/devices/pdp11/machine/1170/machine.xml +++ b/devices/pdp11/machine/1170/test/debugger/machine.xml @@ -1,14 +1,14 @@ - PDP-11/70 Test Machine + PDP-11/70 Test Machine with Debugger - - + + diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index 95333a243..3e3b39bad 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -3,12 +3,11 @@ PDP-11/70 Test Machine - + - - + diff --git a/devices/pdp11/machine/1170/vt100/README.md b/devices/pdp11/machine/1170/vt100/README.md index a0a37749c..16ecf323e 100644 --- a/devices/pdp11/machine/1170/vt100/README.md +++ b/devices/pdp11/machine/1170/vt100/README.md @@ -5,8 +5,7 @@ permalink: /devices/pdp11/machine/1170/vt100/ machines: - id: test1170 type: pdp11 - debugger: true - config: /devices/pdp11/machine/1170/machine.xml + config: /devices/pdp11/machine/1170/vt100/machine.xml connection: dl11->vt100.serialPort - id: vt100 type: pc8080 @@ -14,9 +13,6 @@ machines: connection: serialPort->test1170.dl11 --- -PDP-11/70 with VT100 Terminal ------------------------------------------- - {% include machine.html id="test1170" %} {% include machine.html id="vt100" %} diff --git a/devices/pdp11/machine/1170/vt100/debugger/README.md b/devices/pdp11/machine/1170/vt100/debugger/README.md new file mode 100644 index 000000000..80af00db5 --- /dev/null +++ b/devices/pdp11/machine/1170/vt100/debugger/README.md @@ -0,0 +1,19 @@ +--- +layout: page +title: PDP-11/70 with VT100 Terminal and Debugger +permalink: /devices/pdp11/machine/1170/vt100/ +machines: + - id: test1170 + type: pdp11 + debugger: true + config: /devices/pdp11/machine/1170/vt100/debugger/machine.xml + connection: dl11->vt100.serialPort + - id: vt100 + type: pc8080 + config: /devices/pc8080/machine/vt100/machine.xml + connection: serialPort->test1170.dl11 +--- + +{% include machine.html id="test1170" %} + +{% include machine.html id="vt100" %} diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml new file mode 100644 index 000000000..32ff0bc71 --- /dev/null +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -0,0 +1,14 @@ + + + + PDP-11/70 with Front Panel + + + + + + + + + + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml new file mode 100644 index 000000000..ae389343f --- /dev/null +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -0,0 +1,13 @@ + + + + PDP-11/70 with Front Panel + + + + + + + + + diff --git a/devices/pdp11/panel/1170/led.xml b/devices/pdp11/panel/1170/debugger/leds.xml similarity index 100% rename from devices/pdp11/panel/1170/led.xml rename to devices/pdp11/panel/1170/debugger/leds.xml diff --git a/devices/pdp11/panel/1170/debugger/test.xml b/devices/pdp11/panel/1170/debugger/test.xml new file mode 100644 index 000000000..702346ccd --- /dev/null +++ b/devices/pdp11/panel/1170/debugger/test.xml @@ -0,0 +1,35 @@ + + + Control Panel + + + + + Enter + Clear + + + + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + 0000 + + 0 + 0 + 0 + 0 + + + + Run + Step + Reset + Fast + + diff --git a/devices/pdp11/panel/1170/leds.xml b/devices/pdp11/panel/1170/leds.xml new file mode 100644 index 000000000..23448ae9e --- /dev/null +++ b/devices/pdp11/panel/1170/leds.xml @@ -0,0 +1,96 @@ + + + Control Panel + + + ADDRESS + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + DATA + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + + + Run + Reset + Fast + + diff --git a/devices/pdp11/panel/1170/test.xml b/devices/pdp11/panel/1170/test.xml index 702346ccd..177f6c688 100644 --- a/devices/pdp11/panel/1170/test.xml +++ b/devices/pdp11/panel/1170/test.xml @@ -3,32 +3,9 @@ Control Panel - - - Enter - Clear - - - - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - - 0 - 0 - 0 - 0 - Run - Step Reset Fast diff --git a/modules/pdp11/README.md b/modules/pdp11/README.md index 363bbf838..ae7a7f3e3 100644 --- a/modules/pdp11/README.md +++ b/modules/pdp11/README.md @@ -13,6 +13,9 @@ PDPjs is our PDP-11 machine emulation module. The code is being adapted from the JavaScript [PDP 11/70 Emulator (v1.3)](http://skn.noip.me/pdp11/pdp11.html) written by [Paul Nankervis](mailto:paulnank@hotmail.com). +See the list of available [PDP-11 Machines](/devices/pdp11/machine/), which includes a +[PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) and [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/). + PDPjs is currently comprised of the following non-shared components, as listed in [package.json](../../package.json) (see the *pdp11Files* property): diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index aff9285a7..4c6226a49 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -216,7 +216,7 @@ BusPDP11.IOHANDLER = { * Those fallbacks may not always be appropriate; for example, byte writes to some device registers * must be zero-extended to update the entire word. For those cases, the fallback's "preliminary" read * is issued with a zero address so that the handler can distinguish a normal read from one of these - * preliminary reads, and return an appropriate value for the update (ie, zero). + * preliminary reads (aka read-before-write), and return an appropriate value for the update (eg, zero). * * If none of these fallback behaviors are appropriate, the device has a simple recourse: register * handlers for all possible addresses and sizes. @@ -543,10 +543,15 @@ BusPDP11.prototype.reset = function() */ BusPDP11.prototype.unknownAccess = function(addr, data, byteFlag) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { + /* + * TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits) + */ + this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr, 3) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); + this.cpu.setPC(this.cpu.getLastPC()); + this.cpu.stopCPU(); + } if (!this.nDisableTraps) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { - this.dbg.printMessage("warning: unrecognized I/O access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); - } this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); } return 0; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 8556cfbcc..24cfb1367 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1039,6 +1039,20 @@ PDP11.opDECB = function(opCode) /** * opDIV(opCode) * + * The instruction "DIV SRC,Rn" determines SRC using the DSTMODE portion of the opcode and Rn using + * the SRCMODE portion; Rn can only be a register (and it should be an EVEN-numbered register, lest you + * get unexpected results). The dividend (DST) is then calculated as: + * + * DST = (regs[Rn] << 16) | (regs[Rn|1]) + * + * DST is divided by SRC, and the quotient is stored in regs[Rn] and the remainder in regs[Rn|1]. + * + * For example: + * + * DIV R4,R0 + * + * where R4 = 006400 and R0,R1 = 000000,015000 will result in R0,R1 = 000002,000000. + * * @this {CPUStatePDP11} * @param {number} opCode */ diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 78a8a57b3..e107b62cc 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -534,6 +534,20 @@ CPUStatePDP11.prototype.getPC = function() return this.regsGen[PDP11.REG.PC]; }; +/** + * getLastPC() + * + * @this {CPUStatePDP11} + * @return {number} + */ +CPUStatePDP11.prototype.getLastPC = function() +{ + /* + * As long as we're always snapping the PC before every opcode, we might as well use it.... + */ + return this.regMMR2; +}; + /** * getPCWord() * diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 2b5c1da8b..3a591b6e4 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1152,7 +1152,7 @@ if (DEBUGGER) { DebuggerPDP11.prototype.message = function(sMessage, fAddress) { if (fAddress) { - sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getPC())); + sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getLastPC())); } if (this.bitsMessage & MessagesPDP11.BUFFER) { diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 4ec828132..8f14d388d 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -421,11 +421,12 @@ var PDP11 = { LKS: 0o177546, // KW11-L Clock Status - RCSR: 0o177560, // Console Terminal: Receiver Status Register - RBUF: 0o177562, // Console Terminal: Receiver Data Buffer Register - XCSR: 0o177564, // Console Terminal: Transmitter Status Register - XBUF: 0o177566, // Console Terminal: Transmitter Data Buffer Register - DISPLAY: 0o177570, // Console Switch and Display + RCSR: 0o177560, // Display Terminal: Receiver Status Register + RBUF: 0o177562, // Display Terminal: Receiver Data Buffer Register + XCSR: 0o177564, // Display Terminal: Transmitter Status Register + XBUF: 0o177566, // Display Terminal: Transmitter Data Buffer Register + + CNSL: 0o177570, // Console Switch and Front Panel Display MMR0: 0o177572, // 777572 17777572 MMR1: 0o177574, // 777574 17777574 diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index bc8a5e0d7..4de377a71 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -46,10 +46,10 @@ if (NODE) { * * The Device component implements the following "default" devices: * - * KW11 - * DISPLAY Registers - * MMU Registers - * CPU Registers (eg, PSW) + * KW11 (KW11-L Line Time Clock) + * CNSL (Console Switch and Front Panel Display) + * + * as well providing access to all the MMU and CPU registers, PSW, etc. * * @constructor * @extends Component @@ -59,14 +59,14 @@ function DevicePDP11(parmsDevice) { Component.call(this, "Device", parmsDevice, DevicePDP11, MessagesPDP11.DEVICE); - this.display = { + this.console = { // CNSL registers data: 0, address: 0, misc: 0x14, switches: 0 }; - this.kw11 = { + this.kw11 = { // LW11 registers csr: 0, timer: -1 // initBus() will initialize this timer ID }; @@ -167,6 +167,33 @@ DevicePDP11.prototype.writeLKS = function(data, addr) this.kw11.lks = data & ~PDP11.KW11.LKS.MON; }; +/** + * readCNSL(addr) + * + * If addr is set, then this a normal read, so we should return normal results (ie, switches); + * if addr is NOT set, then this is a read-before-write, so we must return the value being updated (ie, data). + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.CNSL or 177570) + * @return {number} + */ +DevicePDP11.prototype.readCNSL = function(addr) +{ + return (addr? this.console.switches : this.console.data) & 0xffff; +}; + +/** + * writeCNSL(data, addr) + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.CNSL or 177570) + */ +DevicePDP11.prototype.writeCNSL = function(data, addr) +{ + this.console.data = data; +}; + /** * readMMR0(addr) * @@ -189,7 +216,7 @@ DevicePDP11.prototype.readMMR0 = function(addr) DevicePDP11.prototype.writeMMR0 = function(data, addr) { this.cpu.setMMR0(data); - this.updateDisplayMode(); + this.updateConsoleMode(); }; /** @@ -250,21 +277,21 @@ DevicePDP11.prototype.readMMR3 = function(addr) DevicePDP11.prototype.writeMMR3 = function(data, addr) { this.cpu.setMMR3(data); - this.updateDisplayMode(); + this.updateConsoleMode(); }; /** - * updateDisplayMode() + * updateConsoleMode() * * @this {DevicePDP11} */ -DevicePDP11.prototype.updateDisplayMode = function() +DevicePDP11.prototype.updateConsoleMode = function() { /* * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) */ var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; - this.display.misc = (this.display.misc & ~7) | bit; + this.console.misc = (this.console.misc & ~7) | bit; }; /** @@ -1024,7 +1051,7 @@ DevicePDP11.prototype.kw11_interrupt = function() */ DevicePDP11.prototype.reset = function() { - this.display.misc = (this.display.misc & ~0x77) | 0x14; // kernel 16 bit + this.console.misc = (this.console.misc & ~0x77) | 0x14; // kernel 16 bit this.kw11.lks = 0; }; @@ -1042,6 +1069,7 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR"], [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3"], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], + [PDP11.UNIBUS.CNSL]: /* 177570 */ [null, null, DevicePDP11.prototype.readCNSL, DevicePDP11.prototype.writeCNSL, "CNSL"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1"], [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2"], diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index bddd5a75b..13c4c9cc9 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -262,7 +262,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerReceiveInterrupt = this.cpu.addTrigger(PDP11.DL11.RVEC, PDP11.DL11.PRI); - this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() { + this.timerReceiveInterrupt = this.cpu.addTimer(function() { if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) { if (serial.abReceive.length) { serial.rbuf = serial.abReceive.shift(); @@ -276,7 +276,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerTransmitInterrupt = this.cpu.addTrigger(PDP11.DL11.XVEC, PDP11.DL11.PRI); - this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() { + this.timerTransmitInterrupt = this.cpu.addTimer(function readyransmitter() { serial.xcsr |= PDP11.DL11.XCSR.READY; if (serial.xcsr & PDP11.DL11.XCSR.TIE) { serial.cpu.setTrigger(serial.triggerTransmitInterrupt); diff --git a/modules/shared/lib/strlib.js b/modules/shared/lib/strlib.js index e0ea069ce..b69f25869 100644 --- a/modules/shared/lib/strlib.js +++ b/modules/shared/lib/strlib.js @@ -218,7 +218,7 @@ str.toOct = function(n, cch, fPrefix) if (cch) { if (cch > 11) cch = 11; } else { - cch = (n & ~0xffff)? 11 : 6; + cch = (n & ~0xffff)? 11 : 6; // TODO: For our 22-bit machines, we really don't need more than 8 digits max } /* * An initial "falsey" check for null takes care of both null and undefined; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 49fa0342e..e0511dc25 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -682,7 +682,7 @@ as to their contents. */ var h; -function ba(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; @@ -693,131 +693,131 @@ function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window. function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Db=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Eb:!1,ha:!1,error:!1};this.vb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ub=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ua=this.id:(this.Eb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Fb:!1,ha:!1,error:!1};this.wb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Z&&(this.Z=10);15>2;this.A=this.wa-1;this.D=this.I/this.wa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Hb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Lb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.Z;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.rb+=m.w-f,m.w=f,!0;if(f>=m.w+m.rb){q=m.size-(f-p);q>g&&(q=g);m.rb=f-m.w+q;f=p+a.wa;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.wa,d,e);Jb(f,a.i,m);a.W[l++]=f;f=p+a.wa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Z;0>>=a.Z;0>>this.Z].zb(a&this.A,a)};h.xb=function(a){this.C++;a=this.W[(a&this.f)>>>this.Z].Hb(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.Z].qa(a&this.A,a)}; -h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.Z;this.C++;a=this.W[c].Ib(b,a);this.C--;return a};h.Ab=function(a,b){this.W[(a&this.f)>>>this.Z].Cb(a&this.A,b&255,a)};h.pb=function(a,b){this.C++;this.W[(a&this.f)>>>this.Z].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.Z].sb(a&this.A,b&65535,a)};h.Bb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.Z;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; +function Eb(a,b,c){r.call(this,"Bus",a,Eb,64);this.b=b;this.j=c;this.H=a.busWidth||16;this.i=0;this.M=[];this.G=null;this.I=Math.pow(2,this.H);this.f=this.I-1|0;this.Z=(this.H>>1)+2;10>this.Z&&(this.Z=10);15>2;this.A=this.wa-1;this.D=this.I/this.wa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Hb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Lb(a,b){if(b!=a.i){var c;a.i&&(c=(1<>>a.Z;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.sb+=m.w-f,m.w=f,!0;if(f>=m.w+m.sb){q=m.size-(f-p);q>g&&(q=g);m.sb=f-m.w+q;f=p+a.wa;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.wa,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.wa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} +function Nb(a,b,c){var d=[];for(b>>>=a.Z;0>>=a.Z;0>>this.Z].Ab(a&this.A,a)};h.yb=function(a){this.C++;a=this.W[(a&this.f)>>>this.Z].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.Z].qa(a&this.A,a)}; +h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.Z;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Bb=function(a,b){this.W[(a&this.f)>>>this.Z].Db(a&this.A,b&255,a)};h.qb=function(a,b){this.C++;this.W[(a&this.f)>>>this.Z].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.Z].tb(a&this.A,b&65535,a)};h.Cb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.Z;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; function Sb(a){for(var b=0,c=[],d=0;da.b.Gb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} -function Wb(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.aa(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Id:0,yb:20,Ld:0};this.f={Jd:0,Nb:-1}}y(K);h=K.prototype; -h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Nb=Xb(c,function(){e.f.Ia|=128;e.f.Ia&64&&(fc(e.b,e.f.ad),gc(e.b,e.f.Nb,1E3/60))});this.f.ad=hc(64,6);Ub(b,this,L);Vb(b,this.reset.bind(this));G(this)};h.zc=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.jd=function(a){this.f.Ia=a;a&64&&gc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.Bc=function(){var a=this.b;return a.G&62337|a.ta<<5|a.ua<<1}; -h.ld=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ta=a>>5&3;b.ua=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,ic(b))}jc(this)};h.Cc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Dc=function(){return this.b.Kb};h.Ec=function(){return this.b.Ma};h.md=function(a){var b=this.b;1170>b.Gb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.va=3915776):(b.Wa=262143,b.va=253952),ic(b));jc(this)};function jc(a){a.j.yb=a.j.yb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)} -h.Qc=function(a){return this.b.P[1][a>>1&7]};h.yd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Oc=function(a){return this.b.P[1][(a>>1&7)+8]};h.wd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Pc=function(a){return this.b.pa[1][a>>1&7]};h.xd=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Nc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.vd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.yc=function(a){return this.b.P[0][a>>1&7]}; -h.hd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.wc=function(a){return this.b.P[0][(a>>1&7)+8]};h.fd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.xc=function(a){return this.b.pa[0][a>>1&7]};h.gd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.vc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.ed=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Wc=function(a){return this.b.P[3][a>>1&7]};h.Ed=function(a,b){this.b.P[3][b>>1&7]=a&65295}; -h.Uc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Cd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Vc=function(a){return this.b.pa[3][a>>1&7]};h.Dd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Tc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Bd=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a}; -h.Hc=function(){return this.b.L&49152?this.b.sa[0]:this.b.u[6]};h.pd=function(a){this.b.L&49152?this.b.sa[0]=a:this.b.u[6]=a};h.Kc=function(){return this.b.u[7]};h.sd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Ic=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[1]};h.qd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[1]=a}; -h.Jc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[3]};h.rd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[3]=a};h.uc=function(a){return this.b.cc[a-65504>>1]};h.dd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Sc=function(){return 1};h.Ad=function(){};h.tc=function(){return this.b.$};h.cd=function(){this.b.$=0};h.Ac=function(){return this.b.bc};h.kd=function(a,b){b&1||(a&=255);this.b.bc=a}; -h.Fc=function(a){return a?this.b.Lb:0};h.nd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Rc=function(a){return a?this.b.Na&65280:0};h.zd=function(a){this.b.Na=a|255};h.Gc=function(){return Db(this.b)};h.od=function(a){kc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.j.yb=this.j.yb&-120|20;this.f.Ia=0}; -var M={},L=(M[62592]=[null,null,K.prototype.Qc,K.prototype.yd,"SISDR"],M[62608]=[null,null,K.prototype.Oc,K.prototype.wd,"SDSDR"],M[62624]=[null,null,K.prototype.Pc,K.prototype.xd,"SISAR"],M[62640]=[null,null,K.prototype.Nc,K.prototype.vd,"SDSAR"],M[62656]=[null,null,K.prototype.yc,K.prototype.hd,"KISDR"],M[62672]=[null,null,K.prototype.wc,K.prototype.fd,"KDSDR"],M[62688]=[null,null,K.prototype.xc,K.prototype.gd,"KISAR"],M[62704]=[null,null,K.prototype.vc,K.prototype.ed,"KDSAR"],M[62798]=[null,null, -K.prototype.Ec,K.prototype.md,"MMR3"],M[65382]=[null,null,K.prototype.zc,K.prototype.jd,"LKS"],M[65402]=[null,null,K.prototype.Bc,K.prototype.ld,"MMR0"],M[65404]=[null,null,K.prototype.Cc,K.prototype.ec,"MMR1"],M[65406]=[null,null,K.prototype.Dc,K.prototype.ec,"MMR2"],M[65408]=[null,null,K.prototype.Wc,K.prototype.Ed,"UISDR"],M[65424]=[null,null,K.prototype.Uc,K.prototype.Cd,"UDSDR"],M[65440]=[null,null,K.prototype.Vc,K.prototype.Dd,"UISAR"],M[65456]=[null,null,K.prototype.Tc,K.prototype.Bd,"UDSAR"], -M[65472]=[null,null,K.prototype.ab,K.prototype.fb,"R0SET0"],M[65473]=[null,null,K.prototype.ab,K.prototype.fb,"R1SET0"],M[65474]=[null,null,K.prototype.ab,K.prototype.fb,"R2SET0"],M[65475]=[null,null,K.prototype.ab,K.prototype.fb,"R3SET0"],M[65476]=[null,null,K.prototype.ab,K.prototype.fb,"R4SET0"],M[65477]=[null,null,K.prototype.ab,K.prototype.fb,"R5SET0"],M[65478]=[null,null,K.prototype.Hc,K.prototype.pd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Kc,K.prototype.sd,"R7KERNEL"],M[65480]=[null,null, -K.prototype.bb,K.prototype.gb,"R0SET1"],M[65481]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET1"],M[65482]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET1"],M[65483]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET1"],M[65484]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET1"],M[65485]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET1"],M[65486]=[null,null,K.prototype.Ic,K.prototype.qd,"R6SUPER"],M[65487]=[null,null,K.prototype.Jc,K.prototype.rd,"R6USER"],M[65504]=[null,null,K.prototype.uc,K.prototype.dd, -"CTRL",1170],M[65520]=[null,null,K.prototype.$b,K.prototype.fc,"LSIZE",1170],M[65522]=[null,null,K.prototype.$b,K.prototype.fc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Sc,K.prototype.Ad,"SYSID",1170],M[65526]=[null,null,K.prototype.tc,K.prototype.cd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Ac,K.prototype.kd,"MB",1170],M[65530]=[null,null,K.prototype.Fc,K.prototype.nd,"PIR"],M[65532]=[null,null,K.prototype.Rc,K.prototype.zd,"SL"],M[65534]=[null,null,K.prototype.Gc,K.prototype.od,"PSW"], -M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640]; -L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704]; -L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456]; -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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;aa.b.Hb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} +function Wb(a,b){a.C||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.aa(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.i={data:0,Ld:0,zb:20,bd:0};this.f={Md:0,Nb:-1}}y(L);h=L.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;var e=this;this.f.Nb=Xb(c,function(){e.f.Ia|=128;e.f.Ia&64&&(fc(e.b,e.f.cd),gc(e.b,e.f.Nb,1E3/60))});this.f.cd=hc(64,6);Ub(b,this,M);Vb(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&gc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.i.bd:this.i.data)&65535};h.ed=function(a){this.i.data=a}; +h.Cc=function(){var a=this.b;return a.G&62337|a.ta<<5|a.ua<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ta=a>>5&3;b.ua=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,ic(b))}jc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.pb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.Hb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.va=3915776):(b.Wa=262143,b.va=253952),ic(b));jc(this)}; +function jc(a){a.i.zb=a.i.zb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; +h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.pa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.wc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]}; +h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; +h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.sa[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.sa[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[1]}; +h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.$};h.fd=function(){this.b.$=0};h.Bc=function(){return this.b.bc}; +h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Lb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Db(this.b)};h.rd=function(a){kc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.zb=this.i.zb&-120|20;this.f.Ia=0}; +var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR"],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR"],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR"],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR"],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR"],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR"],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR"],N[62704]=[null,null,L.prototype.wc,L.prototype.hd,"KDSAR"],N[62798]=[null,null, +L.prototype.Fc,L.prototype.pd,"MMR3"],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0"],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1"],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2"],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR"],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR"],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR"], +N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR"],N[65472]=[null,null,L.prototype.ab,L.prototype.fb,"R0SET0"],N[65473]=[null,null,L.prototype.ab,L.prototype.fb,"R1SET0"],N[65474]=[null,null,L.prototype.ab,L.prototype.fb,"R2SET0"],N[65475]=[null,null,L.prototype.ab,L.prototype.fb,"R3SET0"],N[65476]=[null,null,L.prototype.ab,L.prototype.fb,"R4SET0"],N[65477]=[null,null,L.prototype.ab,L.prototype.fb,"R5SET0"],N[65478]=[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null, +L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET1"],N[65481]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET1"],N[65482]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET1"],N[65483]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET1"],N[65484]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET1"],N[65485]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET1"],N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER"],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud, +"R6USER"],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd,"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"], +N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624];M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640]; +M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688];M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704]; +M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440];M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456]; +M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&Wb(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;yc(c,this.w+a,1,c.M)&&c.ga(!0)}return this.Hb(a,b)},da:function(a,b){if(this.i&&null!=this.w){var c=this.i;yc(c,this.w+a,2,c.M)&&c.ga(!0)}return this.Ib(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;yc(d,this.w+a, -1,d.D)&&d.ga(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},va:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;yc(d,this.w+a,2,d.D)&&d.ga(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ca:function(a,b){a&1&&Wb(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&Wb(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ -J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},ua:function(a,b,c){a&1&&Wb(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&Wb(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; -function Jb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&xc(a,wc,!1),(a.B=c.B)&&vc(a,wc,!1))}function zc(a,b){b?--a.B||(a.Cb=a.f?a.J:a.Ob,a.sb=a.f?a.H:a.Pb):--a.j||(a.zb=a.Hb,a.qa=a.Ib)}function vc(a,b,c){c&&a.B||(a.Cb=!a.f&&b[1]||a.J,a.sb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function xc(a,b,c){c&&a.j||(a.zb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Hb=b[0]||a.K,a.Ib=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} -var Ac=[],uc=[I.prototype.V,I.prototype.ta,I.prototype.ja,I.prototype.xa],wc=[I.prototype.T,I.prototype.ma,I.prototype.da,I.prototype.va];if(lb)var tc=[I.prototype.R,I.prototype.la,I.prototype.ca,I.prototype.ua],sc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; -function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ea=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.mb=this.ja=0;this.nb=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.$c.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; -h.Da=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Ic(a)&&(a.Ya=a.Za=-1,Fc(a),a.ga(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.mb))}} -h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.qb()}Kc(a,a.T);a.T=0;a.R=ra();a.ca=0;Lc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function gc(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Fa*a.Ka/1E3,a.K[b][0]=c+Mc(a))} +I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(lb)for(a=Array(this.size>>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&Wb(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;yc(c,this.w+a,1,c.M)&&c.fa(!0)}return this.Ib(a,b)},da:function(a,b){if(this.j&&null!=this.w){var c=this.j;yc(c,this.w+a,2,c.M)&&c.fa(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;yc(d,this.w+a, +1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},va:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;yc(d,this.w+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Wb(this.A,b);return this.G.getUint16(a,!0)},ga:function(a,b){a&1&&Wb(this.A,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b,c){a&1&&Wb(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&Wb(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.B=c.B)&&vc(a,wc,!1))}function zc(a,b){b?--a.B||(a.Db=a.f?a.J:a.Ob,a.tb=a.f?a.H:a.Pb):--a.i||(a.Ab=a.Ib,a.qa=a.Jb)}function vc(a,b,c){c&&a.B||(a.Db=!a.f&&b[1]||a.J,a.tb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.Ab=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} +var Ac=[],uc=[I.prototype.V,I.prototype.ta,I.prototype.ja,I.prototype.xa],wc=[I.prototype.T,I.prototype.ma,I.prototype.da,I.prototype.va];if(lb)var tc=[I.prototype.R,I.prototype.la,I.prototype.ca,I.prototype.ua],sc=[I.prototype.U,I.prototype.oa,I.prototype.ga,I.prototype.Ua]; +function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ea=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.mb=this.ja=0;this.nb=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; +h.Da=function(a,b,c,d){this.B=a;this.A=b;this.j=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Ic(a)&&(a.Ya=a.Za=-1,Fc(a),a.fa(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.mb))}} +h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.rb()}Kc(a,a.T);a.T=0;a.R=ra();a.ca=0;Lc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function gc(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Fa*a.Ka/1E3,a.K[b][0]=c+Mc(a))} function Nc(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 Oc(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 Mc(a,b){var c=a.da-=a.b;a.b=0;b&&(a.da=0);return c} -h.$c=function(){if(this.v.ea){this.jb>=this.Fa&&Lc(this,!0);this.oa=0;this.xa=ra();if(this.ca){var a=this.xa-this.ca;a>this.ub&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Nc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Mc(this,!0);this.oa+=b;this.T+=b;Hc(this,b);Oc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.wb&&(this.B&&this.B.ba(),this.wb=0);break}}while(this.v.ea)}catch(e){this.ga();this.B&&this.B.stop(ra(),Ic(this));kb(this, -e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.Yb;this.ca=ra();var c=this.ub;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ca-this.xa),d=this.ca-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Jc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ca+=c;a(b,c)}}}; -h.cb=function(a){if(jb(this))return!1;if(this.v.ea)return this.g(this.toString()+" busy"),!1;Jc(this);this.v.ea=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.qb(!0),this.B.start(this.R,Ic(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.ga=function(a){if(this.v.ea){Mc(this);Kc(this,this.T);this.T=0;this.v.ea=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Ic(this))}this.v.complete=a}; -function Pc(a){this.Gb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.decode=Qc.bind(this);jd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}y(Pc,Bc);h=Pc.prototype;h.reset=function(){this.v.ea&&this.ga();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; +h.ad=function(){if(this.v.ea){this.jb>=this.Fa&&Lc(this,!0);this.oa=0;this.xa=ra();if(this.ca){var a=this.xa-this.ca;a>this.vb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Nc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Mc(this,!0);this.oa+=b;this.T+=b;Hc(this,b);Oc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.xb&&(this.B&&this.B.ba(),this.xb=0);break}}while(this.v.ea)}catch(e){this.fa();this.B&&this.B.stop(ra(),Ic(this));kb(this, +e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.Yb;this.ca=ra();var c=this.vb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ca-this.xa),d=this.ca-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ga=0,Jc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ca+=c;a(b,c)}}}; +h.cb=function(a){if(jb(this))return!1;if(this.v.ea)return this.g(this.toString()+" busy"),!1;Jc(this);this.v.ea=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,Ic(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.fa=function(a){if(this.v.ea){Mc(this);Kc(this,this.T);this.T=0;this.v.ea=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Ic(this))}this.v.complete=a}; +function Pc(a){this.Hb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.decode=Qc.bind(this);jd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}y(Pc,Bc);h=Pc.prototype;h.reset=function(){this.v.ea&&this.fa();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; function jd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.sa=[0,0,0,0];a.D=0;a.ua=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;kd(a)}function kd(a){a.Na=255;a.$=0;a.Lb=0;a.G=0;a.La=0;a.Kb=0;a.Ma=0;a.Ja=0;a.ta=0;a.Wa=262143;a.va=253952;a.F|=2;a.A&&ic(a)}function ic(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Xc,a.sb=a.Fd,Lb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.sb=a.gc,Lb(a.A,16))}h.Vb=function(){return 0}; -h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,Sb(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Jc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.sa[c]=a.u[6],a.u[6]=a.sa[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function pd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function qd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.aa=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.Kb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);kc(this,e&-12289|this.ma>>2&12288);c&&(this.$|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.F&=-17} +h.aa=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.pb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);kc(this,e&-12289|this.ma>>2&12288);c&&(this.$|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);K(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);K(a,b);kc(a,c);a.F&=-17} function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.$|=32,a.aa(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ta=a.D,a.ua=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ta<<5|a.ua<<1),a.aa(168,16)),a.G&61440||!(4191360>f||4194239>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.D][d]=e;if(4194170!==f||a.D)a.ta=a.D,a.ua=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ta<<5|a.ua<<1),a.aa(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; -a.b-=8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.$|=4,a.u[6]=4,a.aa(4,24)):(a.$|=8,a.F|=64));return e}h.xb=function(a){if(!this.Ja)return this.A.xb(a);this.C++;a=xd(this,wd(this,a,3));this.C--;return a}; -h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(wd(this,a,2));this.C--;return a};h.pb=function(a,b){this.Ja?(this.C++,yd(this,wd(this,a,5),b),this.C--):this.A.pb(a,b)};h.Bb=function(a,b){this.Ja?(this.C++,this.gc(wd(this,a,4),b),this.C--):this.A.Bb(a,b)};h.mc=function(a,b,c){return zd(this,a,b,c)};h.nc=function(a,b,c){return wd(this,zd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Xc=function(a){return this.A.ka(wd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; -h.Fd=function(a,b){this.A.Sa(wd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.sa[a.L>>12&3];return c}function Bd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.sa[a.L>>12&3]=d} -function Cd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Dd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Gd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),yd(a,e,d.call(a,c,xd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?yd(a,a.Y(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 Id(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} -function S(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Jd(this.i),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.da=this.b=a;do{if(b){if(Kd(this.i,this.u[7],c)){this.ga();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.aa(168,28):this.F&64?this.aa(4,30):this.F&16&&this.aa(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.bd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.aa(d,26),e=!0):e=!1; -if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.Kb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.$|=4,a.u[6]=4,a.aa(4,24)):(a.$|=8,a.F|=64));return e}h.yb=function(a){if(!this.Ja)return this.A.yb(a);this.C++;a=xd(this,wd(this,a,3));this.C--;return a}; +h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(wd(this,a,2));this.C--;return a};h.qb=function(a,b){this.Ja?(this.C++,yd(this,wd(this,a,5),b),this.C--):this.A.qb(a,b)};h.Cb=function(a,b){this.Ja?(this.C++,this.gc(wd(this,a,4),b),this.C--):this.A.Cb(a,b)};h.mc=function(a,b,c){return zd(this,a,b,c)};h.nc=function(a,b,c){return wd(this,zd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(wd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; +h.Id=function(a,b){this.A.Sa(wd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.sa[a.L>>12&3];return c}function Bd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.sa[a.L>>12&3]=d} +function Cd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Dd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),yd(a,e,d.call(a,c,xd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?yd(a,a.Y(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 Id(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +function S(a,b,c){c&&(K(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.j&&Jd(this.j),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.da=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.aa(168,28):this.F&64?this.aa(4,30):this.F&16&&this.aa(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.aa(d,26),e=!0):e=!1; +if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.pb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(od(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a}function Ud(a,b){a|=b;P(this,a<<8);return a} function Vd(a,b){a=~b|65536;pd(this,a);return a&65535}function Wd(a,b){a=~b|256;pd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} function ae(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;rd(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;rd(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;rd(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255}function ge(a,b){var c=b-a;sd(this,c,a,b);return c&65535} function he(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} -function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} -function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;od(this,Ed(this,a));this.b=b-ne[this.j]} -var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-pe[this.j]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){R(this,a,0,ie);this.b-=this.j?9:3+(7==this.f?2:0)}function xe(a){R(this,a,Dd(this,a),je);this.b-=this.j?9:3+(7==this.f?2:0)}function W(){this.aa(8,6)}function Qc(a){ye[a>>12].call(this,a)} -var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);sd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.j? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],ze= -[function(a){Ve[a>>4&15].call(this,a)},function(a){S(this,a,!0)},function(a){S(this,a,!md(this))},function(a){S(this,a,md(this))},function(a){S(this,a,!this.Ca()==!ld(this))},function(a){S(this,a,!this.Ca()!=!ld(this))},function(a){S(this,a,!md(this)&&!this.Ca()==!ld(this))},function(a){S(this,a,md(this)||!this.Ca()!=!ld(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){pd(this, -Id(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.j?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Ld);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);pd(this,a);this.b-=this.j?4:3+(7==this.f? -2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.j?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a, -0,b);P(this,b);this.b=c-se[this.j]},function(a){P(this,Id(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.aa(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.aa(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.$|=128,this.aa(4, -3)):this.ga();this.b-=7},function(){this.F&4||this.B.ba();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.aa(12,1);this.b-=5},function(){this.aa(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.A.reset());this.b-=667},function(){ud(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],bf= -[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,xe,xe,W,W,W,W,ve,ve],Ue=[function(a){S(this,a,!this.Ca())},function(a){S(this,a,this.Ca())},function(a){S(this,a,!O(this)&&!md(this))},function(a){S(this,a,O(this)||md(this))},function(a){S(this,a,!ld(this))},function(a){S(this,a,ld(this))},function(a){S(this,a,!O(this))},function(a){S(this,a,O(this))},function(){this.aa(24, -2);this.b-=25},function(){this.aa(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){pd(this,Hd(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.j?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= -this.j?11:6},function(a){Q(this,a,O(this)?1:0,Md);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,O(this)?1:0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);pd(this,a<<8);this.b-=this.j?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.j?9:3+(7== -this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.j]},W];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;jf(this)};gf.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Rb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Kd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};gf.prototype.za=function(){return!0}; -function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Db,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ua)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Db+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.za=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Jb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;gc(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.Mc,Y.prototype.ud,"RCSR"],pf[65394]=[null,null,Y.prototype.Lc,Y.prototype.td,"RBUF"],pf[65396]=[null,null,Y.prototype.Zc,Y.prototype.Hd,"XCSR"],pf[65398]=[null,null,Y.prototype.Yc,Y.prototype.Gd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Wb=function(){return-1};qf.prototype.Xb=function(){}; -function sf(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(oa(b.substring(c,f))),c=f+1}}return a} +function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} +function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;K(this,Ed(this,a));this.b=b-ne[this.i]} +var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];K(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)K(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){R(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){R(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function W(){this.aa(8,6)}function Qc(a){ye[a>>12].call(this,a)} +var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? +2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? +4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],ze= +[function(a){Ve[a>>4&15].call(this,a)},function(a){S(this,a,!0)},function(a){S(this,a,!nd(this))},function(a){S(this,a,nd(this))},function(a){S(this,a,!this.Ca()==!md(this))},function(a){S(this,a,!this.Ca()!=!md(this))},function(a){S(this,a,!nd(this)&&!this.Ca()==!md(this))},function(a){S(this,a,nd(this)||!this.Ca()!=!md(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){pd(this, +Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.i?11:6},function(a){R(this,a,ld(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? +2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);K(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a, +0,b);P(this,b);this.b=c-se[this.i]},function(a){P(this,Id(this,a,this.Ca?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.aa(8,6);else{var b=vd(this);a&=7;K(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.aa(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.$|=128,this.aa(4, +3)):this.fa();this.b-=7},function(){this.F&4||this.B.ba();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.aa(12,1);this.b-=5},function(){this.aa(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.A.reset());this.b-=667},function(){ud(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],bf= +[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,xe,xe,W,W,W,W,ve,ve],Ue=[function(a){S(this,a,!this.Ca())},function(a){S(this,a,this.Ca())},function(a){S(this,a,!ld(this)&&!nd(this))},function(a){S(this,a,ld(this)||nd(this))},function(a){S(this,a,!md(this))},function(a){S(this,a,md(this))},function(a){S(this,a,!ld(this))},function(a){S(this,a,ld(this))},function(){this.aa(24, +2);this.b-=25},function(){this.aa(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){pd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= +this.i?11:6},function(a){Q(this,a,ld(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.i?9:3+(7== +this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.i]},W];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); +gf.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;jf(this)};gf.prototype.Aa=function(){if(this.Ba){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Rb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};gf.prototype.za=function(){return!0}; +function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Eb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ua)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Eb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.za=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;gc(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],pf[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],pf[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],pf[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Wb=function(){return-1};qf.prototype.Xb=function(){}; +function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} function tf(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ca[b]);var c=0;for(b in a.ca)xf(a,b,a.ca[b]),c++;return 0>>d.A.Z;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<>>d.A.Z;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;dd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.sa[a-16]:20==a&&(b=Db(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.u[7]).w));this.ia&1073741824?this.ta.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.ga(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Mc(a),a.la=0,a.B.ba()))}; -function Bf(a){var b;if(Jd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Z],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Z],!0);a.D=["bw"];a.Ta=0} +h.save=function(){var a=new O(this);a.set(0,Jf(this.K));a.set(1,Jf(this.T));a.set(2,[this.i,this.U,this.ia]);a.set(3,this.G);return a.data()};h.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Kf(a[b++]),this.T=Kf(a[b++]),this.i=a[b][0],"string"==typeof this.i&&(this.i=[this.i]),this.U=a[b][1],this.ia|=a[b][2]);a[3]&&(this.G=a[3]);return!0};h.start=function(a,b){this.V||this.g("running");this.v.ea=!0;this.jb=a;this.vb=b}; +h.stop=function(a,b){if(this.v.ea){this.v.ea=!1;this.H=b-this.vb;if(!this.V){b="stopped";if(this.H){a-=this.jb;var c=0>>d.Z],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Z],!0);a.D=["bw"];a.Ta=0} h.Pa=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.Z].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.Z],b==a.D));l.ya||Bf(a);break}}return f} function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.w-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ ")+":(D=v.ka(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ka(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ka(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.w&65535)]);break;case 56:D=v.ka(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.w&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.sa[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.ba();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=Z(d.u[7]),Pf(a,J(a,a.K.w)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.ba();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=Z(d.u[7]),Pf(a,J(a,a.K.w)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(ib(a)&&0q||"z"ha.length&&(a.g("note: only "+ha.length+" available"),X=ha.length);aa-=X;0>aa&&(null==ha[ha.length-1].w?(X=aa+X,aa=0):aa+=ha.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(X+" instructions earlier:");0=ha.length&&(aa=0);a.Va=X;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Va=void 0)}else{var pb=Hf(a,ga);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ga+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Oa=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.kb,Zc=a.Ab):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ka,Zc=a.Sa):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< -g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.w)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Pa(a.f,bd,!0)}a.cb(!0,c)}break;case "h":a.v.ea?(c||a.g("halting"),a.ga()):hb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var cd; +a.g("dump extension commands:\n\t"+Ra)}else if("state"==ga){var Ae=eg(a.B,!0);"console"==za?console.log(Ae):(a.Qa&&(a.Qa.value=""),a.g(Ae))}else if("symbols"==ga)for(var Sc=0;Scha.length&&(a.g("note: only "+ha.length+" available"),X=ha.length);ba-=X;0>ba&&(null==ha[ha.length-1].w?(X=ba+X,ba=0):ba+=ha.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(X+" instructions earlier:");0=ha.length&&(ba=0);a.Va=X;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Va=void 0)}else{var pb=Hf(a,ga);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ga+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Oa=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.kb,Zc=a.Bb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ka,Zc=a.Sa):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< +g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.w)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Pa(a.f,bd,!0)}a.cb(!0,c)}break;case "h":a.v.ea?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var cd; var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=Z(),vb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.w));10>dd;){for(var Aa=null,Cg=256;65536>vb.w>>>0;){ed.w=a.ka(vb,2);if(null==vb.w||!Cg--)break;if(!(ed.w&1)){for(var Dg=a,dc=ed,Me=null,wb=dc.w,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2< fd){dc.w=wb;var ec=Vf(Dg,dc);if(0<=ec.indexOf("JSR")){var Oe=ec.indexOf(" ");if(wb+(ec.indexOf(" ",Oe+1)-Oe-1)/2==Ne){Me=ec;break}}}wb-=2}dc.w=Ne;if(Aa=Me)break}}if(!Aa||null==Aa)break;var Pe=null;if("ks"==Bg){var Qe=Aa.match(/[0-9A-F]+$/);Qe&&(Pe=bg(a,Qe[0]))}Aa=na(Aa,50)+" ;"+(Pe||"stack="+J(a,vb.w));a.g(Aa);dd++}dd||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){bg(a,g[1],!0);break}f=!0;break;case "m":a:{var ia,ja=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var sa=0;if("all"== F)sa=1878917119,F=null;else if("on"==F)ja=!0,F=null;else if("off"==F)ja=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ia in H)if(F==ia){sa=H[ia];ja=!!(a.ia&sa);break}if(!sa){a.g("unknown message category: "+F);break a}}if(sa)if("on"==g[2])a.ia|=sa,ja=!0;else if("off"==g[2]&&(a.ia&=~sa,ja=!1,1073741824==sa)){for(var gd=0;gd\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.j=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fhg){if(jg(d,this.I)){this.D=new O(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.hb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function og(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.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ga(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;ma[1];a=a[2];this.ga=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.hb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function og(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} +function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.fa(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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"), diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 362af0325..ceecceec5 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -683,53 +683,53 @@ */ var g; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function m(a,b,c,d){var e=0,f=null,h=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)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function m(a,b,c,d){var e=0,f=null,k=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)}),k;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),k=[f,e]);return k}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} function p(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} function wa(a){if(ua)try{for(var b=0;bb?this.Ea=this.id:(this.Ta=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Vc:!1,Wc:!1,L:!1,error:!1};this.Na=null;this.h.error=!1;this.v={};this.H=null;w.push(this)}var za=void 0,Aa={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.hb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ea=this.id:(this.Ta=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Na=null;this.h.error=!1;this.v={};this.H=null;w.push(this)}var za=void 0,Aa={}; if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=k(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.w=this.B/this.l|0;this.ha=[];this.R=0;this.o=[];this.vb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.H);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} function Ra(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>h&&(t=h);n.Pa=f-n.za+t;f=q+a.l;h-=t;l++;continue}}return $a(1,f,h)}f=new G(a,f,t,a.l,d,e);Ta(f,a.H,n);a.b[l++]=f;f=q+a.l;h-=t}return 0>=h?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+k(b,8,!0)),!0):$a(2,b,c)} +function Ya(a,b,c,d,e){for(var f=b,k=c,l=f>>>a.c;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>k&&(t=k);n.Pa=f-n.za+t;f=q+a.l;k-=t;l++;continue}}return $a(1,f,k)}f=new G(a,f,t,a.l,d,e);Ta(f,a.H,n);a.b[l++]=f;f=q+a.l;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+h(b,8,!0)),!0):$a(2,b,c)} function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].S(b&a.g,b)}Oa.prototype.ab=function(a,b){this.R++;this.b[(a&this.i)>>>this.c].sb(a&this.g,b&255,a);this.R--};function db(a,b,c){a.b[(b&a.i)>>>a.c].Qa(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.jb)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,h,l,n,q,f[4])}}}function hb(a,b){a.o.push(b)}function ib(a,b){a.R||H(a.a,4,b)} -function $a(a,b,c){p("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Uc:0,Oa:20,Yc:0};this.b={Xc:0,bb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;var e=this;this.b.bb=jb(c,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,e.b.mc),lb(e.a,e.b.bb,1E3/60))});this.b.mc=mb(64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Kb=function(){var a=this.b.la;this.b.la&=-129;return a}; -g.uc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.bb,1E3/60);this.b.la=a&-129};g.Mb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.wc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,nb(b))}ob(this)};g.Nb=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Ob=function(){return this.a.Za};g.Pb=function(){return this.a.na}; -g.xc=function(a){var b=this.a;1170>b.jb&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Ha=3915776):(b.Va=262143,b.Ha=253952),nb(b));ob(this)};function ob(a){a.c.Oa=a.c.Oa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.ac=function(a){return this.a.C[1][a>>1&7]};g.Jc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.Zb=function(a){return this.a.C[1][(a>>1&7)+8]};g.Hc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.$b=function(a){return this.a.P[1][a>>1&7]};g.Ic=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; -g.Yb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Gc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Jb=function(a){return this.a.C[0][a>>1&7]};g.tc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Hb=function(a){return this.a.C[0][(a>>1&7)+8]};g.rc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Ib=function(a){return this.a.P[0][a>>1&7]};g.sc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Gb=function(a){return this.a.P[0][(a>>1&7)+8]}; -g.qc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.gc=function(a){return this.a.C[3][a>>1&7]};g.Pc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.ec=function(a){return this.a.C[3][(a>>1&7)+8]};g.Nc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.fc=function(a){return this.a.P[3][a>>1&7]};g.Oc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.dc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Mc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Sb=function(){return this.a.u&49152?this.a.X[0]:this.a.f[6]};g.Ac=function(a){this.a.u&49152?this.a.X[0]=a:this.a.f[6]=a};g.Vb=function(){return this.a.f[7]};g.Dc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; -g.Tb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[1]};g.Bc=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[1]=a};g.Ub=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[3]};g.Cc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[3]=a};g.Fb=function(a){return this.a.pb[a-65504>>1]};g.pc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.cc=function(){return 1};g.Lc=function(){};g.Eb=function(){return this.a.F}; -g.oc=function(){this.a.F=0};g.Lb=function(){return this.a.ob};g.vc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Qb=function(a){return a?this.a.$a:0};g.yc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.bc=function(a){return a?this.a.oa&65280:0};g.Kc=function(a){this.a.oa=a|255};g.Rb=function(){return Na(this.a)};g.zc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.la=0}; -var K={},J=(K[62592]=[null,null,I.prototype.ac,I.prototype.Jc,"SISDR"],K[62608]=[null,null,I.prototype.Zb,I.prototype.Hc,"SDSDR"],K[62624]=[null,null,I.prototype.$b,I.prototype.Ic,"SISAR"],K[62640]=[null,null,I.prototype.Yb,I.prototype.Gc,"SDSAR"],K[62656]=[null,null,I.prototype.Jb,I.prototype.tc,"KISDR"],K[62672]=[null,null,I.prototype.Hb,I.prototype.rc,"KDSDR"],K[62688]=[null,null,I.prototype.Ib,I.prototype.sc,"KISAR"],K[62704]=[null,null,I.prototype.Gb,I.prototype.qc,"KDSAR"],K[62798]=[null,null, -I.prototype.Pb,I.prototype.xc,"MMR3"],K[65382]=[null,null,I.prototype.Kb,I.prototype.uc,"LKS"],K[65402]=[null,null,I.prototype.Mb,I.prototype.wc,"MMR0"],K[65404]=[null,null,I.prototype.Nb,I.prototype.tb,"MMR1"],K[65406]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR2"],K[65408]=[null,null,I.prototype.gc,I.prototype.Pc,"UISDR"],K[65424]=[null,null,I.prototype.ec,I.prototype.Nc,"UDSDR"],K[65440]=[null,null,I.prototype.fc,I.prototype.Oc,"UISAR"],K[65456]=[null,null,I.prototype.dc,I.prototype.Mc,"UDSAR"], -K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]=[null,null,I.prototype.Sb,I.prototype.Ac,"R6KERNEL"],K[65479]=[null,null,I.prototype.Vb,I.prototype.Dc,"R7KERNEL"],K[65480]=[null,null, -I.prototype.va,I.prototype.xa,"R0SET1"],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1"],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1"],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1"],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1"],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1"],K[65486]=[null,null,I.prototype.Tb,I.prototype.Bc,"R6SUPER"],K[65487]=[null,null,I.prototype.Ub,I.prototype.Cc,"R6USER"],K[65504]=[null,null,I.prototype.Fb,I.prototype.pc, -"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.cc,I.prototype.Lc,"SYSID",1170],K[65526]=[null,null,I.prototype.Eb,I.prototype.oc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Lb,I.prototype.vc,"MB",1170],K[65530]=[null,null,I.prototype.Qb,I.prototype.yc,"PIR"],K[65532]=[null,null,I.prototype.bc,I.prototype.Kc,"SL"],K[65534]=[null,null,I.prototype.Rb,I.prototype.zc,"PSW"], -K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640]; -J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704]; -J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456]; -J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;ba.a.jb)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,k,l,n,q,f[4])}}}function hb(a,b){a.o.push(b)}function ib(a,b){a.R||H(a.a,4,b)} +function $a(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Oa:20,nc:0};this.b={$c:0,bb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;var e=this;this.b.bb=jb(c,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,e.b.oc),lb(e.a,e.b.bb,1E3/60))});this.b.oc=mb(64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a}; +g.xc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.bb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,nb(b))}ob(this)};g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.Za};g.Qb=function(){return this.a.na}; +g.Ac=function(a){var b=this.a;1170>b.jb&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Ha=3915776):(b.Va=262143,b.Ha=253952),nb(b));ob(this)};function ob(a){a.c.Oa=a.c.Oa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]};g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; +g.Zb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Jc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.wc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.uc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Jb=function(a){return this.a.P[0][a>>1&7]};g.vc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]}; +g.tc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.hc=function(a){return this.a.C[3][a>>1&7]};g.Sc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Qc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.P[3][a>>1&7]};g.Rc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ec=function(a){return this.a.P[3][(a>>1&7)+8]};g.Pc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; +g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Tb=function(){return this.a.u&49152?this.a.X[0]:this.a.f[6]};g.Dc=function(a){this.a.u&49152?this.a.X[0]=a:this.a.f[6]=a};g.Wb=function(){return this.a.f[7]};g.Gc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; +g.Ub=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[1]};g.Ec=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[1]=a};g.Vb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[3]};g.Fc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]};g.sc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.dc=function(){return 1};g.Oc=function(){};g.Fb=function(){return this.a.F}; +g.rc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.yc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.$a:0};g.Bc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255};g.Sb=function(){return Na(this.a)};g.Cc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.la=0}; +var K={},J=(K[62592]=[null,null,I.prototype.bc,I.prototype.Mc,"SISDR"],K[62608]=[null,null,I.prototype.$b,I.prototype.Kc,"SDSDR"],K[62624]=[null,null,I.prototype.ac,I.prototype.Lc,"SISAR"],K[62640]=[null,null,I.prototype.Zb,I.prototype.Jc,"SDSAR"],K[62656]=[null,null,I.prototype.Kb,I.prototype.wc,"KISDR"],K[62672]=[null,null,I.prototype.Ib,I.prototype.uc,"KDSDR"],K[62688]=[null,null,I.prototype.Jb,I.prototype.vc,"KISAR"],K[62704]=[null,null,I.prototype.Hb,I.prototype.tc,"KDSAR"],K[62798]=[null,null, +I.prototype.Qb,I.prototype.Ac,"MMR3"],K[65382]=[null,null,I.prototype.Lb,I.prototype.xc,"LKS"],K[65400]=[null,null,I.prototype.Eb,I.prototype.qc,"CNSL"],K[65402]=[null,null,I.prototype.Nb,I.prototype.zc,"MMR0"],K[65404]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR1"],K[65406]=[null,null,I.prototype.Pb,I.prototype.tb,"MMR2"],K[65408]=[null,null,I.prototype.hc,I.prototype.Sc,"UISDR"],K[65424]=[null,null,I.prototype.fc,I.prototype.Qc,"UDSDR"],K[65440]=[null,null,I.prototype.gc,I.prototype.Rc,"UISAR"], +K[65456]=[null,null,I.prototype.ec,I.prototype.Pc,"UDSAR"],K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]=[null,null,I.prototype.Tb,I.prototype.Dc,"R6KERNEL"],K[65479]=[null,null, +I.prototype.Wb,I.prototype.Gc,"R7KERNEL"],K[65480]=[null,null,I.prototype.va,I.prototype.xa,"R0SET1"],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1"],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1"],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1"],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1"],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1"],K[65486]=[null,null,I.prototype.Ub,I.prototype.Ec,"R6SUPER"],K[65487]=[null,null,I.prototype.Vb,I.prototype.Fc, +"R6USER"],K[65504]=[null,null,I.prototype.Gb,I.prototype.sc,"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.dc,I.prototype.Oc,"SYSID",1170],K[65526]=[null,null,I.prototype.Fb,I.prototype.rc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Mb,I.prototype.yc,"MB",1170],K[65530]=[null,null,I.prototype.Rb,I.prototype.Bc,"PIR"],K[65532]=[null,null,I.prototype.cc,I.prototype.Nc,"SL"], +K[65534]=[null,null,I.prototype.Sb,I.prototype.Cc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640]; +J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704]; +J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456]; +J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255 R:function(a,b){return this.V(a,b)},$:function(a,b,c){this.v||this.sb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Z:function(a,b){this.c[a]=b;this.ia=!0},da:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> 1]=b;this.ia=!0}};function Ta(a,b,c){a.H=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.cb=!a.v&&b[1]||a.A,a.Qa=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Xa=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} var Db=[],zb=[G.prototype.M,G.prototype.ea,G.prototype.Y,G.prototype.ra],Bb=[G.prototype.G,G.prototype.$,G.prototype.R,G.prototype.ga];if(Ja)var yb=[G.prototype.D,G.prototype.Z,G.prototype.N,G.prototype.fa],xb=[G.prototype.J,G.prototype.da,G.prototype.W,G.prototype.qa]; -function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ka=a.cycles||b;this.$=c;this.Ua=Math.round(this.Ka/1E4)/100;this.da=this.Ua*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Da=this.fa=0;this.Ja=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.G=[];this.mb=this.lc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; +function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ka=a.cycles||b;this.$=c;this.Ua=Math.round(this.Ka/1E4)/100;this.da=this.Ua*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Da=this.fa=0;this.Ja=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.G=[];this.mb=this.mc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; g.ka=function(a,b,c,d){this.w=a;this.l=b;this.H=d;for(b=0;ba.Y/a.da&&(b=1),a.$=b,b=a.Ua*a.$,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=ka();a.Z=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ka*a.$/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.ea-=a.a;a.a=0;b&&(a.ea=0);return c} -g.lc=function(){if(this.h.T){this.Wa>=this.Ka&&Lb(this,!0);this.ya=0;this.Ia=ka();if(this.Z){var a=this.Ia-this.Z;a>this.kb&&(this.N+=a,this.N>this.Ia&&(this.N=this.Ia))}try{do{for(var b,c=this.h.Ma?1:this.La,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Da=this.Da+this.gb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Mb(this)&& -(this.pa=this.qa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+k(this.Da))}for(var a=b,h=this.G.length-1;0<=h;h--){var l=this.G[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.La;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=ka();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ +g.mc=function(){if(this.h.T){this.Wa>=this.Ka&&Lb(this,!0);this.ya=0;this.Ia=ka();if(this.Z){var a=this.Ia-this.Z;a>this.kb&&(this.N+=a,this.N>this.Ia&&(this.N=this.Ia))}try{do{for(var b,c=this.h.Ma?1:this.La,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Da=this.Da+this.gb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Mb(this)&& +(this.pa=this.qa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+h(this.Da))}for(var a=b,k=this.G.length-1;0<=k;k--){var l=this.G[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.La;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=ka();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ this.La));d-=this.Z-this.Ia;if(e=this.Z-this.N)this.Y=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Yd&&(this.N-=d),d=0;this.Wa+=this.ya;this.Z+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Kb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; function F(a){if(a.h.T){Nb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0}function Ob(a){this.jb=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);Qb(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.T&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; function Qb(a){a.m=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.X=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Sa=0;a.ga=-1;Rb(a)}function Rb(a){a.oa=255;a.F=0;a.$a=0;a.A=0;a.ma=0;a.Za=0;a.na=0;a.Ba=0;a.Fa=0;a.Va=262143;a.Ha=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.ic,a.Qa=a.Rc,Va(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.hc,a.Qa=a.Qc,Va(a.l,16))}g.gb=function(){return 0}; -g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.$]);a.set(2,eb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.X[c]=a.f[6],a.f[6]=a.X[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Ub(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} function H(a,b,c){if(!a.R){var d=!1;0>a.ga?a.ga=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.Za=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);pb(a,f&-12289|a.ga>>2&12288);d&&(a.F|=4,a.f[6]=4);Vb(a,a.ga);Vb(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ga=-1;if(26!=c)throw b;}}function Wb(a){var b=Xb(a),c=Xb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} -function Yb(a,b,c){var d,e,f,h=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: -128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;h&&(h&57344&&(0<=a.ga&&(h|=128),a.A&57344||(a.A=a.A|h|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.c].cb(b&a.g,c&255,b)}function Xb(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} +function Yb(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: +128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ga&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.c].cb(b&a.g,c&255,b)}function Xb(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} function Vb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.S(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.S(e)|h;a.a-= -8;break;case 6:return e=Sb(a),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=Sb(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.ab=function(a,b){this.Ba?(this.R++,Zb(this,Yb(this,a,5),b),this.R--):this.l.ab(a,b)};g.yb=function(a,b,c){return $b(this,a,b,c)};g.zb=function(a,b,c){return Yb(this,$b(this,a,b,c),c)}; -g.hc=function(a){return cb(this.l,a)};g.ic=function(a){return cb(this.l,Yb(this,a,2))};g.Qc=function(a,b){db(this.l,a,b&65535)};g.Rc=function(a,b){db(this.l,Yb(this,a,4),b)};function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} +function $b(a,b,c,d){var e,f,k=d&8?0:a.M;switch(b){case 0:return H(a,4,20),0;case 1:return 6===c&&!a.s&&d&4&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32||65534<=a.f[6]?(a.F|=4,a.f[6]=4,H(a,4,22)):(a.F|=8,a.j|=64)),a.a-=3,7===c?a.f[c]:a.f[c]|k;case 2:f=2;e=a.f[c];7!==c&&(e|=k,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= +8;break;case 6:return e=Sb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Sb(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.ab=function(a,b){this.Ba?(this.R++,Zb(this,Yb(this,a,5),b),this.R--):this.l.ab(a,b)};g.yb=function(a,b,c){return $b(this,a,b,c)};g.zb=function(a,b,c){return Yb(this,$b(this,a,b,c),c)}; +g.ic=function(a){return cb(this.l,a)};g.jc=function(a){return cb(this.l,Yb(this,a,2))};g.Tc=function(a,b){db(this.l,a,b&65535)};g.Uc=function(a,b){db(this.l,Yb(this,a,4),b)};function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} function bc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Yb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.X[a.u>>12&3]=d}function cc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)} function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.I(b,e,7),Zb(a,e,d.call(a,c,bb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Zb(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.$a&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.nc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.$a&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& 1&&this.j++;this.A&57344||(this.ma=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Sb(this))}while(0>1|b<<16;P(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function nc(a,b){a=b&~a;N(this,a);return a}function oc(a,b){a=b&~a;N(this,a<<8);return a}function pc(a,b){a|=b;N(this,a);return a}function qc(a,b){a|=b;N(this,a<<8);return a}function rc(a,b){a=~b|65536;O(this,a);return a&65535}function sc(a,b){a=~b|256;O(this,a<<8);return a&255} function tc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function yc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} @@ -786,46 +786,46 @@ this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this)) a,0,mc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],kd=[X,function(a){a=ac(this,a,65536);Vb(this,a);N(this,a);this.a-=11},function(a){var b=Xb(this),c=this.a;bc(this,a,65536,b);N(this,b);this.a=c-Qc[this.c]},X]; function ld(a){v.call(this,"ROM",a,ld);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){md(c,a,b,f)})}}x(ld);ld.prototype.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;nd(this)};ld.prototype.ba=function(){this.m&&(this.H&&this.H.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; ld.prototype.aa=function(){return!0}; -function md(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,h,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),h=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),h=e=0;e>8&255,a.b[h++]=f[e]>>16&255,a.b[h++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); +function md(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Ea)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.aa=function(a){return a?this.save():!0};g.reset=function(){rd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return rd(this)};function rd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.Xb,Z.prototype.Fc,"RCSR"],sd[65394]=[null,null,Z.prototype.Wb,Z.prototype.Ec,"RBUF"],sd[65396]=[null,null,Z.prototype.kc,Z.prototype.Tc,"XCSR"],sd[65398]=[null,null,Z.prototype.jc,Z.prototype.Sc,"XBUF"],sd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],sd[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],sd[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],sd[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],sd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");xd(this.m)&&(Cd(this,d),a=2,Dd(this.m));this.m.set("timestamp",la());Ed(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?xd(d,h):("error"== -f&&"no machine state"!=h?(this.K("Error: "+h),"unable to verify user"==h&&(qa("user",""),this.c=null)):this.O(f+": "+h),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fvd){if(xd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");xd(this.m)&&(Cd(this,d),a=2,Dd(this.m));this.m.set("timestamp",la());Ed(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?xd(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(qa("user",""),this.c=null)):this.O(f+": "+k),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Aa());this.G&&(Cd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; function Cd(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),h=new L(a,"1.30.1","validate"),l=la();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&F(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);Nd(a,b,c)}})}else c(a,null)} -function Od(a,b,c,d){function e(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Kd||xa(!0));n=!1}var h,l,n=!0;Kd++;Fa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ia=document.createElement("style");ia.type="text/css";ia.styleSheet?ia.styleSheet.cssText=q:ia.appendChild(document.createTextNode(q));t.appendChild(ia)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Ld(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--Kd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--Kd||xa(!0)):f("invalid machine element: "+ +function Ld(a,b,c,d,e,f){e("Loading "+a+"...");m(a,null,!0,function(k,l,n){n?(l||(l="unable to load "+a+" ("+n+")"),f(l,null)):Md(l,a,b,c,d,e,f)})} +function Md(a,b,c,d,e,f,k){function l(a,f){if(f)k(f,null);else{c&&(Ga(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);Nd(a,b,c)}})}else c(a,null)} +function Od(a,b,c,d){function e(a){if(void 0===l){var b=k&&C(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Kd||xa(!0));n=!1}var k,l,n=!0;Kd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ia=document.createElement("style");ia.type="text/css";ia.styleSheet?ia.styleSheet.cssText=q:ia.appendChild(document.createTextNode(q));t.appendChild(ia)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Ld(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Kd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Kd||xa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,q):Md(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Jc){f(Jc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Od(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); From b3c7d4e36147fad5f64f276ce152fd8cb97e1010 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 13 Oct 2016 16:39:40 -0700 Subject: [PATCH 23/36] Added current speed control to PDP-11 control panels --- devices/pdp11/panel/1170/debugger/leds.xml | 1 + devices/pdp11/panel/1170/debugger/test.xml | 1 + devices/pdp11/panel/1170/leds.xml | 1 + devices/pdp11/panel/1170/test.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/devices/pdp11/panel/1170/debugger/leds.xml b/devices/pdp11/panel/1170/debugger/leds.xml index de5450d67..ba5f57598 100644 --- a/devices/pdp11/panel/1170/debugger/leds.xml +++ b/devices/pdp11/panel/1170/debugger/leds.xml @@ -115,5 +115,6 @@ Step Reset Fast + Stopped diff --git a/devices/pdp11/panel/1170/debugger/test.xml b/devices/pdp11/panel/1170/debugger/test.xml index 702346ccd..5fda5d305 100644 --- a/devices/pdp11/panel/1170/debugger/test.xml +++ b/devices/pdp11/panel/1170/debugger/test.xml @@ -31,5 +31,6 @@ Step Reset Fast + Stopped diff --git a/devices/pdp11/panel/1170/leds.xml b/devices/pdp11/panel/1170/leds.xml index 23448ae9e..e205bb4ef 100644 --- a/devices/pdp11/panel/1170/leds.xml +++ b/devices/pdp11/panel/1170/leds.xml @@ -92,5 +92,6 @@ Run Reset Fast + Stopped diff --git a/devices/pdp11/panel/1170/test.xml b/devices/pdp11/panel/1170/test.xml index 177f6c688..5960af701 100644 --- a/devices/pdp11/panel/1170/test.xml +++ b/devices/pdp11/panel/1170/test.xml @@ -8,5 +8,6 @@ Run Reset Fast + Stopped From d68d1aa9bc75b09f0ea72a328fa7e206fe61cb72 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Thu, 13 Oct 2016 16:47:30 -0700 Subject: [PATCH 24/36] README updates --- devices/c1p/README.md | 3 ++- devices/pc8080/README.md | 5 +++-- devices/pcx86/README.md | 11 ++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/devices/c1p/README.md b/devices/c1p/README.md index da10dc1c6..3363dc742 100644 --- a/devices/c1p/README.md +++ b/devices/c1p/README.md @@ -9,11 +9,12 @@ Challenger 1P Device Configurations All our [Challenger 1P Machines](machine/) are built from a collection of devices, including: -* [Control Panel](panel/) +* [Control Panels](panel/) * CPU (6502) * Debugger * Floppy Drive Controller * Keyboard +* [Machines](machine/) * RAM * [ROM](rom/) * Serial Port diff --git a/devices/pc8080/README.md b/devices/pc8080/README.md index 5ca6c5a4b..2628e758c 100644 --- a/devices/pc8080/README.md +++ b/devices/pc8080/README.md @@ -9,12 +9,13 @@ PC8080 Device Configurations All our [8080-Based Machines](machine/) are built from a collection of devices, including: +* ChipSets +* [Control Panels](panel/) * CPU (8080) +* [Machines](machine/) * RAM * [ROMs](rom/) -* ChipSets * Video Adapters -* [Control Panels](panel/) Complete [machine configurations](machine/) are constructed from those devices. A machine configuration is a single XML file that lists all the device components to be used. A machine XML file can choose to configure every device itself, diff --git a/devices/pcx86/README.md b/devices/pcx86/README.md index 04745eb3d..ab3536e75 100644 --- a/devices/pcx86/README.md +++ b/devices/pcx86/README.md @@ -12,19 +12,20 @@ IBM PC Device Configurations All our [IBM PC Machines](machine/) are built from a collection of devices, including: -* [ChipSet](chipset/) -* [Control Panel](panel/) -* [CPU](/docs/pcx86/cpu/) +* [ChipSets](chipset/) +* [Control Panels](panel/) +* [CPUs](/docs/pcx86/cpu/) * [Debugger](/docs/pcx86/debugger/) * [Floppy Drive Controller](/docs/pcx86/fdc/) * [Hard Drive Controller](/docs/pcx86/hdc/) * [Keyboard](keyboard/) +* [Machines](machine/) * [Mouse](/docs/pcx86/mouse/) * [RAM](/docs/pcx86/ram/) -* [ROM](rom/) +* [ROMs](rom/) * [Parallel Port](/docs/pcx86/parallel/) * [Serial Port](/docs/pcx86/serial/) -* [Video](video/) +* [Video Adapters](video/) Each of those devices can be configured in multiple ways, and some support external UI controls. From b1f8fca2d982162d1d644955e2630737e95f6a54 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 14 Oct 2016 09:30:17 -0700 Subject: [PATCH 25/36] Re-enabled source maps, at least for the PDP-11 emulators (for now) --- Gruntfile.js | 73 +- docs/pcx86/examples/pcx86-dbg.js | 1035 +------------------------ docs/pcx86/examples/pcx86.js | 1035 +------------------------ modules/build/lib/build.js | 8 +- modules/c1pjs/lib/computer.js | 8 +- modules/c1pjs/lib/cpu.js | 8 +- modules/c1pjs/lib/debugger.js | 8 +- modules/c1pjs/lib/defines.js | 8 +- modules/c1pjs/lib/disk.js | 8 +- modules/c1pjs/lib/keyboard.js | 8 +- modules/c1pjs/lib/nodebugger.js | 8 +- modules/c1pjs/lib/panel.js | 8 +- modules/c1pjs/lib/ram.js | 8 +- modules/c1pjs/lib/rom.js | 8 +- modules/c1pjs/lib/serial.js | 8 +- modules/c1pjs/lib/video.js | 8 +- modules/diskdump/bin/diskdump | 6 +- modules/diskdump/lib/diskdump.js | 8 +- modules/filedump/bin/filedump | 6 +- modules/filedump/lib/filedump.js | 8 +- modules/grunts/prepjs/tasks/prepjs.js | 8 +- modules/htmlout/bin/htmlout | 6 +- modules/htmlout/lib/htmlout.js | 8 +- modules/htmlout/lib/httpapi.js | 8 +- modules/markout/lib/markout.js | 8 +- modules/pc6502/lib/bus.js | 8 +- modules/pc6502/lib/computer.js | 8 +- modules/pc6502/lib/cpu.js | 8 +- modules/pc6502/lib/cpudef.js | 8 +- modules/pc6502/lib/cpuops.js | 8 +- modules/pc6502/lib/cpustate.js | 8 +- modules/pc6502/lib/debugger.js | 8 +- modules/pc6502/lib/defines.js | 8 +- modules/pc6502/lib/keyboard.js | 8 +- modules/pc6502/lib/memory.js | 8 +- modules/pc6502/lib/messages.js | 8 +- modules/pc6502/lib/nodebugger.js | 8 +- modules/pc6502/lib/panel.js | 8 +- modules/pc6502/lib/ram.js | 8 +- modules/pc6502/lib/rom.js | 8 +- modules/pc6502/lib/state.js | 8 +- modules/pc6502/lib/video.js | 8 +- modules/pc8080/lib/bus.js | 8 +- modules/pc8080/lib/chipset.js | 8 +- modules/pc8080/lib/computer.js | 8 +- modules/pc8080/lib/cpu.js | 8 +- modules/pc8080/lib/cpudef.js | 8 +- modules/pc8080/lib/cpuops.js | 8 +- modules/pc8080/lib/cpustate.js | 8 +- modules/pc8080/lib/debugger.js | 8 +- modules/pc8080/lib/defines.js | 8 +- modules/pc8080/lib/keyboard.js | 8 +- modules/pc8080/lib/memory.js | 8 +- modules/pc8080/lib/messages.js | 8 +- modules/pc8080/lib/nodebugger.js | 8 +- modules/pc8080/lib/panel.js | 8 +- modules/pc8080/lib/ram.js | 8 +- modules/pc8080/lib/rom.js | 8 +- modules/pc8080/lib/serialport.js | 8 +- modules/pc8080/lib/video.js | 8 +- modules/pcx86/bin/pcx86 | 6 +- modules/pcx86/bin/x86gen.js | 8 +- modules/pcx86/lib/bus.js | 8 +- modules/pcx86/lib/chipset.js | 8 +- modules/pcx86/lib/computer.js | 8 +- modules/pcx86/lib/cpu.js | 8 +- modules/pcx86/lib/debugger.js | 8 +- modules/pcx86/lib/defines.js | 8 +- modules/pcx86/lib/disk.js | 8 +- modules/pcx86/lib/fdc.js | 8 +- modules/pcx86/lib/hdc.js | 8 +- modules/pcx86/lib/interrupts.js | 8 +- modules/pcx86/lib/keyboard.js | 8 +- modules/pcx86/lib/memory.js | 8 +- modules/pcx86/lib/messages.js | 8 +- modules/pcx86/lib/mouse.js | 8 +- modules/pcx86/lib/nodebugger.js | 8 +- modules/pcx86/lib/panel.js | 8 +- modules/pcx86/lib/parallelport.js | 8 +- modules/pcx86/lib/ram.js | 8 +- modules/pcx86/lib/rom.js | 8 +- modules/pcx86/lib/serialport.js | 8 +- modules/pcx86/lib/video.js | 8 +- modules/pcx86/lib/x86.js | 8 +- modules/pcx86/lib/x86cpu.js | 8 +- modules/pcx86/lib/x86fpu.js | 8 +- modules/pcx86/lib/x86func.js | 8 +- modules/pcx86/lib/x86help.js | 8 +- modules/pcx86/lib/x86mods.js | 8 +- modules/pcx86/lib/x86op0f.js | 8 +- modules/pcx86/lib/x86ops.js | 8 +- modules/pcx86/lib/x86seg.js | 8 +- modules/pdp11/bin/oct2hex.js | 8 +- modules/pdp11/lib/bus.js | 12 +- modules/pdp11/lib/computer.js | 12 +- modules/pdp11/lib/cpu.js | 12 +- modules/pdp11/lib/cpuops.js | 12 +- modules/pdp11/lib/cpustate.js | 12 +- modules/pdp11/lib/debugger.js | 12 +- modules/pdp11/lib/defines.js | 12 +- modules/pdp11/lib/device.js | 12 +- modules/pdp11/lib/keyboard.js | 12 +- modules/pdp11/lib/memory.js | 12 +- modules/pdp11/lib/messages.js | 12 +- modules/pdp11/lib/nodebugger.js | 12 +- modules/pdp11/lib/panel.js | 12 +- modules/pdp11/lib/ram.js | 12 +- modules/pdp11/lib/rk11.js | 12 +- modules/pdp11/lib/rom.js | 12 +- modules/pdp11/lib/serialport.js | 12 +- modules/shared/lib/component.js | 8 +- modules/shared/lib/debugger.js | 8 +- modules/shared/lib/defines.js | 8 +- modules/shared/lib/diskapi.js | 8 +- modules/shared/lib/dumpapi.js | 8 +- modules/shared/lib/embed.js | 8 +- modules/shared/lib/externs.js | 8 +- modules/shared/lib/keys.js | 8 +- modules/shared/lib/netlib.js | 8 +- modules/shared/lib/nodebug.js | 8 +- modules/shared/lib/private.js | 8 +- modules/shared/lib/proclib.js | 8 +- modules/shared/lib/reportapi.js | 8 +- modules/shared/lib/save.js | 8 +- modules/shared/lib/sockets.js | 8 +- modules/shared/lib/state.js | 8 +- modules/shared/lib/strlib.js | 8 +- modules/shared/lib/userapi.js | 8 +- modules/shared/lib/usrlib.js | 8 +- modules/shared/lib/weblib.js | 8 +- modules/textout/bin/textout | 6 +- modules/textout/lib/textout.js | 8 +- versions/c1pjs/1.30.1/c1p-dbg.js | 456 +---------- versions/c1pjs/1.30.1/c1p.js | 456 +---------- versions/pc8080/1.30.1/pc8080-dbg.js | 696 +---------------- versions/pc8080/1.30.1/pc8080.js | 696 +---------------- versions/pcx86/1.30.1/pcx86-dbg.js | 1035 +------------------------ versions/pcx86/1.30.1/pcx86.js | 1035 +------------------------ versions/pdpjs/1.30.1/pdp11-dbg.js | 710 +---------------- versions/pdpjs/1.30.1/pdp11.js | 710 +---------------- 140 files changed, 916 insertions(+), 8111 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 437650c98..05d2b7644 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -198,8 +198,12 @@ module.exports = function(grunt) { options: { banner: '"use strict";\n\n', process: function(src, filepath) { - return "// " + filepath + "\n\n" + - src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, ''); + return "/**\n * @copyright " + filepath.replace(/^\./, "http://pcjs.org") + " (C) Jeff Parsons 2012-2016\n */\n\n" + + src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1') + .replace(/\/\*\*\s*\*\s*@fileoverview[\s\S]*?\*\/\s*/g, '') + .replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ''); } } }, @@ -209,8 +213,12 @@ module.exports = function(grunt) { options: { banner: '"use strict";\n\n', process: function(src, filepath) { - return "// " + filepath + "\n\n" + - src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, ''); + return "/**\n * @copyright " + filepath.replace(/^\./, "http://pcjs.org") + " (C) Jeff Parsons 2012-2016\n */\n\n" + + src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1') + .replace(/\/\*\*\s*\*\s*@fileoverview[\s\S]*?\*\/\s*/g, '') + .replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ''); } } }, @@ -220,8 +228,12 @@ module.exports = function(grunt) { options: { banner: '"use strict";\n\n', process: function(src, filepath) { - return "// " + filepath + "\n\n" + - src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, ''); + return "/**\n * @copyright " + filepath.replace(/^\./, "http://pcjs.org") + " (C) Jeff Parsons 2012-2016\n */\n\n" + + src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1') + .replace(/\/\*\*\s*\*\s*@fileoverview[\s\S]*?\*\/\s*/g, '') + .replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ''); } } }, @@ -231,8 +243,12 @@ module.exports = function(grunt) { options: { banner: '"use strict";\n\n', process: function(src, filepath) { - return "// " + filepath + "\n\n" + - src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1').replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '').replace(/[ \t]*[A-Za-z_][A-Za-z0-9_\.]*\.assert\([^\n]*\);[^\n]*/g, ''); + return "/**\n * @copyright " + filepath.replace(/^\./, "http://pcjs.org") + " (C) Jeff Parsons 2012-2016\n */\n\n" + + src.replace(/(^|\n)[ \t]*(['"])use strict\2;?\s*/g, '$1') + .replace(/\/\*\*\s*\*\s*@fileoverview[\s\S]*?\*\/\s*/g, '') + .replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, '') + .replace(/[ \t]*[A-Za-z_][A-Za-z0-9_.]*\.assert\([^\n]*\);[^\n]*/g, ''); } } } @@ -322,7 +338,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.c1pJSFiles, @@ -334,7 +350,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/c1pjs/" + pkg.version + "/c1p-dbg.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p-dbg.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/c1pjs/" + pkg.version + "/c1p-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.c1pJSFiles, @@ -346,7 +362,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "DEBUGGER=false", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pcX86Files, @@ -361,7 +377,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/pcx86/" + pkg.version + "/pcx86-dbg.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "BACKTRACK=false", "I386=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86-dbg.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pcx86/" + pkg.version + "/pcx86-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pcX86Files, @@ -373,7 +389,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pc8080Files, @@ -388,7 +404,7 @@ module.exports = function(grunt) { // create_source_map: "./tmp/pc8080/" + pkg.version + "/pc8080-dbg.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080-dbg.map\"" + // output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pc8080/" + pkg.version + "/pc8080-dbg.map\"" output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pc8080Files, @@ -397,11 +413,11 @@ module.exports = function(grunt) { }, "pdp11.js": { TEMPcompilerOpts: { - // create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11.map", + create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=false"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11.map\"" - output_wrapper: "\"(function(){%output%})();\"" + output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11.map\"" + // output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pdp11Files, src: tmpPDP11, @@ -412,11 +428,11 @@ module.exports = function(grunt) { * Technically, this is the one case we don't need to override the default 'define' settings, but maybe it's best to be explicit. */ TEMPcompilerOpts: { - // create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map", + create_source_map: "./tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map", define: ["\"APPVERSION='" + pkg.version + "'\"", "\"SITEHOST='www.pcjs.org'\"", "COMPILED=true", "DEBUG=false", "DEBUGGER=true"], - // output_wrapper: "\"(function(){%output%})();//@ sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map\"" - output_wrapper: "\"(function(){%output%})();\"" + output_wrapper: "\"(function(){%output%})();//# sourceMappingURL=/tmp/pdpjs/" + pkg.version + "/pdp11-dbg.map\"" + // output_wrapper: "\"(function(){%output%})();\"" }, // src: pkg.pdp11Files, src: tmpPDP11, @@ -437,7 +453,7 @@ module.exports = function(grunt) { process: function(content, srcPath) { var s = content.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/c1pjs/' + pkg.version + '/$1"'); - s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); + s = s.replace(/[ \t]*\/\*[^*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } } @@ -454,7 +470,7 @@ module.exports = function(grunt) { options: { process: function(content, srcPath) { var s = content.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); - s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); + s = s.replace(/[ \t]*\/\*[^*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } } @@ -472,7 +488,7 @@ module.exports = function(grunt) { process: function(content, srcPath) { var s = content.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/pcx86/' + pkg.version + '/$1"'); - s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); + s = s.replace(/[ \t]*\/\*[^*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } } @@ -492,7 +508,7 @@ module.exports = function(grunt) { s = s.replace(/()[^<]*(<\/xsl:variable>)/g, "$1PC8080$2"); s = s.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/pc8080/' + pkg.version + '/$1"'); - s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); + s = s.replace(/[ \t]*\/\*[^*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } } @@ -512,7 +528,7 @@ module.exports = function(grunt) { s = s.replace(/()[^<]*(<\/xsl:variable>)/g, "$1PDP11$2"); s = s.replace(/()[^<]*(<\/xsl:variable>)/g, "$1" + pkg.version + "$2"); s = s.replace(/"[^"]*\/?(common.css|common.xsl|components.css|components.xsl|document.css|document.xsl)"/g, '"/versions/pdpjs/' + pkg.version + '/$1"'); - s = s.replace(/[ \t]*\/\*[^\*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); + s = s.replace(/[ \t]*\/\*[^*][\s\S]*?\*\//g, "").replace(/[ \t]*[ \t]*\n?/g, ""); return s; } } @@ -604,7 +620,12 @@ module.exports = function(grunt) { }, replace: { "fix-source-maps": { - src: ["./tmp/c1pjs/" + pkg.version + "/c1p*.map", "./tmp/pcx86/" + pkg.version + "/pc*.map"], + src: [ + "./tmp/c1pjs/" + pkg.version + "/c1p*.map", + "./tmp/pcx86/" + pkg.version + "/pc*.map", + "./tmp/pcx8008/" + pkg.version + "/pc*.map", + "./tmp/pdpjs/" + pkg.version + "/pdp*.map" + ], overwrite: true, replacements: [ { diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index c897ddac6..9616a9e90 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -1,996 +1,47 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - - FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: - The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/parallelport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; diff --git a/docs/pcx86/examples/pcx86.js b/docs/pcx86/examples/pcx86.js index cb45608d1..3b8a3f31a 100644 --- a/docs/pcx86/examples/pcx86.js +++ b/docs/pcx86/examples/pcx86.js @@ -1,996 +1,47 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - - FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: - The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/parallelport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; diff --git a/modules/build/lib/build.js b/modules/build/lib/build.js index f434e5b59..7752acb4a 100644 --- a/modules/build/lib/build.js +++ b/modules/build/lib/build.js @@ -1,7 +1,7 @@ /** * @fileoverview PCjs Build Options * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/computer.js b/modules/c1pjs/lib/computer.js index 4f437d50f..2dbc392b9 100644 --- a/modules/c1pjs/lib/computer.js +++ b/modules/c1pjs/lib/computer.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Computer component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/cpu.js b/modules/c1pjs/lib/cpu.js index 7755f2d99..f936966f1 100644 --- a/modules/c1pjs/lib/cpu.js +++ b/modules/c1pjs/lib/cpu.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs 6502 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/debugger.js b/modules/c1pjs/lib/debugger.js index 83c8b98c1..5a6cce96a 100644 --- a/modules/c1pjs/lib/debugger.js +++ b/modules/c1pjs/lib/debugger.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Debugger component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/defines.js b/modules/c1pjs/lib/defines.js index dbda2ee1a..d9dfc0a9b 100644 --- a/modules/c1pjs/lib/defines.js +++ b/modules/c1pjs/lib/defines.js @@ -1,7 +1,7 @@ /** * @fileoverview C1Pjs-specific compile-time definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/disk.js b/modules/c1pjs/lib/disk.js index 598c6d604..adf20377d 100644 --- a/modules/c1pjs/lib/disk.js +++ b/modules/c1pjs/lib/disk.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs DiskController component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/keyboard.js b/modules/c1pjs/lib/keyboard.js index d72945ef0..4ddd6f518 100644 --- a/modules/c1pjs/lib/keyboard.js +++ b/modules/c1pjs/lib/keyboard.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Keyboard component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/nodebugger.js b/modules/c1pjs/lib/nodebugger.js index 4e9a98899..66adaf0c8 100644 --- a/modules/c1pjs/lib/nodebugger.js +++ b/modules/c1pjs/lib/nodebugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/panel.js b/modules/c1pjs/lib/panel.js index 5bf81be49..9cea94e49 100644 --- a/modules/c1pjs/lib/panel.js +++ b/modules/c1pjs/lib/panel.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Panel component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/ram.js b/modules/c1pjs/lib/ram.js index 5180bef38..7e3139d1e 100644 --- a/modules/c1pjs/lib/ram.js +++ b/modules/c1pjs/lib/ram.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs RAM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/rom.js b/modules/c1pjs/lib/rom.js index 33e597305..ca385d4a5 100644 --- a/modules/c1pjs/lib/rom.js +++ b/modules/c1pjs/lib/rom.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs ROM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/serial.js b/modules/c1pjs/lib/serial.js index f5597cc41..9f57c8efb 100644 --- a/modules/c1pjs/lib/serial.js +++ b/modules/c1pjs/lib/serial.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs SerialPort component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/c1pjs/lib/video.js b/modules/c1pjs/lib/video.js index 3e524c2bf..9277d7d48 100644 --- a/modules/c1pjs/lib/video.js +++ b/modules/c1pjs/lib/video.js @@ -1,7 +1,7 @@ /** * @fileoverview This file implements the C1Pjs Video component * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/diskdump/bin/diskdump b/modules/diskdump/bin/diskdump index f08e101ad..b79025bce 100644 --- a/modules/diskdump/bin/diskdump +++ b/modules/diskdump/bin/diskdump @@ -21,9 +21,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/diskdump/lib/diskdump.js b/modules/diskdump/lib/diskdump.js index 240140ace..924369b7d 100644 --- a/modules/diskdump/lib/diskdump.js +++ b/modules/diskdump/lib/diskdump.js @@ -1,7 +1,7 @@ /** * @fileoverview Converts disk images to/from JSON * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/filedump/bin/filedump b/modules/filedump/bin/filedump index ff5398d83..6ec15fa89 100644 --- a/modules/filedump/bin/filedump +++ b/modules/filedump/bin/filedump @@ -21,9 +21,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index 28a7c3554..3ef3d7452 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -1,7 +1,7 @@ /** * @fileoverview Converts file contents to JSON * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/grunts/prepjs/tasks/prepjs.js b/modules/grunts/prepjs/tasks/prepjs.js index 2d28959fa..a3be97470 100644 --- a/modules/grunts/prepjs/tasks/prepjs.js +++ b/modules/grunts/prepjs/tasks/prepjs.js @@ -1,7 +1,7 @@ /** * @fileoverview Pre-process JavaScript file(s) with well-defined constants inlined * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/htmlout/bin/htmlout b/modules/htmlout/bin/htmlout index e1d16b635..581dd0441 100644 --- a/modules/htmlout/bin/htmlout +++ b/modules/htmlout/bin/htmlout @@ -21,9 +21,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/htmlout/lib/htmlout.js b/modules/htmlout/lib/htmlout.js index 8a1eb986e..741f65b86 100644 --- a/modules/htmlout/lib/htmlout.js +++ b/modules/htmlout/lib/htmlout.js @@ -1,7 +1,7 @@ /** * @fileoverview Builds default ("index.html") documents from HTML templates * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/htmlout/lib/httpapi.js b/modules/htmlout/lib/httpapi.js index 00c198ba5..70c482152 100644 --- a/modules/htmlout/lib/httpapi.js +++ b/modules/htmlout/lib/httpapi.js @@ -1,7 +1,7 @@ /** * @fileoverview Handles API requests and redirects * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/markout/lib/markout.js b/modules/markout/lib/markout.js index 85b368bdc..49e2ba258 100644 --- a/modules/markout/lib/markout.js +++ b/modules/markout/lib/markout.js @@ -1,7 +1,7 @@ /** * @fileoverview Parses simplified Markdown files * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/bus.js b/modules/pc6502/lib/bus.js index 13db606af..f9d8dd269 100644 --- a/modules/pc6502/lib/bus.js +++ b/modules/pc6502/lib/bus.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Bus component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/computer.js b/modules/pc6502/lib/computer.js index c52e12f2f..94ec0ad37 100644 --- a/modules/pc6502/lib/computer.js +++ b/modules/pc6502/lib/computer.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Computer component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/cpu.js b/modules/pc6502/lib/cpu.js index d14baad7e..dd4e3349d 100644 --- a/modules/pc6502/lib/cpu.js +++ b/modules/pc6502/lib/cpu.js @@ -1,7 +1,7 @@ /** * @fileoverview Controls the PC6502 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/cpudef.js b/modules/pc6502/lib/cpudef.js index 95afc6719..34ad2aa96 100644 --- a/modules/pc6502/lib/cpudef.js +++ b/modules/pc6502/lib/cpudef.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines PC6502 CPU constants. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/cpuops.js b/modules/pc6502/lib/cpuops.js index 814bac717..8ecadb33f 100644 --- a/modules/pc6502/lib/cpuops.js +++ b/modules/pc6502/lib/cpuops.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PC6502 opcode handlers. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/cpustate.js b/modules/pc6502/lib/cpustate.js index 30c9387a0..8f00ec652 100644 --- a/modules/pc6502/lib/cpustate.js +++ b/modules/pc6502/lib/cpustate.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/debugger.js b/modules/pc6502/lib/debugger.js index 71a2b33b6..e82f67be9 100644 --- a/modules/pc6502/lib/debugger.js +++ b/modules/pc6502/lib/debugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Debugger component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/defines.js b/modules/pc6502/lib/defines.js index 9e732b90f..0b6a0317b 100644 --- a/modules/pc6502/lib/defines.js +++ b/modules/pc6502/lib/defines.js @@ -1,7 +1,7 @@ /** * @fileoverview PC6502-specific compile-time definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/keyboard.js b/modules/pc6502/lib/keyboard.js index a8d69055c..a805df4a9 100644 --- a/modules/pc6502/lib/keyboard.js +++ b/modules/pc6502/lib/keyboard.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Keyboard component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/memory.js b/modules/pc6502/lib/memory.js index 8fe88bbcf..8b31c0c5b 100644 --- a/modules/pc6502/lib/memory.js +++ b/modules/pc6502/lib/memory.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Memory component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/messages.js b/modules/pc6502/lib/messages.js index b019b123a..cba26b5b8 100644 --- a/modules/pc6502/lib/messages.js +++ b/modules/pc6502/lib/messages.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/nodebugger.js b/modules/pc6502/lib/nodebugger.js index 6516aacf0..626d02737 100644 --- a/modules/pc6502/lib/nodebugger.js +++ b/modules/pc6502/lib/nodebugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/panel.js b/modules/pc6502/lib/panel.js index d6b6ec53d..cab68a690 100644 --- a/modules/pc6502/lib/panel.js +++ b/modules/pc6502/lib/panel.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Panel component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/ram.js b/modules/pc6502/lib/ram.js index cd09c6daf..51c917350 100644 --- a/modules/pc6502/lib/ram.js +++ b/modules/pc6502/lib/ram.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 RAM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/rom.js b/modules/pc6502/lib/rom.js index c4eab4ebc..44190f8da 100644 --- a/modules/pc6502/lib/rom.js +++ b/modules/pc6502/lib/rom.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 ROM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/state.js b/modules/pc6502/lib/state.js index ed2c7bc55..bca72949e 100644 --- a/modules/pc6502/lib/state.js +++ b/modules/pc6502/lib/state.js @@ -1,7 +1,7 @@ /** * @fileoverview The State class used by PCjs machines. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc6502/lib/video.js b/modules/pc6502/lib/video.js index fcc4b7838..6214578b5 100644 --- a/modules/pc6502/lib/video.js +++ b/modules/pc6502/lib/video.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC6502 Video component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/bus.js b/modules/pc8080/lib/bus.js index 804e65eb5..fcadb3a09 100644 --- a/modules/pc8080/lib/bus.js +++ b/modules/pc8080/lib/bus.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Bus component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/chipset.js b/modules/pc8080/lib/chipset.js index 48beb7f3f..169304612 100644 --- a/modules/pc8080/lib/chipset.js +++ b/modules/pc8080/lib/chipset.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 ChipSet component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/computer.js b/modules/pc8080/lib/computer.js index 04c2194fc..ef4fd8634 100644 --- a/modules/pc8080/lib/computer.js +++ b/modules/pc8080/lib/computer.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Computer component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/cpu.js b/modules/pc8080/lib/cpu.js index cc92a4d29..897966b77 100644 --- a/modules/pc8080/lib/cpu.js +++ b/modules/pc8080/lib/cpu.js @@ -1,7 +1,7 @@ /** * @fileoverview Controls the PC8080 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/cpudef.js b/modules/pc8080/lib/cpudef.js index 6b0837253..a8afb8958 100644 --- a/modules/pc8080/lib/cpudef.js +++ b/modules/pc8080/lib/cpudef.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines PC8080 CPU constants. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/cpuops.js b/modules/pc8080/lib/cpuops.js index 7b4d99561..41837f595 100644 --- a/modules/pc8080/lib/cpuops.js +++ b/modules/pc8080/lib/cpuops.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PC8080 opcode handlers. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/cpustate.js b/modules/pc8080/lib/cpustate.js index de9fccd3b..65f953a95 100644 --- a/modules/pc8080/lib/cpustate.js +++ b/modules/pc8080/lib/cpustate.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/debugger.js b/modules/pc8080/lib/debugger.js index 76e1adb7f..dfb051b7e 100644 --- a/modules/pc8080/lib/debugger.js +++ b/modules/pc8080/lib/debugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Debugger component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/defines.js b/modules/pc8080/lib/defines.js index 5514989e7..70ac46fc5 100644 --- a/modules/pc8080/lib/defines.js +++ b/modules/pc8080/lib/defines.js @@ -1,7 +1,7 @@ /** * @fileoverview PC8080-specific compile-time definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/keyboard.js b/modules/pc8080/lib/keyboard.js index c3d3a3a7d..95d16dfb0 100644 --- a/modules/pc8080/lib/keyboard.js +++ b/modules/pc8080/lib/keyboard.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Keyboard component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/memory.js b/modules/pc8080/lib/memory.js index 79cdf68f9..95006c8b1 100644 --- a/modules/pc8080/lib/memory.js +++ b/modules/pc8080/lib/memory.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Memory component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/messages.js b/modules/pc8080/lib/messages.js index 6b7df1580..de792335a 100644 --- a/modules/pc8080/lib/messages.js +++ b/modules/pc8080/lib/messages.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/nodebugger.js b/modules/pc8080/lib/nodebugger.js index 6516aacf0..626d02737 100644 --- a/modules/pc8080/lib/nodebugger.js +++ b/modules/pc8080/lib/nodebugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/panel.js b/modules/pc8080/lib/panel.js index 65778e021..cdf83b241 100644 --- a/modules/pc8080/lib/panel.js +++ b/modules/pc8080/lib/panel.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Panel component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/ram.js b/modules/pc8080/lib/ram.js index 051f3dcba..f2920f65b 100644 --- a/modules/pc8080/lib/ram.js +++ b/modules/pc8080/lib/ram.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 RAM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/rom.js b/modules/pc8080/lib/rom.js index b60042bf3..2e02eae08 100644 --- a/modules/pc8080/lib/rom.js +++ b/modules/pc8080/lib/rom.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 ROM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/serialport.js b/modules/pc8080/lib/serialport.js index ac9a189f0..9175a0c0c 100644 --- a/modules/pc8080/lib/serialport.js +++ b/modules/pc8080/lib/serialport.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 SerialPort component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pc8080/lib/video.js b/modules/pc8080/lib/video.js index 3a79c5746..c9a600471 100644 --- a/modules/pc8080/lib/video.js +++ b/modules/pc8080/lib/video.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PC8080 Video component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/bin/pcx86 b/modules/pcx86/bin/pcx86 index cabb3e51a..9cdf9e2fd 100644 --- a/modules/pcx86/bin/pcx86 +++ b/modules/pcx86/bin/pcx86 @@ -21,9 +21,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/bin/x86gen.js b/modules/pcx86/bin/x86gen.js index 6217d3bd1..878146fcc 100644 --- a/modules/pcx86/bin/x86gen.js +++ b/modules/pcx86/bin/x86gen.js @@ -1,7 +1,7 @@ /** * @fileoverview This file generates PCjs 8086 mode-byte decoders. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/bus.js b/modules/pcx86/lib/bus.js index e6d93388e..d61daa818 100644 --- a/modules/pcx86/lib/bus.js +++ b/modules/pcx86/lib/bus.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Bus component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/chipset.js b/modules/pcx86/lib/chipset.js index 2ea035b0a..da46f30cb 100644 --- a/modules/pcx86/lib/chipset.js +++ b/modules/pcx86/lib/chipset.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 ChipSet component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/computer.js b/modules/pcx86/lib/computer.js index 293c2b88d..f5ac0670c 100644 --- a/modules/pcx86/lib/computer.js +++ b/modules/pcx86/lib/computer.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Computer component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/cpu.js b/modules/pcx86/lib/cpu.js index ae65359df..d44aaa5d4 100644 --- a/modules/pcx86/lib/cpu.js +++ b/modules/pcx86/lib/cpu.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/debugger.js b/modules/pcx86/lib/debugger.js index 324126ec9..e35a832d1 100644 --- a/modules/pcx86/lib/debugger.js +++ b/modules/pcx86/lib/debugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Debugger component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/defines.js b/modules/pcx86/lib/defines.js index dabacef80..87d1abd5a 100644 --- a/modules/pcx86/lib/defines.js +++ b/modules/pcx86/lib/defines.js @@ -1,7 +1,7 @@ /** * @fileoverview PCx86-specific compile-time definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/disk.js b/modules/pcx86/lib/disk.js index 0100a85ad..68962c127 100644 --- a/modules/pcx86/lib/disk.js +++ b/modules/pcx86/lib/disk.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements disk image support for both FDC and HDC. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/fdc.js b/modules/pcx86/lib/fdc.js index 92afcbc59..48697e9eb 100644 --- a/modules/pcx86/lib/fdc.js +++ b/modules/pcx86/lib/fdc.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Floppy Drive Controller (FDC) component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/hdc.js b/modules/pcx86/lib/hdc.js index 74abbac93..8740e8d19 100644 --- a/modules/pcx86/lib/hdc.js +++ b/modules/pcx86/lib/hdc.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Hard Drive Controller (HDC) component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/interrupts.js b/modules/pcx86/lib/interrupts.js index 455afc625..e4afe1ba1 100644 --- a/modules/pcx86/lib/interrupts.js +++ b/modules/pcx86/lib/interrupts.js @@ -1,7 +1,7 @@ /** * @fileoverview PCx86-specific BIOS/DOS interrupt definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/keyboard.js b/modules/pcx86/lib/keyboard.js index 723d38c82..e204d31b9 100644 --- a/modules/pcx86/lib/keyboard.js +++ b/modules/pcx86/lib/keyboard.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Keyboard component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/memory.js b/modules/pcx86/lib/memory.js index f244160c1..b4b8ce6e9 100644 --- a/modules/pcx86/lib/memory.js +++ b/modules/pcx86/lib/memory.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 "physical" Memory component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/messages.js b/modules/pcx86/lib/messages.js index b108468ea..f99ad5526 100644 --- a/modules/pcx86/lib/messages.js +++ b/modules/pcx86/lib/messages.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines message categories. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/mouse.js b/modules/pcx86/lib/mouse.js index cebfa12aa..8b4546b20 100644 --- a/modules/pcx86/lib/mouse.js +++ b/modules/pcx86/lib/mouse.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Mouse component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/nodebugger.js b/modules/pcx86/lib/nodebugger.js index 2d632d516..357d81270 100644 --- a/modules/pcx86/lib/nodebugger.js +++ b/modules/pcx86/lib/nodebugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/panel.js b/modules/pcx86/lib/panel.js index a90bcff0c..c4eff1bfe 100644 --- a/modules/pcx86/lib/panel.js +++ b/modules/pcx86/lib/panel.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Panel component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/parallelport.js b/modules/pcx86/lib/parallelport.js index ea889fb3e..ea8da9052 100644 --- a/modules/pcx86/lib/parallelport.js +++ b/modules/pcx86/lib/parallelport.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 ParallelPort component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/ram.js b/modules/pcx86/lib/ram.js index 671229ecd..6cf8fedd2 100644 --- a/modules/pcx86/lib/ram.js +++ b/modules/pcx86/lib/ram.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 RAM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/rom.js b/modules/pcx86/lib/rom.js index 6567b3f83..c4f130377 100644 --- a/modules/pcx86/lib/rom.js +++ b/modules/pcx86/lib/rom.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 ROM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/serialport.js b/modules/pcx86/lib/serialport.js index 8a04b0f6e..7e827f01d 100644 --- a/modules/pcx86/lib/serialport.js +++ b/modules/pcx86/lib/serialport.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 SerialPort component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/video.js b/modules/pcx86/lib/video.js index f8a35bf0f..323debdfb 100644 --- a/modules/pcx86/lib/video.js +++ b/modules/pcx86/lib/video.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements the PCx86 Video component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86.js b/modules/pcx86/lib/x86.js index 86933679e..e1757b414 100644 --- a/modules/pcx86/lib/x86.js +++ b/modules/pcx86/lib/x86.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines PCx86 constants. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86cpu.js b/modules/pcx86/lib/x86cpu.js index b65d2e4f6..8e966f586 100644 --- a/modules/pcx86/lib/x86cpu.js +++ b/modules/pcx86/lib/x86cpu.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 8086/8088 CPU logic. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86fpu.js b/modules/pcx86/lib/x86fpu.js index e2c9a1d0d..b1f9296bf 100644 --- a/modules/pcx86/lib/x86fpu.js +++ b/modules/pcx86/lib/x86fpu.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 8087 FPU logic. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86func.js b/modules/pcx86/lib/x86func.js index 1d13a694a..ea086c9cd 100644 --- a/modules/pcx86/lib/x86func.js +++ b/modules/pcx86/lib/x86func.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 8086 opcode helpers. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86help.js b/modules/pcx86/lib/x86help.js index 3c4f4bf21..43ce00787 100644 --- a/modules/pcx86/lib/x86help.js +++ b/modules/pcx86/lib/x86help.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 opcode helpers. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86mods.js b/modules/pcx86/lib/x86mods.js index 87c9860c1..0bd19fe2b 100644 --- a/modules/pcx86/lib/x86mods.js +++ b/modules/pcx86/lib/x86mods.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 general-purpose ModRegRM decoding. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86op0f.js b/modules/pcx86/lib/x86op0f.js index 252d530a7..a4303d504 100644 --- a/modules/pcx86/lib/x86op0f.js +++ b/modules/pcx86/lib/x86op0f.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 0x0F two-byte opcodes * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86ops.js b/modules/pcx86/lib/x86ops.js index 3db5d9750..40511602a 100644 --- a/modules/pcx86/lib/x86ops.js +++ b/modules/pcx86/lib/x86ops.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 8086 opcode decoding. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pcx86/lib/x86seg.js b/modules/pcx86/lib/x86seg.js index e8678112b..47d7a1b09 100644 --- a/modules/pcx86/lib/x86seg.js +++ b/modules/pcx86/lib/x86seg.js @@ -1,7 +1,7 @@ /** * @fileoverview Implements PCx86 X86 Segment Registers * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/bin/oct2hex.js b/modules/pdp11/bin/oct2hex.js index 911f98849..e693bfc93 100644 --- a/modules/pdp11/bin/oct2hex.js +++ b/modules/pdp11/bin/oct2hex.js @@ -1,7 +1,7 @@ /** * @fileoverview Converts octal constants to hex. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 4c6226a49..46a30d96b 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Bus component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 10e50637f..49658eece 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Computer component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 85930a886..9ec54bb23 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -1,13 +1,13 @@ /** * @fileoverview Controls the PDP11 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 24cfb1367..e9de787b7 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements PDP11 opcode handlers. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index e107b62cc..014bc0329 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 CPU component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 3a591b6e4..4f51cd921 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Debugger component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 8f14d388d..74229e37d 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -1,13 +1,13 @@ /** * @fileoverview PDP11-specific compile-time definitions. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 4de377a71..b2636dfe7 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements PDP11 device support. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/keyboard.js b/modules/pdp11/lib/keyboard.js index 54e10c866..1a1b01d4c 100644 --- a/modules/pdp11/lib/keyboard.js +++ b/modules/pdp11/lib/keyboard.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Keyboard component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 4bfd96973..1aaf9c497 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Memory component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index ed9312b14..da6ef0375 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -1,13 +1,13 @@ /** * @fileoverview Defines PDP11 message categories. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/nodebugger.js b/modules/pdp11/lib/nodebugger.js index 2a11f8c1f..76006fcd8 100644 --- a/modules/pdp11/lib/nodebugger.js +++ b/modules/pdp11/lib/nodebugger.js @@ -1,13 +1,13 @@ /** * @fileoverview Compile-time definitions for Debugger-less configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index a29f74706..be23848e4 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 Panel component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index dac5081fd..861b29cdb 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 RAM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js index cc109cf43..443e81eed 100644 --- a/modules/pdp11/lib/rk11.js +++ b/modules/pdp11/lib/rk11.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements RK11 device support. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index adfab2cfb..3e26f4bbd 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 ROM component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 13c4c9cc9..d4f602795 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -1,13 +1,13 @@ /** * @fileoverview Implements the PDP11 SerialPort component. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - * may be used freely provided the original author name is acknowledged in any modified source code. + * (paulnank@hotmail.com) as of September 2016 at . This code + * may be used freely provided the original authors are acknowledged in any modified source code. * * PCjs is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 @@ -20,9 +20,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index ed6a9f9eb..f2ab6865e 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -1,7 +1,7 @@ /** * @fileoverview The Component class used by all PCjs components. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 481c66320..2728c8b59 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -1,7 +1,7 @@ /** * @fileoverview Common PCjs Debugger support. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/defines.js b/modules/shared/lib/defines.js index 4fa92f6f5..1459217a4 100644 --- a/modules/shared/lib/defines.js +++ b/modules/shared/lib/defines.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions used by C1Pjs and PCjs. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/diskapi.js b/modules/shared/lib/diskapi.js index dead0dc19..1dead2e19 100644 --- a/modules/shared/lib/diskapi.js +++ b/modules/shared/lib/diskapi.js @@ -1,7 +1,7 @@ /** * @fileoverview Disk APIs, as defined by httpapi.js and consumed by disk.js * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/dumpapi.js b/modules/shared/lib/dumpapi.js index 290d47dec..31a3ad7ad 100644 --- a/modules/shared/lib/dumpapi.js +++ b/modules/shared/lib/dumpapi.js @@ -1,7 +1,7 @@ /** * @fileoverview Disk APIs, as defined by diskdump.js and consumed by disk.js * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/embed.js b/modules/shared/lib/embed.js index 5ff3f3124..383f686ab 100644 --- a/modules/shared/lib/embed.js +++ b/modules/shared/lib/embed.js @@ -1,7 +1,7 @@ /** * @fileoverview C1Pjs and PCjs embedding functionality. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/externs.js b/modules/shared/lib/externs.js index f9368e8c7..db1581c41 100644 --- a/modules/shared/lib/externs.js +++ b/modules/shared/lib/externs.js @@ -1,7 +1,7 @@ /** * @fileoverview Externs used by PCjs and C1Pjs (for the Closure Compiler) * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/keys.js b/modules/shared/lib/keys.js index e0f841542..ddf95d8c4 100644 --- a/modules/shared/lib/keys.js +++ b/modules/shared/lib/keys.js @@ -1,7 +1,7 @@ /** * @fileoverview Defines browser keyboard constants. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/netlib.js b/modules/shared/lib/netlib.js index 01defd8f4..1bf0206ef 100644 --- a/modules/shared/lib/netlib.js +++ b/modules/shared/lib/netlib.js @@ -1,7 +1,7 @@ /** * @fileoverview Net-related functions * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/nodebug.js b/modules/shared/lib/nodebug.js index b06f30e68..1b30c33b4 100644 --- a/modules/shared/lib/nodebug.js +++ b/modules/shared/lib/nodebug.js @@ -1,7 +1,7 @@ /** * @fileoverview Compile-time definitions for non-DEBUG configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/private.js b/modules/shared/lib/private.js index efea19a4e..a8e87472a 100644 --- a/modules/shared/lib/private.js +++ b/modules/shared/lib/private.js @@ -1,7 +1,7 @@ /** * @fileoverview Definitions for PRIVATE configurations. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/proclib.js b/modules/shared/lib/proclib.js index 17877a0e2..e5edcf364 100644 --- a/modules/shared/lib/proclib.js +++ b/modules/shared/lib/proclib.js @@ -1,7 +1,7 @@ /** * @fileoverview Process-related helper functions * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/reportapi.js b/modules/shared/lib/reportapi.js index 941cc13be..ec07b2e31 100644 --- a/modules/shared/lib/reportapi.js +++ b/modules/shared/lib/reportapi.js @@ -1,7 +1,7 @@ /** * @fileoverview Report API, as defined by httpapi.js * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/save.js b/modules/shared/lib/save.js index 54347ad41..3e97b9e81 100644 --- a/modules/shared/lib/save.js +++ b/modules/shared/lib/save.js @@ -1,7 +1,7 @@ /** * @fileoverview PCjs save functionality. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/sockets.js b/modules/shared/lib/sockets.js index 34e8f212f..da453401c 100644 --- a/modules/shared/lib/sockets.js +++ b/modules/shared/lib/sockets.js @@ -1,7 +1,7 @@ /** * @fileoverview Experimental code included by HTMLOut() only if "--sockets" * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/state.js b/modules/shared/lib/state.js index 9b122a3ba..15a70bb27 100644 --- a/modules/shared/lib/state.js +++ b/modules/shared/lib/state.js @@ -1,7 +1,7 @@ /** * @fileoverview The State class used by PCjs machines. * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/strlib.js b/modules/shared/lib/strlib.js index b69f25869..388386788 100644 --- a/modules/shared/lib/strlib.js +++ b/modules/shared/lib/strlib.js @@ -1,7 +1,7 @@ /** * @fileoverview String-related helper functions * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/userapi.js b/modules/shared/lib/userapi.js index 884d78d38..05db0f5a0 100644 --- a/modules/shared/lib/userapi.js +++ b/modules/shared/lib/userapi.js @@ -1,7 +1,7 @@ /** * @fileoverview User API, as defined by httpapi.js * @author Jeff Parsons - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/usrlib.js b/modules/shared/lib/usrlib.js index fa1455910..ec4398905 100644 --- a/modules/shared/lib/usrlib.js +++ b/modules/shared/lib/usrlib.js @@ -1,7 +1,7 @@ /** * @fileoverview Assorted helper functions * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index ae7e3cce4..cce022f5e 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -1,7 +1,7 @@ /** * @fileoverview Browser-related helper functions * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/textout/bin/textout b/modules/textout/bin/textout index 7adeb1acf..191cf6293 100644 --- a/modules/textout/bin/textout +++ b/modules/textout/bin/textout @@ -21,9 +21,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/modules/textout/lib/textout.js b/modules/textout/lib/textout.js index a85a2a3b6..4cd30decc 100644 --- a/modules/textout/lib/textout.js +++ b/modules/textout/lib/textout.js @@ -1,7 +1,7 @@ /** * @fileoverview Provides miscellaneous text-munging services * @author Jeff Parsons (@jeffpar) - * @copyright Jeff Parsons 2012-2016 + * @copyright © Jeff Parsons 2012-2016 * * This file is part of PCjs, a computer emulation software project at . * @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License along with PCjs. If not, * see . * - * You are required to include the above copyright notice in every source code file of every - * copy or modified version of this work, and to display that copyright notice on every screen - * that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . * * Some PCjs files also attempt to load external resource files, such as character-image files, * ROM files, and disk image files. Those external resource files are not considered part of PCjs diff --git a/versions/c1pjs/1.30.1/c1p-dbg.js b/versions/c1pjs/1.30.1/c1p-dbg.js index 2384c0f1e..0e46a03dd 100644 --- a/versions/c1pjs/1.30.1/c1p-dbg.js +++ b/versions/c1pjs/1.30.1/c1p-dbg.js @@ -1,441 +1,23 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/serial.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/computer.js (C) Jeff Parsons 2012-2016 */ var f;function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,2,!0)}function r(a){return p(a,4,!0)}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var ea=Date.now||function(){return+new Date}; diff --git a/versions/c1pjs/1.30.1/c1p.js b/versions/c1pjs/1.30.1/c1p.js index 54be5f327..bea695fbd 100644 --- a/versions/c1pjs/1.30.1/c1p.js +++ b/versions/c1pjs/1.30.1/c1p.js @@ -1,441 +1,23 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/serial.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/c1pjs/lib/computer.js (C) Jeff Parsons 2012-2016 */ var e;function p(a,b,c){var d="";b?8=f?48:55),d=String.fromCharCode(f)+d;a>>=4}return(c?"0x":"")+d}function aa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"}; function da(a){return a.replace(/[&<>"']/g,function(a){return ca[a]})}var q=Date.now||function(){return+new Date}; diff --git a/versions/pc8080/1.30.1/pc8080-dbg.js b/versions/pc8080/1.30.1/pc8080-dbg.js index 01d80a74a..174849394 100644 --- a/versions/pc8080/1.30.1/pc8080-dbg.js +++ b/versions/pc8080/1.30.1/pc8080-dbg.js @@ -1,671 +1,33 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpudef.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ var l,m={me:1,ne:3,oe:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ub:65,Hc:66,Jc:67,Xb:68,E:69,Mc:70,Nc:71,Oc:72,Pc:73,Wc:74,Xc:75,Zb:76,dd:77,ed:78,gd:79,hd:80,Q:81,od:82,rd:83,xd:84,yd:85,zd:86,Ad:87,Cd:88,Dd:89,Ed:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ve:97,We:98,Xe:99,d:100,e:101,Ye:102,Ze:103,$e:104,af:105,bf:106,k:107,cf:108, df:109,n:110,ef:111,p:112,q:113,r:114,ff:115,t:116,hf:117,jf:118,kf:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; diff --git a/versions/pc8080/1.30.1/pc8080.js b/versions/pc8080/1.30.1/pc8080.js index fe1fa7c95..b6a8f0922 100644 --- a/versions/pc8080/1.30.1/pc8080.js +++ b/versions/pc8080/1.30.1/pc8080.js @@ -1,671 +1,33 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpudef.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ var k,m={pd:1,qd:3,rd:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,jb:65,Mb:66,Ob:67,mb:68,E:69,Rb:70,Sb:71,Tb:72,Ub:73,ac:74,bc:75,ob:76,ic:77,jc:78,mc:79,nc:80,Q:81,tc:82,wc:83,Bc:84,Cc:85,Dc:86,Ec:87,Gc:88,Hc:89,Ic:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Zd:97,$d:98,ae:99,d:100,e:101,be:102,ce:103,de:104,ee:105,fe:106,k:107,ge:108, he:109,n:110,ie:111,p:112,q:113,r:114,je:115,t:116,ke:117,le:118,me:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; diff --git a/versions/pcx86/1.30.1/pcx86-dbg.js b/versions/pcx86/1.30.1/pcx86-dbg.js index c897ddac6..9616a9e90 100644 --- a/versions/pcx86/1.30.1/pcx86-dbg.js +++ b/versions/pcx86/1.30.1/pcx86-dbg.js @@ -1,996 +1,47 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - - FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: - The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/parallelport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; diff --git a/versions/pcx86/1.30.1/pcx86.js b/versions/pcx86/1.30.1/pcx86.js index cb45608d1..3b8a3f31a 100644 --- a/versions/pcx86/1.30.1/pcx86.js +++ b/versions/pcx86/1.30.1/pcx86.js @@ -1,996 +1,47 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - - FPU instruction description excerpts from the PC Magazine "Programmer's Technical Reference: - The Processor and Coprocessor," Copyright 1992 by Ziff-Davis Press (ISBN 1-56276-016-5). - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/parallelport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index e0511dc25..de8cbd45d 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -1,685 +1,31 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + 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 */ var h; function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0/g.exec(a)){var e= "");a=a.replace(d[0],g);Jg(a,b,c)}})}else c(a,null)} function Kg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--vg||Na(!0));m=!1}var g,l,m=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| (c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Hg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--vg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--vg||Na(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,p):Ig(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Kg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})(); +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,p):Ig(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Kg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index ceecceec5..dc00c9c3b 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -1,685 +1,31 @@ (function(){/* - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code - may be used freely provided the original author name is acknowledged in any modified source code. - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. - Jeff Parsons 2012-2016 - - This file is part of PCjs, a computer emulation software project at . - - PCjs is free software: you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation, either version 3 - of the License, or (at your option) any later version. - - PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with PCjs. If not, - see . - - You are required to include the above copyright notice in every source code file of every - copy or modified version of this work, and to display that copyright notice on every screen - that loads or runs any version of this software (see COPYRIGHT in /modules/shared/lib/defines.js). - - Some PCjs files also attempt to load external resource files, such as character-image files, - ROM files, and disk image files. Those external resource files are not considered part of PCjs - for purposes of the GNU General Public License, and the author does not claim any copyright - as to their contents. + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + 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 */ var g; function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0/g.exec(a)){var e= "");a=a.replace(d[0],k);Nd(a,b,c)}})}else c(a,null)} function Od(a,b,c,d){function e(a){if(void 0===l){var b=k&&C(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Kd||xa(!0));n=!1}var k,l,n=!0;Kd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ia=document.createElement("style");ia.type="text/css";ia.styleSheet?ia.styleSheet.cssText=q:ia.appendChild(document.createTextNode(q));t.appendChild(ia)}c|| (c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Ld(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Kd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Kd||xa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,q):Md(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Jc){f(Jc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Od(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})(); +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,q):Md(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Jc){f(Jc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Od(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map From a0f7b85bddcd8b57cc45abf456fc371826cdbcab Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 14 Oct 2016 09:41:38 -0700 Subject: [PATCH 26/36] Removed an HTML template hack (should only affect the Node environment) --- modules/htmlout/lib/htmlout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/htmlout/lib/htmlout.js b/modules/htmlout/lib/htmlout.js index 741f65b86..c7f69d4ef 100644 --- a/modules/htmlout/lib/htmlout.js +++ b/modules/htmlout/lib/htmlout.js @@ -796,7 +796,7 @@ HTMLOut.prototype.setData = function(err, sData, sFile, fTemplate) * We cheat slightly and insert one of those tokens right now, because otherwise * the template file itself would not render correctly in your web browser. */ - this.sTemplate = sData.replace("/modules/shared/templates/common.css", "/versions/pcx86//common.css"); + this.sTemplate = sData; // .replace("/modules/shared/templates/common.css", "/versions/pcx86//common.css"); this.sHTML = this.sTemplate; /* From 342746f2bc75482f5090a79e38ab95f67e919eea Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 14 Oct 2016 11:06:33 -0700 Subject: [PATCH 27/36] Added a PDP-11 "server array" test page --- devices/pdp11/machine/1170/README.md | 1 + devices/pdp11/machine/1170/array/README.md | 30 ++++++++++++++++++++++ devices/pdp11/panel/1170/debugger/leds.xml | 6 ++--- devices/pdp11/panel/1170/debugger/test.xml | 6 ++--- devices/pdp11/panel/1170/leds.xml | 6 ++--- devices/pdp11/panel/1170/test.xml | 6 ++--- modules/pdp11/lib/serialport.js | 4 +-- 7 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 devices/pdp11/machine/1170/array/README.md diff --git a/devices/pdp11/machine/1170/README.md b/devices/pdp11/machine/1170/README.md index a76320cc6..655c60458 100644 --- a/devices/pdp11/machine/1170/README.md +++ b/devices/pdp11/machine/1170/README.md @@ -11,4 +11,5 @@ PCjs is adding support the following PDP-11/70 configurations: * [PDP-11/70 Test Machine](/devices/pdp11/machine/1170/test/) ([Debugger](/devices/pdp11/machine/1170/test/debugger/)) * [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel) ([Debugger](/devices/pdp11/machine/1170/panel/debugger/)) +* [PDP-11/70 "Server Array"](/devices/pdp11/machine/1170/array/) * [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/) ([Debugger](/devices/pdp11/machine/1170/vt100/debugger/)) diff --git a/devices/pdp11/machine/1170/array/README.md b/devices/pdp11/machine/1170/array/README.md new file mode 100644 index 000000000..690eb2e67 --- /dev/null +++ b/devices/pdp11/machine/1170/array/README.md @@ -0,0 +1,30 @@ +--- +layout: page +title: PDP-11/70 "Server Array" +permalink: /devices/pdp11/machine/1170/array/ +machines: + - type: pdp11 + id: test1170a + autoStart: true + config: /devices/pdp11/machine/1170/panel/machine.xml + - type: pdp11 + id: test1170b + autoStart: true + config: /devices/pdp11/machine/1170/panel/machine.xml + - type: pdp11 + id: test1170c + autoStart: true + config: /devices/pdp11/machine/1170/panel/machine.xml + - type: pdp11 + id: test1170d + autoStart: true + config: /devices/pdp11/machine/1170/panel/machine.xml +--- + +{% include machine.html id="test1170a" %} + +{% include machine.html id="test1170b" %} + +{% include machine.html id="test1170c" %} + +{% include machine.html id="test1170d" %} diff --git a/devices/pdp11/panel/1170/debugger/leds.xml b/devices/pdp11/panel/1170/debugger/leds.xml index ba5f57598..ca8da4248 100644 --- a/devices/pdp11/panel/1170/debugger/leds.xml +++ b/devices/pdp11/panel/1170/debugger/leds.xml @@ -85,8 +85,8 @@ - - + + Enter @@ -110,7 +110,7 @@ 0 - + Run Step Reset diff --git a/devices/pdp11/panel/1170/debugger/test.xml b/devices/pdp11/panel/1170/debugger/test.xml index 5fda5d305..93b469513 100644 --- a/devices/pdp11/panel/1170/debugger/test.xml +++ b/devices/pdp11/panel/1170/debugger/test.xml @@ -1,8 +1,8 @@ Control Panel - - + + Enter @@ -26,7 +26,7 @@ 0 - + Run Step Reset diff --git a/devices/pdp11/panel/1170/leds.xml b/devices/pdp11/panel/1170/leds.xml index e205bb4ef..1b1fd7b63 100644 --- a/devices/pdp11/panel/1170/leds.xml +++ b/devices/pdp11/panel/1170/leds.xml @@ -85,10 +85,10 @@ - - + + - + Run Reset Fast diff --git a/devices/pdp11/panel/1170/test.xml b/devices/pdp11/panel/1170/test.xml index 5960af701..66aa2fc31 100644 --- a/devices/pdp11/panel/1170/test.xml +++ b/devices/pdp11/panel/1170/test.xml @@ -1,10 +1,10 @@ Control Panel - - + + - + Run Reset Fast diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index d4f602795..d92c7e882 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -262,7 +262,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerReceiveInterrupt = this.cpu.addTrigger(PDP11.DL11.RVEC, PDP11.DL11.PRI); - this.timerReceiveInterrupt = this.cpu.addTimer(function() { + this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() { if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) { if (serial.abReceive.length) { serial.rbuf = serial.abReceive.shift(); @@ -276,7 +276,7 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerTransmitInterrupt = this.cpu.addTrigger(PDP11.DL11.XVEC, PDP11.DL11.PRI); - this.timerTransmitInterrupt = this.cpu.addTimer(function readyransmitter() { + this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() { serial.xcsr |= PDP11.DL11.XCSR.READY; if (serial.xcsr & PDP11.DL11.XCSR.TIE) { serial.cpu.setTrigger(serial.triggerTransmitInterrupt); From 3a7b769fa369f895651e00ced4dc14383652cba1 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 11:05:38 -0700 Subject: [PATCH 28/36] Added support to FileDump for generating binary dumps from MACRO11 listing (.lst) files, since I wasn't having much success with dumpobj or obj2hex.pl; note that this assumes a listing file produced by the macro11 cross-assembler written by Richard Krehbiel in 2001, updated in 2009, and maintained here: https://github.com/shattered/macro11. There are other versions of macro11 floating around, like the one in the simtools project that accompanies simh, and the one built for the Windows-based PDP11GUI app. --- devices/pdp11/machine/1120/README.md | 12 + devices/pdp11/machine/1120/test/README.md | 10 + .../machine/1120/test/debugger/README.md | 11 + .../machine/1120/test/debugger/machine.xml | 13 + devices/pdp11/machine/1120/test/machine.xml | 12 + .../machine/1170/panel/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/panel/machine.xml | 4 +- .../machine/1170/test/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/test/machine.xml | 4 +- .../machine/1170/vt100/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/vt100/machine.xml | 4 +- devices/pdp11/machine/README.md | 1 + .../1170/debugger/{leds.xml => front.xml} | 0 .../pdp11/panel/1170/{leds.xml => front.xml} | 0 .../test.xml => test/debugger/terminal.xml} | 0 .../{1170/test.xml => test/terminal.xml} | 0 devices/pdp11/rom/custom/boot.json | 177 ++--- devices/pdp11/rom/custom/boot.mac | 40 +- devices/pdp11/rom/custom/makefile | 7 + modules/filedump/lib/filedump.js | 106 ++- modules/pdp11/lib/bus.js | 40 +- modules/pdp11/lib/cpu.js | 2 +- modules/pdp11/lib/cpuops.js | 635 +++++++++++------- modules/pdp11/lib/cpustate.js | 9 +- modules/pdp11/lib/defines.js | 8 +- modules/pdp11/lib/device.js | 48 +- modules/shared/lib/debugger.js | 5 +- modules/shared/lib/dumpapi.js | 2 + modules/shared/lib/strlib.js | 57 ++ versions/pdpjs/1.30.1/pdp11-dbg.js | 427 ++++++------ versions/pdpjs/1.30.1/pdp11.js | 284 ++++---- 31 files changed, 1148 insertions(+), 782 deletions(-) create mode 100644 devices/pdp11/machine/1120/README.md create mode 100644 devices/pdp11/machine/1120/test/README.md create mode 100644 devices/pdp11/machine/1120/test/debugger/README.md create mode 100644 devices/pdp11/machine/1120/test/debugger/machine.xml create mode 100644 devices/pdp11/machine/1120/test/machine.xml rename devices/pdp11/panel/1170/debugger/{leds.xml => front.xml} (100%) rename devices/pdp11/panel/1170/{leds.xml => front.xml} (100%) rename devices/pdp11/panel/{1170/debugger/test.xml => test/debugger/terminal.xml} (100%) rename devices/pdp11/panel/{1170/test.xml => test/terminal.xml} (100%) create mode 100644 devices/pdp11/rom/custom/makefile diff --git a/devices/pdp11/machine/1120/README.md b/devices/pdp11/machine/1120/README.md new file mode 100644 index 000000000..bde29e5ec --- /dev/null +++ b/devices/pdp11/machine/1120/README.md @@ -0,0 +1,12 @@ +--- +layout: page +title: PDP-11/20 Machine Configurations +permalink: /devices/pdp11/machine/1120/ +--- + +PDP-11/20 Machine Configurations +-------------------------------- + +PCjs is adding support the following PDP-11/20 configurations: + +* [PDP-11/20 Test Machine](/devices/pdp11/machine/1120/test/) ([Debugger](/devices/pdp11/machine/1120/test/debugger/)) diff --git a/devices/pdp11/machine/1120/test/README.md b/devices/pdp11/machine/1120/test/README.md new file mode 100644 index 000000000..80613b2ec --- /dev/null +++ b/devices/pdp11/machine/1120/test/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11/20 Test Machine +permalink: /devices/pdp11/machine/1120/test/ +machines: + - id: test1120 + type: pdp11 +--- + +{% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/test/debugger/README.md b/devices/pdp11/machine/1120/test/debugger/README.md new file mode 100644 index 000000000..62b1158a2 --- /dev/null +++ b/devices/pdp11/machine/1120/test/debugger/README.md @@ -0,0 +1,11 @@ +--- +layout: page +title: PDP-11/20 Test Machine with Debugger +permalink: /devices/pdp11/machine/1120/test/ +machines: + - id: test1120 + type: pdp11 + debugger: true +--- + +{% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/test/debugger/machine.xml b/devices/pdp11/machine/1120/test/debugger/machine.xml new file mode 100644 index 000000000..a0a3f4f2e --- /dev/null +++ b/devices/pdp11/machine/1120/test/debugger/machine.xml @@ -0,0 +1,13 @@ + + + + PDP-11/20 Test Machine with Debugger + + + + + + + + + diff --git a/devices/pdp11/machine/1120/test/machine.xml b/devices/pdp11/machine/1120/test/machine.xml new file mode 100644 index 000000000..4deabff8e --- /dev/null +++ b/devices/pdp11/machine/1120/test/machine.xml @@ -0,0 +1,12 @@ + + + + PDP-11/20 Test Machine + + + + + + + + diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 9884fa131..8615599f7 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -5,10 +5,10 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 9232b558f..97dcd5ddb 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/test/debugger/machine.xml b/devices/pdp11/machine/1170/test/debugger/machine.xml index 1663c4a2e..df5cb042c 100644 --- a/devices/pdp11/machine/1170/test/debugger/machine.xml +++ b/devices/pdp11/machine/1170/test/debugger/machine.xml @@ -5,10 +5,10 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index 3e3b39bad..bf6ca3e02 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index 32ff0bc71..a4bcd50e8 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -5,10 +5,10 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index ae389343f..0630fba34 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/machine/README.md b/devices/pdp11/machine/README.md index c7cdc19a7..3e56b07dc 100644 --- a/devices/pdp11/machine/README.md +++ b/devices/pdp11/machine/README.md @@ -9,5 +9,6 @@ PDP-11 Machine Configurations [PDPjs](/modules/pdp11/), our PDP-11 emulation module, will support the following PDP-11 machines: +* [PDP-11/20](/devices/pdp11/machine/1120/) * PDP-11/45 * [PDP-11/70](/devices/pdp11/machine/1170/) diff --git a/devices/pdp11/panel/1170/debugger/leds.xml b/devices/pdp11/panel/1170/debugger/front.xml similarity index 100% rename from devices/pdp11/panel/1170/debugger/leds.xml rename to devices/pdp11/panel/1170/debugger/front.xml diff --git a/devices/pdp11/panel/1170/leds.xml b/devices/pdp11/panel/1170/front.xml similarity index 100% rename from devices/pdp11/panel/1170/leds.xml rename to devices/pdp11/panel/1170/front.xml diff --git a/devices/pdp11/panel/1170/debugger/test.xml b/devices/pdp11/panel/test/debugger/terminal.xml similarity index 100% rename from devices/pdp11/panel/1170/debugger/test.xml rename to devices/pdp11/panel/test/debugger/terminal.xml diff --git a/devices/pdp11/panel/1170/test.xml b/devices/pdp11/panel/test/terminal.xml similarity index 100% rename from devices/pdp11/panel/1170/test.xml rename to devices/pdp11/panel/test/terminal.xml diff --git a/devices/pdp11/rom/custom/boot.json b/devices/pdp11/rom/custom/boot.json index 2feb7b272..44e526b1a 100644 --- a/devices/pdp11/rom/custom/boot.json +++ b/devices/pdp11/rom/custom/boot.json @@ -1,89 +1,90 @@ {"words":[ -0x0005 /*0000005*/,0x0A1F /*0005037*/,0xFFFE /*0177776*/,0x15C6 /*0012706*/,0xC000 /*0140000*/,0x0A1F /*0005037*/,0xFF74 /*0177564*/,0x15C0 /*0012700*/, -0xC249 /*0141111*/,0x09F7 /*0004767*/,0x0052 /*0000122*/,0x15DF /*0012737*/,0xC054 /*0140124*/,0x0040 /*0000100*/,0x15DF /*0012737*/,0x00E0 /*0000340*/, -0x0042 /*0000102*/,0x55DF /*0052737*/,0x0040 /*0000100*/,0xFF66 /*0177546*/,0x15C0 /*0012700*/,0xC273 /*0141163*/,0x09F7 /*0004767*/,0x0038 /*0000070*/, -0xE5C6 /*0162706*/,0x00AE /*0000256*/,0x1180 /*0010600*/,0x09F7 /*0004767*/,0x006A /*0000152*/,0x0A00 /*0005000*/,0x0001 /*0000001*/,0x0A80 /*0005200*/, -0x0BF7 /*0005767*/,0x000C /*0000014*/,0x03FB /*0001773*/,0x15E6 /*0012746*/,0x5800 /*0054000*/,0x1DE6 /*0016746*/,0x0002 /*0000002*/,0x0006 /*0000006*/, -0x0000 /*0000000*/,0x0000 /*0000000*/,0x0AB7 /*0005267*/,0xFFFA /*0177772*/,0x0006 /*0000006*/,0x8BDF /*0105737*/,0xFF74 /*0177564*/,0x80FD /*0100375*/, -0x901F /*0110037*/,0xFF76 /*0177566*/,0x0087 /*0000207*/,0x0000 /*0000000*/,0xB5DF /*0132737*/,0x0040 /*0000100*/,0xFF74 /*0177564*/,0x02FC /*0001374*/, -0x1037 /*0010067*/,0xFFF2 /*0177762*/,0x15DF /*0012737*/,0xC088 /*0140210*/,0x0034 /*0000064*/,0x15DF /*0012737*/,0x0080 /*0000200*/,0x0036 /*0000066*/, -0xD5DF /*0152737*/,0x0040 /*0000100*/,0xFF74 /*0177564*/,0x0087 /*0000207*/,0x8BFF /*0105777*/,0xFFDA /*0177732*/,0x0306 /*0001406*/,0x9FDF /*0117737*/, -0xFFD4 /*0177724*/,0xFF76 /*0177566*/,0x0AB7 /*0005267*/,0xFFCE /*0177716*/,0x0006 /*0000006*/,0x8A1F /*0105037*/,0xFF74 /*0177564*/,0x0006 /*0000006*/, -0x0000 /*0000000*/,0x0000 /*0000000*/,0x1037 /*0010067*/,0xFFF8 /*0177770*/,0x0A37 /*0005067*/,0xFFF6 /*0177766*/,0x15DF /*0012737*/,0xC0C0 /*0140300*/, -0x0030 /*0000060*/,0x15DF /*0012737*/,0x0080 /*0000200*/,0x0032 /*0000062*/,0xD5DF /*0152737*/,0x0040 /*0000100*/,0xFF70 /*0177560*/,0x0087 /*0000207*/, -0x1026 /*0010046*/,0x97C0 /*0113700*/,0xFF72 /*0177562*/,0xA017 /*0120027*/,0x000D /*0000015*/,0x032D /*0001455*/,0xA017 /*0120027*/,0x007F /*0000177*/, -0x0303 /*0001403*/,0xA017 /*0120027*/,0x0008 /*0000010*/,0x020A /*0001012*/,0x0BF7 /*0005767*/,0xFFC6 /*0177706*/,0x0306 /*0001406*/,0x0AF7 /*0005367*/, -0xFFC0 /*0177700*/,0x15C0 /*0012700*/,0xC217 /*0141027*/,0x09F7 /*0004767*/,0xFF7E /*0177576*/,0x012B /*0000453*/,0xA017 /*0120027*/,0x0020 /*0000040*/, -0x0528 /*0002450*/,0xA017 /*0120027*/,0x007F /*0000177*/,0x0425 /*0002045*/,0x09F7 /*0004767*/,0xFF5E /*0177536*/,0xA017 /*0120027*/,0x007A /*0000172*/, -0x0605 /*0003005*/,0xA017 /*0120027*/,0x0061 /*0000141*/,0x0502 /*0002402*/,0xC5C0 /*0142700*/,0x0020 /*0000040*/,0x2DD7 /*0026727*/,0xFF92 /*0177622*/, -0x00AC /*0000254*/,0x0417 /*0002027*/,0x9026 /*0110046*/,0x1DC0 /*0016700*/,0xFF86 /*0177606*/,0x6DC0 /*0066700*/,0xFF84 /*0177604*/,0x9588 /*0112610*/, -0x0AB7 /*0005267*/,0xFF7E /*0177576*/,0x010E /*0000416*/,0x1DC0 /*0016700*/,0xFF76 /*0177566*/,0x6DC0 /*0066700*/,0xFF74 /*0177564*/,0x8A08 /*0105010*/, -0x15DF /*0012737*/,0xC146 /*0140506*/,0x00A0 /*0000240*/,0x15DF /*0012737*/,0x0040 /*0000100*/,0x00A2 /*0000242*/,0x15DF /*0012737*/,0x0400 /*0002000*/, -0xFFFA /*0177772*/,0x1580 /*0012600*/,0x0006 /*0000006*/,0x0A1F /*0005037*/,0xFFFA /*0177772*/,0x1026 /*0010046*/,0x1066 /*0010146*/,0x10A6 /*0010246*/, -0x10E6 /*0010346*/,0x1126 /*0010446*/,0x15C0 /*0012700*/,0xC214 /*0141024*/,0x09F7 /*0004767*/,0xFF0C /*0177414*/,0xB5DF /*0132737*/,0x0040 /*0000100*/, -0xFF74 /*0177564*/,0x02FC /*0001374*/,0x0A04 /*0005004*/,0x15C3 /*0012703*/,0xC21B /*0141033*/,0x94C0 /*0112300*/,0x0319 /*0001431*/,0x1DC2 /*0016702*/, -0xFF2E /*0177456*/,0x9481 /*0112201*/,0x0319 /*0001431*/,0xA057 /*0120127*/,0x0020 /*0000040*/,0x03FB /*0001773*/,0xA001 /*0120001*/,0x0208 /*0001010*/, -0x94C0 /*0112300*/,0x030A /*0001412*/,0x9481 /*0112201*/,0x0308 /*0001410*/,0xA057 /*0120127*/,0x0020 /*0000040*/,0x02F7 /*0001367*/,0x0104 /*0000404*/, -0x94C0 /*0112300*/,0x02FE /*0001376*/,0x0A84 /*0005204*/,0x01E9 /*0000751*/,0x0CC4 /*0006304*/,0x09FC /*0004774*/,0xC1C0 /*0140700*/,0x0104 /*0000404*/, -0x15C0 /*0012700*/,0xC237 /*0141067*/,0x09F7 /*0004767*/,0xFEC0 /*0177300*/,0x0A37 /*0005067*/,0xFEF6 /*0177366*/,0x15C0 /*0012700*/,0xC273 /*0141163*/, -0x09F7 /*0004767*/,0xFEB4 /*0177264*/,0x1584 /*0012604*/,0x1583 /*0012603*/,0x1582 /*0012602*/,0x1581 /*0012601*/,0x1580 /*0012600*/,0x0006 /*0000006*/, -0xC432 /*0142062*/,0xC2AE /*0141256*/,0xC2BA /*0141272*/,0xC2FE /*0141376*/,0xC2A4 /*0141244*/,0x4F43 /*0047503*/,0x4D4D /*0046515*/,0x4E41 /*0047101*/, -0x5344 /*0051504*/,0x4120 /*0040440*/,0x4552 /*0042522*/,0x4220 /*0041040*/,0x4F4F /*0047517*/,0x2C54 /*0026124*/,0x4820 /*0044040*/,0x4C41 /*0046101*/, -0x2C54 /*0026124*/,0x5420 /*0052040*/,0x5345 /*0051505*/,0x2054 /*0020124*/,0x4E41 /*0047101*/,0x2044 /*0020104*/,0x4548 /*0042510*/,0x504C /*0050114*/, -0x0A0D /*0005015*/,0x4F42 /*0047502*/,0x544F /*0052117*/,0x4420 /*0042040*/,0x5645 /*0053105*/,0x4349 /*0041511*/,0x5345 /*0051505*/,0x4120 /*0040440*/, -0x4552 /*0042522*/,0x5220 /*0051040*/,0x3F4B /*0037513*/,0x5220 /*0051040*/,0x3F4C /*0037514*/,0x4F20 /*0047440*/,0x2052 /*0020122*/,0x5052 /*0050122*/, -0x0D3F /*0006477*/,0x000A /*0000012*/,0x0A0D /*0005015*/,0x0800 /*0004000*/,0x0820 /*0004040*/,0x4200 /*0041000*/,0x4F4F /*0047517*/,0x0054 /*0000124*/, -0x4148 /*0040510*/,0x544C /*0052114*/,0x5400 /*0052000*/,0x5345 /*0051505*/,0x0054 /*0000124*/,0x494C /*0044514*/,0x4847 /*0044107*/,0x5354 /*0051524*/, -0x4800 /*0044000*/,0x4C45 /*0046105*/,0x0050 /*0000120*/,0x5500 /*0052400*/,0x4B4E /*0045516*/,0x4F4E /*0047516*/,0x4E57 /*0047127*/,0x4320 /*0041440*/, -0x4D4F /*0046517*/,0x414D /*0040515*/,0x444E /*0042116*/,0x0D0A /*0006412*/,0x5000 /*0050000*/,0x5541 /*0052501*/,0x204C /*0020114*/,0x414E /*0040516*/, -0x4B4E /*0045516*/,0x5245 /*0051105*/,0x4956 /*0044526*/,0x2053 /*0020123*/,0x202D /*0020055*/,0x4150 /*0040520*/,0x4C55 /*0046125*/,0x414E /*0040516*/, -0x4B4E /*0045516*/,0x4840 /*0044100*/,0x544F /*0052117*/,0x414D /*0040515*/,0x4C49 /*0046111*/,0x432E /*0041456*/,0x4D4F /*0046517*/,0x0D0A /*0006412*/, -0x0D0A /*0006412*/,0x4200 /*0041000*/,0x4F4F /*0047517*/,0x3E54 /*0037124*/,0x0020 /*0000040*/,0x4E55 /*0047125*/,0x4E4B /*0047113*/,0x574F /*0053517*/, -0x204E /*0020116*/,0x4F42 /*0047502*/,0x544F /*0052117*/,0x4420 /*0042040*/,0x5645 /*0053105*/,0x4349 /*0041511*/,0x0A45 /*0005105*/,0x000D /*0000015*/, -0x2020 /*0020040*/,0x2020 /*0020040*/,0x2020 /*0020040*/,0x4C43 /*0046103*/,0x434F /*0041517*/,0x204B /*0020113*/,0x4954 /*0044524*/,0x4B43 /*0045503*/, -0x0A53 /*0005123*/,0x000D /*0000015*/,0x15C0 /*0012700*/,0xC1CA /*0140712*/,0x09F7 /*0004767*/,0xFDBC /*0176674*/,0x0087 /*0000207*/,0x0000 /*0000000*/, -0x15C0 /*0012700*/,0xC214 /*0141024*/,0x09F7 /*0004767*/,0xFDB0 /*0176660*/,0x0087 /*0000207*/,0x0A37 /*0005067*/,0xFD94 /*0176624*/,0x15C5 /*0012705*/, -0x1A00 /*0015000*/,0x115F /*0010537*/,0xFF78 /*0177570*/,0x1144 /*0010504*/,0x0C84 /*0006204*/,0x0A00 /*0005000*/,0x1141 /*0010501*/,0x7204 /*0071004*/, -0x1002 /*0010002*/,0x7084 /*0070204*/,0x60C1 /*0060301*/,0x2045 /*0020105*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x7F0A /*0077412*/,0x7F4F /*0077517*/, -0x15C0 /*0012700*/,0xC295 /*0141225*/,0x1DC3 /*0016703*/,0xFD6A /*0176552*/,0x0A02 /*0005002*/,0x7297 /*0071227*/,0x0008 /*0000010*/,0x65C3 /*0062703*/, -0x0030 /*0000060*/,0x90E0 /*0110340*/,0x1083 /*0010203*/,0x02F8 /*0001370*/,0x09F7 /*0004767*/,0xFD6C /*0176554*/,0x0087 /*0000207*/,0x15C3 /*0012703*/, -0x7F06 /*0077406*/,0x0A02 /*0005002*/,0x0A01 /*0005001*/,0x15C0 /*0012700*/,0x0008 /*0000010*/,0x10F1 /*0010361*/,0xF4C0 /*0172300*/,0x10B1 /*0010261*/, -0xF4E0 /*0172340*/,0x10F1 /*0010361*/,0xF4D0 /*0172320*/,0x10B1 /*0010261*/,0xF4F0 /*0172360*/,0x10F1 /*0010361*/,0xF480 /*0172200*/,0x10B1 /*0010261*/, -0xF4A0 /*0172240*/,0x10F1 /*0010361*/,0xF490 /*0172220*/,0x10B1 /*0010261*/,0xF4B0 /*0172260*/,0x10F1 /*0010361*/,0xFF80 /*0177600*/,0x10B1 /*0010261*/, -0xFFA0 /*0177640*/,0x10F1 /*0010361*/,0xFF90 /*0177620*/,0x10F1 /*0010361*/,0xFFB0 /*0177660*/,0x65C2 /*0062702*/,0x0080 /*0000200*/,0x65C1 /*0062701*/, -0x0002 /*0000002*/,0x7E1D /*0077035*/,0x55DF /*0052737*/,0xFC00 /*0176000*/,0xF4FE /*0172376*/,0x55DF /*0052737*/,0xFC00 /*0176000*/,0xF4BE /*0172276*/, -0x55DF /*0052737*/,0xFC00 /*0176000*/,0xFFBE /*0177676*/,0x15DF /*0012737*/,0x003F /*0000077*/,0xF54E /*0172516*/,0x15DF /*0012737*/,0x0001 /*0000001*/, -0xFF7A /*0177572*/,0x15DF /*0012737*/,0x03C0 /*0001700*/,0xF4A4 /*0172244*/,0x15DF /*0012737*/,0x03C0 /*0001700*/,0xF4B4 /*0172264*/,0x15DF /*0012737*/, -0x1000 /*0010000*/,0xFFFE /*0177776*/,0x15C3 /*0012703*/,0x4080 /*0040200*/,0x15C2 /*0012702*/,0xC38E /*0141616*/,0x14A6 /*0012246*/,0x0D93 /*0006623*/, -0x2097 /*0020227*/,0xC432 /*0142062*/,0x87FB /*0103773*/,0x15F7 /*0012767*/,0x4080 /*0040200*/,0xFCC4 /*0176304*/,0x0087 /*0000207*/,0x15C0 /*0012700*/, -0x001F /*0000037*/,0x15C1 /*0012701*/,0xF800 /*0174000*/,0x35DF /*0032737*/,0x0001 /*0000001*/,0xFF78 /*0177570*/,0x030C /*0001414*/,0x15C0 /*0012700*/, -0x0F0F /*0007417*/,0x1001 /*0010001*/,0x0A41 /*0005101*/,0x35DF /*0032737*/,0x0002 /*0000002*/,0xFF78 /*0177570*/,0x0304 /*0001404*/,0x15C0 /*0012700*/, -0x3C73 /*0036163*/,0x15C1 /*0012701*/,0x3E00 /*0037000*/,0x1042 /*0010102*/,0xE5C2 /*0162702*/,0x0002 /*0000002*/,0x45C2 /*0042702*/,0x0001 /*0000001*/, -0x1083 /*0010203*/,0x45C3 /*0042703*/,0xFFC1 /*0177701*/,0x15F3 /*0012763*/,0x0001 /*0000001*/,0x4000 /*0040000*/,0x65C3 /*0062703*/,0x0002 /*0000002*/, -0x15F3 /*0012763*/,0x004B /*0000113*/,0x4000 /*0040000*/,0x1084 /*0010204*/,0x7517 /*0072427*/,0xFFFA /*0177772*/,0x45C4 /*0042704*/,0xFF80 /*0177600*/, -0x15C5 /*0012705*/,0x03C0 /*0001700*/,0xE105 /*0160405*/,0x1084 /*0010204*/,0x7517 /*0072427*/,0xFFF4 /*0177764*/,0x45C4 /*0042704*/,0xFFF1 /*0177761*/, -0x1174 /*0010564*/,0xF4A0 /*0172240*/,0x1043 /*0010103*/,0x74D7 /*0072327*/,0xFFF4 /*0177764*/,0x45C3 /*0042703*/,0xFFF1 /*0177761*/,0x20C4 /*0020304*/, -0x030A /*0001412*/,0x1044 /*0010104*/,0x7517 /*0072427*/,0xFFFA /*0177772*/,0x45C4 /*0042704*/,0xFF80 /*0177600*/,0x15C5 /*0012705*/,0x03C0 /*0001700*/, -0xE105 /*0160405*/,0x1173 /*0010563*/,0xF4A0 /*0172240*/,0x15C4 /*0012704*/,0x0003 /*0000003*/,0x67C4 /*0063704*/,0xFF78 /*0177570*/,0x15C3 /*0012703*/, -0x0002 /*0000002*/,0x61C3 /*0060703*/,0x004A /*0000112*/,0x7F02 /*0077402*/,0x1002 /*0010002*/,0x0C02 /*0006002*/,0x0C41 /*0006101*/,0x0C00 /*0006000*/, -0x01C2 /*0000702*/,0x0A03 /*0005003*/,0x9481 /*0112201*/,0x0365 /*0001545*/,0xA057 /*0120127*/,0x0020 /*0000040*/,0x03FB /*0001773*/,0xA057 /*0120127*/, -0x0052 /*0000122*/,0x0305 /*0001405*/,0x15C0 /*0012700*/,0xC27A /*0141172*/,0x09F7 /*0004767*/,0xFC1C /*0176034*/,0x0087 /*0000207*/,0x9481 /*0112201*/, -0x9480 /*0112200*/,0x030E /*0001416*/,0xA017 /*0120027*/,0x0020 /*0000040*/,0x030B /*0001413*/,0xA017 /*0120027*/,0x0037 /*0000067*/,0x0619 /*0003031*/, -0xE5C0 /*0162700*/,0x0030 /*0000060*/,0x0516 /*0002426*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/,0x5003 /*0050003*/,0x01F0 /*0000760*/, -0x0A02 /*0005002*/,0x15D2 /*0012722*/,0x005F /*0000137*/,0x15D2 /*0012722*/,0xC000 /*0140000*/,0x15D2 /*0012722*/,0xC000 /*0140000*/,0x0A12 /*0005022*/, -0xA057 /*0120127*/,0x004B /*0000113*/,0x033E /*0001476*/,0xA057 /*0120127*/,0x004C /*0000114*/,0x0308 /*0001410*/,0xA057 /*0120127*/,0x0050 /*0000120*/, -0x034F /*0001517*/,0x15C0 /*0012700*/,0xC237 /*0141067*/,0x09F7 /*0004767*/,0xFBCE /*0175716*/,0x0087 /*0000207*/,0x0005 /*0000005*/,0x00C3 /*0000303*/, -0x15C1 /*0012701*/,0xF900 /*0174400*/,0x15F1 /*0012761*/,0x000B /*0000013*/,0x0004 /*0000004*/,0x55C3 /*0052703*/,0x0004 /*0000004*/,0x10C9 /*0010311*/, -0x8BC9 /*0105711*/,0x80FE /*0100376*/,0x8A03 /*0105003*/,0x55C3 /*0052703*/,0x0008 /*0000010*/,0x10C9 /*0010311*/,0x8BC9 /*0105711*/,0x80FE /*0100376*/, -0x1C42 /*0016102*/,0x0006 /*0000006*/,0x45C2 /*0042702*/,0x003F /*0000077*/,0x0A82 /*0005202*/,0x10B1 /*0010261*/,0x0004 /*0000004*/,0x8A03 /*0105003*/, -0x55C3 /*0052703*/,0x0006 /*0000006*/,0x10C9 /*0010311*/,0x8BC9 /*0105711*/,0x80FE /*0100376*/,0x0A31 /*0005061*/,0x0002 /*0000002*/,0x0A31 /*0005061*/, -0x0004 /*0000004*/,0x15F1 /*0012761*/,0xFE00 /*0177000*/,0x0006 /*0000006*/,0x8A03 /*0105003*/,0x55C3 /*0052703*/,0x000C /*0000014*/,0x10C9 /*0010311*/, -0x8BC9 /*0105711*/,0x80FE /*0100376*/,0x45C9 /*0042711*/,0x00FF /*0000377*/,0x0A02 /*0005002*/,0x0A03 /*0005003*/,0x0A04 /*0005004*/,0x0A05 /*0005005*/, -0x0A07 /*0005007*/,0x0005 /*0000005*/,0x00C3 /*0000303*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/,0x0CC3 /*0006303*/, -0x15C1 /*0012701*/,0xFF0A /*0177412*/,0x10C9 /*0010311*/,0x0A21 /*0005041*/,0x15E1 /*0012741*/,0xFE00 /*0177000*/,0x15E1 /*0012741*/,0x0005 /*0000005*/, -0x0A02 /*0005002*/,0x0A03 /*0005003*/,0x0A04 /*0005004*/,0x0A05 /*0005005*/,0x8BC9 /*0105711*/,0x80FE /*0100376*/,0x8A09 /*0105011*/,0x0A07 /*0005007*/, -0x0005 /*0000005*/,0x15C1 /*0012701*/,0xFDC0 /*0176700*/,0x15F1 /*0012761*/,0x0020 /*0000040*/,0x0008 /*0000010*/,0x10F1 /*0010361*/,0x0008 /*0000010*/, -0x15C9 /*0012711*/,0x0011 /*0000021*/,0x15F1 /*0012761*/,0x1000 /*0010000*/,0x001A /*0000032*/,0x15F1 /*0012761*/,0xFE00 /*0177000*/,0x0002 /*0000002*/, -0x0A31 /*0005061*/,0x0004 /*0000004*/,0x0A31 /*0005061*/,0x0006 /*0000006*/,0x0A31 /*0005061*/,0x001C /*0000034*/,0x15C9 /*0012711*/,0x0039 /*0000071*/, -0x8BC9 /*0105711*/,0x80FE /*0100376*/,0x8A09 /*0105011*/,0x0A07 /*0005007*/,0x0000 /*0000000*/,0x0000 /*0000000*/,0x0000 /*0000000*/,0x0000 /*0000000*/ -]} +0x0005 /*000005*/,0x0A1F /*005037*/,0xFFFE /*177776*/,0x15C6 /*012706*/,0xC000 /*140000*/,0x0A1F /*005037*/,0xFF74 /*177564*/,0x15C0 /*012700*/, +0xC251 /*141121*/,0x09F7 /*004767*/,0x0052 /*000122*/,0x15DF /*012737*/,0xC054 /*140124*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, +0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC27B /*141173*/,0x09F7 /*004767*/,0x0038 /*000070*/, +0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006A /*000152*/,0x0A00 /*005000*/,0x0001 /*000001*/,0x0A80 /*005200*/, +0x0BF7 /*005767*/,0x000C /*000014*/,0x03FB /*001773*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/,0x0002 /*000002*/,0x0002 /*000002*/, +0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/,0xFF74 /*177564*/,0x80FD /*100375*/, +0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/, +0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC088 /*140210*/,0x0034 /*000064*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0036 /*000066*/, +0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/,0x0306 /*001406*/,0x9FDF /*117737*/, +0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/,0xFF74 /*177564*/,0x0002 /*000002*/, +0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/,0x15DF /*012737*/,0xC0C0 /*140300*/, +0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF70 /*177560*/,0x0087 /*000207*/, +0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/,0xA017 /*120027*/,0x007F /*000177*/, +0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/,0x0306 /*001406*/,0x0AF7 /*005367*/, +0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC21F /*141037*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/,0xA017 /*120027*/,0x0020 /*000040*/, +0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/,0xA017 /*120027*/,0x007A /*000172*/, +0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/,0x2DD7 /*026727*/,0xFF92 /*177622*/, +0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/,0xFF84 /*177604*/,0x9588 /*112610*/, +0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/,0xFF74 /*177564*/,0x8A08 /*105010*/, +0x15DF /*012737*/,0xC146 /*140506*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/,0x15DF /*012737*/,0x0400 /*002000*/, +0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/,0x1066 /*010146*/,0x10A6 /*010246*/, +0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFF0C /*177414*/,0xB5DF /*132737*/,0x0040 /*000100*/, +0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC223 /*141043*/,0x94C0 /*112300*/,0x0319 /*001431*/,0x1DC2 /*016702*/, +0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA001 /*120001*/,0x0208 /*001010*/, +0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/,0x02F7 /*001367*/,0x0104 /*000404*/, +0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/,0xC1C0 /*140700*/,0x0104 /*000404*/, +0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/,0x15C0 /*012700*/,0xC27B /*141173*/, +0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/,0x1580 /*012600*/,0x0002 /*000002*/, +0xC43A /*142072*/,0xC2B6 /*141266*/,0xC2C2 /*141302*/,0xC306 /*141406*/,0xC2AC /*141254*/,0x4F43 /*047503*/,0x4D4D /*046515*/,0x4E41 /*047101*/, +0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/,0x4820 /*044040*/,0x4C41 /*046101*/, +0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/,0x5345 /*051505*/,0x2054 /*020124*/, +0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/, +0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/,0x3F4B /*037513*/,0x5220 /*051040*/, +0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/,0x0A0D /*005015*/,0x0800 /*004000*/, +0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/,0x5400 /*052000*/,0x5345 /*051505*/, +0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/,0x0050 /*000120*/,0x5500 /*052400*/, +0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/,0x444E /*042116*/,0x0D0A /*006412*/, +0x5000 /*050000*/,0x5541 /*052501*/,0x204C /*020114*/,0x414E /*040516*/,0x4B4E /*045516*/,0x5245 /*051105*/,0x4956 /*044526*/,0x2053 /*020123*/, +0x202D /*020055*/,0x4150 /*040520*/,0x4C55 /*046125*/,0x414E /*040516*/,0x4B4E /*045516*/,0x4840 /*044100*/,0x544F /*052117*/,0x414D /*040515*/, +0x4C49 /*046111*/,0x432E /*041456*/,0x4D4F /*046517*/,0x0D0A /*006412*/,0x0D0A /*006412*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x3E54 /*037124*/, +0x0020 /*000040*/,0x4E55 /*047125*/,0x4E4B /*047113*/,0x574F /*053517*/,0x204E /*020116*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/, +0x5645 /*053105*/,0x4349 /*041511*/,0x0A45 /*005105*/,0x000D /*000015*/,0x2020 /*020040*/,0x2020 /*020040*/,0x2020 /*020040*/,0x4C43 /*046103*/, +0x434F /*041517*/,0x204B /*020113*/,0x4954 /*044524*/,0x4B43 /*045503*/,0x0A53 /*005123*/,0x000D /*000015*/,0x15C0 /*012700*/,0xC1CA /*140712*/, +0x09F7 /*004767*/,0xFDB4 /*176664*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFDA8 /*176650*/, +0x0087 /*000207*/,0x0A37 /*005067*/,0xFD8C /*176614*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/,0x1144 /*010504*/, +0x0C84 /*006204*/,0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/,0x2045 /*020105*/, +0x0301 /*001401*/,0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC29D /*141235*/,0x1DC3 /*016703*/,0xFD62 /*176542*/, +0x0A02 /*005002*/,0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/,0x02F8 /*001370*/, +0x09F7 /*004767*/,0xFD64 /*176544*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/,0x15C0 /*012700*/, +0x0008 /*000010*/,0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/,0x10B1 /*010261*/, +0xF4F0 /*172360*/,0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/,0x10B1 /*010261*/, +0xF4B0 /*172260*/,0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/,0x10F1 /*010361*/, +0xFFB0 /*177660*/,0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/,0xFC00 /*176000*/, +0xF4FE /*172376*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/,0x15DF /*012737*/, +0x003F /*000077*/,0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4A4 /*172244*/, +0x15DF /*012737*/,0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/,0x4080 /*040200*/, +0x15C2 /*012702*/,0xC396 /*141626*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC43A /*142072*/,0x87FB /*103773*/,0x15F7 /*012767*/, +0x4080 /*040200*/,0xFCBC /*176274*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/,0x35DF /*032737*/, +0x0001 /*000001*/,0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/,0x35DF /*032737*/, +0x0002 /*000002*/,0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/,0x1042 /*010102*/, +0xE5C2 /*162702*/,0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/,0x15F3 /*012763*/, +0x0001 /*000001*/,0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/,0x1084 /*010204*/, +0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1084 /*010204*/, +0x7517 /*072427*/,0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/,0x74D7 /*072327*/, +0xFFF4 /*177764*/,0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/,0xFFFA /*177772*/, +0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/,0x15C4 /*012704*/, +0x0003 /*000003*/,0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/,0x7F02 /*077402*/, +0x1002 /*010002*/,0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/,0x0365 /*001545*/, +0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/,0xC282 /*141202*/, +0x09F7 /*004767*/,0xFC14 /*176024*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/,0x0020 /*000040*/, +0x030B /*001413*/,0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/,0x0CC3 /*006303*/, +0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/,0x15D2 /*012722*/, +0xC000 /*140000*/,0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/,0xA057 /*120127*/, +0x004C /*000114*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/, +0xFBC6 /*175706*/,0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/,0x000B /*000013*/, +0x0004 /*000004*/,0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/,0x55C3 /*052703*/, +0x0008 /*000010*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/,0x003F /*000077*/, +0x0A82 /*005202*/,0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/,0x8BC9 /*105711*/, +0x80FE /*100376*/,0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0006 /*000006*/, +0x8A03 /*105003*/,0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/,0x00FF /*000377*/, +0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x0CC3 /*006303*/, +0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/,0x0A21 /*005041*/, +0x15E1 /*012741*/,0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/, +0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/,0x15F1 /*012761*/, +0x0020 /*000040*/,0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/,0x1000 /*010000*/, +0x001A /*000032*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/,0x0006 /*000006*/, +0x0A31 /*005061*/,0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x10C0 /*010300*/, +0x0A07 /*005007*/] +} \ No newline at end of file diff --git a/devices/pdp11/rom/custom/boot.mac b/devices/pdp11/rom/custom/boot.mac index 65bf107bc..e713034d3 100644 --- a/devices/pdp11/rom/custom/boot.mac +++ b/devices/pdp11/rom/custom/boot.mac @@ -4,21 +4,23 @@ ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? PSW = 177776 -DL11_XCSR = 177564 -DL11_VEC = 64 +DL11XCSR = 177564 +DL11VEC = 64 -KW11_LKS = 177546 -KW11_VEC = 100 +KW11LKS = 177546 +KW11VEC = 100 + .ASECT + .=140000 START: RESET ; 140000 CLR @#PSW MOV #START,SP - CLR @#DL11_XCSR ; CLEAR THE XCSR + CLR @#DL11XCSR ; CLEAR THE XCSR MOV #BANNER,R0 JSR PC,PRINT - MOV #CLKAST,@#KW11_VEC - MOV #340,@#KW11_VEC+2 - BIS #100,@#KW11_LKS ; SET CLOCK TICKING + MOV #CLKAST,@#KW11VEC + MOV #340,@#KW11VEC+2 + BIS #100,@#KW11LKS ; SET CLOCK TICKING MOV #PROMPT,R0 JSR PC,PRINT @@ -32,17 +34,17 @@ START: RESET ; 140000 BEQ 1$ MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG MOV LGHTON,-(SP) ; CALL SUPER LOOP START - RTT + RTI LGHTON: .WORD 0 CLKTIC: .WORD 0 CLKAST: ; 140124 INC CLKTIC - RTT + RTI ONECHR: - TSTB @#DL11_XCSR ; 140132 + TSTB @#DL11XCSR ; 140132 BPL ONECHR MOVB R0,@#177566 RTS PC @@ -50,12 +52,12 @@ ONECHR: PRTPTR: .WORD 0 ; 140146 PRINT: ; 140150 - BITB #100,@#DL11_XCSR + BITB #100,@#DL11XCSR BNE PRINT MOV R0,PRTPTR - MOV #PRTAST,@#DL11_VEC - MOV #200,@#DL11_VEC+2 - BISB #100,@#DL11_XCSR + MOV #PRTAST,@#DL11VEC + MOV #200,@#DL11VEC+2 + BISB #100,@#DL11XCSR RTS PC PRTAST: ; 140210 @@ -63,9 +65,9 @@ PRTAST: ; 140210 BEQ 2$ MOVB @PRTPTR,@#177566 INC PRTPTR - RTT + RTI 2$: CLRB @#177564 - RTT + RTI BUFFER: .WORD 0 ; INPUT BUFFER POINTER LENGTH: .WORD 0 ; INPUT BUFFER LENGTH @@ -119,7 +121,7 @@ INPAST: ; 140300 MOV #100,@#242 MOV #2000,@#177772 9$: MOV (SP)+,R0 - RTT + RTI CMD: ; 140506 CLR @#177772 ; NO MORE PIR CALLS @@ -169,7 +171,7 @@ CMD: ; 140506 MOV (SP)+,R2 MOV (SP)+,R1 MOV (SP)+,R0 - RTT + RTI CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP diff --git a/devices/pdp11/rom/custom/makefile b/devices/pdp11/rom/custom/makefile new file mode 100644 index 000000000..8cda52fde --- /dev/null +++ b/devices/pdp11/rom/custom/makefile @@ -0,0 +1,7 @@ +all: boot.json + +boot.lst: boot.mac + macro11 boot.mac -l boot.lst + +boot.json: boot.lst + node ../../../../modules/filedump/bin/filedump --file=boot.lst --format=octal --output=boot.json --overwrite diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index 3ef3d7452..a9b6f197b 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -80,7 +80,7 @@ function FileDump(sFormat, fComments, fDecimal, offDump, nWidthDump, sServerRoot FileDump.sAPIURL = "http://www.pcjs.org" + DumpAPI.ENDPOINT; FileDump.sCopyright = "© 2012-2016 by Jeff Parsons (@jeffpar)"; FileDump.sNotice = FileDump.sAPIURL + " " + FileDump.sCopyright; -FileDump.sUsage = "Usage: " + FileDump.sAPIURL + "?" + DumpAPI.QUERY.FILE + "=({path}|{URL})&" + DumpAPI.QUERY.FORMAT + "=(json|data|hex|bytes|rom)"; +FileDump.sUsage = "Usage: " + FileDump.sAPIURL + "?" + DumpAPI.QUERY.FILE + "=({path}|{URL})&" + DumpAPI.QUERY.FORMAT + "=(json|data|hex|octal|bytes|words|rom)"; FileDump.asBadExts = [ "js", "log" @@ -97,15 +97,26 @@ FileDump.asBadExts = [ * * Usage * --- - * filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|bytes|rom)] [--comments] - * [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite] + * filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|octal|bytes|words|rom)] + * [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite] * * Arguments * --- * The default format is "json", which generates an array of signed 32-bit decimal values; "hex" is an older * text format that consists entirely of 2-character hex values (deprecated), and "bytes" is a JSON-like format * that also uses hex values (but with "0x" prefixes) and is normally used only when comments are enabled (use - * --decimal to force decimal byte output). + * --decimal to force decimal byte output). "words" are like "bytes" except that it outputs 16-bit values + * instead of 8-bit values; "octal" is an alias for "words", the only difference being that it includes a comment + * alongside each word with the octal form of the word. + * + * If you want actual octal output, then an --octal option should be added at some point; however, that begs the + * question of how to render octal numbers so that all versions of JavaScript interpret them correctly. Prefixing + * octal values with an extra zero was the old convention, but it was never formally adopted and it isn't allowed + * in "strict" mode. Prefixing them with "0o" is the new convention for ES6 and up, which is great, but we still + * have no octal format that works across the board. We can use the new octal format in code, because we always + * compile browser-based code back to ES5 (converting all numeric constants to decimal), and current versions of + * Node support it as well (we don't care about old versions of Node). But what we store in data files is more + * problematic. * * When a second file is "merged", the first file sets all even bytes and the second file sets all odd bytes. * In fact, any number of files can be merged: if there are N files, file #1 sets bytes at "offset mod N == 0", @@ -133,7 +144,7 @@ FileDump.CLI = function() var args = proc.getArgs(); if (!args.argc) { - console.log("usage: filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|bytes|rom)] [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]"); + console.log("usage: filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|octal|bytes|words|rom)] [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]"); return; } @@ -239,9 +250,12 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) { var obj = this; + var encoding = null; var sExt = str.getExtension(sFile); - var options = {encoding: sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX? "utf8" : null}; - + if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst") { + encoding = "utf8"; + } + var options = {encoding: encoding}; var sFilePath = (this.fLocal || net.isRemote(sFile))? sFile : path.join(this.sServerRoot, sFile); if (!this.sFilePath) this.sFilePath = sFilePath; @@ -254,7 +268,7 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) done(err); return; } - obj.setData(buf, iStart, nSkip); + obj.setData(buf, iStart, nSkip, sExt); done(null); }); } else { @@ -264,14 +278,58 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) done(err); return; } - obj.setData(buf, iStart, nSkip); + obj.setData(buf, iStart, nSkip, sExt); done(null); }); } }; /** - * setData(buf, iStart, nSkip) + * parseListing(sListing) + * + * Parses the data within a MACRO11 listing file and produces an array of bytes. + * + * @this {FileDump} + * @param {string} sListing + * @return {Array.} + */ +FileDump.prototype.parseListing = function(sListing) +{ + var ab = []; + var matchLine; + var re = /^([0-9 ]{9})([0-7]{6})[ ]+([0-7]+)[ ]*([0-7']+|)[ ]+([0-7']+|)[ ]+(.*)$/gm; + var addrStart = null; + while (matchLine = re.exec(sListing)) { + /* + * matchLine[1]: line # (optional) + * matchLine[2]: address + * matchLine[3]: 6-digit opcode or 3-digit data + * matchLine[4]: 6-digit operand (with optional apostrophe) or 3-digit data + * matchLine[5]: 6-digit operand (with optional apostrophe) or 3-digit data + */ + var addrLine = parseInt(matchLine[2], 8); + if (addrStart == null) addrStart = addrLine; + for (var i = 3, s; i <= 5 && (s = matchLine[i]); i++) { + var data = parseInt(s.substr(0, 6), 8); + if (s.length == 3) { + addrLine++; + ab.push(data); + } + else { + addrLine += 2; + if (s.length == 7) { + data -= addrLine; + } + ab.push(data & 0xff); + ab.push(data >> 8); + } + } + } + return ab; +}; + +/** + * setData(buf, iStart, nSkip, sExt) * * Records the given file data in the FileDump's buffer * @@ -279,13 +337,17 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) * @param {Buffer|string} buf * @param {number} iStart * @param {number} nSkip + * @param {string} [sExt] */ -FileDump.prototype.setData = function(buf, iStart, nSkip) +FileDump.prototype.setData = function(buf, iStart, nSkip, sExt) { var b, i, j, s; if (typeof buf == "string") { var ab = []; - if (buf.indexOf('{') >= 0) { + if (sExt == "lst") { + ab = this.parseListing(buf); + } + else if (buf.indexOf('{') >= 0) { /* * Treat the incoming string data as JSON data. */ @@ -321,7 +383,6 @@ FileDump.prototype.setData = function(buf, iStart, nSkip) * If we didn't recognize the data, then simply return, leaving this.buf undefined. */ if (!ab.length) return; - buf = new Buffer(ab); } if (!this.buf) { @@ -406,6 +467,12 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth { var chOpen = '', chClose = '', chSep = ' ', sHexPrefix = ""; + var nBase = 16; + if (sKey == DumpAPI.FORMAT.OCTAL) { + sKey = DumpAPI.FORMAT.WORDS; + nBase = 8; + } + this.sKey = sKey; if (this.sFormat != DumpAPI.FORMAT.HEX) { @@ -419,7 +486,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth var sLine = ""; var sASCII = ""; - var cMaxCols = nWidthDump * cbItem; + var cMaxCols = nWidthDump * (cbItem == 2 && nBase == 8? 1 : cbItem); for (var off = offDump; off < len; off += cbItem) { @@ -431,7 +498,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth break; } - var v = (cbItem == 1? buf.readUInt8(off) : buf.readInt32LE(off)); + var v = (cbItem == 1? buf.readUInt8(off) : (cbItem == 2? buf.readInt16LE(off) : buf.readInt32LE(off))); if (off > offDump) { sLine += chSep; @@ -441,7 +508,11 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth } } if (cbItem > 1) { - sLine += v; + if (cbItem > 2) { + sLine += v; + } else { + sLine += str.toHexWord(v) + (nBase == 8? " /*" + str.toOct(v & 0xffff, 6) + "*/" : ""); + } } else { if (this.fDecimal) { @@ -662,6 +733,9 @@ FileDump.prototype.buildJSON = function() // console.log("length of buffer: " + this.buf.length); if (this.fJSONComments || this.sFormat == DumpAPI.FORMAT.HEX || this.sFormat == DumpAPI.FORMAT.BYTES) { this.json += this.dumpBuffer(null, this.buf, this.buf.length, 1); + } + else if (this.sFormat == DumpAPI.FORMAT.OCTAL || this.sFormat == DumpAPI.FORMAT.WORDS) { + this.json += this.dumpBuffer(this.sFormat, this.buf, this.buf.length, 2); } else { this.json += this.dumpBuffer("data", this.buf, this.buf.length, 4); } diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 46a30d96b..349a07a89 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -86,7 +86,7 @@ function BusPDP11(parmsBus, cpu, dbg) /* * Compute all BusPDP11 memory block parameters, based on the width of the bus. The entire * address space is divided into blocks, using a block size that is (hopefully) appropriate to - * the bus width. The following table summarizes our simplistic calculations. + * the bus width. The following table summarizes our (original) simplistic calculations: * * Bus Width Block Shift Block Size * --------- ----------- ---------- @@ -104,10 +104,19 @@ function BusPDP11(parmsBus, cpu, dbg) */ this.addrTotal = Math.pow(2, this.nBusWidth); this.nBusLimit = this.nBusMask = (this.addrTotal - 1) | 0; - this.nBlockShift = (this.nBusWidth >> 1) + 2; - if (this.nBlockShift < 10) this.nBlockShift = 10; - if (this.nBlockShift > 15) this.nBlockShift = 15; - this.nBlockSize = 1 << this.nBlockShift; + + /* + * WARNING: Instead of dynamically calculating nBlockShift based on nBusWidth, as described above, we + * now force nBlockSize to IOPAGE_LENGTH, because that's what our IOController functions currently require. + * + * this.nBlockShift = (this.nBusWidth >> 1) + 2; + * if (this.nBlockShift < 10) this.nBlockShift = 10; + * if (this.nBlockShift > 15) this.nBlockShift = 15; + * this.nBlockSize = 1 << this.nBlockShift; + */ + this.nBlockSize = BusPDP11.IOPAGE_LENGTH; + this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2) + this.nBlockLen = this.nBlockSize >> 2; this.nBlockLimit = this.nBlockSize - 1; this.nBlockTotal = (this.addrTotal / this.nBlockSize) | 0; @@ -272,7 +281,7 @@ BusPDP11.IOController = { } return b; } - b = bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1); + b = bus.unknownAccess(addr, -1, true); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -345,7 +354,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1); + bus.unknownAccess(addr, b, true); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -377,7 +386,7 @@ BusPDP11.IOController = { } return w; } - w = bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0); + w = bus.unknownAccess(addr, -1); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -413,7 +422,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0); + bus.unknownAccess(addr, w); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -530,24 +539,23 @@ BusPDP11.prototype.reset = function() }; /** - * unknownAccess(addr, data, byteFlag) + * unknownAccess(addr, data, fByte) * - * This is our default I/O handler, called whenever there's an IOPAGE access without a corresponding entry - * in aIOHandlers. + * This is our default I/O handler, called when there's an IOPAGE access without a corresponding entry in aIOHandlers. * * @this {BusPDP11} * @param {number} addr (ie, an IOPAGE address) * @param {number} data (-1 if read, otherwise write) - * @param {number} byteFlag (true if byte I/O, otherwise word) + * @param {boolean} [fByte] (true if byte access, otherwise word) * @return {number} */ -BusPDP11.prototype.unknownAccess = function(addr, data, byteFlag) +BusPDP11.prototype.unknownAccess = function(addr, data, fByte) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { /* * TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits) */ - this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr, 3) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")", true, true); + this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr, 3) + "," + this.dbg.toStrBase(data) + "," + fByte + ")", true, true); this.cpu.setPC(this.cpu.getLastPC()); this.cpu.stopCPU(); } @@ -663,7 +671,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) } if (sizeLeft <= 0) { - this.status(Math.floor(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toHexLong(addr)); + this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); return true; } diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 9ec54bb23..b8f5d5a8b 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -962,7 +962,7 @@ CPUPDP11.prototype.setTimer = function(iTimer, ms, fReset) */ CPUPDP11.prototype.getMSCycles = function(ms) { - return (this.nCyclesPerSecond * this.nCyclesMultiplier) / 1000 * ms; + return ((this.nCyclesPerSecond * this.nCyclesMultiplier) / 1000 * ms)|0; }; /** diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index e9de787b7..bf69d6874 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -37,10 +37,12 @@ if (NODE) { } /* - * Decoding starts at the bottom of this file, in op1170(). The basic decoding approach is to - * dispatch on the top 4 bits of the opcode, and if further decoding is required, the dispatched - * function will dispatch on the next 4 bits, and so on (although some of the intermediate levels - * dispatch only on 2 bits, which could also handled with a switch statement). + * Decoding starts at the bottom of this file, in op1120() and op1170(). + * + * The basic decoding approach is to dispatch on the top 4 bits of the opcode, and if further + * decoding is required, the dispatched function will dispatch on the next 4 bits, and so on + * (although some of the intermediate levels dispatch only on 2 bits, which could also be handled + * with a switch statement). * * Eventually, every opcode should end up either in an opXXX() function or opUndefined(). For * opcodes that perform a simple read and/or write operation, the entire operation is handled by @@ -1765,285 +1767,234 @@ PDP11.opUndefined = function(opCode) }; /** - * op0Xnn_1170(opCode) + * op1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0Xnn_1170 = function(opCode) +PDP11.op1120 = function(opCode) { - PDP11.aOps0Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOpXnnn_1120[opCode >> 12].call(this, opCode); }; /** - * op0AXn_1170(opCode) + * op0Xnn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0AXn_1170 = function(opCode) +PDP11.op0Xnn_1120 = function(opCode) { - PDP11.aOps0AXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp0Xnn_1120[(opCode >> 8) & 0xf].call(this, opCode); }; /** - * op0BXn_1170(opCode) + * op0AXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0BXn_1170 = function(opCode) +PDP11.op0AXn_1120 = function(opCode) { - PDP11.aOps0BXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp0AXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op0CXn_1170(opCode) + * op0BXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0CXn_1170 = function(opCode) +PDP11.op0BXn_1120 = function(opCode) { - PDP11.aOps0CXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp0BXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op0DXn_1170(opCode) + * op0CXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0DXn_1170 = function(opCode) +PDP11.op0CXn_1120 = function(opCode) { - PDP11.aOps0DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp0CXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op00Xn_1170(opCode) + * op00Xn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op00Xn_1170 = function(opCode) +PDP11.op00Xn_1120 = function(opCode) { - PDP11.aOps00Xn_1170[(opCode >> 4) & 0xf].call(this, opCode); + PDP11.aOp00Xn_1120[(opCode >> 4) & 0xf].call(this, opCode); }; /** - * op008X_1170(opCode) + * op00AX_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op008X_1170 = function(opCode) +PDP11.op00AX_1120 = function(opCode) { - PDP11.aOps00AX_1170[opCode & 0xf].call(this, opCode); + PDP11.aOp00AX_1120[opCode & 0xf].call(this, opCode); }; /** - * op00AX_1170(opCode) + * op00BX_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op00AX_1170 = function(opCode) +PDP11.op00BX_1120 = function(opCode) { - PDP11.aOps00AX_1170[opCode & 0xf].call(this, opCode); + PDP11.aOp00BX_1120[opCode & 0xf].call(this, opCode); }; /** - * op00BX_1170(opCode) + * op000X_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op00BX_1170 = function(opCode) +PDP11.op000X_1120 = function(opCode) { - PDP11.aOps00BX_1170[opCode & 0xf].call(this, opCode); + PDP11.aOp000X_1120[opCode & 0xf].call(this, opCode); }; /** - * op000X_1170(opCode) + * op8Xnn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op000X_1170 = function(opCode) +PDP11.op8Xnn_1120 = function(opCode) { - PDP11.aOps000X_1170[opCode & 0xf].call(this, opCode); + PDP11.aOp8Xnn_1120[(opCode >> 8) & 0xf].call(this, opCode); }; /** - * op7Xnn_1170(opCode) + * op8AXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op7Xnn_1170 = function(opCode) +PDP11.op8AXn_1120 = function(opCode) { - PDP11.aOps7Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOp8AXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op8Xnn_1170(opCode) + * op8BXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op8Xnn_1170 = function(opCode) +PDP11.op8BXn_1120 = function(opCode) { - PDP11.aOps8Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOp8BXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op8AXn_1170(opCode) + * op8CXn_1120(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op8AXn_1170 = function(opCode) +PDP11.op8CXn_1120 = function(opCode) { - PDP11.aOps8AXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp8CXn_1120[(opCode >> 6) & 0x3].call(this, opCode); }; -/** - * op8BXn_1170(opCode) - * - * @this {CPUStatePDP11} - * @param {number} opCode - */ -PDP11.op8BXn_1170 = function(opCode) -{ - PDP11.aOps8BXn_1170[(opCode >> 6) & 0x3].call(this, opCode); -}; - -/** - * op8CXn_1170(opCode) - * - * @this {CPUStatePDP11} - * @param {number} opCode - */ -PDP11.op8CXn_1170 = function(opCode) -{ - PDP11.aOps8CXn_1170[(opCode >> 6) & 0x3].call(this, opCode); -}; - -/** - * op8DXn_1170(opCode) - * - * @this {CPUStatePDP11} - * @param {number} opCode - */ -PDP11.op8DXn_1170 = function(opCode) -{ - PDP11.aOps8DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); -}; - -/** - * op1170(opCode) - * - * @this {CPUStatePDP11} - * @param {number} opCode - */ -PDP11.op1170 = function(opCode) -{ - PDP11.aOpsXnnn_1170[opCode >> 12].call(this, opCode); -}; - -PDP11.aOpsXnnn_1170 = [ - PDP11.op0Xnn_1170, // 0x0nnn - PDP11.opMOV, // 0x1nnn 01SSDD - PDP11.opCMP, // 0x2nnn 02SSDD - PDP11.opBIT, // 0x3nnn 03SSDD - PDP11.opBIC, // 0x4nnn 04SSDD - PDP11.opBIS, // 0x5nnn 05SSDD - PDP11.opADD, // 0x6nnn 06SSDD - PDP11.op7Xnn_1170, // 0x7nnn - PDP11.op8Xnn_1170, // 0x8nnn - PDP11.opMOVB, // 0x9nnn 11SSDD - PDP11.opCMPB, // 0xAnnn 12SSDD - PDP11.opBITB, // 0xBnnn 13SSDD - PDP11.opBICB, // 0xCnnn 14SSDD - PDP11.opBISB, // 0xDnnn 15SSDD - PDP11.opSUB, // 0xEnnn 16SSDD +PDP11.aOpXnnn_1120 = [ + PDP11.op0Xnn_1120, // 0x0nnn + PDP11.opMOV, // 0x1nnn 01SSDD 11/20+ 2.3 + PDP11.opCMP, // 0x2nnn 02SSDD 11/20+ 2.3* + PDP11.opBIT, // 0x3nnn 03SSDD 11/20+ 2.9* + PDP11.opBIC, // 0x4nnn 04SSDD 11/20+ 2.9 + PDP11.opBIS, // 0x5nnn 05SSDD 11/20+ 2.3 + PDP11.opADD, // 0x6nnn 06SSDD 11/20+ 2.3 + PDP11.opUndefined, // 0x7nnn + PDP11.op8Xnn_1120, // 0x8nnn + PDP11.opMOVB, // 0x9nnn 11SSDD 11/20+ 2.3 + PDP11.opCMPB, // 0xAnnn 12SSDD 11/20+ 2.3 + PDP11.opBITB, // 0xBnnn 13SSDD 11/20+ 2.9 + PDP11.opBICB, // 0xCnnn 14SSDD 11/20+ 2.9 + PDP11.opBISB, // 0xDnnn 15SSDD 11/20+ 2.3 + PDP11.opSUB, // 0xEnnn 16SSDD 11/20+ 2.3 PDP11.opUndefined // 0xFnnn ]; -PDP11.aOps0Xnn_1170 = [ - PDP11.op00Xn_1170, // 0x00nn - PDP11.opBR, // 0x01nn - PDP11.opBNE, // 0x02nn - PDP11.opBEQ, // 0x03nn - PDP11.opBGE, // 0x04nn - PDP11.opBLT, // 0x05nn - PDP11.opBGT, // 0x06nn - PDP11.opBLE, // 0x07nn - PDP11.opJSR, // 0x08nn - PDP11.opJSR, // 0x09nn - PDP11.op0AXn_1170, // 0x0Ann - PDP11.op0BXn_1170, // 0x0Bnn - PDP11.op0CXn_1170, // 0x0Cnn - PDP11.op0DXn_1170, // 0x0Dnn +PDP11.aOp0Xnn_1120 = [ + PDP11.op00Xn_1120, // 0x00nn + PDP11.opBR, // 0x01nn 0004XX 11/20+ 2.6 + PDP11.opBNE, // 0x02nn 0010XX 11/20+ 2.6** + PDP11.opBEQ, // 0x03nn 0014XX 11/20+ 2.6** + PDP11.opBGE, // 0x04nn 0020XX 11/20+ 2.6** + PDP11.opBLT, // 0x05nn 0024XX 11/20+ 2.6** + PDP11.opBGT, // 0x06nn 0030XX 11/20+ 2.6** + PDP11.opBLE, // 0x07nn 0034XX 11/20+ 2.6** + PDP11.opJSR, // 0x08nn 004RDD 11/20+ 4.4 + PDP11.opJSR, // 0x09nn 004RDD 11/20+ 4.4 + PDP11.op0AXn_1120, // 0x0Ann + PDP11.op0BXn_1120, // 0x0Bnn + PDP11.op0CXn_1120, // 0x0Cnn + PDP11.opUndefined, // 0x0Dnn PDP11.opUndefined, // 0x0Enn PDP11.opUndefined // 0x0Fnn ]; -PDP11.aOps0AXn_1170 = [ - PDP11.opCLR, // 0x0A0n - PDP11.opCOM, // 0x0A4n - PDP11.opINC, // 0x0A8n - PDP11.opDEC // 0x0ACn +PDP11.aOp0AXn_1120 = [ + PDP11.opCLR, // 0x0A0n 0050DD 11/20+ 2.3 + PDP11.opCOM, // 0x0A4n 0051DD 11/20+ 2.3 + PDP11.opINC, // 0x0A8n 0052DD 11/20+ 2.3 + PDP11.opDEC // 0x0ACn 0053DD 11/20+ 2.3 ]; -PDP11.aOps0BXn_1170 = [ - PDP11.opNEG, // 0x0B0n - PDP11.opADC, // 0x0B4n - PDP11.opSBC, // 0x0B8n - PDP11.opTST // 0x0BCn +PDP11.aOp0BXn_1120 = [ + PDP11.opNEG, // 0x0B0n 0054DD 11/20+ 2.3 + PDP11.opADC, // 0x0B4n 0055DD 11/20+ 2.3 + PDP11.opSBC, // 0x0B8n 0056DD 11/20+ 2.3 + PDP11.opTST // 0x0BCn 0057DD 11/20+ 2.3* ]; -PDP11.aOps0CXn_1170 = [ - PDP11.opROR, // 0x0C0n - PDP11.opROL, // 0x0C4n - PDP11.opASR, // 0x0C8n - PDP11.opASL // 0x0CCn +PDP11.aOp0CXn_1120 = [ + PDP11.opROR, // 0x0C0n 0060DD 11/20+ 2.3* + PDP11.opROL, // 0x0C4n 0061DD 11/20+ 2.3* + PDP11.opASR, // 0x0C8n 0062DD 11/20+ 2.3* + PDP11.opASL // 0x0CCn 0063DD 11/20+ 2.3* ]; -PDP11.aOps0DXn_1170 = [ - PDP11.opMARK, // 0x0D0n - PDP11.opMFPI, // 0x0D4n - PDP11.opMTPI, // 0x0D8n - PDP11.opSXT // 0x0DCn -]; - -PDP11.aOps00Xn_1170 = [ - PDP11.op000X_1170, // 0x000n 000000-000017 +PDP11.aOp00Xn_1120 = [ + PDP11.op000X_1120, // 0x000n 000000-000017 PDP11.opUndefined, // 0x001n 000020-000037 PDP11.opUndefined, // 0x002n 000040-000057 PDP11.opUndefined, // 0x003n 000060-000077 - PDP11.opJMP, // 0x004n 0001DD - PDP11.opJMP, // 0x005n 0001DD - PDP11.opJMP, // 0x006n 0001DD - PDP11.opJMP, // 0x007n 0001DD - PDP11.opRTS, // 0x008n 00020R (opRTS() will also confirm that bit 3 is clear) - PDP11.opSPL, // 0x009n 00023N (opSPL() will also confirm that bit 3 is set) - PDP11.op00AX_1170, // 0x00An 000240-000257 - PDP11.op00BX_1170, // 0x00Bn 000260-000277 - PDP11.opSWAB, // 0x00Cn 0003DD - PDP11.opSWAB, // 0x00Dn 0003DD - PDP11.opSWAB, // 0x00En 0003DD - PDP11.opSWAB // 0x00Fn 0003DD + PDP11.opJMP, // 0x004n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x005n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x006n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x007n 0001DD 11/20+ 1.2 + PDP11.opRTS, // 0x008n 00020R 11/20+ 3.5 (opRTS() will also confirm that bit 3 is clear) + PDP11.opUndefined, // 0x009n 00023N + PDP11.op00AX_1120, // 0x00An 000240-000257 + PDP11.op00BX_1120, // 0x00Bn 000260-000277 + PDP11.opSWAB, // 0x00Cn 0003DD 11/20+ 2.3 + PDP11.opSWAB, // 0x00Dn 0003DD 11/20+ 2.3 + PDP11.opSWAB, // 0x00En 0003DD 11/20+ 2.3 + PDP11.opSWAB // 0x00Fn 0003DD 11/20+ 2.3 ]; -PDP11.aOps000X_1170 = [ - PDP11.opHALT, // 0x0000 000000 - PDP11.opWAIT, // 0x0001 000001 - PDP11.opRTI, // 0x0002 000002 - PDP11.opBPT, // 0x0003 000003 - PDP11.opIOT, // 0x0004 000004 - PDP11.opRESET, // 0x0005 000005 - PDP11.opRTT, // 0x0006 000006 +PDP11.aOp000X_1120 = [ + PDP11.opHALT, // 0x0000 000000 11/20+ 1.8 + PDP11.opWAIT, // 0x0001 000001 11/20+ 1.8 + PDP11.opRTI, // 0x0002 000002 11/20+ 4.8 + PDP11.opBPT, // 0x0003 + PDP11.opIOT, // 0x0004 000004 11/20+ 9.3 + PDP11.opRESET, // 0x0005 000005 11/20+ 20ms + PDP11.opUndefined, // 0x0006 PDP11.opUndefined, // 0x0007 PDP11.opUndefined, // 0x0008 PDP11.opUndefined, // 0x0009 @@ -2055,106 +2006,296 @@ PDP11.aOps000X_1170 = [ PDP11.opUndefined // 0x000F ]; -PDP11.aOps00AX_1170 = [ - PDP11.opNOP, // 0x00A0 000240 - PDP11.opCLC, // 0x00A1 - PDP11.opCLV, // 0x00A2 - PDP11.opCLx, // 0x00A3 - PDP11.opCLZ, // 0x00A4 - PDP11.opCLx, // 0x00A5 - PDP11.opCLx, // 0x00A6 - PDP11.opCLx, // 0x00A7 - PDP11.opCLN, // 0x00A8 - PDP11.opCLx, // 0x00A9 - PDP11.opCLx, // 0x00AA - PDP11.opCLx, // 0x00AB - PDP11.opCLx, // 0x00AC - PDP11.opCLx, // 0x00AD - PDP11.opCLx, // 0x00AE - PDP11.opCLx // 0x00AF 000257 +PDP11.aOp00AX_1120 = [ + PDP11.opNOP, // 0x00A0 000240 11/20+ 1.5 + PDP11.opCLC, // 0x00A1 000241 11/20+ 1.5 + PDP11.opCLV, // 0x00A2 000242 11/20+ 1.5 + PDP11.opCLx, // 0x00A3 000243 11/20+ 1.5 + PDP11.opCLZ, // 0x00A4 000244 11/20+ 1.5 + PDP11.opCLx, // 0x00A5 000245 11/20+ 1.5 + PDP11.opCLx, // 0x00A6 000246 11/20+ 1.5 + PDP11.opCLx, // 0x00A7 000247 11/20+ 1.5 + PDP11.opCLN, // 0x00A8 000250 11/20+ 1.5 + PDP11.opCLx, // 0x00A9 000251 11/20+ 1.5 + PDP11.opCLx, // 0x00AA 000252 11/20+ 1.5 + PDP11.opCLx, // 0x00AB 000253 11/20+ 1.5 + PDP11.opCLx, // 0x00AC 000254 11/20+ 1.5 + PDP11.opCLx, // 0x00AD 000255 11/20+ 1.5 + PDP11.opCLx, // 0x00AE 000256 11/20+ 1.5 + PDP11.opCLx // 0x00AF 000257 11/20+ 1.5 ]; -PDP11.aOps00BX_1170 = [ - PDP11.opNOP, // 0x00B0 000260 - PDP11.opSEC, // 0x00B1 - PDP11.opSEV, // 0x00B2 - PDP11.opSEx, // 0x00B3 - PDP11.opSEZ, // 0x00B4 - PDP11.opSEx, // 0x00B5 - PDP11.opSEx, // 0x00B6 - PDP11.opSEx, // 0x00B7 - PDP11.opSEN, // 0x00B8 - PDP11.opSEx, // 0x00B9 - PDP11.opSEx, // 0x00BA - PDP11.opSEx, // 0x00BB - PDP11.opSEx, // 0x00BC - PDP11.opSEx, // 0x00BD - PDP11.opSEx, // 0x00BE - PDP11.opSEx // 0x00BF 000277 +PDP11.aOp00BX_1120 = [ + PDP11.opNOP, // 0x00B0 000260 11/20+ 1.5 + PDP11.opSEC, // 0x00B1 000261 11/20+ 1.5 + PDP11.opSEV, // 0x00B2 000262 11/20+ 1.5 + PDP11.opSEx, // 0x00B3 000263 11/20+ 1.5 + PDP11.opSEZ, // 0x00B4 000264 11/20+ 1.5 + PDP11.opSEx, // 0x00B5 000265 11/20+ 1.5 + PDP11.opSEx, // 0x00B6 000266 11/20+ 1.5 + PDP11.opSEx, // 0x00B7 000267 11/20+ 1.5 + PDP11.opSEN, // 0x00B8 000270 11/20+ 1.5 + PDP11.opSEx, // 0x00B9 000271 11/20+ 1.5 + PDP11.opSEx, // 0x00BA 000272 11/20+ 1.5 + PDP11.opSEx, // 0x00BB 000273 11/20+ 1.5 + PDP11.opSEx, // 0x00BC 000274 11/20+ 1.5 + PDP11.opSEx, // 0x00BD 000275 11/20+ 1.5 + PDP11.opSEx, // 0x00BE 000276 11/20+ 1.5 + PDP11.opSEx // 0x00BF 000277 11/20+ 1.5 ]; -PDP11.aOps7Xnn_1170 = [ - PDP11.opMUL, // 0x70nn - PDP11.opMUL, // 0x71nn - PDP11.opDIV, // 0x72nn - PDP11.opDIV, // 0x73nn - PDP11.opASH, // 0x74nn - PDP11.opASH, // 0x75nn - PDP11.opASHC, // 0x76nn - PDP11.opASHC, // 0x77nn - PDP11.opXOR, // 0x78nn - PDP11.opXOR, // 0x79nn +PDP11.aOp8Xnn_1120 = [ + PDP11.opBPL, // 0x80nn 1000XX 11/20+ 2.6** + PDP11.opBMI, // 0x81nn 1004XX 11/20+ 2.6** + PDP11.opBHI, // 0x82nn 1010XX 11/20+ 2.6** + PDP11.opBLOS, // 0x83nn 1014XX 11/20+ 2.6** + PDP11.opBVC, // 0x84nn 1020XX 11/20+ 2.6** + PDP11.opBVS, // 0x85nn 1024XX 11/20+ 2.6** + PDP11.opBCC, // 0x86nn 1030XX 11/20+ 2.6** + PDP11.opBCS, // 0x87nn 1034XX 11/20+ 2.6** + PDP11.opEMT, // 0x88nn 104000-104377 11/20+ 9.3 + PDP11.opTRAP, // 0x89nn 104400-104777 11/20+ 9.3 + PDP11.op8AXn_1120, // 0x8Ann + PDP11.op8BXn_1120, // 0x8Bnn + PDP11.op8CXn_1120, // 0x8Cnn + PDP11.opUndefined, // 0x8Dnn + PDP11.opUndefined, // 0x8Enn + PDP11.opUndefined // 0x8Fnn +]; + +PDP11.aOp8AXn_1120 = [ + PDP11.opCLRB, // 0x8A0n 1050DD 11/20+ 2.3 + PDP11.opCOMB, // 0x8A4n 1051DD 11/20+ 2.3 + PDP11.opINCB, // 0x8A8n 1052DD 11/20+ 2.3 + PDP11.opDECB // 0x8ACn 1053DD 11/20+ 2.3 +]; + +PDP11.aOp8BXn_1120 = [ + PDP11.opNEGB, // 0x8B0n 1054DD 11/20+ 2.3 + PDP11.opADCB, // 0x8B4n 1055DD 11/20+ 2.3 + PDP11.opSBCB, // 0x8B8n 1056DD 11/20+ 2.3 + PDP11.opTSTB // 0x8BCn 1057DD 11/20+ 2.3* +]; + +PDP11.aOp8CXn_1120 = [ + PDP11.opRORB, // 0x8C0n 1060DD 11/20+ 2.3* + PDP11.opROLB, // 0x8C4n 1061DD 11/20+ 2.3* + PDP11.opASRB, // 0x8C8n 1062DD 11/20+ 2.3* + PDP11.opASLB // 0x8CCn 1063DD 11/20+ 2.3* +]; + +/** + * op1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op1170 = function(opCode) +{ + PDP11.aOpXnnn_1170[opCode >> 12].call(this, opCode); +}; + +/** + * op0Xnn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op0Xnn_1170 = function(opCode) +{ + PDP11.aOp0Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); +}; + +/** + * op0DXn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op0DXn_1170 = function(opCode) +{ + PDP11.aOp0DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); +}; + +/** + * op00Xn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op00Xn_1170 = function(opCode) +{ + PDP11.aOp00Xn_1170[(opCode >> 4) & 0xf].call(this, opCode); +}; + +/** + * op000X_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op000X_1170 = function(opCode) +{ + PDP11.aOp000X_1170[opCode & 0xf].call(this, opCode); +}; + +/** + * op7Xnn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op7Xnn_1170 = function(opCode) +{ + PDP11.aOp7Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); +}; + +/** + * op8Xnn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op8Xnn_1170 = function(opCode) +{ + PDP11.aOp8Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); +}; + +/** + * op8DXn_1170(opCode) + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.op8DXn_1170 = function(opCode) +{ + PDP11.aOp8DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); +}; + +PDP11.aOpXnnn_1170 = [ + PDP11.op0Xnn_1170, // 0x0nnn + PDP11.opMOV, // 0x1nnn 01SSDD 11/20+ 2.3 + PDP11.opCMP, // 0x2nnn 02SSDD 11/20+ 2.3* + PDP11.opBIT, // 0x3nnn 03SSDD 11/20+ 2.9* + PDP11.opBIC, // 0x4nnn 04SSDD 11/20+ 2.9 + PDP11.opBIS, // 0x5nnn 05SSDD 11/20+ 2.3 + PDP11.opADD, // 0x6nnn 06SSDD 11/20+ 2.3 + PDP11.op7Xnn_1170, // 0x7nnn + PDP11.op8Xnn_1170, // 0x8nnn + PDP11.opMOVB, // 0x9nnn 11SSDD 11/20+ 2.3 + PDP11.opCMPB, // 0xAnnn 12SSDD 11/20+ 2.3 + PDP11.opBITB, // 0xBnnn 13SSDD 11/20+ 2.9 + PDP11.opBICB, // 0xCnnn 14SSDD 11/20+ 2.9 + PDP11.opBISB, // 0xDnnn 15SSDD 11/20+ 2.3 + PDP11.opSUB, // 0xEnnn 16SSDD 11/20+ 2.3 + PDP11.opUndefined // 0xFnnn +]; + +PDP11.aOp0Xnn_1170 = [ + PDP11.op00Xn_1170, // 0x00nn + PDP11.opBR, // 0x01nn 0004XX 11/20+ 2.6 + PDP11.opBNE, // 0x02nn 0010XX 11/20+ 2.6** + PDP11.opBEQ, // 0x03nn 0014XX 11/20+ 2.6** + PDP11.opBGE, // 0x04nn 0020XX 11/20+ 2.6** + PDP11.opBLT, // 0x05nn 0024XX 11/20+ 2.6** + PDP11.opBGT, // 0x06nn 0030XX 11/20+ 2.6** + PDP11.opBLE, // 0x07nn 0034XX 11/20+ 2.6** + PDP11.opJSR, // 0x08nn 004RDD 11/20+ 4.4 + PDP11.opJSR, // 0x09nn 004RDD 11/20+ 4.4 + PDP11.op0AXn_1120, // 0x0Ann + PDP11.op0BXn_1120, // 0x0Bnn + PDP11.op0CXn_1120, // 0x0Cnn + PDP11.op0DXn_1170, // 0x0Dnn + PDP11.opUndefined, // 0x0Enn + PDP11.opUndefined // 0x0Fnn +]; + +PDP11.aOp0DXn_1170 = [ + PDP11.opMARK, // 0x0D0n 11/45+ + PDP11.opMFPI, // 0x0D4n 11/45+ + PDP11.opMTPI, // 0x0D8n 11/45+ + PDP11.opSXT // 0x0DCn 11/45+ +]; + +PDP11.aOp00Xn_1170 = [ + PDP11.op000X_1170, // 0x000n 000000-000017 + PDP11.opUndefined, // 0x001n 000020-000037 + PDP11.opUndefined, // 0x002n 000040-000057 + PDP11.opUndefined, // 0x003n 000060-000077 + PDP11.opJMP, // 0x004n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x005n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x006n 0001DD 11/20+ 1.2 + PDP11.opJMP, // 0x007n 0001DD 11/20+ 1.2 + PDP11.opRTS, // 0x008n 00020R 11/20+ 3.5 (opRTS() will also confirm that bit 3 is clear) + PDP11.opSPL, // 0x009n 00023N 11/45+ (opSPL() will also confirm that bit 3 is set) + PDP11.op00AX_1120, // 0x00An 000240-000257 + PDP11.op00BX_1120, // 0x00Bn 000260-000277 + PDP11.opSWAB, // 0x00Cn 0003DD 11/20+ 2.3 + PDP11.opSWAB, // 0x00Dn 0003DD 11/20+ 2.3 + PDP11.opSWAB, // 0x00En 0003DD 11/20+ 2.3 + PDP11.opSWAB // 0x00Fn 0003DD 11/20+ 2.3 +]; + +PDP11.aOp000X_1170 = [ + PDP11.opHALT, // 0x0000 000000 11/20+ 1.8 + PDP11.opWAIT, // 0x0001 000001 11/20+ 1.8 + PDP11.opRTI, // 0x0002 000002 11/20+ 4.8 + PDP11.opBPT, // 0x0003 000003 + PDP11.opIOT, // 0x0004 000004 11/20+ 9.3 + PDP11.opRESET, // 0x0005 000005 11/20+ 20ms + PDP11.opRTT, // 0x0006 000006 11/45+ + PDP11.opUndefined, // 0x0007 + PDP11.opUndefined, // 0x0008 + PDP11.opUndefined, // 0x0009 + PDP11.opUndefined, // 0x000A + PDP11.opUndefined, // 0x000B + PDP11.opUndefined, // 0x000C + PDP11.opUndefined, // 0x000D + PDP11.opUndefined, // 0x000E + PDP11.opUndefined // 0x000F +]; + +PDP11.aOp7Xnn_1170 = [ + PDP11.opMUL, // 0x70nn 11/45+ + PDP11.opMUL, // 0x71nn 11/45+ + PDP11.opDIV, // 0x72nn 11/45+ + PDP11.opDIV, // 0x73nn 11/45+ + PDP11.opASH, // 0x74nn 11/45+ + PDP11.opASH, // 0x75nn 11/45+ + PDP11.opASHC, // 0x76nn 11/45+ + PDP11.opASHC, // 0x77nn 11/45+ + PDP11.opXOR, // 0x78nn 11/45+ + PDP11.opXOR, // 0x79nn 11/45+ PDP11.opUndefined, // 0x7Ann PDP11.opUndefined, // 0x7Bnn PDP11.opUndefined, // 0x7Cnn PDP11.opUndefined, // 0x7Dnn - PDP11.opSOB, // 0x7Enn - PDP11.opSOB // 0x7Fnn + PDP11.opSOB, // 0x7Enn 11/45+ + PDP11.opSOB // 0x7Fnn 11/45+ ]; -PDP11.aOps8Xnn_1170 = [ - PDP11.opBPL, // 0x80nn - PDP11.opBMI, // 0x81nn - PDP11.opBHI, // 0x82nn - PDP11.opBLOS, // 0x83nn - PDP11.opBVC, // 0x84nn - PDP11.opBVS, // 0x85nn - PDP11.opBCC, // 0x86nn - PDP11.opBCS, // 0x87nn - PDP11.opEMT, // 0x88nn - PDP11.opTRAP, // 0x89nn - PDP11.op8AXn_1170, // 0x8Ann - PDP11.op8BXn_1170, // 0x8Bnn - PDP11.op8CXn_1170, // 0x8Cnn +PDP11.aOp8Xnn_1170 = [ + PDP11.opBPL, // 0x80nn 1000XX 11/20+ 2.6** + PDP11.opBMI, // 0x81nn 1004XX 11/20+ 2.6** + PDP11.opBHI, // 0x82nn 1010XX 11/20+ 2.6** + PDP11.opBLOS, // 0x83nn 1014XX 11/20+ 2.6** + PDP11.opBVC, // 0x84nn 1020XX 11/20+ 2.6** + PDP11.opBVS, // 0x85nn 1024XX 11/20+ 2.6** + PDP11.opBCC, // 0x86nn 1030XX 11/20+ 2.6** + PDP11.opBCS, // 0x87nn 1034XX 11/20+ 2.6** + PDP11.opEMT, // 0x88nn 104000-104377 11/20+ 9.3 + PDP11.opTRAP, // 0x89nn 104400-104777 11/20+ 9.3 + PDP11.op8AXn_1120, // 0x8Ann + PDP11.op8BXn_1120, // 0x8Bnn + PDP11.op8CXn_1120, // 0x8Cnn PDP11.op8DXn_1170, // 0x8Dnn PDP11.opUndefined, // 0x8Enn PDP11.opUndefined // 0x8Fnn ]; -PDP11.aOps8AXn_1170 = [ - PDP11.opCLRB, // 0x8A0n - PDP11.opCOMB, // 0x8A4n - PDP11.opINCB, // 0x8A8n - PDP11.opDECB // 0x8ACn -]; - -PDP11.aOps8BXn_1170 = [ - PDP11.opNEGB, // 0x8B0n - PDP11.opADCB, // 0x8B4n - PDP11.opSBCB, // 0x8B8n - PDP11.opTSTB // 0x8BCn -]; - -PDP11.aOps8CXn_1170 = [ - PDP11.opRORB, // 0x8C0n - PDP11.opROLB, // 0x8C4n - PDP11.opASRB, // 0x8C8n - PDP11.opASLB // 0x8CCn -]; - -PDP11.aOps8DXn_1170 = [ +PDP11.aOp8DXn_1170 = [ PDP11.opUndefined, // 0x8D0n - PDP11.opMFPD, // 0x8D4n - PDP11.opMTPD, // 0x8D8n + PDP11.opMFPD, // 0x8D4n 11/45+ + PDP11.opMTPD, // 0x8D8n 11/45+ PDP11.opUndefined // 0x8DCn ]; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 014bc0329..24de601ea 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -123,7 +123,11 @@ var Trigger; */ CPUStatePDP11.prototype.initProcessor = function() { - this.decode = PDP11.op1170.bind(this); + if (this.model == PDP11.MODEL_1120) { + this.decode = PDP11.op1120.bind(this); + } else { + this.decode = PDP11.op1170.bind(this); + } this.initRegs(); @@ -147,6 +151,7 @@ CPUStatePDP11.prototype.initProcessor = function() */ CPUStatePDP11.prototype.reset = function() { + this.status("model " + this.model); if (this.flags.running) this.stopCPU(); this.initRegs(); this.resetCycles(); @@ -826,7 +831,7 @@ CPUStatePDP11.prototype.setPSW = function(newPSW) * an interrupt has been dispatched, because it's dispatched via trap(), and trap() calls setPSW(). * * I mean, sure, it's POSSIBLE that the new PSW loaded by trap() actually set a lower priority, allowing a lower - * priority interrupt to immediately be acknowledged. But perhaps we should a bit more rigorous here. + * priority interrupt to immediately be acknowledged. But perhaps we should be a bit more rigorous here. * * For example, we could avoid setting INTQ unless 1) there's actually an active interrupt trigger (ie, triggerNext * is not null) or 2) an optional fCheckInterrupts flag is passed to us, because the caller has some knowledge diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 74229e37d..021bd0704 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -125,6 +125,7 @@ var PDP11 = { /* * CPU model numbers (supported) */ + MODEL_1120: 1120, MODEL_1145: 1145, MODEL_1170: 1170, @@ -167,7 +168,10 @@ var PDP11 = { TF: 0x0010, // bit 4: Trap Flag PRI: 0x00E0, // bits 5-7: Priority UNUSED: 0x0700, // bits 8-10: unused - REGSET: 0x0800, // bit 11: Register Set + /* + * PSW bits above this point are unused on 11/20-class machines + */ + REGSET: 0x0800, // bit 11: Register Set ( PMODE: 0x3000, // bits 12-13: Prev Mode (see PDP11.MODE) CMODE: 0xC000, // bits 14-15: Curr Mode (see PDP11.MODE) SHIFT: { @@ -498,7 +502,7 @@ var PDP11 = { HSIZE: 0o177762, // Upper Size Register (always zero) (11/70 only) SYSID: 0o177764, // System ID Register (11/70 only) CPUERR: 0o177766, // CPU error (11/70 only) - MB: 0o177770, // Microprogram break + MB: 0o177770, // Microprogram break (11/70 only) PIR: 0o177772, // Program Interrupt Request SL: 0o177774, // Stack Limit Register PSW: 0o177776 // 777776 17777776 0x3FFFFE Processor Status Word diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index b2636dfe7..567d0115b 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -1059,24 +1059,24 @@ DevicePDP11.prototype.reset = function() * ES6 ALERT: As you can see below, I've finally started using computed property names. */ DevicePDP11.UNIBUS_IOTABLE = { - [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR"], - [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR"], - [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR"], - [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR"], - [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR"], - [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR"], - [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR"], - [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR"], - [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3"], + [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", PDP11.MODEL_1145], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.CNSL]: /* 177570 */ [null, null, DevicePDP11.prototype.readCNSL, DevicePDP11.prototype.writeCNSL, "CNSL"], - [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0"], - [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1"], - [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2"], - [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR"], - [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR"], - [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR"], - [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR"], + [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", PDP11.MODEL_1145], + [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR", PDP11.MODEL_1145], + [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR", PDP11.MODEL_1145], [PDP11.UNIBUS.R0SET0]: /* 177700 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], [PDP11.UNIBUS.R1SET0]: /* 177701 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], [PDP11.UNIBUS.R2SET0]: /* 177702 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], @@ -1085,14 +1085,14 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.R5SET0]: /* 177705 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R5SET0"], [PDP11.UNIBUS.R6KERNEL]:/* 177706 */ [null, null, DevicePDP11.prototype.readR6KERNEL,DevicePDP11.prototype.writeR6KERNEL,"R6KERNEL"], [PDP11.UNIBUS.R7KERNEL]:/* 177707 */ [null, null, DevicePDP11.prototype.readR7KERNEL,DevicePDP11.prototype.writeR7KERNEL,"R7KERNEL"], - [PDP11.UNIBUS.R0SET1]: /* 177710 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1"], - [PDP11.UNIBUS.R1SET1]: /* 177711 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1"], - [PDP11.UNIBUS.R2SET1]: /* 177712 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1"], - [PDP11.UNIBUS.R3SET1]: /* 177713 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1"], - [PDP11.UNIBUS.R4SET1]: /* 177714 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1"], - [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1"], - [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER"], - [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER"], + [PDP11.UNIBUS.R0SET1]: /* 177710 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R1SET1]: /* 177711 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R2SET1]: /* 177712 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R3SET1]: /* 177713 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R4SET1]: /* 177714 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1", PDP11.MODEL_1145], + [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER", PDP11.MODEL_1145], + [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER", PDP11.MODEL_1145], [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", PDP11.MODEL_1170], [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", PDP11.MODEL_1170], [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", PDP11.MODEL_1170], diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 2728c8b59..e65bbea87 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -691,10 +691,7 @@ if (DEBUGGER) { s = str.toHex(n, nBytes * 2); break; } - if (fStripLeadingZeros && s.charAt(0) == '0') { - s = s.replace(/^0+([0-9A-F]+)$/i, "$1"); - } - return s; + return (fStripLeadingZeros? str.stripLeadingZeros(s) : s); }; } // endif DEBUGGER diff --git a/modules/shared/lib/dumpapi.js b/modules/shared/lib/dumpapi.js index 31a3ad7ad..2c0ef453a 100644 --- a/modules/shared/lib/dumpapi.js +++ b/modules/shared/lib/dumpapi.js @@ -67,7 +67,9 @@ var DumpAPI = { JSON_GZ: "gz", // gzip is currently used ONLY for compressed JSON DATA: "data", // same as "json", but built without JSON.stringify() (DiskDump only) HEX: "hex", // deprecated + OCTAL: "octal", // displays data as octal words BYTES: "bytes", // displays data as hex bytes; normally used only when comments are enabled + WORDS: "words", // displays data as hex words; normally used only when comments are enabled IMG: "img", // returns the raw disk data (ie, using a Buffer object) (DiskDump only) ROM: "rom" // returns the raw file data (ie, using a Buffer object) (FileDump only) } diff --git a/modules/shared/lib/strlib.js b/modules/shared/lib/strlib.js index 388386788..2abaf3fa8 100644 --- a/modules/shared/lib/strlib.js +++ b/modules/shared/lib/strlib.js @@ -240,6 +240,48 @@ str.toOct = function(n, cch, fPrefix) return (fPrefix? "0o" : "") + s; }; +/** + * toDec(n, cch) + * + * Converts an integer to decimal, with the specified number of digits (default of 5; max of 10) + * + * You might be tempted to use the built-in n.toString(10) instead, but it doesn't zero-pad and it + * doesn't properly convert negative values. Moreover, if n is undefined, n.toString() will throw + * an exception, whereas this function will return '?' characters. + * + * @param {number|null|undefined} n is a 32-bit value + * @param {number} [cch] is the desired number of decimal digits (0 or undefined for default of either 5 or 10) + * @return {string} the octal representation of n + */ +str.toDec = function(n, cch) +{ + var s = ""; + + if (cch) { + if (cch > 10) cch = 10; + } else { + cch = (n & ~0xffff)? 10 : 5; + } + /* + * An initial "falsey" check for null takes care of both null and undefined; + * we can't rely entirely on isNaN(), because isNaN(null) returns false, oddly enough. + * + * Alternatively, we could mask and shift n regardless of whether it's null/undefined/NaN, + * since JavaScript coerces such operands to zero, but I think there's "value" in seeing those + * values displayed differently. + */ + if (n == null || isNaN(n)) { + while (cch-- > 0) s = '?' + s; + } else { + while (cch-- > 0) { + var d = (n % 10) + 0x30; + s = String.fromCharCode(d) + s; + n /= 10; + } + } + return s; +}; + /** * toHex(n, cch, fPrefix) * @@ -477,6 +519,21 @@ str.pad = function(s, cch, fPadLeft) return fPadLeft? (sPadding + s).slice(-cch) : (s + sPadding).slice(0, cch); }; +/** + * stripLeadingZeros(s, fPad) + * + * @param {string} s + * @param {boolean} [fPad] + * @return {string} + */ +str.stripLeadingZeros = function(s, fPad) +{ + var cch = s.length; + s = s.replace(/^0+([0-9A-F]+)$/i, "$1"); + if (fPad) s = str.pad(s, cch, true); + return s; +}; + /** * trim(s) * diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index de8cbd45d..229a34586 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -27,223 +27,228 @@ 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 */ -var h; -function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)} -function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function ua(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ka(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Eb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Fb:!1,ha:!1,error:!1};this.wb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={}; -if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(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 y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function pa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ua(a){return a.replace(/[&<>"']/g,function(a){return ta[a]})}function wa(a,b){return(a+" ").slice(0,b)} +function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ya={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Fa(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function sa(){return"http://"+(window?window.location.host:"www.pcjs.org")} +function n(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window.confirm(a));return b}var Ha=null;function Ia(){if(null==Ha){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}Ha=a}return Ha}function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} +function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Fb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Gb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; +if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.Z&&(this.Z=10);15>2;this.A=this.wa-1;this.D=this.I/this.wa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Gb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Hb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Lb(a,b){if(b!=a.i){var c;a.i&&(c=(1<>>a.Z;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.sb+=m.w-f,m.w=f,!0;if(f>=m.w+m.sb){q=m.size-(f-p);q>g&&(q=g);m.sb=f-m.w+q;f=p+a.wa;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.wa,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.wa;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)} -function Nb(a,b,c){var d=[];for(b>>>=a.Z;0>>=a.Z;0>>this.Z].Ab(a&this.A,a)};h.yb=function(a){this.C++;a=this.W[(a&this.f)>>>this.Z].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.Z].qa(a&this.A,a)}; -h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.Z;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Bb=function(a,b){this.W[(a&this.f)>>>this.Z].Db(a&this.A,b&255,a)};h.qb=function(a,b){this.C++;this.W[(a&this.f)>>>this.Z].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.Z].tb(a&this.A,b&65535,a)};h.Cb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.Z;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; -function Sb(a){for(var b=0,c=[],d=0;da.b.Hb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)} -function Wb(a,b){a.C||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.aa(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.i={data:0,Ld:0,zb:20,bd:0};this.f={Md:0,Nb:-1}}y(L);h=L.prototype; -h.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;var e=this;this.f.Nb=Xb(c,function(){e.f.Ia|=128;e.f.Ia&64&&(fc(e.b,e.f.cd),gc(e.b,e.f.Nb,1E3/60))});this.f.cd=hc(64,6);Ub(b,this,M);Vb(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&gc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.i.bd:this.i.data)&65535};h.ed=function(a){this.i.data=a}; -h.Cc=function(){var a=this.b;return a.G&62337|a.ta<<5|a.ua<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ta=a>>5&3;b.ua=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,ic(b))}jc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.pb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.Hb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.va=3915776):(b.Wa=262143,b.va=253952),ic(b));jc(this)}; -function jc(a){a.i.zb=a.i.zb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; +var Gb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function Hb(a){r.call(this,"Panel",a,Hb);this.f=0;this.v.Sb=!0}u(Hb);h=Hb.prototype; +h.ra=function(a,b,c,d){if(this.B&&this.B.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d)||this.j&&this.j.ra(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.ra.call(this,a,b,c,d)}};h.Da=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.j=d};h.Aa=function(a,b){b||Ib();return!0};h.za=function(){return!0}; +function Jb(a,b,c,d){if(a.J[b]){void 0===c&&(Fb(a,"Value for "+b+" is invalid"),a.b.ea());var e=a.j&&a.j.ja||8;c=!a.b.v.da||a.v.Sb?8==e?oa(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Kb(a,b,c,d){for(var e=0;e>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Ub(d,b,-1,!0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Ub(e,c,b,!0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Ub(d,b,-1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} +function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Ub(e,c,b),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} +function Vb(a,b){if(b!=a.i){var c;a.i&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return $b(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.j,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Bb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; +h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Cb=function(a,b){this.W[(a&this.f)>>>this.ga].Eb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Db=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; +function jc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));kc(a,e,e,g,l,m,p,f[4])}}}function mc(a,b){a.B.push(b)} +function nc(a,b){a.C||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function $b(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.i={data:0,Ld:0,Ab:20,bd:0};this.f={Md:0,Nb:-1}}u(L);h=L.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;var e=this;this.f.Nb=oc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(pc(e.b,e.f.cd),qc(e.b,e.f.Nb,1E3/60))});this.f.cd=rc(64,6);lc(b,this,M);mc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&qc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.i.bd:this.i.data)&65535};h.ed=function(a){this.i.data=a}; +h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,sc(b))}tc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),sc(b));tc(this)}; +function tc(a){a.i.Ab=a.i.Ab&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.pa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.wc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]}; h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; -h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.sa[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.sa[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[1]}; -h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.sa[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.sa[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.$};h.fd=function(){this.b.$=0};h.Bc=function(){return this.b.bc}; -h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Lb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Db(this.b)};h.rd=function(a){kc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};h.reset=function(){this.i.zb=this.i.zb&-120|20;this.f.Ia=0}; -var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR"],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR"],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR"],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR"],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR"],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR"],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR"],N[62704]=[null,null,L.prototype.wc,L.prototype.hd,"KDSAR"],N[62798]=[null,null, -L.prototype.Fc,L.prototype.pd,"MMR3"],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0"],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1"],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2"],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR"],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR"],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR"], -N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR"],N[65472]=[null,null,L.prototype.ab,L.prototype.fb,"R0SET0"],N[65473]=[null,null,L.prototype.ab,L.prototype.fb,"R1SET0"],N[65474]=[null,null,L.prototype.ab,L.prototype.fb,"R2SET0"],N[65475]=[null,null,L.prototype.ab,L.prototype.fb,"R3SET0"],N[65476]=[null,null,L.prototype.ab,L.prototype.fb,"R4SET0"],N[65477]=[null,null,L.prototype.ab,L.prototype.fb,"R5SET0"],N[65478]=[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null, -L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET1"],N[65481]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET1"],N[65482]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET1"],N[65483]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET1"],N[65484]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET1"],N[65485]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET1"],N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER"],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud, -"R6USER"],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd,"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"], -N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624];M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640]; -M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688];M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704]; -M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440];M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456]; -M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];La(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&Wb(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;yc(c,this.w+a,1,c.M)&&c.fa(!0)}return this.Ib(a,b)},da:function(a,b){if(this.j&&null!=this.w){var c=this.j;yc(c,this.w+a,2,c.M)&&c.fa(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;yc(d,this.w+a, -1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},va:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;yc(d,this.w+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Wb(this.A,b);return this.G.getUint16(a,!0)},ga:function(a,b){a&1&&Wb(this.A,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},ua:function(a,b,c){a&1&&Wb(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&Wb(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Jb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.B=c.B)&&vc(a,wc,!1))}function zc(a,b){b?--a.B||(a.Db=a.f?a.J:a.Ob,a.tb=a.f?a.H:a.Pb):--a.i||(a.Ab=a.Ib,a.qa=a.Jb)}function vc(a,b,c){c&&a.B||(a.Db=!a.f&&b[1]||a.J,a.tb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.Ab=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)} -var Ac=[],uc=[I.prototype.V,I.prototype.ta,I.prototype.ja,I.prototype.xa],wc=[I.prototype.T,I.prototype.ma,I.prototype.da,I.prototype.va];if(lb)var tc=[I.prototype.R,I.prototype.la,I.prototype.ca,I.prototype.ua],sc=[I.prototype.U,I.prototype.oa,I.prototype.ga,I.prototype.Ua]; -function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ea=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.mb=this.ja=0;this.nb=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype; -h.Da=function(a,b,c,d){this.B=a;this.A=b;this.j=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Ic(a)&&(a.Ya=a.Za=-1,Fc(a),a.fa(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.mb))}} -h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.rb()}Kc(a,a.T);a.T=0;a.R=ra();a.ca=0;Lc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function gc(a,b,c){0<=b&&ba.K[b][0]&&(c*=a.Fa*a.Ka/1E3,a.K[b][0]=c+Mc(a))} -function Nc(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 Oc(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 Mc(a,b){var c=a.da-=a.b;a.b=0;b&&(a.da=0);return c} -h.ad=function(){if(this.v.ea){this.jb>=this.Fa&&Lc(this,!0);this.oa=0;this.xa=ra();if(this.ca){var a=this.xa-this.ca;a>this.vb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Nc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Mc(this,!0);this.oa+=b;this.T+=b;Hc(this,b);Oc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.xb&&(this.B&&this.B.ba(),this.xb=0);break}}while(this.v.ea)}catch(e){this.fa();this.B&&this.B.stop(ra(),Ic(this));kb(this, -e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.Yb;this.ca=ra();var c=this.vb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ca-this.xa),d=this.ca-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ga=0,Jc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ca+=c;a(b,c)}}}; -h.cb=function(a){if(jb(this))return!1;if(this.v.ea)return this.g(this.toString()+" busy"),!1;Jc(this);this.v.ea=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,Ic(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.fa=function(a){if(this.v.ea){Mc(this);Kc(this,this.T);this.T=0;this.v.ea=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(ra(),Ic(this))}this.v.complete=a}; -function Pc(a){this.Hb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.decode=Qc.bind(this);jd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}y(Pc,Bc);h=Pc.prototype;h.reset=function(){this.v.ea&&this.fa();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)}; -function jd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.sa=[0,0,0,0];a.D=0;a.ua=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.i=a.f=a.Ta=0;a.ma=-1;kd(a)}function kd(a){a.Na=255;a.$=0;a.Lb=0;a.G=0;a.La=0;a.pb=0;a.Ma=0;a.Ja=0;a.ta=0;a.Wa=262143;a.va=253952;a.F|=2;a.A&&ic(a)}function ic(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.tb=a.Id,Lb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.tb=a.gc,Lb(a.A,16))}h.Vb=function(){return 0}; -h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ga,this.Ka]);a.set(2,Sb(this.A));return a.data()};h.restore=function(a){var b=a[1];this.ga=b[1];Jc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.sa[c]=a.u[6],a.u[6]=a.sa[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function pd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function qd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function sd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.aa=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.pb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);kc(this,e&-12289|this.ma>>2&12288);c&&(this.$|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);K(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);K(a,b);kc(a,c);a.F&=-17} -function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.$|=32,a.aa(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ta=a.D,a.ua=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ta<<5|a.ua<<1),a.aa(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; -a.b-=8;break;case 6:return e=od(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=od(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.$|=4,a.u[6]=4,a.aa(4,24)):(a.$|=8,a.F|=64));return e}h.yb=function(a){if(!this.Ja)return this.A.yb(a);this.C++;a=xd(this,wd(this,a,3));this.C--;return a}; -h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(wd(this,a,2));this.C--;return a};h.qb=function(a,b){this.Ja?(this.C++,yd(this,wd(this,a,5),b),this.C--):this.A.qb(a,b)};h.Cb=function(a,b){this.Ja?(this.C++,this.gc(wd(this,a,4),b),this.C--):this.A.Cb(a,b)};h.mc=function(a,b,c){return zd(this,a,b,c)};h.nc=function(a,b,c){return wd(this,zd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(wd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; -h.Id=function(a,b){this.A.Sa(wd(this,a,4),b)};function Ad(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=zd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.sa[a.L>>12&3];return c}function Bd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=zd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.sa[a.L>>12&3]=d} -function Cd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Dd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Ed(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return zd(a,b,c,8)}function Fd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?xd(a,a.Y(b,c,3)):a.u[c]&255}function Gd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),yd(a,e,d.call(a,c,xd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Hd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?yd(a,a.Y(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 Id(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]}; +h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc}; +h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Lb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){uc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.i.Ab=this.i.Ab&-120|20;this.f.Ia=0}; +var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR",1145],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR",1145],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR",1145],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR",1145],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR",1145],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR",1145],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR",1145],N[62704]=[null,null,L.prototype.wc,L.prototype.hd, +"KDSAR",1145],N[62798]=[null,null,L.prototype.Fc,L.prototype.pd,"MMR3",1145],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0",1145],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1",1145],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2",1145],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR",1145],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR", +1145],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR",1145],N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR",1145],N[65472]=[null,null,L.prototype.ab,L.prototype.fb,"R0SET0"],N[65473]=[null,null,L.prototype.ab,L.prototype.fb,"R1SET0"],N[65474]=[null,null,L.prototype.ab,L.prototype.fb,"R2SET0"],N[65475]=[null,null,L.prototype.ab,L.prototype.fb,"R3SET0"],N[65476]=[null,null,L.prototype.ab,L.prototype.fb,"R4SET0"],N[65477]=[null,null,L.prototype.ab,L.prototype.fb,"R5SET0"],N[65478]= +[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET1",1145],N[65481]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET1",1145],N[65482]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET1",1145],N[65483]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET1",1145],N[65484]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET1",1145],N[65485]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET1",1145], +N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER",1145],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud,"R6USER",1145],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd, +"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"],N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; +M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; +M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; +M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];Ta(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Bc(this,xc?Cc:Dc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&nc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;Ic(c,this.w+a,1,c.M)&&c.ea(!0)}return this.Ib(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;Ic(c,this.w+a,2,c.M)&&c.ea(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;Ic(d,this.w+a, +1,d.D)&&d.ea(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;Ic(d,this.w+a,2,d.D)&&d.ea(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&nc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&nc(this.A,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ +J(this.j,b)+"): "+J(this.j,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},va:function(a,b,c){a&1&&nc(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&nc(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; +function Sb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&Hc(a,Gc,!1),(a.B=c.B)&&Fc(a,Gc,!1))}function Jc(a,b){b?--a.B||(a.Eb=a.f?a.J:a.Ob,a.ub=a.f?a.H:a.Pb):--a.i||(a.Bb=a.Ib,a.qa=a.Jb)}function Fc(a,b,c){c&&a.B||(a.Eb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function Hc(a,b,c){c&&a.i||(a.Bb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function Bc(a,b){b||(b=Kc);Hc(a,b,void 0);Fc(a,b,void 0)} +var Kc=[],Ec=[I.prototype.V,I.prototype.ua,I.prototype.ja,I.prototype.xa],Gc=[I.prototype.T,I.prototype.ma,I.prototype.ca,I.prototype.wa];if(Gb)var Dc=[I.prototype.R,I.prototype.la,I.prototype.ba,I.prototype.va],Cc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; +function Lc(a,b){r.call(this,"CPU",a,Lc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.da=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}u(Lc);var Mc=["power","reset"];h=Lc.prototype; +h.Da=function(a,b,c,d){this.B=a;this.A=b;this.j=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Sc(a)&&(a.Ya=a.Za=-1,Pc(a),a.ea(),c=!0);c&&a.g(Sc(a)+" cycles: checksum="+k(a.nb))}} +h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.sb()}Uc(a,a.T);a.T=0;a.R=Aa();a.ba=0;Vc(a);return d}function oc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function qc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Wc(a))} +function Xc(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 Yc(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 Wc(a,b){var c=a.ca-=a.b;a.b=0;b&&(a.ca=0);return c} +h.ad=function(){if(this.v.da){this.jb>=this.Fa&&Vc(this,!0);this.oa=0;this.xa=Aa();if(this.ba){var a=this.xa-this.ba;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Xc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Wc(this,!0);this.oa+=b;this.T+=b;Rc(this,b);Yc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.aa(),this.yb=0);break}}while(this.v.da)}catch(e){this.ea();this.B&&this.B.stop(Aa(),Sc(this));Fb(this, +e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Yb;this.ba=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ba-this.xa),d=this.ba-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Tc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ba+=c;a(b,c)}}}; +h.cb=function(a){if(Eb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Tc(this);this.v.da=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Sc(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.ea=function(a){if(this.v.da){Wc(this);Uc(this,this.T);this.T=0;this.v.da=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Sc(this))}this.v.complete=a}; +function rd(a){this.mb=+a.model||1170;this.qc=a.resetAddr||0;Lc.call(this,a,6666667);this.decode=1120==this.mb?sd.bind(this):td.bind(this);ud(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(rd,Lc);h=rd.prototype;h.reset=function(){this.status("model "+this.mb);this.v.da&&this.ea();ud(this);Oc(this);this.v.error=!1;this.parent.reset.call(this)}; +function ud(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.i=a.f=a.Ta=0;a.ma=-1;vd(a)}function vd(a){a.Na=255;a.Z=0;a.Lb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&sc(a)}function sc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Vb=function(){return 0}; +h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,jc(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Tc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Ad(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Bd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Cd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Dd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.$=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Lb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);uc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Ed(this,this.ma);Ed(this,this.u[7]);K(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Fd(a){var b=Gd(a),c=Gd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);K(a,b);uc(a,c);a.F&=-17} +function Hd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.$(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g;a.b-= +8;break;case 6:return e=zd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=zd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.A.zb(a);this.C++;a=Id(this,Hd(this,a,3));this.C--;return a}; +h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(Hd(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Jd(this,Hd(this,a,5),b),this.C--):this.A.rb(a,b)};h.Db=function(a,b){this.Ja?(this.C++,this.gc(Hd(this,a,4),b),this.C--):this.A.Db(a,b)};h.mc=function(a,b,c){return Kd(this,a,b,c)};h.nc=function(a,b,c){return Hd(this,Kd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Hd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; +h.Id=function(a,b){this.A.Sa(Hd(this,a,4),b)};function Ld(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=Kd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Md(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=Kd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Hd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} +function Nd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Id(a,a.Y(b,c,3)):a.u[c]&255}function Od(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Pd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return Kd(a,b,c,8)}function Qd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?Id(a,a.Y(b,c,3)):a.u[c]&255}function Rd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Jd(a,e,d.call(a,c,Id(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Sd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?Jd(a,a.Y(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 Td(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} function S(a,b,c){c&&(K(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.j&&Jd(this.j),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.da=this.b=a;do{if(b){if(Kd(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.aa(168,28):this.F&64?this.aa(4,30):this.F&16&&this.aa(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.aa(d,26),e=!0):e=!1; -if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.pb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(od(this))}while(0>1|b<<16;rd(this,a);return a&65535}function Qd(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Rd(a,b){a=b&~a;P(this,a);return a}function Sd(a,b){a=b&~a;P(this,a<<8);return a}function Td(a,b){a|=b;P(this,a);return a}function Ud(a,b){a|=b;P(this,a<<8);return a} -function Vd(a,b){a=~b|65536;pd(this,a);return a&65535}function Wd(a,b){a=~b|256;pd(this,a<<8);return a&255}function Xd(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function Yd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function Zd(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function $d(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} -function ae(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function be(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ce(a,b){a=b<<1|this.N>>16&1;rd(this,a);return a&65535}function de(a,b){a=b<<1|this.N>>16&1;rd(this,a<<8);return a&255}function ee(a,b){a=(this.N&65536|b)>>1|b<<16;rd(this,a);return a&65535}function fe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255}function ge(a,b){var c=b-a;sd(this,c,a,b);return c&65535} -function he(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ie(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function je(a,b){a^=b;P(this,a);return a&65535} -function ke(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} -function le(a){var b=Gd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function me(a){var b=Gd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}var ne=[0,7,7,10,7,11,9,13];function oe(a){var b=this.b;K(this,Ed(this,a));this.b=b-ne[this.i]} -var pe=[0,14,14,17,14,18,16,20];function qe(a){var b=this.b,c=Ed(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];K(this,c);this.b=b-pe[this.i]}var re=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],se=[7,13,13,17,14,18,17,21];function te(a){var b=Gd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)K(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function we(a){R(this,a,0,ie);this.b-=this.i?9:3+(7==this.f?2:0)}function xe(a){R(this,a,Dd(this,a),je);this.b-=this.i?9:3+(7==this.f?2:0)}function W(){this.aa(8,6)}function Qc(a){ye[a>>12].call(this,a)} -var ye=[function(a){ze[a>>8&15].call(this,a)},function(a){var b=Dd(this,a),c=this.b;P(this,Id(this,a,b));this.b=c-re[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Dd(this,a);a=Gd(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,Dd(this,a)&Gd(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f? -2:0)},function(a){R(this,a,Dd(this,a),Td);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),Ld);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},function(a){var b=Cd(this,a);P(this,Hd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Cd(this,a)<<8;a=Fd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i? -4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,(Cd(this,a)&Fd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Cd(this,a),Ud);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){R(this,a,Dd(this,a),ge);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},W],ze= -[function(a){Ve[a>>4&15].call(this,a)},function(a){S(this,a,!0)},function(a){S(this,a,!nd(this))},function(a){S(this,a,nd(this))},function(a){S(this,a,!this.Ca()==!md(this))},function(a){S(this,a,!this.Ca()!=!md(this))},function(a){S(this,a,!nd(this)&&!this.Ca()==!md(this))},function(a){S(this,a,nd(this)||!this.Ca()!=!md(this))},qe,qe,function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},function(a){Ye[a>>6&3].call(this,a)},function(a){Ze[a>>6&3].call(this,a)},W,W],We=[function(a){pd(this, -Id(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Vd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Zd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){R(this,a,0,ae);this.b-=this.i?11:6},function(a){R(this,a,ld(this)?1:0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Gd(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f? -2:0)}],Ye=[function(a){R(this,a,0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Pd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ze=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);K(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ad(this,a,0);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a, -0,b);P(this,b);this.b=c-se[this.i]},function(a){P(this,Id(this,a,this.Ca?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){$e[a&15].call(this,a)},W,W,W,oe,oe,oe,oe,function(a){if(a&8)this.aa(8,6);else{var b=vd(this);a&=7;K(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.aa(8,6)},function(a){af[a&15].call(this,a)},function(a){bf[a&15].call(this,a)},we,we,we,we],$e=[function(){this.L&49152?(this.$|=128,this.aa(4, -3)):this.fa();this.b-=7},function(){this.F&4||this.B.ba();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.aa(12,1);this.b-=5},function(){this.aa(16,4);this.b-=25},function(){this.L&49152||(kd(this),this.A.reset());this.b-=667},function(){ud(this);this.b-=13},W,W,W,W,W,W,W,W,W],af=[ue,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],bf= -[ue,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],Te=[te,te,me,me,ke,ke,le,le,xe,xe,W,W,W,W,ve,ve],Ue=[function(a){S(this,a,!this.Ca())},function(a){S(this,a,this.Ca())},function(a){S(this,a,!ld(this)&&!nd(this))},function(a){S(this,a,ld(this)||nd(this))},function(a){S(this,a,!md(this))},function(a){S(this,a,md(this))},function(a){S(this,a,!ld(this))},function(a){S(this,a,ld(this))},function(){this.aa(24, -2);this.b-=25},function(){this.aa(28,5);this.b-=5},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},function(a){ef[a>>6&3].call(this,a)},function(a){ff[a>>6&3].call(this,a)},W,W],cf=[function(a){pd(this,Hd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}],df=[function(a){Q(this,a,0,be);this.b-= -this.i?11:6},function(a){Q(this,a,ld(this)?1:0,Md);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,ld(this)?1:0,he);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Fd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],ef=[function(a){Q(this,a,0,fe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,de);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Qd);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Od);this.b-=this.i?9:3+(7== -this.f?2:0)}],ff=[W,function(a){a=Ad(this,a,65536);td(this,a);P(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;Bd(this,a,65536,b);P(this,b);this.b=c-se[this.i]},W];function gf(a){r.call(this,"ROM",a,gf);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=da(this.C);if(this.C){a=this.C;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ka()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){hf(c,a,b,f)})}}y(gf); -gf.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;jf(this)};gf.prototype.Aa=function(){if(this.Ba){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Rb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};gf.prototype.za=function(){return!0}; -function hf(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.Eb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=oa(b[0]);if(c!=this.Ua)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Eb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.za=function(a){return a?this.save():!0};h.reset=function(){of(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return of(this)};function of(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;gc(this.b,this.V,1)}};var pf={},nf=(pf[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],pf[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],pf[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],pf[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],pf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};qf.prototype.Wb=function(){return-1};qf.prototype.Xb=function(){}; -function sf(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(oa(b.substring(c,f))),c=f+1}}return a} -function tf(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; +h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.j&&Ud(this.j),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.ca=this.b=a;do{if(b){if(Vd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.$(d,26),e=!0):e=!1;if(e&& +a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(zd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function ae(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function be(a,b){a=b&~a;P(this,a);return a}function ce(a,b){a=b&~a;P(this,a<<8);return a}function de(a,b){a|=b;P(this,a);return a}function ee(a,b){a|=b;P(this,a<<8);return a} +function fe(a,b){a=~b|65536;Ad(this,a);return a&65535}function ge(a,b){a=~b|256;Ad(this,a<<8);return a&255}function he(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function ie(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function je(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function ke(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} +function le(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function me(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function ne(a,b){a=b<<1|this.N>>16&1;Cd(this,a);return a&65535}function oe(a,b){a=b<<1|this.N>>16&1;Cd(this,a<<8);return a&255}function pe(a,b){a=(this.N&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function qe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function re(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} +function se(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function te(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function ue(a,b){a^=b;P(this,a);return a&65535}function ve(a){R(this,a,Od(this,a),Wd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function we(a){var b=Rd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} +function xe(a){var b=Rd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function ye(a){S(this,a,!wd(this))}function ze(a){S(this,a,wd(this))} +function Ae(a){R(this,a,Od(this,a),be);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Be(a){Q(this,a,Nd(this,a),ce);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ce(a){R(this,a,Od(this,a),de);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){Q(this,a,Nd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Ee(a){P(this,Od(this,a)&Rd(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Fe(a){P(this,(Nd(this,a)&Qd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ge(a){S(this,a,yd(this))}function He(a){S(this,a,!this.Ca()==!xd(this))}function Ie(a){S(this,a,!yd(this)&&!this.Ca()==!xd(this))}function Je(a){S(this,a,!wd(this)&&!yd(this))}function Ke(a){S(this,a,yd(this)||!this.Ca()!=!xd(this))} +function Le(a){S(this,a,wd(this)||yd(this))}function Me(a){S(this,a,!this.Ca()!=!xd(this))}function Ne(a){S(this,a,this.Ca())}function Oe(a){S(this,a,!yd(this))}function Pe(a){S(this,a,!this.Ca())}function Qe(){this.$(12,1);this.b-=5}function Re(a){S(this,a,!0)}function Se(a){S(this,a,!xd(this))}function Te(a){S(this,a,xd(this))}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function Ue(a){var b=Od(this,a);a=Rd(this,a);Dd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ve(a){var b=Nd(this,a)<<8;a=Qd(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} +function We(a){var b=Rd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Xe(){this.$(24,2);this.b-=25}function Ye(){this.L&49152?(this.Z|=128,this.$(4,3)):this.ea();this.b-=7} +function Ze(){this.$(16,4);this.b-=25}var $e=[0,7,7,10,7,11,9,13];function af(a){var b=this.b;K(this,Pd(this,a));this.b=b-$e[this.i]}var bf=[0,14,14,17,14,18,16,20];function cf(a){var b=this.b,c=Pd(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];K(this,c);this.b=b-bf[this.i]}var df=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ef(a){var b=Od(this,a),c=this.b;P(this,Td(this,a,b));this.b=c-df[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)} +function ff(a){var b=Nd(this,a);P(this,Sd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var gf=[7,13,13,17,14,18,17,21];function hf(a){var b=Rd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)K(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function of(a){R(this,a,Od(this,a),re);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function pf(a){R(this,a,0,te);this.b-=this.i?9:3+(7==this.f?2:0)}function qf(){this.$(28,5);this.b-=5}function rf(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function sf(a){R(this,a,Od(this,a),ue);this.b-=this.i?9:3+(7==this.f?2:0)}function W(){this.$(8,6)}function sd(a){tf[a>>12].call(this,a)}function uf(a){vf[a>>6&3].call(this,a)}function wf(a){xf[a>>6&3].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)}function Tf(a){Uf[a&15].call(this,a)} +function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)} +var tf=[function(a){cg[a>>8&15].call(this,a)},ef,Ue,Ee,Ae,Ce,ve,W,function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,of,W],cg=[function(a){eg[a>>4&15].call(this,a)},Re,Oe,Ge,He,Me,Ie,Ke,cf,cf,uf,wf,yf,W,W,W],vf=[function(a){Ad(this,Td(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,je);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,he);this.b-=this.i?9:3+(7==this.f?2:0)}],xf=[function(a){R(this,a,0, +le);this.b-=this.i?11:6},function(a){R(this,a,wd(this)?1:0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,wd(this)?1:0,re);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Rd(this,a);Ad(this,a);this.b-=this.i?4:3+(7==this.f?2:0)}],zf=[function(a){R(this,a,0,pe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ne);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}], +eg=[function(a){fg[a&15].call(this,a)},W,W,W,af,af,af,af,mf,W,Tf,Vf,pf,pf,pf,pf],fg=[Ye,rf,lf,Qe,Ze,kf,W,W,W,W,W,W,W,W,W,W],Uf=[jf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Wf=[jf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],dg=[Pe,Ne,Je,Le,Se,Te,ye,ze,Xe,qf,Xf,Zf,ag,W,W,W],Yf=[function(a){Ad(this, +Sd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ke);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ie);this.b-=this.i?9:3+(7==this.f?2:0)}],$f=[function(a){Q(this,a,0,me);this.b-=this.i?11:6},function(a){Q(this,a,wd(this)?1:0,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,wd(this)?1:0,se);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Qd(this,a);Ad(this,a<<8);this.b-=this.i?4:3+(7== +this.f?2:0)}],bg=[function(a){Q(this,a,0,qe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,oe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Zd);this.b-=this.i?9:3+(7==this.f?2:0)}];function td(a){gg[a>>12].call(this,a)} +var gg=[function(a){hg[a>>8&15].call(this,a)},ef,Ue,Ee,Ae,Ce,ve,function(a){ig[a>>8&15].call(this,a)},function(a){jg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,of,W],hg=[function(a){kg[a>>4&15].call(this,a)},Re,Oe,Ge,He,Me,Ie,Ke,cf,cf,uf,wf,yf,function(a){lg[a>>6&3].call(this,a)},W,W],lg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);K(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ld(this,a,0);Ed(this,a);P(this,a);this.b-=11},function(a){var b=Gd(this),c= +this.b;Md(this,a,0,b);P(this,b);this.b=c-gf[this.i]},function(a){P(this,Td(this,a,this.Ca?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],kg=[function(a){mg[a&15].call(this,a)},W,W,W,af,af,af,af,mf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},Tf,Vf,pf,pf,pf,pf],mg=[Ye,rf,lf,Qe,Ze,kf,function(){Fd(this);this.b-=13},W,W,W,W,W,W,W,W,W],ig=[hf,hf,We,We,we,we,xe,xe,sf,sf,W,W,W,W,nf,nf],jg=[Pe,Ne,Je,Le,Se,Te,ye,ze,Xe,qf,Xf,Zf,ag,function(a){ng[a>>6&3].call(this, +a)},W,W],ng=[W,function(a){a=Ld(this,a,65536);Ed(this,a);P(this,a);this.b-=11},function(a){var b=Gd(this),c=this.b;Md(this,a,65536,b);P(this,b);this.b=c-gf[this.i]},W];function og(a){r.call(this,"ROM",a,og);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){pg(c,a,b,f)})}}u(og); +og.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;qg(this)};og.prototype.Aa=function(){if(this.Ba){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Rb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};og.prototype.za=function(){return!0}; +function pg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Fb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.za=function(a){return a?this.save():!0};h.reset=function(){vg(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return vg(this)};function vg(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;qc(this.b,this.V,1)}};var wg={},ug=(wg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],wg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],wg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],wg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],wg);Ta(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xg.prototype.Wb=function(){return-1};xg.prototype.Xb=function(){}; +function zg(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(xa(b.substring(c,f))),c=f+1}}return a} +function Ag(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 uf(a,b,c){var d;if(b){b=vf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function yf(a,b){if(b)return xf(a,b,a.ca[b]);var c=0;for(b in a.ca)xf(a,b,a.ca[b]),c++;return 0>>d.A.Z;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.sa[a-16]:20==a&&(b=Db(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.pb).w));this.ia&1073741824?this.ta.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Mc(a),a.la=0,a.B.ba()))}; -function Bf(a){var b;if(Jd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.Z],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.Z],!0);a.D=["bw"];a.Ta=0} -h.Pa=function(a,b,c){var d=!0;c||Rf(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.Z].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(Sf(this,a,a.length-1,"set"),Bf(this)));return d};function Rf(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.Z],b==a.D));l.ya||Bf(a);break}}return f} -function Tf(a,b){for(var c=1;c>23)&65535,x=J(v,u);else if(8192==D)u=u.w-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Mf(C);break;case 8:x="@"+Mf(C);break;case 16:7>C?x="("+Mf(C)+ -")+":(D=v.ka(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Mf(C)+")+":(D=v.ka(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Mf(C)+")";break;case 40:x="@-("+Mf(C)+")";break;case 48:D=v.ka(u,2);x=J(v,D,0,!0)+"("+Mf(C)+")";7==C&&(x=[x,J(v,D+u.w&65535)]);break;case 56:D=v.ka(u,2),x="@"+J(v,D)+"("+Mf(C)+")",7==C&&(x=[x,J(v,D+u.w&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0b?(c=Mf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.sa[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Yf(a){var b,c="";for(b=0;6>b;b++)c+=Xf(a,b);c=c+"\n"+(Xf(a,6)+Xf(a,7)+Xf(a,20));return c+=Wf(a,"T")+Wf(a,"N")+Wf(a,"Z")+Wf(a,"V")+Wf(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.ba();a.g("updated registers:")}a.g(Yf(a));c&&(a.K=Z(d.u[7]),Pf(a,J(a,a.K.w)))}}function cg(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Vf(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} -function Uf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(ib(a)&&0q||"z"ha.length&&(a.g("note: only "+ha.length+" available"),X=ha.length);ba-=X;0>ba&&(null==ha[ha.length-1].w?(X=ba+X,ba=0):ba+=ha.length);var Uc=[];"call"==Fe&&(nb=1E5,Uc=["CALL"]);for(void 0!==Ee&&a.g(X+" instructions earlier:");0=ha.length&&(ba=0);a.Va=X;He++;nb--}}He||(a.g("no "+Ge+"history available"),a.Va=void 0)}else{var pb=Hf(a,ga);if(pb){var Yb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||wg),Yb=wf(a,za)>>>0,65536>4||1;yg--&&0ac?String.fromCharCode(ac):".";Zb--}qb&&(qb+="\n");qb+=ga+" "+Vc+(0==sb?" "+Ke:"")}qb&&a.g(qb);a.Oa=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Xc,Yc,Zc,$c=g[0],ad=g[1];"eb"==$c?(Ua=1,Xc=255,Yc=a.kb,Zc=a.Bb):"e"==$c||"ew"==$c?(Ua=2,Xc=65535,Yc=a.ka,Zc=a.Sa):ad=null;if(null==ad)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var bc=Hf(a,ad);if(bc)for(var cc=2;cc< -g.length;cc++){var tb=uf(a,g[cc]);if(void 0===tb){a.g("unrecognized value: "+g[cc]);break}tb&~Xc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var zg=Yc.call(a,bc);a.g("changing "+J(a,bc.w)+" from "+J(a,zg,Ua)+" to "+J(a,tb,Ua));Zc.call(a,bc,tb,Ua)}}break;case "g":a:{var Le=g[1],Ag=b;if(void 0!==Le){var bd=Hf(a,Le,!0);if(!bd)break a;Lf(a,bd,Ag);a.Pa(a.f,bd,!0)}a.cb(!0,c)}break;case "h":a.v.ea?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var cd; -var ub=b.substr(2),ub=oa(ub);uf(a,ub)?(c||a.g("true: "+ub),cd=!0):(c||a.g("false: "+ub),cd=!1);cd||(d=!1);break}f=!0;break;case "k":var Bg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var dd=0,ed=Z(),vb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,vb.w));10>dd;){for(var Aa=null,Cg=256;65536>vb.w>>>0;){ed.w=a.ka(vb,2);if(null==vb.w||!Cg--)break;if(!(ed.w&1)){for(var Dg=a,dc=ed,Me=null,wb=dc.w,Ne=wb,fd=1;6>=fd&&wb;fd++){if(2< -fd){dc.w=wb;var ec=Vf(Dg,dc);if(0<=ec.indexOf("JSR")){var Oe=ec.indexOf(" ");if(wb+(ec.indexOf(" ",Oe+1)-Oe-1)/2==Ne){Me=ec;break}}}wb-=2}dc.w=Ne;if(Aa=Me)break}}if(!Aa||null==Aa)break;var Pe=null;if("ks"==Bg){var Qe=Aa.match(/[0-9A-F]+$/);Qe&&(Pe=bg(a,Qe[0]))}Aa=na(Aa,50)+" ;"+(Pe||"stack="+J(a,vb.w));a.g(Aa);dd++}dd||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){bg(a,g[1],!0);break}f=!0;break;case "m":a:{var ia,ja=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var sa=0;if("all"== -F)sa=1878917119,F=null;else if("on"==F)ja=!0,F=null;else if("off"==F)ja=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ia in H)if(F==ia){sa=H[ia];ja=!!(a.ia&sa);break}if(!sa){a.g("unknown message category: "+F);break a}}if(sa)if("on"==g[2])a.ia|=sa,ja=!0;else if("off"==g[2]&&(a.ia&=~sa,ja=!1,1073741824==sa)){for(var gd=0;gd\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.I)){this.D=new O(this,"1.30.1","failsafe");jg(this.D)&&(og(this,d),a=2,pg(this.D));this.D.set("timestamp",ta());qg(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(rg(this,this.b,b,c,a),this.b.hb());this.T&&(og(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function og(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.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}} -function eg(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.fa(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ua(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Jg(a,b,c)}})}else c(a,null)} -function Kg(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--vg||Na(!0));m=!1}var g,l,m=!0;vg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Hg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--vg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--vg||Na(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hg(b,a,d,!0,e,p):Ig(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Kg(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map +function Bg(a,b,c){var d;if(b){b=Cg(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Fg(a,b){if(b)return Eg(a,b,a.ba[b]);var c=0;for(b in a.ba)Eg(a,b,a.ba[b]),c++;return 0>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=ac[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.qb).w));this.ia&1073741824?this.ua.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Wc(a),a.la=0,a.B.aa()))}; +function Ig(a){var b;if(Ud(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||Yg(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(Zg(this,a,a.length-1,"set"),Ig(this)));return d};function Yg(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Ig(a);break}}return f} +function $g(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y=Tg(C);break;case 8:y="@"+Tg(C);break;case 16:7>C?y="("+Tg(C)+ +")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Tg(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Tg(C)+")";break;case 40:y="@-("+Tg(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Tg(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Tg(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(m=x[1],x=x[0]);0b?(c=Tg(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function eh(a){var b,c="";for(b=0;6>b;b++)c+=dh(a,b);c=c+"\n"+(dh(a,6)+dh(a,7)+dh(a,20));return c+=ch(a,"T")+ch(a,"N")+ch(a,"Z")+ch(a,"V")+ch(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(eh(a));c&&(a.K=Z(d.u[7]),Wg(a,J(a,a.K.w)))}}function jh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=bh(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} +function ah(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Ff&&(rb=1E5,bd=["CALL"]);for(void 0!==Ef&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;Hf++;rb--}}Hf||(a.g("no "+Gf+"history available"),a.Va=void 0)}else{var tb=Og(a,ha);if(tb){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Dh),bc=Dg(a,Ca)>>>0,65536>4||1;Fh--&&0ec?String.fromCharCode(ec):".";cc--}ub&&(ub+="\n");ub+=ha+" "+cd+(0==wb?" "+Kf:"")}ub&&a.g(ub);a.Oa=tb}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.kb,gd=a.Cb):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Og(a,id);if(fc)for(var gc=2;gc< +g.length;gc++){var xb=Bg(a,g[gc]);if(void 0===xb){a.g("unrecognized value: "+g[gc]);break}xb&~ed&&a.g("warning: "+k(xb)+" exceeds "+Za+"-byte value");var Gh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Gh,Za)+" to "+J(a,xb,Za));gd.call(a,fc,xb,Za)}}break;case "g":a:{var Lf=g[1],Hh=b;if(void 0!==Lf){var jd=Og(a,Lf,!0);if(!jd)break a;Sg(a,jd,Hh);a.Pa(a.f,jd,!0)}a.cb(!0,c)}break;case "h":a.v.da?(c||a.g("halting"),a.ea()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; +var yb=b.substr(2),yb=xa(yb);Bg(a,yb)?(c||a.g("true: "+yb),kd=!0):(c||a.g("false: "+yb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Ih=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),zb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,zb.w));10>ld;){for(var Da=null,Jh=256;65536>zb.w>>>0;){md.w=a.ka(zb,2);if(null==zb.w||!Jh--)break;if(!(md.w&1)){for(var Kh=a,hc=md,Mf=null,Ab=hc.w,Nf=Ab,nd=1;6>=nd&&Ab;nd++){if(2< +nd){hc.w=Ab;var ic=bh(Kh,hc);if(0<=ic.indexOf("JSR")){var Of=ic.indexOf(" ");if(Ab+(ic.indexOf(" ",Of+1)-Of-1)/2==Nf){Mf=ic;break}}}Ab-=2}hc.w=Nf;if(Da=Mf)break}}if(!Da||null==Da)break;var Pf=null;if("ks"==Ih){var Qf=Da.match(/[0-9A-F]+$/);Qf&&(Pf=ih(a,Qf[0]))}Da=wa(Da,50)+" ;"+(Pf||"stack="+J(a,zb.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){ih(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== +F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;boh){if(qh(d,this.I)){this.D=new O(this,"1.30.1","failsafe");qh(this.D)&&(vh(this,d),a=2,wh(this.D));this.D.set("timestamp",Ea());xh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=uh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?qh(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.i=null)):this.g(f+": "+g),wh(d),qh(d)?(c=uh(d),e=!0):c=!1))}e&&th(this,c?d:null)}else 2==a&&d.clear()}else th(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(yh(this,this.b,b,c,a),this.b.hb());this.T&&(vh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function vh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} +function lh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ea(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Qh(a,b,c)}})}else c(a,null)} +function Rh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Ch||ab(!0));m=!1}var g,l,m=!0;Ch++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Oh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Ch||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Ch||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Oh(b,a,d,!0,e,p):Ph(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Rh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index dc00c9c3b..4ed88e858 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -27,151 +27,155 @@ 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 */ -var g; -function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} -var ja={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ka=Date.now||function(){return+new Date}; -function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +for(var g,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function h(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function ka(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function pa(a){return a.replace(/[&<>"']/g,function(a){return oa[a]})}function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ra={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},sa=Date.now||function(){return+new Date}; +function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function m(a,b,c,d){var e=0,f=null,k=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)}),k;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),k=[f,e]);return k}function ea(){return"http://"+(window?window.location.host:"www.pcjs.org")} -function p(a){window&&window.alert(a)}function ma(a){var b=!1;window&&(b=window.confirm(a));return b}var na=null;function oa(){if(null==na){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}na=a}return na}function pa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} -function qa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function ra(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var r={init:[],show:[],exit:[]},sa=!1,ta=!1,ua=!0;function va(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){r.init.push(a)} -function wa(a){if(ua)try{for(var b=0;bb?this.Ea=this.id:(this.Ta=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Na=null;this.h.error=!1;this.v={};this.H=null;w.push(this)}var za=void 0,Aa={}; -if(window){za||(za=window.location.search.substr(1));for(var Ba,Ca=/\+/g,Da=/([^&=]+)=?([^&]*)/g;Ba=Da.exec(za);)Aa[decodeURIComponent(Ba[1].replace(Ca," "))]=decodeURIComponent(Ba[2].replace(Ca," "))}function Ea(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 x(a,b){b||(b=v);a.prototype=Ea(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Fa=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Fa={},w=[];function Ga(a,b,c){Fa[a]&&b&&(Fa[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Ea=this.id:(this.Ua=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Oa=null;this.h.error=!1;this.v={};this.G=null;w.push(this)}var Ha=void 0,Ia={}; +if(window){Ha||(Ha=window.location.search.substr(1));for(var Ja,Ka=/\+/g,La=/([^&=]+)=?([^&]*)/g;Ja=La.exec(Ha);)Ia[decodeURIComponent(Ja[1].replace(Ka," "))]=decodeURIComponent(Ja[2].replace(Ka," "))}function Ma(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 x(a,b){b||(b=v);a.prototype=Ma(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Na=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Na={},w=[];function Oa(a,b,c){Na[a]&&b&&(Na[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;d=""+e}else d=h(c,d);else d="--------".substr(0,d||4);a.v[b].textContent!=d&&(a.v[b].textContent=d)}}function Ma(a,b,c,d){for(var e=0;e>1)+2;10>this.c&&(this.c=10);15>2;this.g=this.l-1;this.w=this.B/this.l|0;this.ha=[];this.R=0;this.o=[];this.vb=[Pa,Qa,Ra,Sa];a=new G(this);Ta(a,this.H);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=Ua(d,b|4186112)}function Qa(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||Ua(e,c|4186112)} -function Ra(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=Ua(d,b|4186112)}function Sa(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||Ua(e,c|4186112)}function Va(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Pa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Pa){t=n.size-(f-q);t>k&&(t=k);n.Pa=f-n.za+t;f=q+a.l;k-=t;l++;continue}}return $a(1,f,k)}f=new G(a,f,t,a.l,d,e);Ta(f,a.H,n);a.b[l++]=f;f=q+a.l;k-=t}return 0>=k?(a.status(Math.floor(c/1024)+"Kb "+ab[d]+" at "+h(b,8,!0)),!0):$a(2,b,c)} -function Xa(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Xa(b&a.g,b)}function cb(a,b){return a.b[(b&a.i)>>>a.c].S(b&a.g,b)}Oa.prototype.ab=function(a,b){this.R++;this.b[(a&this.i)>>>this.c].sb(a&this.g,b&255,a);this.R--};function db(a,b,c){a.b[(b&a.i)>>>a.c].Qa(b&a.g,c&65535,b)} -function eb(a){for(var b=0,c=[],d=0;da.a.jb)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));fb(a,e,e,k,l,n,q,f[4])}}}function hb(a,b){a.o.push(b)}function ib(a,b){a.R||H(a.a,4,b)} -function $a(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Oa:20,nc:0};this.b={$c:0,bb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;var e=this;this.b.bb=jb(c,function(){e.b.la|=128;e.b.la&64&&(kb(e.a,e.b.oc),lb(e.a,e.b.bb,1E3/60))});this.b.oc=mb(64,6);gb(b,this,J);hb(b,this.reset.bind(this));D(this)};g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a}; -g.xc=function(a){this.b.la=a;a&64&&lb(this.a,this.b.bb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,nb(b))}ob(this)};g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.Za};g.Qb=function(){return this.a.na}; -g.Ac=function(a){var b=this.a;1170>b.jb&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Va=4194303,b.Ha=3915776):(b.Va=262143,b.Ha=253952),nb(b));ob(this)};function ob(a){a.c.Oa=a.c.Oa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]};g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Sa="undefined"!==typeof ArrayBuffer;function Ta(a){v.call(this,"Panel",a,Ta);this.b=0;this.h.fb=!0}x(Ta);g=Ta.prototype; +g.U=function(a,b,c,d){if(this.w&&this.w.U(a,b,c,d)||this.a&&this.a.U(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.v[b]=c,this.b++,!0;default:return"rled"==a?(this.v[b]=c,this.b++,!0):this.parent.U.call(this,a,b,c,d)}};g.ka=function(a,b,c,d){this.w=a;this.m=b;this.a=c;this.G=d};g.ba=function(a,b){b||Ua();return!0};g.aa=function(){return!0}; +function Va(a,b,c,d){if(a.v[b]){void 0===c&&(a.h.error=!0,a.K("Value for "+b+" is invalid"),E(a.a));var e=a.G&&a.G.b||8;c=!a.a.h.T||a.h.fb?8==e?ja(c,d):h(c,d):"--------".substr(0,d||4);a.v[b].textContent!=c&&(a.v[b].textContent=c)}}function Wa(a,b,c,d){for(var e=0;e>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ha=[];this.R=0;this.o=[];this.vb=[Za,$a,ab,bb];a=new G(this);cb(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=eb(d,b)}function $a(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||eb(e,c)} +function ab(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=eb(d,b)}function bb(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||eb(e,c)}function fb(a,b){if(b!=a.l){var c;a.l&&(c=(1<>>a.m;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Qa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Qa){t=n.size-(f-r);t>k&&(t=k);n.Qa=f-n.za+t;f=r+a.c;k-=t;l++;continue}}return kb(1,f,k)}f=new G(a,f,t,a.c,d,e);cb(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var B;e="";B?10>>=a.m;0>>=a.m;0>>a.m].Ya(b&a.g,b)}function nb(a,b){return a.b[(b&a.i)>>>a.m].S(b&a.g,b)}Ya.prototype.bb=function(a,b){this.R++;this.b[(a&this.i)>>>this.m].sb(a&this.g,b&255,a);this.R--}; +function ob(a,b,c){a.b[(b&a.i)>>>a.m].Ra(b&a.g,c&65535,b)}function pb(a){for(var b=0,c=[],d=0;da.a.Ia)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,r=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));qb(a,e,e,k,l,n,r,f[4])}}}function sb(a,b){a.o.push(b)}function tb(a,b){a.R||H(a.a,4,b)} +function kb(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Pa:20,nc:0};this.b={$c:0,cb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.m=b;this.a=c;this.G=d;var e=this;this.b.cb=ub(c,function(){e.b.la|=128;e.b.la&64&&(vb(e.a,e.b.oc),wb(e.a,e.b.cb,1E3/60))});this.b.oc=xb(64,6);rb(b,this,J);sb(b,this.reset.bind(this));D(this)};g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a}; +g.xc=function(a){this.b.la=a;a&64&&wb(this.a,this.b.cb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,yb(b))}zb(this)};g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.$a};g.Qb=function(){return this.a.na}; +g.Ac=function(a){var b=this.a;1170>b.Ia&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Wa=4194303,b.Ha=3915776):(b.Wa=262143,b.Ha=253952),yb(b));zb(this)};function zb(a){a.c.Pa=a.c.Pa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]};g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; g.Zb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Jc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.wc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.uc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Jb=function(a){return this.a.P[0][a>>1&7]};g.vc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]}; g.tc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.hc=function(a){return this.a.C[3][a>>1&7]};g.Sc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Qc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.P[3][a>>1&7]};g.Rc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ec=function(a){return this.a.P[3][(a>>1&7)+8]};g.Pc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Tb=function(){return this.a.u&49152?this.a.X[0]:this.a.f[6]};g.Dc=function(a){this.a.u&49152?this.a.X[0]=a:this.a.f[6]=a};g.Wb=function(){return this.a.f[7]};g.Gc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; g.Ub=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[1]};g.Ec=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[1]=a};g.Vb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[3]};g.Fc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]};g.sc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.dc=function(){return 1};g.Oc=function(){};g.Fb=function(){return this.a.F}; -g.rc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.yc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.$a:0};g.Bc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.$a=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255};g.Sb=function(){return Na(this.a)};g.Cc=function(a){pb(this.a,a&-1809|Na(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Oa=this.c.Oa&-120|20;this.b.la=0}; -var K={},J=(K[62592]=[null,null,I.prototype.bc,I.prototype.Mc,"SISDR"],K[62608]=[null,null,I.prototype.$b,I.prototype.Kc,"SDSDR"],K[62624]=[null,null,I.prototype.ac,I.prototype.Lc,"SISAR"],K[62640]=[null,null,I.prototype.Zb,I.prototype.Jc,"SDSAR"],K[62656]=[null,null,I.prototype.Kb,I.prototype.wc,"KISDR"],K[62672]=[null,null,I.prototype.Ib,I.prototype.uc,"KDSDR"],K[62688]=[null,null,I.prototype.Jb,I.prototype.vc,"KISAR"],K[62704]=[null,null,I.prototype.Hb,I.prototype.tc,"KDSAR"],K[62798]=[null,null, -I.prototype.Qb,I.prototype.Ac,"MMR3"],K[65382]=[null,null,I.prototype.Lb,I.prototype.xc,"LKS"],K[65400]=[null,null,I.prototype.Eb,I.prototype.qc,"CNSL"],K[65402]=[null,null,I.prototype.Nb,I.prototype.zc,"MMR0"],K[65404]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR1"],K[65406]=[null,null,I.prototype.Pb,I.prototype.tb,"MMR2"],K[65408]=[null,null,I.prototype.hc,I.prototype.Sc,"UISDR"],K[65424]=[null,null,I.prototype.fc,I.prototype.Qc,"UDSDR"],K[65440]=[null,null,I.prototype.gc,I.prototype.Rc,"UISAR"], -K[65456]=[null,null,I.prototype.ec,I.prototype.Pc,"UDSAR"],K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]=[null,null,I.prototype.Tb,I.prototype.Dc,"R6KERNEL"],K[65479]=[null,null, -I.prototype.Wb,I.prototype.Gc,"R7KERNEL"],K[65480]=[null,null,I.prototype.va,I.prototype.xa,"R0SET1"],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1"],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1"],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1"],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1"],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1"],K[65486]=[null,null,I.prototype.Ub,I.prototype.Ec,"R6SUPER"],K[65487]=[null,null,I.prototype.Vb,I.prototype.Fc, -"R6USER"],K[65504]=[null,null,I.prototype.Gb,I.prototype.sc,"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.dc,I.prototype.Oc,"SYSID",1170],K[65526]=[null,null,I.prototype.Fb,I.prototype.rc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Mb,I.prototype.yc,"MB",1170],K[65530]=[null,null,I.prototype.Rb,I.prototype.Bc,"PIR"],K[65532]=[null,null,I.prototype.cc,I.prototype.Nc,"SL"], -K[65534]=[null,null,I.prototype.Sb,I.prototype.Cc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624];J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640]; -J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688];J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704]; -J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440];J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456]; -J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),wb(this,sb?xb:yb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Y:function(a,b){a&1&&ib(this.l,b);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},ea: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.ia=!0},G:function(a,b){return this.I(a,b)}, -R:function(a,b){return this.V(a,b)},$:function(a,b,c){this.v||this.sb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ib(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ib(this.l,b);return this.o[a>>1]},Z:function(a,b){this.c[a]=b;this.ia=!0},da:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b,c){a&1&&ib(this.l,c);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b,c){a&1&&ib(this.l,c);this.o[a>> -1]=b;this.ia=!0}};function Ta(a,b,c){a.H=b;a.i=a.m=0;c&&((a.i=c.i)&&Ab(a,Bb,!1),(a.m=c.m)&&Cb(a,Bb,!1))}function Cb(a,b,c){c&&a.m||(a.cb=!a.v&&b[1]||a.A,a.Qa=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Ab(a,b,c){c&&a.i||(a.Xa=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function wb(a,b){b||(b=Db);Ab(a,b,void 0);Cb(a,b,void 0)} -var Db=[],zb=[G.prototype.M,G.prototype.ea,G.prototype.Y,G.prototype.ra],Bb=[G.prototype.G,G.prototype.$,G.prototype.R,G.prototype.ga];if(Ja)var yb=[G.prototype.D,G.prototype.Z,G.prototype.N,G.prototype.fa],xb=[G.prototype.J,G.prototype.da,G.prototype.W,G.prototype.qa]; -function Eb(a,b){v.call(this,"CPU",a,Eb);var c=a.multiplier||1;this.Ka=a.cycles||b;this.$=c;this.Ua=Math.round(this.Ka/1E4)/100;this.da=this.Ua*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Da=this.fa=0;this.Ja=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.G=[];this.mb=this.mc.bind(this);D(this)}x(Eb);var Fb=["power","reset"];g=Eb.prototype; -g.ka=function(a,b,c,d){this.w=a;this.l=b;this.H=d;for(b=0;ba.Y/a.da&&(b=1),a.$=b,b=a.Ua*a.$,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=ka();a.Z=0;Lb(a)}function jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function lb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.Ka*a.$/1E3,a.G[b][0]=c+Nb(a))}function Nb(a,b){var c=a.ea-=a.a;a.a=0;b&&(a.ea=0);return c} -g.mc=function(){if(this.h.T){this.Wa>=this.Ka&&Lb(this,!0);this.ya=0;this.Ia=ka();if(this.Z){var a=this.Ia-this.Z;a>this.kb&&(this.N+=a,this.N>this.Ia&&(this.N=this.Ia))}try{do{for(var b,c=this.h.Ma?1:this.La,d=this.G.length-1;0<=d;d--){var e=this.G[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Nb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Da=this.Da+this.gb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Mb(this)&& -(this.pa=this.qa=-1,Ib(this),F(this),f=!0);f&&this.O(Mb(this)+" cycles: checksum="+h(this.Da))}for(var a=b,k=this.G.length-1;0<=k;k--){var l=this.G[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.La;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){F(this);this.w&&this.w.stop(ka(),Mb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=ka();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ -this.La));d-=this.Z-this.Ia;if(e=this.Z-this.N)this.Y=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Kb(this));if(0>d||this.Yd&&(this.N-=d),d=0;this.Wa+=this.ya;this.Z+=d;b(c,d)}}};function Jb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Kb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Mb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; -function F(a){if(a.h.T){Nb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(ka(),Mb(a))}a.h.complete=void 0}function Ob(a){this.jb=+a.model||1170;this.Cb=a.resetAddr||0;Eb.call(this,a,6666667);this.decode=Pb.bind(this);Qb(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x(Ob,Eb);g=Ob.prototype;g.reset=function(){this.h.T&&F(this);Qb(this);Hb(this);this.h.error=!1;this.parent.reset.call(this)}; -function Qb(a){a.m=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.X=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Sa=0;a.ga=-1;Rb(a)}function Rb(a){a.oa=255;a.F=0;a.$a=0;a.A=0;a.ma=0;a.Za=0;a.na=0;a.Ba=0;a.Fa=0;a.Va=262143;a.Ha=253952;a.j|=2;a.l&&nb(a)}function nb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.jc,a.Qa=a.Uc,Va(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.ic,a.Qa=a.Tc,Va(a.l,16))}g.gb=function(){return 0}; -g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.$]);a.set(2,eb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Kb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.X[c]=a.f[6],a.f[6]=a.X[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function Tb(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function Ub(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b,c){if(!a.R){var d=!1;0>a.ga?a.ga=Na(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.Za=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);pb(a,f&-12289|a.ga>>2&12288);d&&(a.F|=4,a.f[6]=4);Vb(a,a.ga);Vb(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ga=-1;if(26!=c)throw b;}}function Wb(a){var b=Xb(a),c=Xb(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;pb(a,c);a.j&=-17} -function Yb(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Va;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: -128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ga&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.c].cb(b&a.g,c&255,b)}function Xb(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} -function Vb(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= -8;break;case 6:return e=Sb(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=Sb(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.ab=function(a,b){this.Ba?(this.R++,Zb(this,Yb(this,a,5),b),this.R--):this.l.ab(a,b)};g.yb=function(a,b,c){return $b(this,a,b,c)};g.zb=function(a,b,c){return Yb(this,$b(this,a,b,c),c)}; -g.ic=function(a){return cb(this.l,a)};g.jc=function(a){return cb(this.l,Yb(this,a,2))};g.Tc=function(a,b){db(this.l,a,b&65535)};g.Uc=function(a,b){db(this.l,Yb(this,a,4),b)};function ac(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=$b(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} -function bc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=$b(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=Yb(a,e|c&65536,4),a.s=a.u>>14&3,db(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.X[a.u>>12&3]=d}function cc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return $b(a,b,c,8)} -function ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=bb(a.l,c)):a=a.f[c]&255;return a}function R(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?cb(a.l,a.I(b,c,2)):a.f[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Sa=a.I(b,e,7),Zb(a,e,d.call(a,c,bb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),db(a.l,e,d.call(a,c,cb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Zb(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?db(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function U(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.$a&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& -1&&this.j++;this.A&57344||(this.ma=0,this.Za=this.f[7]);this.j=this.j&7|this.u&16;this.decode(Sb(this))}while(0>1|b<<16;P(this,a);return a&65535}function mc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function nc(a,b){a=b&~a;N(this,a);return a}function oc(a,b){a=b&~a;N(this,a<<8);return a}function pc(a,b){a|=b;N(this,a);return a}function qc(a,b){a|=b;N(this,a<<8);return a}function rc(a,b){a=~b|65536;O(this,a);return a&65535}function sc(a,b){a=~b|256;O(this,a<<8);return a&255} -function tc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function uc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function vc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function wc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function xc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function yc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} -function zc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function Ac(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function Bc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Cc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Dc(a,b){var c=b-a;Ub(this,c,a,b);return c&65535}function Ec(a,b){var c=b-a;Ub(this,c<<8,a<<8,b<<8);return c&255}function Fc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} -function Gc(a,b){a^=b;N(this,a);return a&65535}function Hc(a){var b=R(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} -function Ic(a){var b=R(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function V(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5} -function Kc(a){var b=R(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}var Lc=[0,7,7,10,7,11,9,13];function Mc(a){var b=this.a;a=dc(this,a);this.f[7]=a&65535;this.a=b-Lc[this.c]} -var Nc=[0,14,14,17,14,18,16,20];function Oc(a){var b=this.a,c=dc(this,a);a=a>>6&7;Vb(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Nc[this.c]}var Pc=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],Qc=[7,13,13,17,14,18,17,21];function Rc(a){var b=R(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Uc(a){T(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)}function Vc(a){T(this,a,Q(this,a),Gc);this.a-=this.c?9:3+(7==this.b?2:0)}function X(){H(this,8,6)}function Pb(a){Wc[a>>12].call(this,a)} -var Wc=[function(a){Xc[a>>8&15].call(this,a)},function(a){var b=Q(this,a),c=this.a;N(this,gc(this,a,b));this.a=c-Pc[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)},function(a){var b=Q(this,a);a=R(this,a);Ub(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,Q(this,a)&R(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b? -2:0)},function(a){T(this,a,Q(this,a),pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),hc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){Yc[a>>8&15].call(this,a)},function(a){Zc[a>>8&15].call(this,a)},function(a){var b=cc(this,a);N(this,fc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){var b=cc(this,a)<<8;a=ec(this,a)<<8;Ub(this,b-a,a,b);this.a-=this.c?4+ -(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){N(this,(cc(this,a)&ec(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)},function(a){S(this,a,cc(this,a),oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){S(this,a,cc(this,a),qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},function(a){T(this,a,Q(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)},X],Xc=[function(a){$c[a>> -4&15].call(this,a)},function(a){U(this,a,!0)},function(a){U(this,a,!!(this.i&65535))},function(a){U(this,a,this.i&65535?0:4)},function(a){U(this,a,!this.ja()==!(this.g&32768))},function(a){U(this,a,!this.ja()!=!(this.g&32768))},function(a){U(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))},function(a){U(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))},Oc,Oc,function(a){ad[a>>6&3].call(this,a)},function(a){bd[a>>6&3].call(this,a)},function(a){cd[a>>6&3].call(this,a)},function(a){dd[a>> -6&3].call(this,a)},X,X],ad=[function(a){O(this,gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,tc);this.a-=this.c?9:3+(7==this.b?2:0)}],bd=[function(a){T(this,a,0,xc);this.a-=this.c?11:6},function(a){T(this,a,M(this)?1:0,hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,M(this)?1:0,Dc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=R(this, -a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],cd=[function(a){T(this,a,0,Bc);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)},function(a){T(this,a,0,lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,jc);this.a-=this.c?9:3+(7==this.b?2:0)}],dd=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=ac(this,a,0);Vb(this,a);N(this,a);this.a-= -11},function(a){var b=Xb(this),c=this.a;bc(this,a,0,b);N(this,b);this.a=c-Qc[this.c]},function(a){N(this,gc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$c=[function(a){ed[a&15].call(this,a)},X,X,X,Mc,Mc,Mc,Mc,function(a){if(a&8)H(this,8,6);else{var b=Xb(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}},function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},function(a){fd[a&15].call(this,a)},function(a){gd[a&15].call(this,a)},Uc, -Uc,Uc,Uc],ed=[function(){this.u&49152?(this.F|=128,H(this,4,3)):F(this);this.a-=7},function(){this.j&4||this.w.ca();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3},function(){Wb(this);this.j|=this.u&16;this.a-=13},function(){H(this,12,1);this.a-=5},function(){H(this,16,4);this.a-=25},function(){this.u&49152||(Rb(this),this.l.reset());this.a-=667},function(){Wb(this);this.a-=13},X,X,X,X,X,X,X,X,X],fd=[Sc,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},V,function(){this.i=1;this.a-= -5},V,V,V,function(){this.o=0;this.a-=5},V,V,V,V,V,V,V],gd=[Sc,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],Yc=[Rc,Rc,Kc,Kc,Hc,Hc,Ic,Ic,Vc,Vc,X,X,X,X,Tc,Tc],Zc=[function(a){U(this,a,!this.ja())},function(a){U(this,a,this.ja())},function(a){U(this,a,!M(this)&&!!(this.i&65535))},function(a){U(this,a,M(this)||(this.i&65535?0:4))},function(a){U(this,a,!(this.g&32768))},function(a){U(this,a, -this.g&32768?2:0)},function(a){U(this,a,!M(this))},function(a){U(this,a,M(this))},function(){H(this,24,2);this.a-=25},function(){H(this,28,5);this.a-=5},function(a){hd[a>>6&3].call(this,a)},function(a){id[a>>6&3].call(this,a)},function(a){jd[a>>6&3].call(this,a)},function(a){kd[a>>6&3].call(this,a)},X,X],hd=[function(a){O(this,fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,wc);this.a-=this.c?9:3+(7==this.b?2: -0)},function(a){S(this,a,1,uc);this.a-=this.c?9:3+(7==this.b?2:0)}],id=[function(a){S(this,a,0,yc);this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ec(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],jd=[function(a){S(this,a,0,Cc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this, -a,0,mc);this.a-=this.c?9+(this.Sa&1):3+(7==this.b?2:0)},function(a){S(this,a,0,kc);this.a-=this.c?9:3+(7==this.b?2:0)}],kd=[X,function(a){a=ac(this,a,65536);Vb(this,a);N(this,a);this.a-=11},function(a){var b=Xb(this),c=this.a;bc(this,a,65536,b);N(this,b);this.a=c-Qc[this.c]},X]; -function ld(a){v.call(this,"ROM",a,ld);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ba(this.i);if(this.i){a=this.i;var b=ca(this.s);"json"!=b&&"hex"!=b&&(a=ea()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){md(c,a,b,f)})}}x(ld);ld.prototype.ka=function(a,b,c,d){this.l=b;this.a=c;this.H=d;nd(this)};ld.prototype.ba=function(){this.m&&(this.H&&this.H.a(this.id,this.o,this.c,this.m),delete this.m);return!0}; -ld.prototype.aa=function(){return!0}; -function md(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Ga(a.Ta,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); -return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Ea)return;b=ha(b[1]);if(this.s=Ha(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.aa=function(a){return a?this.save():!0};g.reset=function(){rd(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return rd(this)};function rd(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Ya=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.G||8,c=a-this.o%a,this.G&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;lb(this.a,this.J,1)}};var sd={},qd=(sd[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],sd[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],sd[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],sd[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],sd);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvd){if(xd(d,this.s)){this.m=new L(this,"1.30.1","failsafe");xd(this.m)&&(Cd(this,d),a=2,Dd(this.m));this.m.set("timestamp",la());Ed(this.m);var e=this.b&&!this.o;if(1==a||ma("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bd(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?xd(d,k):("error"== -f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(qa("user",""),this.c=null)):this.O(f+": "+k),Dd(d),xd(d)?(c=Bd(d),e=!0):c=!1))}e&&Ad(this,c?d:null)}else 2==a&&d.clear()}else Ad(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Fd(this,this.a,b,c,a),this.a.Aa());this.G&&(Cd(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function Cd(a,b){if(ma("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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Gd(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=la();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&F(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255};g.Sb=function(){return Xa(this.a)};g.Cc=function(a){Ab(this.a,a&-1809|Xa(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.b.la=0}; +var K={},J=(K[62592]=[null,null,I.prototype.bc,I.prototype.Mc,"SISDR",1145],K[62608]=[null,null,I.prototype.$b,I.prototype.Kc,"SDSDR",1145],K[62624]=[null,null,I.prototype.ac,I.prototype.Lc,"SISAR",1145],K[62640]=[null,null,I.prototype.Zb,I.prototype.Jc,"SDSAR",1145],K[62656]=[null,null,I.prototype.Kb,I.prototype.wc,"KISDR",1145],K[62672]=[null,null,I.prototype.Ib,I.prototype.uc,"KDSDR",1145],K[62688]=[null,null,I.prototype.Jb,I.prototype.vc,"KISAR",1145],K[62704]=[null,null,I.prototype.Hb,I.prototype.tc, +"KDSAR",1145],K[62798]=[null,null,I.prototype.Qb,I.prototype.Ac,"MMR3",1145],K[65382]=[null,null,I.prototype.Lb,I.prototype.xc,"LKS"],K[65400]=[null,null,I.prototype.Eb,I.prototype.qc,"CNSL"],K[65402]=[null,null,I.prototype.Nb,I.prototype.zc,"MMR0",1145],K[65404]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR1",1145],K[65406]=[null,null,I.prototype.Pb,I.prototype.tb,"MMR2",1145],K[65408]=[null,null,I.prototype.hc,I.prototype.Sc,"UISDR",1145],K[65424]=[null,null,I.prototype.fc,I.prototype.Qc,"UDSDR", +1145],K[65440]=[null,null,I.prototype.gc,I.prototype.Rc,"UISAR",1145],K[65456]=[null,null,I.prototype.ec,I.prototype.Pc,"UDSAR",1145],K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]= +[null,null,I.prototype.Tb,I.prototype.Dc,"R6KERNEL"],K[65479]=[null,null,I.prototype.Wb,I.prototype.Gc,"R7KERNEL"],K[65480]=[null,null,I.prototype.va,I.prototype.xa,"R0SET1",1145],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1",1145],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1",1145],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1",1145],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1",1145],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1",1145], +K[65486]=[null,null,I.prototype.Ub,I.prototype.Ec,"R6SUPER",1145],K[65487]=[null,null,I.prototype.Vb,I.prototype.Fc,"R6USER",1145],K[65504]=[null,null,I.prototype.Gb,I.prototype.sc,"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.dc,I.prototype.Oc,"SYSID",1170],K[65526]=[null,null,I.prototype.Fb,I.prototype.rc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Mb,I.prototype.yc, +"MB",1170],K[65530]=[null,null,I.prototype.Rb,I.prototype.Bc,"PIR"],K[65532]=[null,null,I.prototype.cc,I.prototype.Nc,"SL"],K[65534]=[null,null,I.prototype.Sb,I.prototype.Cc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624]; +J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688]; +J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440]; +J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),Hb(this,Db?Ib:Jb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Y:function(a,b){a&1&&tb(this.m,b);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},ea: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.ia=!0},H:function(a,b){return this.I(a,b)}, +R:function(a,b){return this.V(a,b)},$:function(a,b,c){this.v||this.sb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&tb(this.m,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&tb(this.m,b);return this.o[a>>1]},Z:function(a,b){this.c[a]=b;this.ia=!0},da:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b,c){a&1&&tb(this.m,c);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b,c){a&1&&tb(this.m,c);this.o[a>> +1]=b;this.ia=!0}};function cb(a,b,c){a.G=b;a.i=a.l=0;c&&((a.i=c.i)&&Lb(a,Mb,!1),(a.l=c.l)&&Nb(a,Mb,!1))}function Nb(a,b,c){c&&a.l||(a.eb=!a.v&&b[1]||a.A,a.Ra=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Lb(a,b,c){c&&a.i||(a.Ya=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function Hb(a,b){b||(b=Ob);Lb(a,b,void 0);Nb(a,b,void 0)} +var Ob=[],Kb=[G.prototype.M,G.prototype.ea,G.prototype.Y,G.prototype.ra],Mb=[G.prototype.H,G.prototype.$,G.prototype.R,G.prototype.ga];if(Sa)var Jb=[G.prototype.D,G.prototype.Z,G.prototype.N,G.prototype.fa],Ib=[G.prototype.J,G.prototype.da,G.prototype.W,G.prototype.qa]; +function Pb(a,b){v.call(this,"CPU",a,Pb);var c=a.multiplier||1;this.La=a.cycles||b;this.$=c;this.Va=Math.round(this.La/1E4)/100;this.da=this.Va*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Ja=this.fa=0;this.Ka=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.mb=this.mc.bind(this);D(this)}x(Pb);var Qb=["power","reset"];g=Pb.prototype; +g.ka=function(a,b,c,d){this.w=a;this.m=b;this.G=d;for(b=0;ba.Y/a.da&&(b=1),a.$=b,b=a.Va*a.$,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=sa();a.Z=0;Wb(a)}function ub(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function wb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.La*a.$/1E3*c|0,a.H[b][0]=c+Yb(a))}function Yb(a,b){var c=a.ea-=a.a;a.a=0;b&&(a.ea=0);return c} +g.mc=function(){if(this.h.T){this.Xa>=this.La&&Wb(this,!0);this.ya=0;this.Da=sa();if(this.Z){var a=this.Da-this.Z;a>this.kb&&(this.N+=a,this.N>this.Da&&(this.N=this.Da))}try{do{for(var b,c=this.h.Ma?1:this.Na,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Yb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Ja=this.Ja+this.hb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Xb(this)&& +(this.pa=this.qa=-1,Tb(this),E(this),f=!0);f&&this.O(Xb(this)+" cycles: checksum="+h(this.Ja))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.Na;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){E(this);this.w&&this.w.stop(sa(),Xb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=sa();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ +this.Na));d-=this.Z-this.Da;if(e=this.Z-this.N)this.Y=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Vb(this));if(0>d||this.Yd&&(this.N-=d),d=0;this.Xa+=this.ya;this.Z+=d;b(c,d)}}};function Ub(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Vb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Xb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; +function E(a){if(a.h.T){Yb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Xb(a))}a.h.complete=void 0}function Zb(a){this.Ia=+a.model||1170;this.Cb=a.resetAddr||0;Pb.call(this,a,6666667);this.decode=1120==this.Ia?$b.bind(this):ac.bind(this);bc(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x(Zb,Pb);g=Zb.prototype;g.reset=function(){this.status("model "+this.Ia);this.h.T&&E(this);bc(this);Sb(this);this.h.error=!1;this.parent.reset.call(this)}; +function bc(a){a.l=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.X=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Ta=0;a.ga=-1;cc(a)}function cc(a){a.oa=255;a.F=0;a.ab=0;a.A=0;a.ma=0;a.$a=0;a.na=0;a.Ba=0;a.Fa=0;a.Wa=262143;a.Ha=253952;a.j|=2;a.m&&yb(a)}function yb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.jc,a.Ra=a.Uc,fb(a.m,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.ic,a.Ra=a.Tc,fb(a.m,16))}g.hb=function(){return 0}; +g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.$]);a.set(2,pb(this.m));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Vb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.X[c]=a.f[6],a.f[6]=a.X[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.l=b,a.g=c||0)}function ec(a,b,c,d){a.j&128||(a.o=a.i=a.l=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.l=b,a.g=a.o^a.l>>1)}function fc(a,b,c,d){a.j&128||(a.o=a.i=a.l=b,a.g=(c^d)&(d^b))} +function H(a,b,c){if(!a.R){var d=!1;0>a.ga?a.ga=Xa(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.$a=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);Ab(a,f&-12289|a.ga>>2&12288);d&&(a.F|=4,a.f[6]=4);gc(a,a.ga);gc(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ga=-1;if(26!=c)throw b;}}function hc(a){var b=ic(a),c=ic(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;Ab(a,c);a.j&=-17} +function jc(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: +128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ga&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.m].eb(b&a.g,c&255,b)}function ic(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} +function gc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= +8;break;case 6:return e=dc(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=dc(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.bb=function(a,b){this.Ba?(this.R++,kc(this,jc(this,a,5),b),this.R--):this.m.bb(a,b)};g.yb=function(a,b,c){return lc(this,a,b,c)};g.zb=function(a,b,c){return jc(this,lc(this,a,b,c),c)}; +g.ic=function(a){return nb(this.m,a)};g.jc=function(a){return nb(this.m,jc(this,a,2))};g.Tc=function(a,b){ob(this.m,a,b&65535)};g.Uc=function(a,b){ob(this.m,jc(this,a,4),b)};function mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=lc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} +function nc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=lc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=jc(a,e|c&65536,4),a.s=a.u>>14&3,ob(a.m,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.X[a.u>>12&3]=d}function oc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.m,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?nb(a.m,a.I(b,c,2)):a.f[c]}function pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return lc(a,b,c,8)} +function qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.m,c)):a=a.f[c]&255;return a}function rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?nb(a.m,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ta=a.I(b,e,7),kc(a,e,d.call(a,c,mb(a.m,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),ob(a.m,e,d.call(a,c,nb(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} +function sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?kc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?ob(a.m,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.ab&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +1&&this.j++;this.A&57344||(this.ma=0,this.$a=this.f[7]);this.j=this.j&7|this.u&16;this.decode(dc(this))}while(0>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){a=b&~a;N(this,a);return a}function Bc(a,b){a=b&~a;N(this,a<<8);return a}function Cc(a,b){a|=b;N(this,a);return a}function Dc(a,b){a|=b;N(this,a<<8);return a}function Ec(a,b){a=~b|65536;O(this,a);return a&65535}function Fc(a,b){a=~b|256;O(this,a<<8);return a&255} +function Gc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function Hc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function Ic(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function Jc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function Kc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function Lc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} +function Mc(a,b){a=b<<1|this.l>>16&1;P(this,a);return a&65535}function Nc(a,b){a=b<<1|this.l>>16&1;P(this,a<<8);return a&255}function Oc(a,b){a=(this.l&65536|b)>>1|b<<16;P(this,a);return a&65535}function Pc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Qc(a,b){var c=b-a;fc(this,c,a,b);return c&65535}function Rc(a,b){var c=b-a;fc(this,c<<8,a<<8,b<<8);return c&255}function Sc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535} +function Tc(a,b){a^=b;N(this,a);return a&65535}function Uc(a){S(this,a,Q(this,a),uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Vc(a){var b=rc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +function Wc(a){var b=rc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Xc(a){T(this,a,!M(this))}function Yc(a){T(this,a,M(this))} +function Zc(a){S(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function $c(a){R(this,a,oc(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ad(a){S(this,a,Q(this,a),Cc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function bd(a){R(this,a,oc(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function cd(a){N(this,Q(this,a)&rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function dd(a){N(this,(oc(this,a)&qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ed(a){T(this,a,this.i&65535?0:4)}function fd(a){T(this,a,!this.ja()==!(this.g&32768))}function gd(a){T(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))}function hd(a){T(this,a,!M(this)&&!!(this.i&65535))} +function id(a){T(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))}function jd(a){T(this,a,M(this)||(this.i&65535?0:4))}function kd(a){T(this,a,!this.ja()!=!(this.g&32768))}function ld(a){T(this,a,this.ja())}function md(a){T(this,a,!!(this.i&65535))}function nd(a){T(this,a,!this.ja())}function od(){H(this,12,1);this.a-=5}function pd(a){T(this,a,!0)}function qd(a){T(this,a,!(this.g&32768))}function rd(a){T(this,a,this.g&32768?2:0)} +function U(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5}function sd(a){var b=Q(this,a);a=rc(this,a);fc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function td(a){var b=oc(this,a)<<8;a=qc(this,a)<<8;fc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} +function ud(a){var b=rc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.l=65536,this.a-=7}function vd(){H(this,24,2);this.a-=25}function wd(){this.u&49152?(this.F|=128,H(this,4,3)):E(this);this.a-=7} +function xd(){H(this,16,4);this.a-=25}var yd=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;a=pc(this,a);this.f[7]=a&65535;this.a=b-yd[this.c]}var zd=[0,14,14,17,14,18,16,20];function Ad(a){var b=this.a,c=pc(this,a);a=a>>6&7;gc(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-zd[this.c]}var Bd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Cd(a){var b=Q(this,a),c=this.a;N(this,tc(this,a,b));this.a=c-Bd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} +function Dd(a){var b=oc(this,a);N(this,sc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Ed=[7,13,13,17,14,18,17,21];function Fd(a){var b=rc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Md(a){S(this,a,Q(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function X(a){S(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)}function Nd(){H(this,28,5);this.a-=5}function Od(){this.j&4||this.w.ca();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Pd(a){S(this,a,Q(this,a),Tc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){H(this,8,6)}function $b(a){Qd[a>>12].call(this,a)}function Rd(a){Sd[a>>6&3].call(this,a)}function Td(a){Ud[a>>6&3].call(this,a)}function Vd(a){Wd[a>>6&3].call(this,a)}function Xd(a){Yd[a&15].call(this,a)} +function Zd(a){$d[a&15].call(this,a)}function ae(a){be[a>>6&3].call(this,a)}function ce(a){de[a>>6&3].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)} +var Qd=[function(a){ge[a>>8&15].call(this,a)},Cd,sd,cd,Zc,ad,Uc,Y,function(a){he[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Md,Y],ge=[function(a){ie[a>>4&15].call(this,a)},pd,md,ed,fd,kd,gd,id,Ad,Ad,Rd,Td,Vd,Y,Y,Y],Sd=[function(a){O(this,tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Gc);this.a-=this.c?9:3+(7==this.b?2:0)}],Ud=[function(a){S(this,a,0,Kc); +this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=rc(this,a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Wd=[function(a){S(this,a,0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)}],ie=[function(a){je[a& +15].call(this,a)},Y,Y,Y,V,V,V,V,Jd,Y,Xd,Zd,X,X,X,X],je=[wd,Od,Id,od,xd,Hd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Yd=[Gd,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},U,function(){this.i=1;this.a-=5},U,U,U,function(){this.o=0;this.a-=5},U,U,U,U,U,U,U],$d=[Gd,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],he=[nd,ld,hd,jd,qd,rd,Xc,Yc,vd,Nd,ae,ce,ee,Y,Y,Y],be=[function(a){O(this,sc(this,a,0)); +this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Hc);this.a-=this.c?9:3+(7==this.b?2:0)}],de=[function(a){R(this,a,0,Lc);this.a-=this.c?11:6},function(a){R(this,a,M(this)?1:0,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,M(this)?1:0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=qc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fe= +[function(a){R(this,a,0,Pc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,zc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ac(a){ke[a>>12].call(this,a)} +var ke=[function(a){le[a>>8&15].call(this,a)},Cd,sd,cd,Zc,ad,Uc,function(a){me[a>>8&15].call(this,a)},function(a){ne[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Md,Y],le=[function(a){oe[a>>4&15].call(this,a)},pd,md,ed,fd,kd,gd,id,Ad,Ad,Rd,Td,Vd,function(a){pe[a>>6&3].call(this,a)},Y,Y],pe=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=mc(this,a,0);gc(this,a);N(this,a);this.a-=11},function(a){var b=ic(this), +c=this.a;nc(this,a,0,b);N(this,b);this.a=c-Ed[this.c]},function(a){N(this,tc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],oe=[function(a){qe[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Jd,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},Xd,Zd,X,X,X,X],qe=[wd,Od,Id,od,xd,Hd,function(){hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],me=[Fd,Fd,ud,ud,Vc,Vc,Wc,Wc,Pd,Pd,Y,Y,Y,Y,Kd,Kd],ne=[nd,ld,hd,jd,qd,rd,Xc,Yc,vd,Nd,ae,ce,ee,function(a){re[a>>6&3].call(this, +a)},Y,Y],re=[Y,function(a){a=mc(this,a,65536);gc(this,a);N(this,a);this.a-=11},function(a){var b=ic(this),c=this.a;nc(this,a,65536,b);N(this,b);this.a=c-Ed[this.c]},Y];function se(a){v.call(this,"ROM",a,se);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ka(this.i);if(this.i){a=this.i;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){te(c,a,b,f)})}}x(se); +se.prototype.ka=function(a,b,c,d){this.m=b;this.a=c;this.G=d;ue(this)};se.prototype.ba=function(){this.l&&(this.G&&this.G.a(this.id,this.o,this.c,this.l),delete this.l);return!0};se.prototype.aa=function(){return!0}; +function te(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Oa(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.l=l.symbols;if(!a.b.length){p("Empty ROM: "+b); +return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.Ea)return;b=qa(b[1]);if(this.s=Pa(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.aa=function(a){return a?this.save():!0};g.reset=function(){ze(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return ze(this)};function ze(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Za=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.O(this.l), +this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;wb(this.a,this.J,1)}};var Ae={},ye=(Ae[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],Ae[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],Ae[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],Ae[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],Ae);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bDe){if(Fe(d,this.s)){this.l=new L(this,"1.30.1","failsafe");Fe(this.l)&&(Ke(this,d),a=2,Le(this.l));this.l.set("timestamp",ta());Me(this.l);var e=this.b&&!this.o;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Je(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Fe(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(ya("user",""),this.c=null)):this.O(f+": "+k),Le(d),Fe(d)?(c=Je(d),e=!0):c=!1))}e&&Ie(this,c?d:null)}else 2==a&&d.clear()}else Ie(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Ne(this,this.a,b,c,a),this.a.Aa());this.H&&(Ke(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; +function Ke(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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Oe(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&E(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);Nd(a,b,c)}})}else c(a,null)} -function Od(a,b,c,d){function e(a){if(void 0===l){var b=k&&C(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&(--Kd||xa(!0));n=!1}var k,l,n=!0;Kd++;Fa[a]={};try{if(k=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],ia=document.createElement("style");ia.type="text/css";ia.styleSheet?ia.styleSheet.cssText=q:ia.appendChild(document.createTextNode(q));t.appendChild(ia)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");q=function(d,l){l?Ld(c,null,null,!1,e,function(d,n){n?(Ga(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Kd||xa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Kd||xa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ld(b,a,d,!0,e,q):Md(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Jc){f(Jc.message)}return n}window.embedPDP11=function(a,b,c,d){xa(!1);return Od(a,b,c,d)};window.enableEvents=xa;window.sendEvent=ya;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map +g.U=function(a,b,c){var d=this;switch(b){case "power":return this.v[b]=c,c.onclick=function(){d.g||(d.h.L?Oe(d,!1,!0):He(d,d.Ca))},!0;case "reset":return this.v[b]=c,c.onclick=function(){if(d.h.L&&!d.g)if(d.b&&!d.w){var a=ua("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Oe(d,a,!0);!a&&d.D?window&&window.location.reload():d.Ca(De)}else d.reset(),d.a&&d.a.Aa()},!0;case "save":if(ma())c.parentNode.removeChild(c);else return this.v[b]= +c,c.onclick=function(){var a=Ee(d,!0);if(a){var b=!!(d.b&&!d.w||d.D),c=Oe(d,b);b?Pe(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1}; +function Ee(a,b){var c=a.c;c||((c=xa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Qe(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c} +function Qe(a,b){a.c=null;b=m(na()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(ya("user",b.data),a.c=b.data)}catch(d){p(d.message+" ("+c+")")}return a.c}function Ge(a){var b=null;a.c&&(b=na()+"/api/v1/user?req=load&user="+a.c+"&state="+Re(a,"1.30.1"));return b} +function Pe(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Re(a,"1.30.1");d.data=c;b=m(na()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);Ve(a,b,c)}})}else c(a,null)} +function We(a,b,c,d){function e(a){if(void 0===l){var b=k&&C(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--Se||Fa(!0));n=!1}var k,l,n=!0;Se++;Na[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=r:B.appendChild(document.createTextNode(r));t.appendChild(B)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?Te(c,null,null,!1,e,function(d,n){n?(Oa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Se||Fa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Se||Fa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Te(b,a,d,!0,e,r):Ue(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Ld){f(Ld.message)}return n}window.embedPDP11=function(a,b,c,d){Fa(!1);return We(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map From c14f919f4f731d03856e710cbda4d297c0a649e6 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 11:32:51 -0700 Subject: [PATCH 29/36] Debugger now stops on undefined opcodes, as well as on unknown I/O accesses --- devices/pdp11/rom/custom/makefile | 4 + modules/pdp11/lib/bus.js | 3 +- modules/pdp11/lib/cpuops.js | 3 + modules/pdp11/lib/debugger.js | 31 +++ versions/pdpjs/1.30.1/pdp11-dbg.js | 386 ++++++++++++++--------------- 5 files changed, 232 insertions(+), 195 deletions(-) diff --git a/devices/pdp11/rom/custom/makefile b/devices/pdp11/rom/custom/makefile index 8cda52fde..ea582823e 100644 --- a/devices/pdp11/rom/custom/makefile +++ b/devices/pdp11/rom/custom/makefile @@ -1,3 +1,7 @@ +# +# Don't have macro11? Make yourself a copy from https://github.com/shattered/macro11 +# + all: boot.json boot.lst: boot.mac diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 349a07a89..4ff3efa07 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -556,8 +556,7 @@ BusPDP11.prototype.unknownAccess = function(addr, data, fByte) * TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits) */ this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr, 3) + "," + this.dbg.toStrBase(data) + "," + fByte + ")", true, true); - this.cpu.setPC(this.cpu.getLastPC()); - this.cpu.stopCPU(); + if (this.dbg.stopInstruction()) return 0; } if (!this.nDisableTraps) { this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index bf69d6874..d3c438e34 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1763,6 +1763,9 @@ PDP11.opXOR = function(opCode) */ PDP11.opUndefined = function(opCode) { + if (DEBUGGER && this.dbg) { + this.dbg.undefinedInstruction(opCode); + } this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED); }; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 4f51cd921..6e92eed2e 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1607,6 +1607,37 @@ if (DEBUGGER) { return false; }; + /** + * stopInstruction() + * + * TODO: Currently, the only way to prevent this call from stopping the CPU is when you're single-stepping. + * + * @this {DebuggerPDP11} + * @return {boolean} true if stopping is enabled, false if not + */ + DebuggerPDP11.prototype.stopInstruction = function() + { + var cpu = this.cpu; + if (cpu.isRunning()) { + cpu.setPC(this.cpu.getLastPC()); + this.stopCPU(); + return true; + } + return false; + }; + + /** + * undefinedInstruction(opCode) + * + * @this {DebuggerPDP11} + * @param {number} opCode + */ + DebuggerPDP11.prototype.undefinedInstruction = function(opCode) + { + this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true); + this.stopInstruction(); // allow the caller to step over it if they really want a trap generated + }; + /** * checkMemoryRead(addr, nb) * diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 229a34586..dc38c5fe6 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -40,215 +40,215 @@ function n(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window. function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Fb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Gb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ub=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ua=this.id:(this.Fb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Gb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.j);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Ub(d,b,-1,!0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Ub(e,c,b,!0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Ub(d,b,-1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c} -function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Ub(e,c,b),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))} -function Vb(a,b){if(b!=a.i){var c;a.i&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return $b(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.j,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Bb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; +h.ra=function(a,b,c,d){if(this.B&&this.B.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d)||this.i&&this.i.ra(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.ra.call(this,a,b,c,d)}};h.Da=function(a,b,c,d){this.B=a;this.A=b;this.b=c;this.i=d};h.Aa=function(a,b){b||Ib();return!0};h.za=function(){return!0}; +function Jb(a,b,c,d){if(a.J[b]){void 0===c&&(Fb(a,"Value for "+b+" is invalid"),a.b.da());var e=a.i&&a.i.ja||8;c=!a.b.v.ca||a.v.Sb?8==e?oa(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Kb(a,b,c,d){for(var e=0;e>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,-1,!0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,b,!0),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,-1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Vb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.i,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Bb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Cb=function(a,b){this.W[(a&this.f)>>>this.ga].Eb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Db=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; -function jc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));kc(a,e,e,g,l,m,p,f[4])}}}function mc(a,b){a.B.push(b)} -function nc(a,b){a.C||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function $b(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.i={data:0,Ld:0,Ab:20,bd:0};this.f={Md:0,Nb:-1}}u(L);h=L.prototype; -h.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;var e=this;this.f.Nb=oc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(pc(e.b,e.f.cd),qc(e.b,e.f.Nb,1E3/60))});this.f.cd=rc(64,6);lc(b,this,M);mc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&qc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.i.bd:this.i.data)&65535};h.ed=function(a){this.i.data=a}; -h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,sc(b))}tc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),sc(b));tc(this)}; -function tc(a){a.i.Ab=a.i.Ab&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; +function kc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));lc(a,e,e,g,l,m,p,f[4])}}}function nc(a,b){a.B.push(b)} +function oc(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ea(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Ld:0,Ab:20,bd:0};this.f={Md:0,Nb:-1}}u(K);h=K.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Nb=pc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(qc(e.b,e.f.cd),rc(e.b,e.f.Nb,1E3/60))});this.f.cd=sc(64,6);mc(b,this,L);nc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&rc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535};h.ed=function(a){this.j.data=a}; +h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,tc(b))}uc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),tc(b));uc(this)}; +function uc(a){a.j.Ab=a.j.Ab&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.pa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.wc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]}; h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]}; h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc}; -h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Lb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){uc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.i.Ab=this.i.Ab&-120|20;this.f.Ia=0}; -var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR",1145],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR",1145],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR",1145],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR",1145],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR",1145],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR",1145],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR",1145],N[62704]=[null,null,L.prototype.wc,L.prototype.hd, -"KDSAR",1145],N[62798]=[null,null,L.prototype.Fc,L.prototype.pd,"MMR3",1145],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0",1145],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1",1145],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2",1145],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR",1145],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR", -1145],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR",1145],N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR",1145],N[65472]=[null,null,L.prototype.ab,L.prototype.fb,"R0SET0"],N[65473]=[null,null,L.prototype.ab,L.prototype.fb,"R1SET0"],N[65474]=[null,null,L.prototype.ab,L.prototype.fb,"R2SET0"],N[65475]=[null,null,L.prototype.ab,L.prototype.fb,"R3SET0"],N[65476]=[null,null,L.prototype.ab,L.prototype.fb,"R4SET0"],N[65477]=[null,null,L.prototype.ab,L.prototype.fb,"R5SET0"],N[65478]= -[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET1",1145],N[65481]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET1",1145],N[65482]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET1",1145],N[65483]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET1",1145],N[65484]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET1",1145],N[65485]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET1",1145], -N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER",1145],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud,"R6USER",1145],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd, -"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"],N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; -M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; -M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; -M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];Ta(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Bc(this,xc?Cc:Dc);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&nc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.j&&null!=this.w){var c=this.j;Ic(c,this.w+a,1,c.M)&&c.ea(!0)}return this.Ib(a,b)},ca:function(a,b){if(this.j&&null!=this.w){var c=this.j;Ic(c,this.w+a,2,c.M)&&c.ea(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;Ic(d,this.w+a, -1,d.D)&&d.ea(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},wa:function(a,b,c){if(this.j&&null!=this.w){var d=this.j;Ic(d,this.w+a,2,d.D)&&d.ea(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ba:function(a,b){a&1&&nc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&nc(this.A,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+ -J(this.j,b)+"): "+J(this.j,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},va:function(a,b,c){a&1&&nc(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&nc(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}}; -function Sb(a,b,c){a.j=b;a.i=a.B=0;c&&((a.i=c.i)&&Hc(a,Gc,!1),(a.B=c.B)&&Fc(a,Gc,!1))}function Jc(a,b){b?--a.B||(a.Eb=a.f?a.J:a.Ob,a.ub=a.f?a.H:a.Pb):--a.i||(a.Bb=a.Ib,a.qa=a.Jb)}function Fc(a,b,c){c&&a.B||(a.Eb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function Hc(a,b,c){c&&a.i||(a.Bb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function Bc(a,b){b||(b=Kc);Hc(a,b,void 0);Fc(a,b,void 0)} -var Kc=[],Ec=[I.prototype.V,I.prototype.ua,I.prototype.ja,I.prototype.xa],Gc=[I.prototype.T,I.prototype.ma,I.prototype.ca,I.prototype.wa];if(Gb)var Dc=[I.prototype.R,I.prototype.la,I.prototype.ba,I.prototype.va],Cc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; -function Lc(a,b){r.call(this,"CPU",a,Lc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.da=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}u(Lc);var Mc=["power","reset"];h=Lc.prototype; -h.Da=function(a,b,c,d){this.B=a;this.A=b;this.j=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Sc(a)&&(a.Ya=a.Za=-1,Pc(a),a.ea(),c=!0);c&&a.g(Sc(a)+" cycles: checksum="+k(a.nb))}} -h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.sb()}Uc(a,a.T);a.T=0;a.R=Aa();a.ba=0;Vc(a);return d}function oc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function qc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Wc(a))} -function Xc(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 Yc(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 Wc(a,b){var c=a.ca-=a.b;a.b=0;b&&(a.ca=0);return c} -h.ad=function(){if(this.v.da){this.jb>=this.Fa&&Vc(this,!0);this.oa=0;this.xa=Aa();if(this.ba){var a=this.xa-this.ba;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Xc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Wc(this,!0);this.oa+=b;this.T+=b;Rc(this,b);Yc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.aa(),this.yb=0);break}}while(this.v.da)}catch(e){this.ea();this.B&&this.B.stop(Aa(),Sc(this));Fb(this, -e.stack||e.message);return}if(this.v.da){a=setTimeout;b=this.Yb;this.ba=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.ba-this.xa),d=this.ba-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Tc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.ba+=c;a(b,c)}}}; -h.cb=function(a){if(Eb(this))return!1;if(this.v.da)return this.g(this.toString()+" busy"),!1;Tc(this);this.v.da=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Sc(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.ea=function(a){if(this.v.da){Wc(this);Uc(this,this.T);this.T=0;this.v.da=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Sc(this))}this.v.complete=a}; -function rd(a){this.mb=+a.model||1170;this.qc=a.resetAddr||0;Lc.call(this,a,6666667);this.decode=1120==this.mb?sd.bind(this):td.bind(this);ud(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(rd,Lc);h=rd.prototype;h.reset=function(){this.status("model "+this.mb);this.v.da&&this.ea();ud(this);Oc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ud(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.i=a.f=a.Ta=0;a.ma=-1;vd(a)}function vd(a){a.Na=255;a.Z=0;a.Lb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&sc(a)}function sc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Vb=function(){return 0}; -h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,jc(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Tc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Ad(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Bd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Cd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Dd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.$=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Lb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);uc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Ed(this,this.ma);Ed(this,this.u[7]);K(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Fd(a){var b=Gd(a),c=Gd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);K(a,b);uc(a,c);a.F&=-17} -function Hd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.$(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.$(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g;a.b-= -8;break;case 6:return e=zd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=zd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.A.zb(a);this.C++;a=Id(this,Hd(this,a,3));this.C--;return a}; -h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(Hd(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Jd(this,Hd(this,a,5),b),this.C--):this.A.rb(a,b)};h.Db=function(a,b){this.Ja?(this.C++,this.gc(Hd(this,a,4),b),this.C--):this.A.Db(a,b)};h.mc=function(a,b,c){return Kd(this,a,b,c)};h.nc=function(a,b,c){return Hd(this,Kd(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Hd(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; -h.Id=function(a,b){this.A.Sa(Hd(this,a,4),b)};function Ld(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=Kd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Md(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=Kd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Hd(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} -function Nd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Id(a,a.Y(b,c,3)):a.u[c]&255}function Od(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Pd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return Kd(a,b,c,8)}function Qd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?Id(a,a.Y(b,c,3)):a.u[c]&255}function Rd(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Jd(a,e,d.call(a,c,Id(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Sd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?Jd(a,a.Y(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 Td(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} -function S(a,b,c){c&&(K(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.j&&Ud(this.j),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.ca=this.b=a;do{if(b){if(Vd(this.j,this.u[7],c)){this.ea();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.$(d,26),e=!0):e=!1;if(e&& -a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(zd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function ae(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function be(a,b){a=b&~a;P(this,a);return a}function ce(a,b){a=b&~a;P(this,a<<8);return a}function de(a,b){a|=b;P(this,a);return a}function ee(a,b){a|=b;P(this,a<<8);return a} -function fe(a,b){a=~b|65536;Ad(this,a);return a&65535}function ge(a,b){a=~b|256;Ad(this,a<<8);return a&255}function he(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function ie(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function je(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function ke(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} -function le(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function me(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function ne(a,b){a=b<<1|this.N>>16&1;Cd(this,a);return a&65535}function oe(a,b){a=b<<1|this.N>>16&1;Cd(this,a<<8);return a&255}function pe(a,b){a=(this.N&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function qe(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function re(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} -function se(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function te(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function ue(a,b){a^=b;P(this,a);return a&65535}function ve(a){R(this,a,Od(this,a),Wd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function we(a){var b=Rd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.i?6:7)+b} -function xe(a){var b=Rd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function ye(a){S(this,a,!wd(this))}function ze(a){S(this,a,wd(this))} -function Ae(a){R(this,a,Od(this,a),be);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Be(a){Q(this,a,Nd(this,a),ce);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ce(a){R(this,a,Od(this,a),de);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){Q(this,a,Nd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function Ee(a){P(this,Od(this,a)&Rd(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Fe(a){P(this,(Nd(this,a)&Qd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ge(a){S(this,a,yd(this))}function He(a){S(this,a,!this.Ca()==!xd(this))}function Ie(a){S(this,a,!yd(this)&&!this.Ca()==!xd(this))}function Je(a){S(this,a,!wd(this)&&!yd(this))}function Ke(a){S(this,a,yd(this)||!this.Ca()!=!xd(this))} -function Le(a){S(this,a,wd(this)||yd(this))}function Me(a){S(this,a,!this.Ca()!=!xd(this))}function Ne(a){S(this,a,this.Ca())}function Oe(a){S(this,a,!yd(this))}function Pe(a){S(this,a,!this.Ca())}function Qe(){this.$(12,1);this.b-=5}function Re(a){S(this,a,!0)}function Se(a){S(this,a,!xd(this))}function Te(a){S(this,a,xd(this))}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function Ue(a){var b=Od(this,a);a=Rd(this,a);Dd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ve(a){var b=Nd(this,a)<<8;a=Qd(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} -function We(a){var b=Rd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Xe(){this.$(24,2);this.b-=25}function Ye(){this.L&49152?(this.Z|=128,this.$(4,3)):this.ea();this.b-=7} -function Ze(){this.$(16,4);this.b-=25}var $e=[0,7,7,10,7,11,9,13];function af(a){var b=this.b;K(this,Pd(this,a));this.b=b-$e[this.i]}var bf=[0,14,14,17,14,18,16,20];function cf(a){var b=this.b,c=Pd(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];K(this,c);this.b=b-bf[this.i]}var df=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ef(a){var b=Od(this,a),c=this.b;P(this,Td(this,a,b));this.b=c-df[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)} -function ff(a){var b=Nd(this,a);P(this,Sd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var gf=[7,13,13,17,14,18,17,21];function hf(a){var b=Rd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)K(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function of(a){R(this,a,Od(this,a),re);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function pf(a){R(this,a,0,te);this.b-=this.i?9:3+(7==this.f?2:0)}function qf(){this.$(28,5);this.b-=5}function rf(){this.F&4||this.B.aa();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function sf(a){R(this,a,Od(this,a),ue);this.b-=this.i?9:3+(7==this.f?2:0)}function W(){this.$(8,6)}function sd(a){tf[a>>12].call(this,a)}function uf(a){vf[a>>6&3].call(this,a)}function wf(a){xf[a>>6&3].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)}function Tf(a){Uf[a&15].call(this,a)} -function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)} -var tf=[function(a){cg[a>>8&15].call(this,a)},ef,Ue,Ee,Ae,Ce,ve,W,function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,of,W],cg=[function(a){eg[a>>4&15].call(this,a)},Re,Oe,Ge,He,Me,Ie,Ke,cf,cf,uf,wf,yf,W,W,W],vf=[function(a){Ad(this,Td(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,je);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,1,he);this.b-=this.i?9:3+(7==this.f?2:0)}],xf=[function(a){R(this,a,0, -le);this.b-=this.i?11:6},function(a){R(this,a,wd(this)?1:0,Wd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,wd(this)?1:0,re);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Rd(this,a);Ad(this,a);this.b-=this.i?4:3+(7==this.f?2:0)}],zf=[function(a){R(this,a,0,pe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ne);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Yd);this.b-=this.i?9:3+(7==this.f?2:0)}], -eg=[function(a){fg[a&15].call(this,a)},W,W,W,af,af,af,af,mf,W,Tf,Vf,pf,pf,pf,pf],fg=[Ye,rf,lf,Qe,Ze,kf,W,W,W,W,W,W,W,W,W,W],Uf=[jf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Wf=[jf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},V,function(){this.X=0;this.b-=5},V,V,V,function(){this.S=32768;this.b-=5},V,V,V,V,V,V,V],dg=[Pe,Ne,Je,Le,Se,Te,ye,ze,Xe,qf,Xf,Zf,ag,W,W,W],Yf=[function(a){Ad(this, -Sd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ke);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ie);this.b-=this.i?9:3+(7==this.f?2:0)}],$f=[function(a){Q(this,a,0,me);this.b-=this.i?11:6},function(a){Q(this,a,wd(this)?1:0,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,wd(this)?1:0,se);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Qd(this,a);Ad(this,a<<8);this.b-=this.i?4:3+(7== -this.f?2:0)}],bg=[function(a){Q(this,a,0,qe);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,oe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,Zd);this.b-=this.i?9:3+(7==this.f?2:0)}];function td(a){gg[a>>12].call(this,a)} -var gg=[function(a){hg[a>>8&15].call(this,a)},ef,Ue,Ee,Ae,Ce,ve,function(a){ig[a>>8&15].call(this,a)},function(a){jg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,of,W],hg=[function(a){kg[a>>4&15].call(this,a)},Re,Oe,Ge,He,Me,Ie,Ke,cf,cf,uf,wf,yf,function(a){lg[a>>6&3].call(this,a)},W,W],lg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);K(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ld(this,a,0);Ed(this,a);P(this,a);this.b-=11},function(a){var b=Gd(this),c= -this.b;Md(this,a,0,b);P(this,b);this.b=c-gf[this.i]},function(a){P(this,Td(this,a,this.Ca?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],kg=[function(a){mg[a&15].call(this,a)},W,W,W,af,af,af,af,mf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},Tf,Vf,pf,pf,pf,pf],mg=[Ye,rf,lf,Qe,Ze,kf,function(){Fd(this);this.b-=13},W,W,W,W,W,W,W,W,W],ig=[hf,hf,We,We,we,we,xe,xe,sf,sf,W,W,W,W,nf,nf],jg=[Pe,Ne,Je,Le,Se,Te,ye,ze,Xe,qf,Xf,Zf,ag,function(a){ng[a>>6&3].call(this, -a)},W,W],ng=[W,function(a){a=Ld(this,a,65536);Ed(this,a);P(this,a);this.b-=11},function(a){var b=Gd(this),c=this.b;Md(this,a,65536,b);P(this,b);this.b=c-gf[this.i]},W];function og(a){r.call(this,"ROM",a,og);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){pg(c,a,b,f)})}}u(og); -og.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.j=d;qg(this)};og.prototype.Aa=function(){if(this.Ba){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Rb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};og.prototype.za=function(){return!0}; -function pg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Fb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.za=function(a){return a?this.save():!0};h.reset=function(){vg(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return vg(this)};function vg(a){a.R=0;a.f=0;a.i=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.j.Ab=this.j.Ab&-120|20;this.f.Ia=0}; +var M={},L=(M[62592]=[null,null,K.prototype.Rc,K.prototype.Bd,"SISDR",1145],M[62608]=[null,null,K.prototype.Pc,K.prototype.zd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Qc,K.prototype.Ad,"SISAR",1145],M[62640]=[null,null,K.prototype.Oc,K.prototype.yd,"SDSAR",1145],M[62656]=[null,null,K.prototype.zc,K.prototype.ld,"KISDR",1145],M[62672]=[null,null,K.prototype.xc,K.prototype.jd,"KDSDR",1145],M[62688]=[null,null,K.prototype.yc,K.prototype.kd,"KISAR",1145],M[62704]=[null,null,K.prototype.wc,K.prototype.hd, +"KDSAR",1145],M[62798]=[null,null,K.prototype.Fc,K.prototype.pd,"MMR3",1145],M[65382]=[null,null,K.prototype.Ac,K.prototype.md,"LKS"],M[65400]=[null,null,K.prototype.tc,K.prototype.ed,"CNSL"],M[65402]=[null,null,K.prototype.Cc,K.prototype.od,"MMR0",1145],M[65404]=[null,null,K.prototype.Dc,K.prototype.ec,"MMR1",1145],M[65406]=[null,null,K.prototype.Ec,K.prototype.ec,"MMR2",1145],M[65408]=[null,null,K.prototype.Xc,K.prototype.Hd,"UISDR",1145],M[65424]=[null,null,K.prototype.Vc,K.prototype.Fd,"UDSDR", +1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Gd,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Ed,"UDSAR",1145],M[65472]=[null,null,K.prototype.ab,K.prototype.fb,"R0SET0"],M[65473]=[null,null,K.prototype.ab,K.prototype.fb,"R1SET0"],M[65474]=[null,null,K.prototype.ab,K.prototype.fb,"R2SET0"],M[65475]=[null,null,K.prototype.ab,K.prototype.fb,"R3SET0"],M[65476]=[null,null,K.prototype.ab,K.prototype.fb,"R4SET0"],M[65477]=[null,null,K.prototype.ab,K.prototype.fb,"R5SET0"],M[65478]= +[null,null,K.prototype.Ic,K.prototype.sd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Lc,K.prototype.vd,"R7KERNEL"],M[65480]=[null,null,K.prototype.bb,K.prototype.gb,"R0SET1",1145],M[65481]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET1",1145],M[65482]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET1",1145],M[65483]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET1",1145],M[65484]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET1",1145],M[65485]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET1",1145], +M[65486]=[null,null,K.prototype.Jc,K.prototype.td,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Kc,K.prototype.ud,"R6USER",1145],M[65504]=[null,null,K.prototype.vc,K.prototype.gd,"CTRL",1170],M[65520]=[null,null,K.prototype.$b,K.prototype.fc,"LSIZE",1170],M[65522]=[null,null,K.prototype.$b,K.prototype.fc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Tc,K.prototype.Dd,"SYSID",1170],M[65526]=[null,null,K.prototype.uc,K.prototype.fd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Bc,K.prototype.nd, +"MB",1170],M[65530]=[null,null,K.prototype.Gc,K.prototype.qd,"PIR"],M[65532]=[null,null,K.prototype.Sc,K.prototype.Cd,"SL"],M[65534]=[null,null,K.prototype.Hc,K.prototype.rd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; +L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; +L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; +L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];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];Ta(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&oc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,1,c.M)&&c.da(!0)}return this.Ib(a,b)},ba:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,2,c.M)&&c.da(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a, +1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},aa:function(a,b){a&1&&oc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&oc(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ +J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},va:function(a,b,c){a&1&&oc(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&oc(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; +function Sb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Eb=a.f?a.J:a.Ob,a.ub=a.f?a.H:a.Pb):--a.j||(a.Bb=a.Ib,a.qa=a.Jb)}function Gc(a,b,c){c&&a.B||(a.Eb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Bb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} +var Lc=[],Fc=[I.prototype.V,I.prototype.ua,I.prototype.ja,I.prototype.xa],Hc=[I.prototype.T,I.prototype.ma,I.prototype.ba,I.prototype.wa];if(Gb)var Ec=[I.prototype.R,I.prototype.la,I.prototype.aa,I.prototype.va],Dc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; +function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; +h.Da=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Tc(a)&&(a.Ya=a.Za=-1,Qc(a),a.da(),c=!0);c&&a.g(Tc(a)+" cycles: checksum="+k(a.nb))}} +h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function pc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function rc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} +function Yc(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 rd(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 Xc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} +h.ad=function(){if(this.v.ca){this.jb>=this.Fa&&Wc(this,!0);this.oa=0;this.xa=Aa();if(this.aa){var a=this.xa-this.aa;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.oa+=b;this.T+=b;Sc(this,b);rd(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));Fb(this, +e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Yb;this.aa=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.aa-this.xa),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.aa+=c;a(b,c)}}}; +h.cb=function(a){if(Eb(this))return!1;if(this.v.ca)return this.g(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; +function sd(a){this.mb=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.mb?td.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(sd,Mc);h=sd.prototype;h.reset=function(){this.status("model "+this.mb);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; +function vd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Lb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&tc(a)}function tc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Vb=function(){return 0}; +h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,kc(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Uc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Bd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Cd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Dd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Ed(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.ea=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Lb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);vc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Fd(this,this.ma);Fd(this,this.u[7]);Ad(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Gd(a){var b=Hd(a),c=Hd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);Ad(a,b);vc(a,c);a.F&=-17} +function Id(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.ea(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.ea(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; +a.b-=8;break;case 6:return e=zd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=zd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.A.zb(a);this.C++;a=Jd(this,Id(this,a,3));this.C--;return a}; +h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(Id(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Kd(this,Id(this,a,5),b),this.C--):this.A.rb(a,b)};h.Db=function(a,b){this.Ja?(this.C++,this.gc(Id(this,a,4),b),this.C--):this.A.Db(a,b)};h.mc=function(a,b,c){return Ld(this,a,b,c)};h.nc=function(a,b,c){return Id(this,Ld(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Id(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; +h.Id=function(a,b){this.A.Sa(Id(this,a,4),b)};function Md(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=Ld(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Nd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=Ld(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Id(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} +function Od(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Qd(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return Ld(a,b,c,8)}function Rd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Sd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Kd(a,e,d.call(a,c,Jd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Td(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?Kd(a,a.Y(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 Ud(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +function S(a,b,c){c&&(Ad(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Vd(this.i),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.ba=this.b=a;do{if(b){if(Wd(this.i,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; +if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(zd(this))}while(0>1|b<<16;Dd(this,a);return a&65535}function be(a,b){a=b&2048|b>>1|b<<8;Dd(this,a<<8);return a&255}function ce(a,b){a=b&~a;P(this,a);return a}function de(a,b){a=b&~a;P(this,a<<8);return a}function ee(a,b){a|=b;P(this,a);return a}function fe(a,b){a|=b;P(this,a<<8);return a} +function ge(a,b){a=~b|65536;Bd(this,a);return a&65535}function he(a,b){a=~b|256;Bd(this,a<<8);return a&255}function ie(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function je(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function ke(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function le(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} +function me(a,b){a=-b;Bd(this,a,a&b&32768);return a&65535}function ne(a,b){a=-b;Bd(this,a<<8,(a&b&128)<<8);return a&255}function oe(a,b){a=b<<1|this.N>>16&1;Dd(this,a);return a&65535}function pe(a,b){a=b<<1|this.N>>16&1;Dd(this,a<<8);return a&255}function qe(a,b){a=(this.N&65536|b)>>1|b<<16;Dd(this,a);return a&65535}function re(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Dd(this,a<<8);return a&255}function se(a,b){var c=b-a;Ed(this,c,a,b);return c&65535} +function te(a,b){var c=b-a;Ed(this,c<<8,a<<8,b<<8);return c&255}function ue(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function ve(a,b){a^=b;P(this,a);return a&65535}function we(a){R(this,a,Pd(this,a),Xd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function xe(a){var b=Sd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} +function ye(a){var b=Sd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function ze(a){S(this,a,!O(this))}function Ae(a){S(this,a,O(this))} +function Be(a){R(this,a,Pd(this,a),ce);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ce(a){Q(this,a,Od(this,a),de);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){R(this,a,Pd(this,a),ee);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){Q(this,a,Od(this,a),fe);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Fe(a){P(this,Pd(this,a)&Sd(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ge(a){P(this,(Od(this,a)&Rd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function He(a){S(this,a,yd(this))}function Ie(a){S(this,a,!this.Ca()==!xd(this))}function Je(a){S(this,a,!yd(this)&&!this.Ca()==!xd(this))}function Ke(a){S(this,a,!O(this)&&!yd(this))}function Le(a){S(this,a,yd(this)||!this.Ca()!=!xd(this))} +function Me(a){S(this,a,O(this)||yd(this))}function Ne(a){S(this,a,!this.Ca()!=!xd(this))}function Oe(a){S(this,a,this.Ca())}function Pe(a){S(this,a,!yd(this))}function Qe(a){S(this,a,!this.Ca())}function Re(){this.ea(12,1);this.b-=5}function Se(a){S(this,a,!0)}function Te(a){S(this,a,!xd(this))}function Ue(a){S(this,a,xd(this))}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function Ve(a){var b=Pd(this,a);a=Sd(this,a);Ed(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function We(a){var b=Od(this,a)<<8;a=Rd(this,a)<<8;Ed(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} +function Xe(a){var b=Sd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Ye(){this.ea(24,2);this.b-=25}function Ze(){this.L&49152?(this.Z|=128,this.ea(4,3)):this.da();this.b-=7} +function $e(){this.ea(16,4);this.b-=25}var af=[0,7,7,10,7,11,9,13];function bf(a){var b=this.b;Ad(this,Qd(this,a));this.b=b-af[this.j]}var cf=[0,14,14,17,14,18,16,20];function df(a){var b=this.b,c=Qd(this,a);a=a>>6&7;Fd(this,this.u[a]);this.u[a]=this.u[7];Ad(this,c);this.b=b-cf[this.j]}var ef=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ff(a){var b=Pd(this,a),c=this.b;P(this,Ud(this,a,b));this.b=c-ef[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)} +function gf(a){var b=Od(this,a);P(this,Td(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var hf=[7,13,13,17,14,18,17,21];function jf(a){var b=Sd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Ad(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function pf(a){R(this,a,Pd(this,a),se);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function qf(a){R(this,a,0,ue);this.b-=this.j?9:3+(7==this.f?2:0)}function rf(){this.ea(28,5);this.b-=5}function sf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function tf(a){R(this,a,Pd(this,a),ve);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){if(this.i){var b=this.i;B(b,"undefined opcode "+J(b,a),!0,!0);$b(b)}this.ea(8,6)}function td(a){uf[a>>12].call(this,a)}function vf(a){wf[a>>6&3].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)} +function zf(a){Af[a>>6&3].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} +var uf=[function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,V,function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],dg=[function(a){fg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,V,V,V],wf=[function(a){Bd(this,Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ie);this.b-=this.j?9:3+(7==this.f?2:0)}],yf=[function(a){R(this,a,0, +me);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Xd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,se);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Bd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Af=[function(a){R(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,oe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)}], +fg=[function(a){gg[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,V,Uf,Wf,qf,qf,qf,qf],gg=[Ze,sf,mf,Re,$e,lf,V,V,V,V,V,V,V,V,V,V],Vf=[kf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Xf=[kf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],eg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,V,V,V],Zf=[function(a){Bd(this, +Td(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,le);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,je);this.b-=this.j?9:3+(7==this.f?2:0)}],ag=[function(a){Q(this,a,0,ne);this.b-=this.j?11:6},function(a){Q(this,a,O(this)?1:0,Yd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,O(this)?1:0,te);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Rd(this,a);Bd(this,a<<8);this.b-=this.j?4:3+(7==this.f? +2:0)}],cg=[function(a){Q(this,a,0,re);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,pe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,$d);this.b-=this.j?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} +var hg=[function(a){ig[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],ig=[function(a){lg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,function(a){mg[a>>6&3].call(this,a)},V,V],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);Ad(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Md(this,a,0);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c= +this.b;Nd(this,a,0,b);P(this,b);this.b=c-hf[this.j]},function(a){P(this,Ud(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Uf,Wf,qf,qf,qf,qf],ng=[Ze,sf,mf,Re,$e,lf,function(){Gd(this);this.b-=13},V,V,V,V,V,V,V,V,V],jg=[jf,jf,Xe,Xe,xe,xe,ye,ye,tf,tf,V,V,V,V,of,of],kg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,function(a){og[a>>6&3].call(this, +a)},V,V],og=[V,function(a){a=Md(this,a,65536);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c=this.b;Nd(this,a,65536,b);P(this,b);this.b=c-hf[this.j]},V];function pg(a){r.call(this,"ROM",a,pg);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){qg(c,a,b,f)})}}u(pg); +pg.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;rg(this)};pg.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Rb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};pg.prototype.za=function(){return!0}; +function qg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Fb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.za=function(a){return a?this.save():!0};h.reset=function(){wg(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return wg(this)};function wg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;qc(this.b,this.V,1)}};var wg={},ug=(wg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],wg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],wg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],wg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],wg);Ta(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xg.prototype.Wb=function(){return-1};xg.prototype.Xb=function(){}; -function zg(a,b,c,d){if(c)if(b){0>a.C&&a.i.length&&(a.C=0);if(0>a.C||b!=a.i[a.C])a.i.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.i[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(xa(b.substring(c,f))),c=f+1}}return a} -function Ag(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; +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;rc(this.b,this.V,1)}};var xg={},vg=(xg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],xg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],xg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],xg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],xg);Ta(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yg.prototype.Wb=function(){return-1};yg.prototype.Xb=function(){}; +function Ag(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(xa(b.substring(c,f))),c=f+1}}return a} +function Bg(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 Bg(a,b,c){var d;if(b){b=Cg(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Fg(a,b){if(b)return Eg(a,b,a.ba[b]);var c=0;for(b in a.ba)Eg(a,b,a.ba[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Gg(a,b){if(b)return Fg(a,b,a.aa[b]);var c=0;for(b in a.aa)Fg(a,b,a.aa[b]),c++;return 0>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=ac[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.qb).w));this.ia&1073741824?this.ua.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Wc(a),a.la=0,a.B.aa()))}; -function Ig(a){var b;if(Ud(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} -h.Pa=function(a,b,c){var d=!0;c||Yg(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(Zg(this,a,a.length-1,"set"),Ig(this)));return d};function Yg(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Ig(a);break}}return f} -function $g(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y=Tg(C);break;case 8:y="@"+Tg(C);break;case 16:7>C?y="("+Tg(C)+ -")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Tg(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Tg(C)+")";break;case 40:y="@-("+Tg(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Tg(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Tg(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(m=x[1],x=x[0]);0b?(c=Tg(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function eh(a){var b,c="";for(b=0;6>b;b++)c+=dh(a,b);c=c+"\n"+(dh(a,6)+dh(a,7)+dh(a,20));return c+=ch(a,"T")+ch(a,"N")+ch(a,"Z")+ch(a,"V")+ch(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.aa();a.g("updated registers:")}a.g(eh(a));c&&(a.K=Z(d.u[7]),Wg(a,J(a,a.K.w)))}}function jh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=bh(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} -function ah(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Ff&&(rb=1E5,bd=["CALL"]);for(void 0!==Ef&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;Hf++;rb--}}Hf||(a.g("no "+Gf+"history available"),a.Va=void 0)}else{var tb=Og(a,ha);if(tb){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Dh),bc=Dg(a,Ca)>>>0,65536>4||1;Fh--&&0ec?String.fromCharCode(ec):".";cc--}ub&&(ub+="\n");ub+=ha+" "+cd+(0==wb?" "+Kf:"")}ub&&a.g(ub);a.Oa=tb}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.kb,gd=a.Cb):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Og(a,id);if(fc)for(var gc=2;gc< -g.length;gc++){var xb=Bg(a,g[gc]);if(void 0===xb){a.g("unrecognized value: "+g[gc]);break}xb&~ed&&a.g("warning: "+k(xb)+" exceeds "+Za+"-byte value");var Gh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Gh,Za)+" to "+J(a,xb,Za));gd.call(a,fc,xb,Za)}}break;case "g":a:{var Lf=g[1],Hh=b;if(void 0!==Lf){var jd=Og(a,Lf,!0);if(!jd)break a;Sg(a,jd,Hh);a.Pa(a.f,jd,!0)}a.cb(!0,c)}break;case "h":a.v.da?(c||a.g("halting"),a.ea()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; -var yb=b.substr(2),yb=xa(yb);Bg(a,yb)?(c||a.g("true: "+yb),kd=!0):(c||a.g("false: "+yb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Ih=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),zb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,zb.w));10>ld;){for(var Da=null,Jh=256;65536>zb.w>>>0;){md.w=a.ka(zb,2);if(null==zb.w||!Jh--)break;if(!(md.w&1)){for(var Kh=a,hc=md,Mf=null,Ab=hc.w,Nf=Ab,nd=1;6>=nd&&Ab;nd++){if(2< -nd){hc.w=Ab;var ic=bh(Kh,hc);if(0<=ic.indexOf("JSR")){var Of=ic.indexOf(" ");if(Ab+(ic.indexOf(" ",Of+1)-Of-1)/2==Nf){Mf=ic;break}}}Ab-=2}hc.w=Nf;if(Da=Mf)break}}if(!Da||null==Da)break;var Pf=null;if("ks"==Ih){var Qf=Da.match(/[0-9A-F]+$/);Qf&&(Pf=ih(a,Qf[0]))}Da=wa(Da,50)+" ;"+(Pf||"stack="+J(a,zb.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){ih(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== -F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;boh){if(qh(d,this.I)){this.D=new O(this,"1.30.1","failsafe");qh(this.D)&&(vh(this,d),a=2,wh(this.D));this.D.set("timestamp",Ea());xh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=uh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?qh(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.i=null)):this.g(f+": "+g),wh(d),qh(d)?(c=uh(d),e=!0):c=!1))}e&&th(this,c?d:null)}else 2==a&&d.clear()}else th(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(yh(this,this.b,b,c,a),this.b.hb());this.T&&(vh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function vh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} -function lh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ea(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Qh(a,b,c)}})}else c(a,null)} -function Rh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Ch||ab(!0));m=!1}var g,l,m=!0;Ch++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Oh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Ch||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Ch||ab(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Oh(b,a,d,!0,e,p):Ph(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Rh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map +35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};h=Hg.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.B=a;(a=Oc(a,"messages"))&&Kg(this,a);this.Wa=Ng;Og(this,function(a){a:{var b=d.A.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Pg(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=jc[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.qb).w));this.ia&1073741824?this.ua.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; +function Jg(a){var b;if(Vd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||Zg(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:($g(this,a,a.length-1,"set"),Jg(this)));return d};function Zg(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Jg(a);break}}return f} +function ah(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y=Ug(C);break;case 8:y="@"+Ug(C);break;case 16:7>C?y="("+Ug(C)+ +")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Ug(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Ug(C)+")";break;case 40:y="@-("+Ug(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Ug(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Ug(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(m=x[1],x=x[0]);0b?(c=Ug(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function fh(a){var b,c="";for(b=0;6>b;b++)c+=eh(a,b);c=c+"\n"+(eh(a,6)+eh(a,7)+eh(a,20));return c+=dh(a,"T")+dh(a,"N")+dh(a,"Z")+dh(a,"V")+dh(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.$();a.g("updated registers:")}a.g(fh(a));c&&(a.K=Z(d.u[7]),Xg(a,J(a,a.K.w)))}}function kh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=ch(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} +function bh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Gf&&(rb=1E5,bd=["CALL"]);for(void 0!==Ff&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;If++;rb--}}If||(a.g("no "+Hf+"history available"),a.Va=void 0)}else{var tb=Pg(a,ha);if(tb){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Eh),bc=Eg(a,Ca)>>>0,65536>4||1;Gh--&&0ec?String.fromCharCode(ec):".";cc--}ub&&(ub+="\n");ub+=ha+" "+cd+(0==wb?" "+Lf:"")}ub&&a.g(ub);a.Oa=tb}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.kb,gd=a.Cb):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Pg(a,id);if(fc)for(var gc=2;gc< +g.length;gc++){var xb=Cg(a,g[gc]);if(void 0===xb){a.g("unrecognized value: "+g[gc]);break}xb&~ed&&a.g("warning: "+k(xb)+" exceeds "+Za+"-byte value");var Hh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Hh,Za)+" to "+J(a,xb,Za));gd.call(a,fc,xb,Za)}}break;case "g":a:{var Mf=g[1],Ih=b;if(void 0!==Mf){var jd=Pg(a,Mf,!0);if(!jd)break a;Tg(a,jd,Ih);a.Pa(a.f,jd,!0)}a.cb(!0,c)}break;case "h":a.v.ca?(c||a.g("halting"),a.da()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; +var yb=b.substr(2),yb=xa(yb);Cg(a,yb)?(c||a.g("true: "+yb),kd=!0):(c||a.g("false: "+yb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Jh=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),zb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,zb.w));10>ld;){for(var Da=null,Kh=256;65536>zb.w>>>0;){md.w=a.ka(zb,2);if(null==zb.w||!Kh--)break;if(!(md.w&1)){for(var Lh=a,hc=md,Nf=null,Ab=hc.w,Of=Ab,nd=1;6>=nd&&Ab;nd++){if(2< +nd){hc.w=Ab;var ic=ch(Lh,hc);if(0<=ic.indexOf("JSR")){var Pf=ic.indexOf(" ");if(Ab+(ic.indexOf(" ",Pf+1)-Pf-1)/2==Of){Nf=ic;break}}}Ab-=2}hc.w=Of;if(Da=Nf)break}}if(!Da||null==Da)break;var Qf=null;if("ks"==Jh){var Rf=Da.match(/[0-9A-F]+$/);Rf&&(Qf=jh(a,Rf[0]))}Da=wa(Da,50)+" ;"+(Qf||"stack="+J(a,zb.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){jh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== +F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bph){if(rh(d,this.I)){this.D=new N(this,"1.30.1","failsafe");rh(this.D)&&(wh(this,d),a=2,xh(this.D));this.D.set("timestamp",Ea());yh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=vh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rh(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.g(f+": "+g),xh(d),rh(d)?(c=vh(d),e=!0):c=!1))}e&&uh(this,c?d:null)}else 2==a&&d.clear()}else uh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(zh(this,this.b,b,c,a),this.b.hb());this.T&&(wh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function wh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} +function mh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.da(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Rh(a,b,c)}})}else c(a,null)} +function Sh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Dh||ab(!0));m=!1}var g,l,m=!0;Dh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Ph(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Dh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Dh||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ph(b,a,d,!0,e,p):Qh(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Sh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map From 1e080e720e5ffbb2636ef753f686613bffd43d1b Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 11:59:48 -0700 Subject: [PATCH 30/36] Debugger now actually prevents an undefined opcode from executing (until/unless you single-step it) --- modules/pdp11/lib/bus.js | 16 ++++++++-------- modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/debugger.js | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 4ff3efa07..ee9b65755 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -281,7 +281,7 @@ BusPDP11.IOController = { } return b; } - b = bus.unknownAccess(addr, -1, true); + b = bus.unknownAccess(addr, true); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -354,7 +354,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr, b, true); + bus.unknownAccess(addr, true, b); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -386,7 +386,7 @@ BusPDP11.IOController = { } return w; } - w = bus.unknownAccess(addr, -1); + w = bus.unknownAccess(addr, false); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -422,7 +422,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr, w); + bus.unknownAccess(addr, false, w); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -539,23 +539,23 @@ BusPDP11.prototype.reset = function() }; /** - * unknownAccess(addr, data, fByte) + * unknownAccess(addr, fByte, data) * * This is our default I/O handler, called when there's an IOPAGE access without a corresponding entry in aIOHandlers. * * @this {BusPDP11} * @param {number} addr (ie, an IOPAGE address) - * @param {number} data (-1 if read, otherwise write) * @param {boolean} [fByte] (true if byte access, otherwise word) + * @param {number} [data] (undefined if read, otherwise write) * @return {number} */ -BusPDP11.prototype.unknownAccess = function(addr, data, fByte) +BusPDP11.prototype.unknownAccess = function(addr, fByte, data) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { /* * TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits) */ - this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr, 3) + "," + this.dbg.toStrBase(data) + "," + fByte + ")", true, true); + this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true); if (this.dbg.stopInstruction()) return 0; } if (!this.nDisableTraps) { diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index d3c438e34..af581d571 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1764,7 +1764,7 @@ PDP11.opXOR = function(opCode) PDP11.opUndefined = function(opCode) { if (DEBUGGER && this.dbg) { - this.dbg.undefinedInstruction(opCode); + if (this.dbg.undefinedInstruction(opCode)) return; } this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED); }; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 6e92eed2e..cb915839f 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1631,11 +1631,12 @@ if (DEBUGGER) { * * @this {DebuggerPDP11} * @param {number} opCode + * @return {boolean} true if stopping is enabled, false if not */ DebuggerPDP11.prototype.undefinedInstruction = function(opCode) { this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true); - this.stopInstruction(); // allow the caller to step over it if they really want a trap generated + return this.stopInstruction(); // allow the caller to step over it if they really want a trap generated }; /** From 2ce661e141869234029064e8d6bc536641ceeb7a Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 13:34:02 -0700 Subject: [PATCH 31/36] Refer to all 11/45+ instructions as 11/45, rather than 11/70, since the 11/70 doesn't appear to have added any instructions to the 11/45's set --- modules/pdp11/lib/bus.js | 2 +- modules/pdp11/lib/cpuops.js | 80 +++++++++++++++--------------- modules/pdp11/lib/cpustate.js | 2 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 12 ++--- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index ee9b65755..f1435a2a9 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -107,7 +107,7 @@ function BusPDP11(parmsBus, cpu, dbg) /* * WARNING: Instead of dynamically calculating nBlockShift based on nBusWidth, as described above, we - * now force nBlockSize to IOPAGE_LENGTH, because that's what our IOController functions currently require. + * now force nBlockSize to IOPAGE_LENGTH, because that's what our IOController functions currently assume. * * this.nBlockShift = (this.nBusWidth >> 1) + 2; * if (this.nBlockShift < 10) this.nBlockShift = 10; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index af581d571..c2c739862 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -37,7 +37,7 @@ if (NODE) { } /* - * Decoding starts at the bottom of this file, in op1120() and op1170(). + * Decoding starts at the bottom of this file, in op1120() and op1145(). * * The basic decoding approach is to dispatch on the top 4 bits of the opcode, and if further * decoding is required, the dispatched function will dispatch on the next 4 bits, and so on @@ -2088,103 +2088,103 @@ PDP11.aOp8CXn_1120 = [ ]; /** - * op1170(opCode) + * op1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op1170 = function(opCode) +PDP11.op1145 = function(opCode) { - PDP11.aOpXnnn_1170[opCode >> 12].call(this, opCode); + PDP11.aOpXnnn_1145[opCode >> 12].call(this, opCode); }; /** - * op0Xnn_1170(opCode) + * op0Xnn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0Xnn_1170 = function(opCode) +PDP11.op0Xnn_1145 = function(opCode) { - PDP11.aOp0Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOp0Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode); }; /** - * op0DXn_1170(opCode) + * op0DXn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op0DXn_1170 = function(opCode) +PDP11.op0DXn_1145 = function(opCode) { - PDP11.aOp0DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp0DXn_1145[(opCode >> 6) & 0x3].call(this, opCode); }; /** - * op00Xn_1170(opCode) + * op00Xn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op00Xn_1170 = function(opCode) +PDP11.op00Xn_1145 = function(opCode) { - PDP11.aOp00Xn_1170[(opCode >> 4) & 0xf].call(this, opCode); + PDP11.aOp00Xn_1145[(opCode >> 4) & 0xf].call(this, opCode); }; /** - * op000X_1170(opCode) + * op000X_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op000X_1170 = function(opCode) +PDP11.op000X_1145 = function(opCode) { - PDP11.aOp000X_1170[opCode & 0xf].call(this, opCode); + PDP11.aOp000X_1145[opCode & 0xf].call(this, opCode); }; /** - * op7Xnn_1170(opCode) + * op7Xnn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op7Xnn_1170 = function(opCode) +PDP11.op7Xnn_1145 = function(opCode) { - PDP11.aOp7Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOp7Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode); }; /** - * op8Xnn_1170(opCode) + * op8Xnn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op8Xnn_1170 = function(opCode) +PDP11.op8Xnn_1145 = function(opCode) { - PDP11.aOp8Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode); + PDP11.aOp8Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode); }; /** - * op8DXn_1170(opCode) + * op8DXn_1145(opCode) * * @this {CPUStatePDP11} * @param {number} opCode */ -PDP11.op8DXn_1170 = function(opCode) +PDP11.op8DXn_1145 = function(opCode) { - PDP11.aOp8DXn_1170[(opCode >> 6) & 0x3].call(this, opCode); + PDP11.aOp8DXn_1145[(opCode >> 6) & 0x3].call(this, opCode); }; -PDP11.aOpXnnn_1170 = [ - PDP11.op0Xnn_1170, // 0x0nnn +PDP11.aOpXnnn_1145 = [ + PDP11.op0Xnn_1145, // 0x0nnn PDP11.opMOV, // 0x1nnn 01SSDD 11/20+ 2.3 PDP11.opCMP, // 0x2nnn 02SSDD 11/20+ 2.3* PDP11.opBIT, // 0x3nnn 03SSDD 11/20+ 2.9* PDP11.opBIC, // 0x4nnn 04SSDD 11/20+ 2.9 PDP11.opBIS, // 0x5nnn 05SSDD 11/20+ 2.3 PDP11.opADD, // 0x6nnn 06SSDD 11/20+ 2.3 - PDP11.op7Xnn_1170, // 0x7nnn - PDP11.op8Xnn_1170, // 0x8nnn + PDP11.op7Xnn_1145, // 0x7nnn + PDP11.op8Xnn_1145, // 0x8nnn PDP11.opMOVB, // 0x9nnn 11SSDD 11/20+ 2.3 PDP11.opCMPB, // 0xAnnn 12SSDD 11/20+ 2.3 PDP11.opBITB, // 0xBnnn 13SSDD 11/20+ 2.9 @@ -2194,8 +2194,8 @@ PDP11.aOpXnnn_1170 = [ PDP11.opUndefined // 0xFnnn ]; -PDP11.aOp0Xnn_1170 = [ - PDP11.op00Xn_1170, // 0x00nn +PDP11.aOp0Xnn_1145 = [ + PDP11.op00Xn_1145, // 0x00nn PDP11.opBR, // 0x01nn 0004XX 11/20+ 2.6 PDP11.opBNE, // 0x02nn 0010XX 11/20+ 2.6** PDP11.opBEQ, // 0x03nn 0014XX 11/20+ 2.6** @@ -2208,20 +2208,20 @@ PDP11.aOp0Xnn_1170 = [ PDP11.op0AXn_1120, // 0x0Ann PDP11.op0BXn_1120, // 0x0Bnn PDP11.op0CXn_1120, // 0x0Cnn - PDP11.op0DXn_1170, // 0x0Dnn + PDP11.op0DXn_1145, // 0x0Dnn PDP11.opUndefined, // 0x0Enn PDP11.opUndefined // 0x0Fnn ]; -PDP11.aOp0DXn_1170 = [ +PDP11.aOp0DXn_1145 = [ PDP11.opMARK, // 0x0D0n 11/45+ PDP11.opMFPI, // 0x0D4n 11/45+ PDP11.opMTPI, // 0x0D8n 11/45+ PDP11.opSXT // 0x0DCn 11/45+ ]; -PDP11.aOp00Xn_1170 = [ - PDP11.op000X_1170, // 0x000n 000000-000017 +PDP11.aOp00Xn_1145 = [ + PDP11.op000X_1145, // 0x000n 000000-000017 PDP11.opUndefined, // 0x001n 000020-000037 PDP11.opUndefined, // 0x002n 000040-000057 PDP11.opUndefined, // 0x003n 000060-000077 @@ -2239,7 +2239,7 @@ PDP11.aOp00Xn_1170 = [ PDP11.opSWAB // 0x00Fn 0003DD 11/20+ 2.3 ]; -PDP11.aOp000X_1170 = [ +PDP11.aOp000X_1145 = [ PDP11.opHALT, // 0x0000 000000 11/20+ 1.8 PDP11.opWAIT, // 0x0001 000001 11/20+ 1.8 PDP11.opRTI, // 0x0002 000002 11/20+ 4.8 @@ -2258,7 +2258,7 @@ PDP11.aOp000X_1170 = [ PDP11.opUndefined // 0x000F ]; -PDP11.aOp7Xnn_1170 = [ +PDP11.aOp7Xnn_1145 = [ PDP11.opMUL, // 0x70nn 11/45+ PDP11.opMUL, // 0x71nn 11/45+ PDP11.opDIV, // 0x72nn 11/45+ @@ -2277,7 +2277,7 @@ PDP11.aOp7Xnn_1170 = [ PDP11.opSOB // 0x7Fnn 11/45+ ]; -PDP11.aOp8Xnn_1170 = [ +PDP11.aOp8Xnn_1145 = [ PDP11.opBPL, // 0x80nn 1000XX 11/20+ 2.6** PDP11.opBMI, // 0x81nn 1004XX 11/20+ 2.6** PDP11.opBHI, // 0x82nn 1010XX 11/20+ 2.6** @@ -2291,12 +2291,12 @@ PDP11.aOp8Xnn_1170 = [ PDP11.op8AXn_1120, // 0x8Ann PDP11.op8BXn_1120, // 0x8Bnn PDP11.op8CXn_1120, // 0x8Cnn - PDP11.op8DXn_1170, // 0x8Dnn + PDP11.op8DXn_1145, // 0x8Dnn PDP11.opUndefined, // 0x8Enn PDP11.opUndefined // 0x8Fnn ]; -PDP11.aOp8DXn_1170 = [ +PDP11.aOp8DXn_1145 = [ PDP11.opUndefined, // 0x8D0n PDP11.opMFPD, // 0x8D4n 11/45+ PDP11.opMTPD, // 0x8D8n 11/45+ diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 24de601ea..3076be152 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -126,7 +126,7 @@ CPUStatePDP11.prototype.initProcessor = function() if (this.model == PDP11.MODEL_1120) { this.decode = PDP11.op1120.bind(this); } else { - this.decode = PDP11.op1170.bind(this); + this.decode = PDP11.op1145.bind(this); } this.initRegs(); diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index dc38c5fe6..7828be6d7 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -56,11 +56,11 @@ h.ra=function(a,b,c,d){if(this.B&&this.B.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d) function Jb(a,b,c,d){if(a.J[b]){void 0===c&&(Fb(a,"Value for "+b+" is invalid"),a.b.da());var e=a.i&&a.i.ja||8;c=!a.b.v.ca||a.v.Sb?8==e?oa(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Kb(a,b,c,d){for(var e=0;e>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,-1,!0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,b,!0),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,-1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Vb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Vb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.i,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Bb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Cb=function(a,b){this.W[(a&this.f)>>>this.ga].Eb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Db=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; @@ -138,7 +138,7 @@ function Xe(a){var b=Sd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];t function $e(){this.ea(16,4);this.b-=25}var af=[0,7,7,10,7,11,9,13];function bf(a){var b=this.b;Ad(this,Qd(this,a));this.b=b-af[this.j]}var cf=[0,14,14,17,14,18,16,20];function df(a){var b=this.b,c=Qd(this,a);a=a>>6&7;Fd(this,this.u[a]);this.u[a]=this.u[7];Ad(this,c);this.b=b-cf[this.j]}var ef=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ff(a){var b=Pd(this,a),c=this.b;P(this,Ud(this,a,b));this.b=c-ef[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)} function gf(a){var b=Od(this,a);P(this,Td(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var hf=[7,13,13,17,14,18,17,21];function jf(a){var b=Sd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Ad(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function pf(a){R(this,a,Pd(this,a),se);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function qf(a){R(this,a,0,ue);this.b-=this.j?9:3+(7==this.f?2:0)}function rf(){this.ea(28,5);this.b-=5}function sf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function tf(a){R(this,a,Pd(this,a),ve);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){if(this.i){var b=this.i;B(b,"undefined opcode "+J(b,a),!0,!0);$b(b)}this.ea(8,6)}function td(a){uf[a>>12].call(this,a)}function vf(a){wf[a>>6&3].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)} +function qf(a){R(this,a,0,ue);this.b-=this.j?9:3+(7==this.f?2:0)}function rf(){this.ea(28,5);this.b-=5}function sf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function tf(a){R(this,a,Pd(this,a),ve);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,B(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ea(8,6)}function td(a){uf[a>>12].call(this,a)}function vf(a){wf[a>>6&3].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)} function zf(a){Af[a>>6&3].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} var uf=[function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,V,function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],dg=[function(a){fg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,V,V,V],wf=[function(a){Bd(this,Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ie);this.b-=this.j?9:3+(7==this.f?2:0)}],yf=[function(a){R(this,a,0, me);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Xd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,se);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Bd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Af=[function(a){R(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,oe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)}], From b79146880de6ad8c64e41ca3a69f24269af31ca7 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 15:01:39 -0700 Subject: [PATCH 32/36] Debugger now restricts opcodes to the current CPU model --- devices/pdp11/loader/README.md | 57 +++++++ devices/pdp11/loader/bootstrap.json | 4 + devices/pdp11/loader/bootstrap.lst | 9 + modules/filedump/lib/filedump.js | 5 +- modules/pdp11/lib/debugger.js | 97 +++++++---- versions/pdpjs/1.30.1/pdp11-dbg.js | 245 ++++++++++++++-------------- 6 files changed, 264 insertions(+), 153 deletions(-) create mode 100644 devices/pdp11/loader/README.md create mode 100644 devices/pdp11/loader/bootstrap.json create mode 100644 devices/pdp11/loader/bootstrap.lst diff --git a/devices/pdp11/loader/README.md b/devices/pdp11/loader/README.md new file mode 100644 index 000000000..1def583b0 --- /dev/null +++ b/devices/pdp11/loader/README.md @@ -0,0 +1,57 @@ +--- +layout: page +title: PDP-11 Loaders +permalink: /devices/pdp11/loader/ +--- + +PDP-11 Loaders +-------------- + +The blog post "[PDP-11 Paper Tape BASIC](http://avitech.com.au/?page_id=709)" describes the *Bootstrap Loader*, +a small program used to load the *Absolute Loader*, which in turn loads the *PDP-11 BASIC Paper Tape*. + +Here's what the *Bootstrap Loader* looks like: + + Location Instruction + 037744 016701 + 037746 000026 + 037750 012702 + 037752 000352 + 037754 005211 + 037756 105711 + 037760 100376 + 037762 116162 + 037764 000002 + 037766 037400 + 037770 005267 + 037772 177756 + 037774 000765 + 037776 177550 + +Using a [PDPjs](/modules/pdpjs/) machine such as the [PDP-11/20 Test Machine with Debugger](/devices/pdp11/machine/1120/test/debugger/), +the *Bootstrap Loader* is easily entered with a single Debugger "edit" command: + + e 037744 016701 000026 012702 000352 005211 105711 100376 116162 000002 037400 005267 177756 000765 177550 + +You can immediately disassemble the code using `u 037744 040000`: + + 037744: 016701 000026 MOV 26(PC),R1 ; @037776 + 037750: 012702 000352 MOV #352,R2 + 037754: 005211 INC @R1 + 037756: 105711 TSTB @R1 + 037760: 100376 BPL 037756 + 037762: 116162 000002 037400 MOVB 2(R1),37400(R2) + 037770: 005267 177756 INC 177756(PC) ; @037752 + 037774: 000765 BR 037750 + 037776: 177550 .WORD 177550 + +I also pasted the disassembled code into a listing file, [bootstrap.lst](bootstrap.lst), and ran [FileDump](/modules/filedump) +to produce a [bootstrap.json](bootstrap.json) that can be pre-loaded into any machine: + + filedump --file=bootstrap.lst --format=octal --output=bootstrap.json + +To run the *Bootstrap Loader*, set the PC to 037744 and start the machine: + + r pc=037744 + g + diff --git a/devices/pdp11/loader/bootstrap.json b/devices/pdp11/loader/bootstrap.json new file mode 100644 index 000000000..edc54ec3e --- /dev/null +++ b/devices/pdp11/loader/bootstrap.json @@ -0,0 +1,4 @@ +{"words":[ +0x1DC1 /*016701*/,0x0016 /*000026*/,0x15C2 /*012702*/,0x00EA /*000352*/,0x0A89 /*005211*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x9C72 /*116162*/, +0x0002 /*000002*/,0x3F00 /*037400*/,0x0AB7 /*005267*/,0xFFEE /*177756*/,0x01F5 /*000765*/,0xFF68 /*177550*/] +} \ No newline at end of file diff --git a/devices/pdp11/loader/bootstrap.lst b/devices/pdp11/loader/bootstrap.lst new file mode 100644 index 000000000..dc7acb522 --- /dev/null +++ b/devices/pdp11/loader/bootstrap.lst @@ -0,0 +1,9 @@ +037744: 016701 000026 MOV 26(PC),R1 ; @037776 +037750: 012702 000352 MOV #352,R2 +037754: 005211 INC @R1 +037756: 105711 TSTB @R1 +037760: 100376 BPL 037756 +037762: 116162 000002 037400 MOVB 2(R1),37400(R2) +037770: 005267 177756 INC 177756(PC) ; @037752 +037774: 000765 BR 037750 +037776: 177550 .WORD 177550 diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index a9b6f197b..3ecab298d 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -115,8 +115,7 @@ FileDump.asBadExts = [ * in "strict" mode. Prefixing them with "0o" is the new convention for ES6 and up, which is great, but we still * have no octal format that works across the board. We can use the new octal format in code, because we always * compile browser-based code back to ES5 (converting all numeric constants to decimal), and current versions of - * Node support it as well (we don't care about old versions of Node). But what we store in data files is more - * problematic. + * Node supported the new format for quite a while. But what we store in data files is more problematic. * * When a second file is "merged", the first file sets all even bytes and the second file sets all odd bytes. * In fact, any number of files can be merged: if there are N files, file #1 sets bytes at "offset mod N == 0", @@ -297,7 +296,7 @@ FileDump.prototype.parseListing = function(sListing) { var ab = []; var matchLine; - var re = /^([0-9 ]{9})([0-7]{6})[ ]+([0-7]+)[ ]*([0-7']+|)[ ]+([0-7']+|)[ ]+(.*)$/gm; + var re = /^( [0-9 ]{8}|)([0-7]{6})[: ]+([0-7]+)[ ]*([0-7']+|)[ ]+([0-7']+|)[ ]+(.*)$/gm; var addrStart = null; while (matchLine = re.exec(sListing)) { /* diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index cb915839f..d66741a2f 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -245,7 +245,7 @@ if (DEBUGGER) { * CPU opcode names, indexed by CPU opcode ordinal (above) */ DebuggerPDP11.OPNAMES = [ - "NONE", "ADC", "ADCB", "ADD", "ASL", "ASLB", "ASR", "ASRB", + ".WORD", "ADC", "ADCB", "ADD", "ASL", "ASLB", "ASR", "ASRB", "BCC", "BCS", "BEQ", "BGE", "BGT", "BHI", "BIC", "BICB", "BIS", "BISB", "BIT", "BITB", "BLE", "BLOS", "BLT", "BMI", "BNE", "BPL", "BPT", "BR", "BVC", "BVS", "CCC", "CLC", @@ -282,7 +282,7 @@ if (DEBUGGER) { DebuggerPDP11.OP_OTHER = 0xF000; /* - * The opTable contains opcode masks, and each mask refers to table of possible values, and each + * The OPTABLE contains opcode masks, and each mask refers to table of possible values, and each * value refers to an array that contains: * * [0]: {number} of the opcode name (see OP.*) @@ -298,7 +298,7 @@ if (DEBUGGER) { * that the opcode's destination operand is being listed first, but rather that the bits describing the source * operand are in the opcode's OP_DST field. */ - DebuggerPDP11.opTable = { + DebuggerPDP11.OPTABLE = { 0xF000: { 0x1000: [DebuggerPDP11.OPS.MOV, DebuggerPDP11.OP_SRC, DebuggerPDP11.OP_DST], // 01SSDD 0x2000: [DebuggerPDP11.OPS.CMP, DebuggerPDP11.OP_SRC, DebuggerPDP11.OP_DST], // 02SSDD @@ -425,6 +425,28 @@ if (DEBUGGER) { } }; + DebuggerPDP11.OPNONE = [DebuggerPDP11.OPS.NONE]; + + /* + * Table of opcodes that are specific to the 11/45 and higher + */ + DebuggerPDP11.OP1145 = [ + DebuggerPDP11.OPS.MARK, + DebuggerPDP11.OPS.MFPI, + DebuggerPDP11.OPS.MTPI, + DebuggerPDP11.OPS.SXT, + DebuggerPDP11.OPS.SPL, + DebuggerPDP11.OPS.RTT, + DebuggerPDP11.OPS.MUL, + DebuggerPDP11.OPS.DIV, + DebuggerPDP11.OPS.ASH, + DebuggerPDP11.OPS.ASHC, + DebuggerPDP11.OPS.XOR, + DebuggerPDP11.OPS.SOB, + DebuggerPDP11.OPS.MFPD, + DebuggerPDP11.OPS.MTPD + ]; + DebuggerPDP11.HISTORY_LIMIT = DEBUG? 100000 : 1000; /** @@ -448,7 +470,8 @@ if (DEBUGGER) { var sMessages = cmp.getMachineParm('messages'); if (sMessages) this.messageInit(sMessages); - this.opTable = DebuggerPDP11.opTable; + this.opTable = DebuggerPDP11.OPTABLE; + this.aOpReserved = this.cpu.model < PDP11.MODEL_1145? DebuggerPDP11.OP1145 : []; this.messageDump(MessagesPDP11.BUS, function onDumpBus(asArgs) { dbg.dumpBus(asArgs); }); @@ -2016,12 +2039,24 @@ if (DEBUGGER) { if (opDesc) break; } - if (!opDesc) opDesc = [DebuggerPDP11.OPS.NONE]; + if (!opDesc) { + opDesc = DebuggerPDP11.OPNONE; + } + + var opNum = opDesc[0]; + if (this.aOpReserved.indexOf(opNum) >= 0) { + opDesc = DebuggerPDP11.OPNONE; + opNum = opDesc[0]; + } var sOperands = "", sTarget = ""; - var sOpName = opNames[opDesc[0]]; + var sOpName = opNames[opNum]; var cOperands = opDesc.length - 1; + if (!opNum && !cOperands) { + sOperands = this.toStrBase(opCode); + } + for (var iOperand = 1; iOperand <= cOperands; iOperand++) { var opType = opDesc[iOperand]; @@ -3550,43 +3585,49 @@ if (DEBUGGER) { }; /** - * doUnassemble(sAddr, sAddrEnd, n) + * doUnassemble(sAddr, sAddrEnd, nLines) * * @this {DebuggerPDP11} * @param {string} [sAddr] * @param {string} [sAddrEnd] - * @param {number} [n] + * @param {number} [nLines] */ - DebuggerPDP11.prototype.doUnassemble = function(sAddr, sAddrEnd, n) + DebuggerPDP11.prototype.doUnassemble = function(sAddr, sAddrEnd, nLines) { var dbgAddr = this.parseAddr(sAddr, true); if (!dbgAddr) return; - if (n === undefined) n = 1; + if (nLines === undefined) nLines = 1; var nBytes = 0x100; if (sAddrEnd !== undefined) { - var dbgAddrEnd = this.parseAddr(sAddrEnd, true); - if (!dbgAddrEnd || dbgAddrEnd.addr < dbgAddr.addr) return; - - nBytes = dbgAddrEnd.addr - dbgAddr.addr; - if (!DEBUG && nBytes > 0x100) { - /* - * Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to - * prevent the user from wedging the browser by dumping too many lines, but also a recognition - * that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway. - */ - this.println("range too large"); - return; + if (sAddrEnd.charAt(0) == 'l') { + var n = this.parseValue(sAddrEnd.substr(1)); + if (n != null) nLines = n; + } + else { + var dbgAddrEnd = this.parseAddr(sAddrEnd, true); + if (!dbgAddrEnd || dbgAddrEnd.addr < dbgAddr.addr) return; + + nBytes = dbgAddrEnd.addr - dbgAddr.addr; + if (!DEBUG && nBytes > 0x100) { + /* + * Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to + * prevent the user from wedging the browser by dumping too many lines, but also a recognition + * that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway. + */ + this.println("range too large"); + return; + } + nLines = -1; } - n = -1; } - var nLines = 0; + var nPrinted = 0; var sInstruction; - while (nBytes > 0 && n--) { + while (nBytes > 0 && nLines--) { var nSequence = (this.isBusy(false) || this.nStep)? this.nCycles : null; var sComment = (nSequence != null? "cycles" : null); @@ -3594,8 +3635,8 @@ if (DEBUGGER) { var addr = dbgAddr.addr; // we snap dbgAddr.addr *after* calling findSymbol(), which re-evaluates it - if (aSymbol[0] && n) { - if (!nLines && n || aSymbol[0].indexOf('+') < 0) { + if (aSymbol[0] && nLines) { + if (!nPrinted && nLines || aSymbol[0].indexOf('+') < 0) { var sLabel = aSymbol[0] + ':'; if (aSymbol[2]) sLabel += ' ' + aSymbol[2]; this.println(sLabel); @@ -3612,7 +3653,7 @@ if (DEBUGGER) { this.println(sInstruction); this.dbgAddrNextCode = dbgAddr; nBytes -= dbgAddr.addr - addr; - nLines++; + nPrinted++; } }; diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 7828be6d7..7209829a3 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -40,7 +40,7 @@ function n(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window. function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Fb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,ib:!1,Gb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Vb=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ua=this.id:(this.Gb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,jb:!1,Hb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} @@ -62,23 +62,23 @@ function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&( function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} function Vb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.i,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Bb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Ib(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; -h.lb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Jb(b,a);this.C--;return a};h.Cb=function(a,b){this.W[(a&this.f)>>>this.ga].Eb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Ob(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Db=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Pb(c,b&65535,a);this.C--}; +10;a.status(e+"Kb "+jc[d]+" at "+oa(b));return!0}return ac(2,b,c)}function Xb(a,b,c){var d=[];for(b>>>=a.ga;0>>=a.ga;0>>this.ga].Cb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Jb(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; +h.mb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Kb(b,a);this.C--;return a};h.Db=function(a,b){this.W[(a&this.f)>>>this.ga].Fb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Pb(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Eb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Qb(c,b&65535,a);this.C--}; function kc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));lc(a,e,e,g,l,m,p,f[4])}}}function nc(a,b){a.B.push(b)} -function oc(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ea(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Ld:0,Ab:20,bd:0};this.f={Md:0,Nb:-1}}u(K);h=K.prototype; -h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Nb=pc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(qc(e.b,e.f.cd),rc(e.b,e.f.Nb,1E3/60))});this.f.cd=sc(64,6);mc(b,this,L);nc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&rc(this.b,this.f.Nb,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535};h.ed=function(a){this.j.data=a}; -h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,tc(b))}uc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),tc(b));uc(this)}; -function uc(a){a.j.Ab=a.j.Ab&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; +function mc(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Ya)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));lc(a,e,e,g,l,m,p,f[4])}}}function nc(a,b){a.B.push(b)} +function oc(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ea(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Ld:0,Bb:20,bd:0};this.f={Md:0,Ob:-1}}u(K);h=K.prototype; +h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Ob=pc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(qc(e.b,e.f.cd),rc(e.b,e.f.Ob,1E3/60))});this.f.cd=sc(64,6);mc(b,this,L);nc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&rc(this.b,this.f.Ob,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535};h.ed=function(a){this.j.data=a}; +h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,tc(b))}uc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.Ya&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),tc(b));uc(this)}; +function uc(a){a.j.Bb=a.j.Bb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.pa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.wc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]}; -h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.ab=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; -h.fb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.bb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]}; +h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.bb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; +h.gb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.cb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.hb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]}; h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc}; -h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Lb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Lb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.j.Ab=this.j.Ab&-120|20;this.f.Ia=0}; +h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Mb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.j.Bb=this.j.Bb&-120|20;this.f.Ia=0}; var M={},L=(M[62592]=[null,null,K.prototype.Rc,K.prototype.Bd,"SISDR",1145],M[62608]=[null,null,K.prototype.Pc,K.prototype.zd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Qc,K.prototype.Ad,"SISAR",1145],M[62640]=[null,null,K.prototype.Oc,K.prototype.yd,"SDSAR",1145],M[62656]=[null,null,K.prototype.zc,K.prototype.ld,"KISDR",1145],M[62672]=[null,null,K.prototype.xc,K.prototype.jd,"KDSDR",1145],M[62688]=[null,null,K.prototype.yc,K.prototype.kd,"KISAR",1145],M[62704]=[null,null,K.prototype.wc,K.prototype.hd, "KDSAR",1145],M[62798]=[null,null,K.prototype.Fc,K.prototype.pd,"MMR3",1145],M[65382]=[null,null,K.prototype.Ac,K.prototype.md,"LKS"],M[65400]=[null,null,K.prototype.tc,K.prototype.ed,"CNSL"],M[65402]=[null,null,K.prototype.Cc,K.prototype.od,"MMR0",1145],M[65404]=[null,null,K.prototype.Dc,K.prototype.ec,"MMR1",1145],M[65406]=[null,null,K.prototype.Ec,K.prototype.ec,"MMR2",1145],M[65408]=[null,null,K.prototype.Xc,K.prototype.Hd,"UISDR",1145],M[65424]=[null,null,K.prototype.Vc,K.prototype.Fd,"UDSDR", -1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Gd,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Ed,"UDSAR",1145],M[65472]=[null,null,K.prototype.ab,K.prototype.fb,"R0SET0"],M[65473]=[null,null,K.prototype.ab,K.prototype.fb,"R1SET0"],M[65474]=[null,null,K.prototype.ab,K.prototype.fb,"R2SET0"],M[65475]=[null,null,K.prototype.ab,K.prototype.fb,"R3SET0"],M[65476]=[null,null,K.prototype.ab,K.prototype.fb,"R4SET0"],M[65477]=[null,null,K.prototype.ab,K.prototype.fb,"R5SET0"],M[65478]= -[null,null,K.prototype.Ic,K.prototype.sd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Lc,K.prototype.vd,"R7KERNEL"],M[65480]=[null,null,K.prototype.bb,K.prototype.gb,"R0SET1",1145],M[65481]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET1",1145],M[65482]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET1",1145],M[65483]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET1",1145],M[65484]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET1",1145],M[65485]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET1",1145], +1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Gd,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Ed,"UDSAR",1145],M[65472]=[null,null,K.prototype.bb,K.prototype.gb,"R0SET0"],M[65473]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET0"],M[65474]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET0"],M[65475]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET0"],M[65476]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET0"],M[65477]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET0"],M[65478]= +[null,null,K.prototype.Ic,K.prototype.sd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Lc,K.prototype.vd,"R7KERNEL"],M[65480]=[null,null,K.prototype.cb,K.prototype.hb,"R0SET1",1145],M[65481]=[null,null,K.prototype.cb,K.prototype.hb,"R1SET1",1145],M[65482]=[null,null,K.prototype.cb,K.prototype.hb,"R2SET1",1145],M[65483]=[null,null,K.prototype.cb,K.prototype.hb,"R3SET1",1145],M[65484]=[null,null,K.prototype.cb,K.prototype.hb,"R4SET1",1145],M[65485]=[null,null,K.prototype.cb,K.prototype.hb,"R5SET1",1145], M[65486]=[null,null,K.prototype.Jc,K.prototype.td,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Kc,K.prototype.ud,"R6USER",1145],M[65504]=[null,null,K.prototype.vc,K.prototype.gd,"CTRL",1170],M[65520]=[null,null,K.prototype.$b,K.prototype.fc,"LSIZE",1170],M[65522]=[null,null,K.prototype.$b,K.prototype.fc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Tc,K.prototype.Dd,"SYSID",1170],M[65526]=[null,null,K.prototype.uc,K.prototype.fd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Bc,K.prototype.nd, "MB",1170],M[65530]=[null,null,K.prototype.Gc,K.prototype.qd,"PIR"],M[65532]=[null,null,K.prototype.Sc,K.prototype.Cd,"SL"],M[65534]=[null,null,K.prototype.Hc,K.prototype.rd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; @@ -88,41 +88,41 @@ if(Gb){var xc=new ArrayBuffer(2);(new DataView(xc)).setUint16(0,256,!0);wc=256== function I(a,b,c,d,e,f){this.A=a;this.id=zc+=2;this.b=null;this.w=b;this.tb=c;this.size=d||0;this.type=e||Ac;this.f=e==Bc;this.controller=null;Sb(this);this.Ha=this.lc=!1;if(d)if(f)this.controller=f,this.b=null,Cc(this,f.ic);else if(Gb)this.C=new ArrayBuffer(d),this.G=new DataView(this.C,0,d),this.D=new Uint8Array(this.C,0,d),this.I=new Uint16Array(this.C,0,d>>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&oc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,1,c.M)&&c.da(!0)}return this.Ib(a,b)},ba:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,2,c.M)&&c.da(!0)}return this.Jb(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a, -1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Ob(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},aa:function(a,b){a&1&&oc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&oc(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ +k(this.w),!0),this.i.da());return 255},J:function(a,b){this.i&&E(this.i,128)&&(B(this.i,"attempt to write "+k(b,4,!0)+" to invalid block %"+k(this.w),!0),this.i.da())},M:function(a,b){return this.Cb(a++,b++)|this.Cb(a,b)<<8},H:function(a,b,c){this.Fb(a++,b&255,c++);this.Fb(a,b>>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&oc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,1,c.M)&&c.da(!0)}return this.Jb(a,b)},ba:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,2,c.M)&&c.da(!0)}return this.Kb(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a, +1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Qb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},aa:function(a,b){a&1&&oc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&oc(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},va:function(a,b,c){a&1&&oc(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&oc(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; -function Sb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Eb=a.f?a.J:a.Ob,a.ub=a.f?a.H:a.Pb):--a.j||(a.Bb=a.Ib,a.qa=a.Jb)}function Gc(a,b,c){c&&a.B||(a.Eb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Ob=b[1]||a.J,a.Pb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Bb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Ib=b[0]||a.K,a.Jb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} +function Sb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Fb=a.f?a.J:a.Pb,a.ub=a.f?a.H:a.Qb):--a.j||(a.Cb=a.Jb,a.qa=a.Kb)}function Gc(a,b,c){c&&a.B||(a.Fb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Pb=b[1]||a.J,a.Qb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Cb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Jb=b[0]||a.K,a.Kb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} var Lc=[],Fc=[I.prototype.V,I.prototype.ua,I.prototype.ja,I.prototype.xa],Hc=[I.prototype.T,I.prototype.ma,I.prototype.ba,I.prototype.wa];if(Gb)var Ec=[I.prototype.R,I.prototype.la,I.prototype.aa,I.prototype.va],Dc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; -function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Mb=!1;this.v.hb=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.K=[];this.Yb=this.ad.bind(this);G(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; -h.Da=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Ya,c=!0);0<=a.Za&&a.Za<=Tc(a)&&(a.Ya=a.Za=-1,Qc(a),a.da(),c=!0);c&&a.g(Tc(a)+" cycles: checksum="+k(a.nb))}} -h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;c=a.ja&&(a.ja+=a.Za,c=!0);0<=a.$a&&a.$a<=Tc(a)&&(a.Za=a.$a=-1,Qc(a),a.da(),c=!0);c&&a.g(Tc(a)+" cycles: checksum="+k(a.nb))}} +h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function pc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function rc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} function Yc(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 rd(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 Xc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} -h.ad=function(){if(this.v.ca){this.jb>=this.Fa&&Wc(this,!0);this.oa=0;this.xa=Aa();if(this.aa){var a=this.xa-this.aa;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.eb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.oa+=b;this.T+=b;Sc(this,b);rd(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));Fb(this, -e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Yb;this.aa=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.aa-this.xa),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.jb+=this.oa;this.aa+=c;a(b,c)}}}; -h.cb=function(a){if(Eb(this))return!1;if(this.v.ca)return this.g(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Mb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Yb,0);return!0};h.eb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; -function sd(a){this.mb=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.mb?td.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(sd,Mc);h=sd.prototype;h.reset=function(){this.status("model "+this.mb);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; +h.ad=function(){if(this.v.ca){this.kb>=this.Fa&&Wc(this,!0);this.oa=0;this.xa=Aa();if(this.aa){var a=this.xa-this.aa;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.oa+=b;this.T+=b;Sc(this,b);rd(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));Fb(this, +e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Ab;this.aa=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.aa-this.xa),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.kb+=this.oa;this.aa+=c;a(b,c)}}}; +h.eb=function(a){if(rb(this))return!1;if(this.v.ca)return this.g(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Nb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Ab,0);return!0};h.fb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; +function sd(a){this.Ya=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.Ya?td.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(sd,Mc);h=sd.prototype;h.reset=function(){this.status("model "+this.Ya);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; function vd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Lb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&tc(a)}function tc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Vb=function(){return 0}; +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Mb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&tc(a)}function tc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Wb=function(){return 0}; h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,kc(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Uc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Bd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Cd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Dd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Ed(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} h.ea=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Lb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);vc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Fd(this,this.ma);Fd(this,this.u[7]);Ad(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Gd(a){var b=Hd(a),c=Hd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);Ad(a,b);vc(a,c);a.F&=-17} function Id(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.ea(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.ea(168,16)),a.G&61440||!(4191360>f||4194239>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.ea(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; a.b-=8;break;case 6:return e=zd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=zd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.A.zb(a);this.C++;a=Jd(this,Id(this,a,3));this.C--;return a}; -h.lb=function(a){if(!this.Ja)return this.A.lb(a);this.C++;a=this.ac(Id(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Kd(this,Id(this,a,5),b),this.C--):this.A.rb(a,b)};h.Db=function(a,b){this.Ja?(this.C++,this.gc(Id(this,a,4),b),this.C--):this.A.Db(a,b)};h.mc=function(a,b,c){return Ld(this,a,b,c)};h.nc=function(a,b,c){return Id(this,Ld(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Id(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; +h.mb=function(a){if(!this.Ja)return this.A.mb(a);this.C++;a=this.ac(Id(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Kd(this,Id(this,a,5),b),this.C--):this.A.rb(a,b)};h.Eb=function(a,b){this.Ja?(this.C++,this.gc(Id(this,a,4),b),this.C--):this.A.Eb(a,b)};h.mc=function(a,b,c){return Ld(this,a,b,c)};h.nc=function(a,b,c){return Id(this,Ld(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Id(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; h.Id=function(a,b){this.A.Sa(Id(this,a,4),b)};function Md(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=Ld(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Nd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=Ld(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Id(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} function Od(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Qd(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return Ld(a,b,c,8)}function Rd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Sd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Kd(a,e,d.call(a,c,Jd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Td(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?Kd(a,a.Y(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 Ud(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} function S(a,b,c){c&&(Ad(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.eb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Vd(this.i),c=a?this.v.Mb?0:1:-1;this.v.Mb=!1;this.ba=this.b=a;do{if(b){if(Wd(this.i,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Lb&224)>>5;if(a=this.U&&this.U.$a>e?this.U:null)d=a.dd,e=a.$a;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; +h.fb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Vd(this.i),c=a?this.v.Nb?0:1:-1;this.v.Nb=!1;this.ba=this.b=a;do{if(b){if(Wd(this.i,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Mb&224)>>5;if(a=this.U&&this.U.ab>e?this.U:null)d=a.dd,e=a.ab;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(zd(this))}while(0>1|b<<16;Dd(this,a);return a&65535}function be(a,b){a=b&2048|b>>1|b<<8;Dd(this,a<<8);return a&255}function ce(a,b){a=b&~a;P(this,a);return a}function de(a,b){a=b&~a;P(this,a<<8);return a}function ee(a,b){a|=b;P(this,a);return a}function fe(a,b){a|=b;P(this,a<<8);return a} function ge(a,b){a=~b|65536;Bd(this,a);return a&65535}function he(a,b){a=~b|256;Bd(this,a<<8);return a&255}function ie(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function je(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function ke(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function le(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} @@ -139,116 +139,117 @@ function $e(){this.ea(16,4);this.b-=25}var af=[0,7,7,10,7,11,9,13];function bf(a function gf(a){var b=Od(this,a);P(this,Td(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var hf=[7,13,13,17,14,18,17,21];function jf(a){var b=Sd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Ad(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function pf(a){R(this,a,Pd(this,a),se);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} function qf(a){R(this,a,0,ue);this.b-=this.j?9:3+(7==this.f?2:0)}function rf(){this.ea(28,5);this.b-=5}function sf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function tf(a){R(this,a,Pd(this,a),ve);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,B(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ea(8,6)}function td(a){uf[a>>12].call(this,a)}function vf(a){wf[a>>6&3].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)} -function zf(a){Af[a>>6&3].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} +function zf(a){Af[a>>6&3].call(this,a)}function Bf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} var uf=[function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,V,function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],dg=[function(a){fg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,V,V,V],wf=[function(a){Bd(this,Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ie);this.b-=this.j?9:3+(7==this.f?2:0)}],yf=[function(a){R(this,a,0, me);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Xd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,se);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Bd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Af=[function(a){R(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,oe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)}], -fg=[function(a){gg[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,V,Uf,Wf,qf,qf,qf,qf],gg=[Ze,sf,mf,Re,$e,lf,V,V,V,V,V,V,V,V,V,V],Vf=[kf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Xf=[kf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],eg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,V,V,V],Zf=[function(a){Bd(this, +fg=[function(a){gg[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,V,Bf,Wf,qf,qf,qf,qf],gg=[Ze,sf,mf,Re,$e,lf,V,V,V,V,V,V,V,V,V,V],Vf=[kf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Xf=[kf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],eg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,V,V,V],Zf=[function(a){Bd(this, Td(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,le);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,je);this.b-=this.j?9:3+(7==this.f?2:0)}],ag=[function(a){Q(this,a,0,ne);this.b-=this.j?11:6},function(a){Q(this,a,O(this)?1:0,Yd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,O(this)?1:0,te);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Rd(this,a);Bd(this,a<<8);this.b-=this.j?4:3+(7==this.f? 2:0)}],cg=[function(a){Q(this,a,0,re);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,pe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,$d);this.b-=this.j?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} var hg=[function(a){ig[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],ig=[function(a){lg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,function(a){mg[a>>6&3].call(this,a)},V,V],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);Ad(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Md(this,a,0);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c= -this.b;Nd(this,a,0,b);P(this,b);this.b=c-hf[this.j]},function(a){P(this,Ud(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Uf,Wf,qf,qf,qf,qf],ng=[Ze,sf,mf,Re,$e,lf,function(){Gd(this);this.b-=13},V,V,V,V,V,V,V,V,V],jg=[jf,jf,Xe,Xe,xe,xe,ye,ye,tf,tf,V,V,V,V,of,of],kg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,function(a){og[a>>6&3].call(this, +this.b;Nd(this,a,0,b);P(this,b);this.b=c-hf[this.j]},function(a){P(this,Ud(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Bf,Wf,qf,qf,qf,qf],ng=[Ze,sf,mf,Re,$e,lf,function(){Gd(this);this.b-=13},V,V,V,V,V,V,V,V,V],jg=[jf,jf,Xe,Xe,xe,xe,ye,ye,tf,tf,V,V,V,V,of,of],kg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,function(a){og[a>>6&3].call(this, a)},V,V],og=[V,function(a){a=Md(this,a,65536);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c=this.b;Nd(this,a,65536,b);P(this,b);this.b=c-hf[this.j]},V];function pg(a){r.call(this,"ROM",a,pg);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){qg(c,a,b,f)})}}u(pg); -pg.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;rg(this)};pg.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Rb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Qb:f})}delete this.Ba}return!0};pg.prototype.za=function(){return!0}; -function qg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Fb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ +pg.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;rg(this)};pg.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Sb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Rb:f})}delete this.Ba}return!0};pg.prototype.za=function(){return!0}; +function qg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Gb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.za=function(a){return a?this.save():!0};h.reset=function(){wg(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return wg(this)};function wg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Kb=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Gb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.za=function(a){return a?this.save():!0};h.reset=function(){wg(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return wg(this)};function wg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Lb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;rc(this.b,this.V,1)}};var xg={},vg=(xg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],xg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],xg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],xg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],xg);Ta(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yg.prototype.Wb=function(){return-1};yg.prototype.Xb=function(){}; +function yg(a){r.call(this,"Debugger",a,yg);this.ja=a.base||16;this.wa=!1;this.R=this.va=this.H=0;this.U=!1;this.C=-1;this.j=[];this.aa={}}u(yg);var zg={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yg.prototype.Xb=function(){return-1};yg.prototype.Yb=function(){}; function Ag(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(xa(b.substring(c,f))),c=f+1}}return a} function Bg(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 Cg(a,b,c){var d;if(b){b=Dg(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Gg(a,b){if(b)return Fg(a,b,a.aa[b]);var c=0;for(b in a.aa)Fg(a,b,a.aa[b]),c++;return 0>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=jc[c],q&&d.g(k(q.id,8)+" %"+k(e<this.b.Ya?Pg:[];Qg(this,function(a){a:{var b=d.A.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Rg(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=jc[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Xb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; +d.la.value="";Rc(d,a,!0);return!0}return!1}),!0;case "step":return this.J[b]=c,Na(c,function(a){var b=!1;pb(d,!0)||(ob(d,!0),b=d.fb(a?1:0),ob(d,!1));return b}),!0}return!1};h.sb=function(){this.la&&this.la.focus()};h.Y=function(a){a=a&&a.w;null==a&&(a=-1);return a};h.lb=function(a,b){var c=255,d=this.Y(a,!1,1);-1!==d&&(c=a.vb?this.A.zb(d):this.b.zb(d),b&&Sg(a,b));return c};h.ka=function(a,b){var c=65535,d=this.Y(a,!1,2);-1!==d&&(c=a.vb?this.A.mb(d):this.b.mb(d),b&&Sg(a,b));return c}; +h.Db=function(a,b,c){var d=this.Y(a,!0,1);-1!==d&&(a.vb?this.A.rb(d,b):this.b.rb(d,b),c&&Sg(a,c),this.B.$(!0))};h.Sa=function(a,b,c){var d=this.Y(a,!0,2);-1!==d&&(a.vb?this.A.Eb(d,b):this.b.Eb(d,b),c&&Sg(a,c),this.B.$(!0))};function Z(a,b){return{w:a,vb:b,ya:!1}}function Tg(a){return[a.w,a.ya]}function Ug(a){return{w:a[0],ya:a[1]}} +function Rg(a,b,c){var d,e=(c?a.K:a.Oa).w;c=!1;if(void 0!==b){b=Dg(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;ed&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Yb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.qb).w));this.ia&1073741824?this.ua.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; -function Jg(a){var b;if(Vd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} -h.Pa=function(a,b,c){var d=!0;c||Zg(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:($g(this,a,a.length-1,"set"),Jg(this)));return d};function Zg(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Jg(a);break}}return f} -function ah(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y=Ug(C);break;case 8:y="@"+Ug(C);break;case 16:7>C?y="("+Ug(C)+ -")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Ug(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Ug(C)+")";break;case 40:y="@-("+Ug(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Ug(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Ug(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(m=x[1],x=x[0]);0b?(c=Ug(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function fh(a){var b,c="";for(b=0;6>b;b++)c+=eh(a,b);c=c+"\n"+(eh(a,6)+eh(a,7)+eh(a,20));return c+=dh(a,"T")+dh(a,"N")+dh(a,"Z")+dh(a,"V")+dh(a,"C")}h.Rb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.$();a.g("updated registers:")}a.g(fh(a));c&&(a.K=Z(d.u[7]),Xg(a,J(a,a.K.w)))}}function kh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=ch(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} -function bh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Gf&&(rb=1E5,bd=["CALL"]);for(void 0!==Ff&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;If++;rb--}}If||(a.g("no "+Hf+"history available"),a.Va=void 0)}else{var tb=Pg(a,ha);if(tb){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Eh),bc=Eg(a,Ca)>>>0,65536>4||1;Gh--&&0ec?String.fromCharCode(ec):".";cc--}ub&&(ub+="\n");ub+=ha+" "+cd+(0==wb?" "+Lf:"")}ub&&a.g(ub);a.Oa=tb}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.kb,gd=a.Cb):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Pg(a,id);if(fc)for(var gc=2;gc< -g.length;gc++){var xb=Cg(a,g[gc]);if(void 0===xb){a.g("unrecognized value: "+g[gc]);break}xb&~ed&&a.g("warning: "+k(xb)+" exceeds "+Za+"-byte value");var Hh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Hh,Za)+" to "+J(a,xb,Za));gd.call(a,fc,xb,Za)}}break;case "g":a:{var Mf=g[1],Ih=b;if(void 0!==Mf){var jd=Pg(a,Mf,!0);if(!jd)break a;Tg(a,jd,Ih);a.Pa(a.f,jd,!0)}a.cb(!0,c)}break;case "h":a.v.ca?(c||a.g("halting"),a.da()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; -var yb=b.substr(2),yb=xa(yb);Cg(a,yb)?(c||a.g("true: "+yb),kd=!0):(c||a.g("false: "+yb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Jh=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),zb=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,zb.w));10>ld;){for(var Da=null,Kh=256;65536>zb.w>>>0;){md.w=a.ka(zb,2);if(null==zb.w||!Kh--)break;if(!(md.w&1)){for(var Lh=a,hc=md,Nf=null,Ab=hc.w,Of=Ab,nd=1;6>=nd&&Ab;nd++){if(2< -nd){hc.w=Ab;var ic=ch(Lh,hc);if(0<=ic.indexOf("JSR")){var Pf=ic.indexOf(" ");if(Ab+(ic.indexOf(" ",Pf+1)-Pf-1)/2==Of){Nf=ic;break}}}Ab-=2}hc.w=Of;if(Da=Nf)break}}if(!Da||null==Da)break;var Qf=null;if("ks"==Jh){var Rf=Da.match(/[0-9A-F]+$/);Rf&&(Qf=jh(a,Rf[0]))}Da=wa(Da,50)+" ;"+(Qf||"stack="+J(a,zb.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){jh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== -F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bph){if(rh(d,this.I)){this.D=new N(this,"1.30.1","failsafe");rh(this.D)&&(wh(this,d),a=2,xh(this.D));this.D.set("timestamp",Ea());yh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=vh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rh(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.g(f+": "+g),xh(d),rh(d)?(c=vh(d),e=!0):c=!1))}e&&uh(this,c?d:null)}else 2==a&&d.clear()}else uh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(zh(this,this.b,b,c,a),this.b.hb());this.T&&(wh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function wh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} -function mh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.da(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;m>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||ah(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(bh(this,a,a.length-1,"set"),Jg(this)));return d};function ah(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Jg(a);break}}return f} +function ch(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y= +Wg(C);break;case 8:y="@"+Wg(C);break;case 16:7>C?y="("+Wg(C)+")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Wg(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Wg(C)+")";break;case 40:y="@-("+Wg(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Wg(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Wg(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=Wg(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function hh(a){var b,c="";for(b=0;6>b;b++)c+=gh(a,b);c=c+"\n"+(gh(a,6)+gh(a,7)+gh(a,20));return c+=fh(a,"T")+fh(a,"N")+fh(a,"Z")+fh(a,"V")+fh(a,"C")}h.Sb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.$();a.g("updated registers:")}a.g(hh(a));c&&(a.K=Z(d.u[7]),Zg(a,J(a,a.K.w)))}}function mh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=eh(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} +function dh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Hf&&(sb=1E5,bd=["CALL"]);for(void 0!==Gf&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;Jf++;sb--}}Jf||(a.g("no "+If+"history available"),a.Va=void 0)}else{var ub=Rg(a,ha);if(ub){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Gh),bc=Eg(a,Ca)>>>0,65536>4||1;Ih--&&0ec?String.fromCharCode(ec):".";cc--}vb&&(vb+="\n");vb+=ha+" "+cd+(0==xb?" "+Mf:"")}vb&&a.g(vb);a.Oa=ub}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.lb,gd=a.Db):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Rg(a,id);if(fc)for(var gc=2;gc< +g.length;gc++){var yb=Cg(a,g[gc]);if(void 0===yb){a.g("unrecognized value: "+g[gc]);break}yb&~ed&&a.g("warning: "+k(yb)+" exceeds "+Za+"-byte value");var Jh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Jh,Za)+" to "+J(a,yb,Za));gd.call(a,fc,yb,Za)}}break;case "g":a:{var Nf=g[1],Kh=b;if(void 0!==Nf){var jd=Rg(a,Nf,!0);if(!jd)break a;Vg(a,jd,Kh);a.Pa(a.f,jd,!0)}a.eb(!0,c)}break;case "h":a.v.ca?(c||a.g("halting"),a.da()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; +var zb=b.substr(2),zb=xa(zb);Cg(a,zb)?(c||a.g("true: "+zb),kd=!0):(c||a.g("false: "+zb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Lh=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),Ab=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,Ab.w));10>ld;){for(var Da=null,Mh=256;65536>Ab.w>>>0;){md.w=a.ka(Ab,2);if(null==Ab.w||!Mh--)break;if(!(md.w&1)){for(var Nh=a,hc=md,Of=null,Bb=hc.w,Pf=Bb,nd=1;6>=nd&&Bb;nd++){if(2< +nd){hc.w=Bb;var ic=eh(Nh,hc);if(0<=ic.indexOf("JSR")){var Qf=ic.indexOf(" ");if(Bb+(ic.indexOf(" ",Qf+1)-Qf-1)/2==Pf){Of=ic;break}}}Bb-=2}hc.w=Pf;if(Da=Of)break}}if(!Da||null==Da)break;var Rf=null;if("ks"==Lh){var Sf=Da.match(/[0-9A-F]+$/);Sf&&(Rf=lh(a,Sf[0]))}Da=wa(Da,50)+" ;"+(Rf||"stack="+J(a,Ab.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){lh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== +F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;brh){if(th(d,this.I)){this.D=new N(this,"1.30.1","failsafe");th(this.D)&&(yh(this,d),a=2,zh(this.D));this.D.set("timestamp",Ea());Ah(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=xh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?th(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.g(f+": "+g),zh(d),th(d)?(c=xh(d),e=!0):c=!1))}e&&wh(this,c?d:null)}else 2==a&&d.clear()}else wh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(Bh(this,this.b,b,c,a),this.b.ib());this.T&&(yh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function yh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} +function oh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.da(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Rh(a,b,c)}})}else c(a,null)} -function Sh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Dh||ab(!0));m=!1}var g,l,m=!0;Dh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Ph(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Dh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Dh||ab(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ph(b,a,d,!0,e,p):Qh(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Sh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map +h.ra=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.B||(d.v.ha?oh(d,!1,!0):vh(d,d.pb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.ha&&!d.B)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");oh(d,a,!0);!a&&d.R?window&&window.location.reload():d.pb(rh)}else d.reset(),d.b&&d.b.ib()},!0;case "save":if(ra())c.parentNode.removeChild(c);else return this.J[b]= +c,c.onclick=function(){var a=sh(d,!0);if(a){var b=!!(d.f&&!d.H||d.R),c=oh(d,b);b?Ch(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function sh(a,b){var c=a.j;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Dh(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function Dh(a,b){a.j=null;b=Fa(sa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.j=b.data)}catch(d){n(d.message+" ("+c+")")}return a.j}function uh(a){var b=null;a.j&&(b=sa()+"/api/v1/user?req=load&user="+a.j+"&state="+Eh(a,"1.30.1"));return b} +function Ch(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Eh(a,"1.30.1");d.data=c;b=Fa(sa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Th(a,b,c)}})}else c(a,null)} +function Uh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Fh||ab(!0));m=!1}var g,l,m=!0;Fh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Rh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Fh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Fh||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Rh(b,a,d,!0,e,p):Sh(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Uh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map From 0f4cbd6e7b335434e8f7bf812e0841cb273db698 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 16:32:59 -0700 Subject: [PATCH 33/36] Added my first PDP-11 add-on device component (PC11) --- devices/pdp11/README.md | 7 +- .../machine/1120/test/debugger/machine.xml | 5 +- devices/pdp11/machine/1120/test/machine.xml | 4 +- .../machine/1170/panel/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/panel/machine.xml | 4 +- .../machine/1170/test/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/test/machine.xml | 4 +- .../machine/1170/vt100/debugger/machine.xml | 4 +- devices/pdp11/machine/1170/vt100/machine.xml | 4 +- devices/pdp11/rom/README.md | 10 + devices/pdp11/rom/test/README.md | 13 + devices/pdp11/rom/{custom => test}/boot.json | 0 devices/pdp11/rom/test/boot.lst | 538 ++++++++++++++++++ devices/pdp11/rom/{custom => test}/boot.mac | 0 devices/pdp11/rom/{custom => test}/makefile | 0 docs/pcx86/examples/components.xsl | 6 +- modules/pdp11/lib/debugger.js | 2 +- modules/pdp11/lib/defines.js | 17 + modules/pdp11/lib/device.js | 62 +- modules/pdp11/lib/pc11.js | 236 ++++++++ modules/shared/templates/components.xsl | 6 +- package.json | 1 + versions/pc8080/1.30.1/components.xsl | 6 +- versions/pcx86/1.30.1/components.xsl | 6 +- versions/pdpjs/1.30.1/components.xsl | 6 +- versions/pdpjs/1.30.1/pdp11-dbg.js | 411 ++++++------- versions/pdpjs/1.30.1/pdp11.js | 247 ++++---- 27 files changed, 1219 insertions(+), 388 deletions(-) create mode 100644 devices/pdp11/rom/README.md create mode 100644 devices/pdp11/rom/test/README.md rename devices/pdp11/rom/{custom => test}/boot.json (100%) create mode 100644 devices/pdp11/rom/test/boot.lst rename devices/pdp11/rom/{custom => test}/boot.mac (100%) rename devices/pdp11/rom/{custom => test}/makefile (100%) create mode 100644 modules/pdp11/lib/pc11.js diff --git a/devices/pdp11/README.md b/devices/pdp11/README.md index 14b462a76..69ffee6fb 100644 --- a/devices/pdp11/README.md +++ b/devices/pdp11/README.md @@ -7,4 +7,9 @@ permalink: /devices/pdp11/ PDP-11 Device Configurations ---------------------------- -See the list of [PDP-11 Machines](machine/) supported by [PDPjs](/modules/pdp11/), our PDP-11 emulation module. +PDP-11 resources used by [PDPjs](/modules/pdp11/), our PDP-11 emulation module, include: + +* [Loaders](loader/) +* [Machines](machine/) +* [Panels](panel/) +* [ROMs](rom/) diff --git a/devices/pdp11/machine/1120/test/debugger/machine.xml b/devices/pdp11/machine/1120/test/debugger/machine.xml index a0a3f4f2e..dc20b1d3d 100644 --- a/devices/pdp11/machine/1120/test/debugger/machine.xml +++ b/devices/pdp11/machine/1120/test/debugger/machine.xml @@ -5,8 +5,9 @@ - - + + + diff --git a/devices/pdp11/machine/1120/test/machine.xml b/devices/pdp11/machine/1120/test/machine.xml index 4deabff8e..9e25546f2 100644 --- a/devices/pdp11/machine/1120/test/machine.xml +++ b/devices/pdp11/machine/1120/test/machine.xml @@ -5,8 +5,8 @@ - - + +
    diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 8615599f7..e5f973935 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -5,9 +5,9 @@ - + - + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 97dcd5ddb..e69c04ad2 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/test/debugger/machine.xml b/devices/pdp11/machine/1170/test/debugger/machine.xml index df5cb042c..7351f82e9 100644 --- a/devices/pdp11/machine/1170/test/debugger/machine.xml +++ b/devices/pdp11/machine/1170/test/debugger/machine.xml @@ -5,9 +5,9 @@ - + - + diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index bf6ca3e02..779fee551 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index a4bcd50e8..3ef3ce4af 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -5,9 +5,9 @@ - + - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 0630fba34..2f9362178 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -5,9 +5,9 @@ - + - +
    diff --git a/devices/pdp11/rom/README.md b/devices/pdp11/rom/README.md new file mode 100644 index 000000000..0907e7fe0 --- /dev/null +++ b/devices/pdp11/rom/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11 ROMs +permalink: /devices/pdp11/rom/ +--- + +PDP-11 ROMs +----------- + +* [Test ROM](custom/) ([original version](http://skn.noip.me/pdp11/boot.mac) created by [Paul Nankervis](paulnank@hotmail.com)) diff --git a/devices/pdp11/rom/test/README.md b/devices/pdp11/rom/test/README.md new file mode 100644 index 000000000..343b55954 --- /dev/null +++ b/devices/pdp11/rom/test/README.md @@ -0,0 +1,13 @@ +--- +layout: page +title: PDP-11 Test ROM +permalink: /devices/pdp11/rom/test/ +--- + +PDP-11 Test ROM +--------------- + +This isn't a ROM so much as a read-only image that can be loaded in RAM by the ROM component. + +[BOOT.MAC](boot.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce [BOOT.LST](boot.lst), +which was then processed by [FileDump](/modules/filedump/) to produce [BOOT.JSON](boot.json). diff --git a/devices/pdp11/rom/custom/boot.json b/devices/pdp11/rom/test/boot.json similarity index 100% rename from devices/pdp11/rom/custom/boot.json rename to devices/pdp11/rom/test/boot.json diff --git a/devices/pdp11/rom/test/boot.lst b/devices/pdp11/rom/test/boot.lst new file mode 100644 index 000000000..cc1d5876e --- /dev/null +++ b/devices/pdp11/rom/test/boot.lst @@ -0,0 +1,538 @@ + 1 ; BOOT LOADER CODE + 2 ; + 3 ; REBASE HIGHER LINK/BOT:140000 + 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? + 5 + 6 177776 PSW = 177776 + 7 177564 DL11XCSR = 177564 + 8 000064 DL11VEC = 64 + 9 + 10 177546 KW11LKS = 177546 + 11 000100 KW11VEC = 100 + 12 + 13 .ASECT + 14 140000 .=140000 + 15 140000 000005 START: RESET ; 140000 + 16 140002 005037 177776 CLR @#PSW + 17 140006 012706 140000 MOV #START,SP + 18 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR + 19 140016 012700 141121 MOV #BANNER,R0 + 20 140022 004767 140150' JSR PC,PRINT + 21 140026 012737 140124 000100 MOV #CLKAST,@#KW11VEC + 22 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 + 23 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING + 24 + 25 140050 012700 141173 MOV #PROMPT,R0 + 26 140054 004767 140150' JSR PC,PRINT + 27 140060 162706 000256 SUB #256,SP + 28 140064 010600 MOV SP,R0 + 29 140066 004767 140244' JSR PC,INPUT + 30 140072 005000 CLR R0 + 31 140074 000001 1$: WAIT + 32 140076 005200 INC R0 + 33 140100 005767 140120' TST LGHTON + 34 140104 001773 BEQ 1$ + 35 140106 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG + 36 140112 016746 140120' MOV LGHTON,-(SP) ; CALL SUPER LOOP START + 37 140116 000002 RTI + 38 + 39 140120 000000 LGHTON: .WORD 0 + 40 140122 000000 CLKTIC: .WORD 0 + 41 + 42 CLKAST: ; 140124 + 43 140124 005267 140122' INC CLKTIC + 44 140130 000002 RTI + 45 + 46 ONECHR: + 47 140132 105737 177564 TSTB @#DL11XCSR ; 140132 + 48 140136 100375 BPL ONECHR + 49 140140 110037 177566 MOVB R0,@#177566 + 50 140144 000207 RTS PC + 51 + 52 140146 000000 PRTPTR: .WORD 0 ; 140146 + 53 + 54 PRINT: ; 140150 + 55 140150 132737 000100 177564 BITB #100,@#DL11XCSR + 56 140156 001374 BNE PRINT + 57 140160 010067 140146' MOV R0,PRTPTR + 58 140164 012737 140210 000064 MOV #PRTAST,@#DL11VEC + 59 140172 012737 000200 000066 MOV #200,@#DL11VEC+2 + 60 140200 152737 000100 177564 BISB #100,@#DL11XCSR + 61 140206 000207 RTS PC + 62 + 63 PRTAST: ; 140210 + 64 140210 105777 140146' TSTB @PRTPTR + 65 140214 001406 BEQ 2$ + 66 140216 117737 140146' 177566 MOVB @PRTPTR,@#177566 + 67 140224 005267 140146' INC PRTPTR + 68 140230 000002 RTI + 69 140232 105037 177564 2$: CLRB @#177564 + 70 140236 000002 RTI + 71 + 72 140240 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER + 73 140242 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH + 74 + 75 INPUT: + 76 140244 010067 140240' MOV R0,BUFFER ; 140244 + 77 140250 005067 140242' CLR LENGTH + 78 140254 012737 140300 000060 MOV #INPAST,@#60 + 79 140262 012737 000200 000062 MOV #200,@#62 + 80 140270 152737 000100 177560 BISB #100,@#177560 + 81 140276 000207 RTS PC + 82 + 83 INPAST: ; 140300 + 84 140300 010046 MOV R0,-(SP) + 85 140302 113700 177562 MOVB @#177562,R0 + 86 140306 120027 000015 CMPB R0,#15 + 87 140312 001455 BEQ 7$ ; CARRIAGE RETURN + 88 140314 120027 000177 CMPB R0,#127. + 89 140320 001403 BEQ 2$ ; + 90 140322 120027 000010 CMPB R0,#10 + 91 140326 001012 BNE 4$ ; BACK SPACE + 92 140330 005767 140242' 2$: TST LENGTH ; DATA IN BUFFER? + 93 140334 001406 BEQ 3$ + 94 140336 005367 140242' DEC LENGTH ; LENGTH + 95 140342 012700 141037 MOV #DEL,R0 + 96 140346 004767 140150' JSR PC,PRINT + 97 140352 000453 3$: BR 9$ + 98 140354 120027 000040 4$: CMPB R0,#40 + 99 140360 002450 BLT 9$ ; BELOW SPACE + 100 140362 120027 000177 CMPB R0,#177 + 101 140366 002045 BGE 9$ ; SKIP STUFF TOO BIG + 102 140370 004767 140132' JSR PC,ONECHR ; ECHO CHAR + 103 140374 120027 000172 CMPB R0,#172 + 104 140400 003005 BGT 5$ ; ABOVE Z + 105 140402 120027 000141 CMPB R0,#141 + 106 140406 002402 BLT 5$ ; BELOW A + 107 140410 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE + 108 140414 026727 140242' 000254 5$: CMP LENGTH,#254 + 109 140422 002027 BGE 9$ + 110 140424 110046 MOVB R0,-(SP) + 111 140426 016700 140240' MOV BUFFER,R0 + 112 140432 066700 140242' ADD LENGTH,R0 + 113 140436 112610 MOVB (SP)+,(R0) + 114 140440 005267 140242' INC LENGTH + 115 140444 000416 BR 9$ + 116 + 117 140446 016700 140240' 7$: MOV BUFFER,R0 + 118 140452 066700 140242' ADD LENGTH,R0 + 119 140456 105010 CLRB (R0) + 120 140460 012737 140506 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 + 121 140466 012737 000100 000242 MOV #100,@#242 + 122 140474 012737 002000 177772 MOV #2000,@#177772 + 123 140502 012600 9$: MOV (SP)+,R0 + 124 140504 000002 RTI + 125 + 126 CMD: ; 140506 + 127 140506 005037 177772 CLR @#177772 ; NO MORE PIR CALLS + 128 140512 010046 MOV R0,-(SP) + 129 140514 010146 MOV R1,-(SP) + 130 140516 010246 MOV R2,-(SP) + 131 140520 010346 MOV R3,-(SP) + 132 140522 010446 MOV R4,-(SP) + 133 140524 012700 141034 MOV #EOL,R0 + 134 140530 004767 140150' JSR PC,PRINT + 135 140534 132737 000100 177564 1$: BITB #100,@#177564 + 136 140542 001374 BNE 1$ + 137 140544 005004 CLR R4 + 138 140546 012703 141043 MOV #CMDLST,R3 ; CMD LIST + 139 140552 112300 3$: MOVB (R3)+,R0 + 140 140554 001431 BEQ 13$ + 141 140556 016702 140240' MOV BUFFER,R2 ; USER CMD + 142 140562 112201 4$: MOVB (R2)+,R1 + 143 140564 001431 BEQ 15$ ; NULL COMMAND? + 144 140566 120127 000040 CMPB R1,#40 + 145 140572 001773 BEQ 4$ ; SKIP SPACE + 146 140574 120001 5$: CMPB R0,R1 + 147 140576 001010 BNE 7$ + 148 140600 112300 MOVB (R3)+,R0 + 149 140602 001412 BEQ 9$ + 150 140604 112201 MOVB (R2)+,R1 + 151 140606 001410 BEQ 9$ + 152 140610 120127 000040 CMPB R1,#40 + 153 140614 001367 BNE 5$ + 154 140616 000404 BR 9$ + 155 140620 112300 7$: MOVB (R3)+,R0 + 156 140622 001376 BNE 7$ + 157 140624 005204 INC R4 + 158 140626 000751 BR 3$ + 159 140630 006304 9$: ASL R4 + 160 140632 004774 140700 JSR PC,@CMDTBL(R4) ; EXECUTE + 161 140636 000404 BR 15$ + 162 + 163 140640 012700 141077 13$: MOV #UNKMSG,R0 + 164 140644 004767 140150' JSR PC,PRINT + 165 + 166 140650 005067 140242' 15$: CLR LENGTH + 167 140654 012700 141173 MOV #PROMPT,R0 + 168 140660 004767 140150' JSR PC,PRINT + 169 140664 012604 MOV (SP)+,R4 + 170 140666 012603 MOV (SP)+,R3 + 171 140670 012602 MOV (SP)+,R2 + 172 140672 012601 MOV (SP)+,R1 + 173 140674 012600 MOV (SP)+,R0 + 174 140676 000002 RTI + 175 + 176 + 177 140700 142072 141266 141302 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP + 140706 141406 141254 + 178 140712 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> + 140715 115 101 116 + 140720 104 123 040 + 140723 101 122 105 + 140726 040 102 117 + 140731 117 124 054 + 140734 040 110 101 + 140737 114 124 054 + 140742 040 114 111 + 140745 107 110 124 + 140750 123 054 040 + 140753 124 105 123 + 140756 124 040 101 + 140761 116 104 040 + 140764 110 105 114 + 140767 120 015 012 + 140772 102 117 117 + 140775 124 040 104 + 141000 105 126 111 + 141003 103 105 123 + 141006 040 101 122 + 141011 105 040 122 + 141014 113 077 040 + 141017 122 114 077 + 141022 040 117 122 + 141025 040 122 120 + 141030 077 015 012 + 141033 000 + 179 141034 015 012 000 EOL: .BYTE 15,12,0 + 180 141037 010 040 010 DEL: .BYTE 10,40,10,0 + 141042 000 + 181 141043 102 117 117 CMDLST: .ASCIZ 'BOOT' + 141046 124 000 + 182 141050 110 101 114 .ASCIZ 'HALT' + 141053 124 000 + 183 141055 124 105 123 .ASCIZ 'TEST' + 141060 124 000 + 184 141062 114 111 107 .ASCIZ 'LIGHTS' + 141065 110 124 123 + 141070 000 + 185 141071 110 105 114 .ASCIZ 'HELP' + 141074 120 000 + 186 141076 000 .BYTE 0 + 187 141077 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> + 141102 116 117 127 + 141105 116 040 103 + 141110 117 115 115 + 141113 101 116 104 + 141116 012 015 000 + 188 141121 120 101 125 BANNER: .ASCIZ 'PAUL NANKERVIS - PAULNANK@HOTMAIL.COM'<12><15><12><15> + 141124 114 040 116 + 141127 101 116 113 + 141132 105 122 126 + 141135 111 123 040 + 141140 055 040 120 + 141143 101 125 114 + 141146 116 101 116 + 141151 113 100 110 + 141154 117 124 115 + 141157 101 111 114 + 141162 056 103 117 + 141165 115 012 015 + 141170 012 015 000 + 189 141173 102 117 117 PROMPT: .ASCIZ 'BOOT> ' + 141176 124 076 040 + 141201 000 + 190 141202 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> + 141205 116 117 127 + 141210 116 040 102 + 141213 117 117 124 + 141216 040 104 105 + 141221 126 111 103 + 141224 105 012 015 + 141227 000 + 191 141230 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> + 141233 040 040 040 + 141236 103 114 117 + 141241 103 113 040 + 141244 124 111 103 + 141247 113 123 012 + 141252 015 000 + 192 + 193 .EVEN + 194 + 195 HELP: ; 141244 + 196 141254 012700 140712 MOV #HLPMSG,R0 + 197 141260 004767 140150' JSR PC,PRINT + 198 141264 000207 RTS PC + 199 + 200 HALT: ; 141260 + 201 141266 000000 HALT + 202 141270 012700 141034 MOV #EOL,R0 + 203 141274 004767 140150' JSR PC,PRINT + 204 141300 000207 RTS PC + 205 + 206 TEST: ; 141272 + 207 141302 005067 140122' CLR CLKTIC + 208 + 209 141306 012705 015000 MOV #15000,R5 + 210 141312 010537 177570 10$: MOV R5,@#177570 ; DISPLAY + 211 141316 010504 MOV R5,R4 + 212 141320 006204 ASR R4 + 213 141322 005000 15$: CLR R0 + 214 141324 010501 MOV R5,R1 + 215 141326 071004 DIV R4,R0 + 216 141330 010002 MOV R0,R2 + 217 141332 070204 MUL R4,R2 + 218 141334 060301 ADD R3,R1 + 219 141336 020105 CMP R1,R5 + 220 141340 001401 BEQ 20$ + 221 141342 000000 HALT + 222 141344 077412 20$: SOB R4,15$ + 223 141346 077517 SOB R5,10$ + 224 + 225 141350 012700 141235 MOV #PERMSG+5,R0 + 226 141354 016703 140122' MOV CLKTIC,R3 + 227 + 228 141360 005002 25$: CLR R2 ; 141350 + 229 141362 071227 000010 DIV #10,R2 + 230 141366 062703 000060 ADD #'0,R3 + 231 141372 110340 MOVB R3,-(R0) + 232 141374 010203 MOV R2,R3 + 233 141376 001370 BNE 25$ + 234 + 235 141400 004767 140150' JSR PC,PRINT + 236 141404 000207 RTS PC + 237 + 238 + 239 177572 MMR0=177572 + 240 177574 MMR1=177574 + 241 177576 MMR2=177576 + 242 172516 MMR3=172516 + 243 + 244 LIGHTS: ; 141376 + 245 141406 012703 077406 MOV #77406,R3 ; DEFAULT PDR + 246 141412 005002 CLR R2 + 247 141414 005001 CLR R1 + 248 141416 012700 000010 MOV #8.,R0 + 249 141422 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR + 250 141426 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR + 251 141432 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR + 252 141436 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR + 253 141442 010361 172200 MOV R3,172200(R1) ; SUPER I PDR + 254 141446 010261 172240 MOV R2,172240(R1) ; SUPER I PAR + 255 141452 010361 172220 MOV R3,172220(R1) ; SUPER D PDR + 256 141456 010261 172260 MOV R2,172260(R1) ; SUPER D PAR + 257 141462 010361 177600 MOV R3,177600(R1) ; USER I PDR + 258 141466 010261 177640 MOV R2,177640(R1) ; USER I PAR + 259 141472 010361 177620 MOV R3,177620(R1) ; USER D PDR + 260 141476 010361 177660 MOV R3,177660(R1) ; USER D PAR + 261 141502 062702 000200 ADD #200,R2 + 262 141506 062701 000002 ADD #2,R1 + 263 141512 077035 SOB R0,1$ + 264 141514 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE + 265 141522 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE + 266 141530 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE + 267 141536 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT + 268 141544 012737 000001 177572 MOV #1,@#MMR0 + 269 + 270 141552 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 + 271 141560 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 + 272 141566 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER + 273 + 274 141574 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS + 275 141600 012702 141626 MOV #SUPERS,R2 ; ADDRESS SUPER CODE + 276 141604 012246 10$: MOV (R2)+,-(SP) + 277 141606 006623 MTPI (R3)+ + 278 141610 020227 142072 CMP R2,#SUPERE + 279 141614 103773 BLO 10$ + 280 + 281 141616 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK + 282 141624 000207 RTS PC + 283 + 284 ; + 285 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 + 286 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS + 287 ; + 288 SUPERS: ; 141616 + 289 141626 012700 000037 MOV #37,R0 ; LOAD PATTERN + 290 141632 012701 174000 MOV #174000,R1 + 291 141636 032737 000001 177570 BIT #1,@#177570 + 292 141644 001414 BEQ 10$ + 293 141646 012700 007417 MOV #7417,R0 + 294 141652 010001 MOV R0,R1 + 295 141654 005101 COM R1 + 296 141656 032737 000002 177570 BIT #2,@#177570 + 297 141664 001404 BEQ 10$ + 298 141666 012700 036163 MOV #36163,R0 + 299 141672 012701 037000 MOV #37000,R1 + 300 141676 010102 10$: MOV R1,R2 + 301 141700 162702 000002 SUB #2,R2 + 302 141704 042702 000001 BIC #1,R2 ; WAIT ADDRESS + 303 141710 010203 MOV R2,R3 + 304 141712 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET + 305 141716 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT + 306 141724 062703 000002 ADD #2,R3 + 307 141730 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) + 308 + 309 141736 010204 MOV R2,R4 + 310 141740 072427 177772 ASH #-6,R4 + 311 141744 042704 177600 BIC #177600,R4 + 312 141750 012705 001700 MOV #1700,R5 + 313 141754 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT + 314 141756 010204 MOV R2,R4 + 315 141760 072427 177764 ASH #-12.,R4 + 316 141764 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET + 317 141770 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE + 318 + 319 141774 010103 MOV R1,R3 + 320 141776 072327 177764 ASH #-12.,R3 + 321 142002 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET + 322 142006 020304 CMP R3,R4 ; SAME PAR + 323 142010 001412 BEQ 30$ + 324 142012 010104 MOV R1,R4 + 325 142014 072427 177772 ASH #-6,R4 + 326 142020 042704 177600 BIC #177600,R4 + 327 142024 012705 001700 MOV #1700,R5 + 328 142030 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP + 329 142032 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE + 330 30$: + 331 142036 012704 000003 MOV #3,R4 + 332 142042 063704 177570 ADD @#177570,R4 + 333 142046 012703 000002 MOV #2,R3 + 334 142052 060703 ADD PC,R3 + 335 142054 000112 40$: JMP (R2) + 336 142056 077402 SOB R4,40$ + 337 142060 010002 MOV R0,R2 + 338 142062 006002 ROR R2 ; ROTATE PATTERN + 339 142064 006101 ROL R1 + 340 142066 006000 ROR R0 + 341 142070 000702 BR 10$ + 342 SUPERE: + 343 + 344 BOOT: ; 142062 + 345 142072 005003 CLR R3 ; UNIT + 346 142074 112201 1$: MOVB (R2)+,R1 + 347 142076 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 + 348 142100 120127 000040 CMPB R1,#40 + 349 142104 001773 BEQ 1$ + 350 142106 120127 000122 CMPB R1,#'R + 351 142112 001405 BEQ 5$ + 352 + 353 142114 012700 141202 MOV #BADBOO,R0 + 354 142120 004767 140150' JSR PC,PRINT + 355 142124 000207 RTS PC + 356 + 357 142126 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P + 358 142130 112200 7$: MOVB (R2)+,R0 ; DIGIT + 359 142132 001416 BEQ 9$ + 360 142134 120027 000040 CMPB R0,#40 + 361 142140 001413 BEQ 9$ + 362 142142 120027 000067 CMPB R0,#'7 + 363 142146 003031 BGT 11$ + 364 142150 162700 000060 SUB #'0,R0 + 365 142154 002426 BLT 11$ + 366 142156 006303 ASL R3 + 367 142160 006303 ASL R3 + 368 142162 006303 ASL R3 + 369 142164 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT + 370 142166 000760 BR 7$ + 371 142170 005002 9$: CLR R2 + 372 142172 012722 000137 MOV #137,(R2)+ + 373 142176 012722 140000 MOV #START,(R2)+ + 374 142202 012722 140000 MOV #START,(R2)+ + 375 142206 005022 CLR (R2)+ + 376 142210 120127 000113 CMPB R1,#'K + 377 142214 001476 BEQ BOOTRK + 378 142216 120127 000114 CMPB R1,#'L + 379 142222 001410 BEQ BOOTRL + 380 142224 120127 000120 CMPB R1,#'P + 381 142230 001517 BEQ BOOTRP + 382 + 383 142232 012700 141077 11$: MOV #UNKMSG,R0 + 384 142236 004767 140150' JSR PC,PRINT + 385 142242 000207 RTS PC + 386 + 387 174400 RLCS=174400 + 388 BOOTRL: ; 142234 + 389 142244 000005 RESET + 390 142246 000303 SWAB R3 ; UNIT NUMBER + 391 142250 012701 174400 MOV #RLCS,R1 ; CSR + 392 142254 012761 000013 000004 MOV #13,4(R1) ; CLR ERR + 393 142262 052703 000004 BIS #4,R3 ; UNIT+GSTAT + 394 142266 010311 MOV R3,(R1) ; ISSUE CMD + 395 142270 105711 TSTB (R1) ; WAIT + 396 142272 100376 BPL .-2 + 397 142274 105003 CLRB R3 + 398 142276 052703 000010 BIS #10,R3 ; UNIT+RDHDR + 399 142302 010311 MOV R3,(R1) ; ISSUE CMD + 400 142304 105711 TSTB (R1) ; WAIT + 401 142306 100376 BPL .-2 + 402 142310 016102 000006 MOV 6(R1),R2 ; GET HDR + 403 142314 042702 000077 BIC #77,R2 ; CLR SECTOR + 404 142320 005202 INC R2 ; MAGIC BIT + 405 142322 010261 000004 MOV R2,4(R1) ; SEEK TO 0 + 406 142326 105003 CLRB R3 + 407 142330 052703 000006 BIS #6,R3 ; UNIT+SEEK + 408 142334 010311 MOV R3,(R1) ; ISSUE CMD + 409 142336 105711 TSTB (R1) ; WAIT + 410 142340 100376 BPL .-2 + 411 142342 005061 000002 CLR 2(R1) ; CLR BA + 412 142346 005061 000004 CLR 4(R1) ; CLR DA + 413 142352 012761 177000 000006 MOV #-512.,6(R1) ; SET WC + 414 142360 105003 CLRB R3 + 415 142362 052703 000014 BIS #14,R3 ; UNIT+READ + 416 142366 010311 MOV R3,(R1) ; ISSUE CMD + 417 142370 105711 TSTB (R1) ; WAIT + 418 142372 100376 BPL .-2 + 419 142374 042711 000377 BIC #377,(R1) + 420 142400 005002 CLR R2 + 421 142402 005003 CLR R3 + 422 142404 005004 CLR R4 + 423 142406 005005 CLR R5 + 424 142410 005007 CLR PC + 425 + 426 177412 RKDA=177412 + 427 000005 READGO=5 + 428 BOOTRK: + 429 142412 000005 RESET ; 142402 + 430 142414 000303 SWAB R3 ; UNIT NUMBER + 431 142416 006303 ASL R3 + 432 142420 006303 ASL R3 + 433 142422 006303 ASL R3 + 434 142424 006303 ASL R3 + 435 142426 006303 ASL R3 + 436 142430 012701 177412 MOV #RKDA,R1 ; CSR + 437 142434 010311 MOV R3,(R1) ; LOAD DA + 438 142436 005041 CLR -(R1) ; CLEAR BA + 439 142440 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC + 440 142444 012741 000005 MOV #READGO,-(R1) ; READ & GO + 441 142450 005002 CLR R2 + 442 142452 005003 CLR R3 + 443 142454 005004 CLR R4 + 444 142456 005005 CLR R5 + 445 142460 105711 TSTB (R1) + 446 142462 100376 BPL .-2 + 447 142464 105011 CLRB (R1) + 448 142466 005007 CLR PC + 449 + 450 176700 RPCSR=0176700 + 451 BOOTRP: ; 142460 + 452 142470 000005 RESET + 453 142472 012701 176700 MOV #RPCSR, R1 + 454 142476 012761 000040 000010 MOV #0000040, 10(R1) ; RESET + 455 142504 010361 000010 MOV R3, 10(R1) ; SET UNIT + 456 142510 012711 000021 MOV #0000021, (R1) ; PACK ACK + 457 142514 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE + 458 142522 012761 177000 000002 MOV #-512., 2(R1) ; SET WC + 459 142530 005061 000004 CLR 4(R1) ; CLR BA + 460 142534 005061 000006 CLR 6(R1) ; CLR DA + 461 142540 005061 000034 CLR 34(R1) ; CLR CYL + 462 142544 012711 000071 MOV #0000071, (R1) ; READ + 463 142550 105711 TSTB (R1) ; WAIT + 464 142552 100376 BPL .-2 + 465 142554 105011 CLRB (R1) + 466 142556 010300 MOV R3,R0 + 467 142560 005007 CLR PC + 468 + 469 .END START + 469 diff --git a/devices/pdp11/rom/custom/boot.mac b/devices/pdp11/rom/test/boot.mac similarity index 100% rename from devices/pdp11/rom/custom/boot.mac rename to devices/pdp11/rom/test/boot.mac diff --git a/devices/pdp11/rom/custom/makefile b/devices/pdp11/rom/test/makefile similarity index 100% rename from devices/pdp11/rom/custom/makefile rename to devices/pdp11/rom/test/makefile diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl index 43f7691f9..a7246cf44 100644 --- a/docs/pcx86/examples/components.xsl +++ b/docs/pcx86/examples/components.xsl @@ -712,16 +712,16 @@ - + - + device - ,name:'' + ,type:'' diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index d66741a2f..7c0499d18 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1644,7 +1644,7 @@ if (DEBUGGER) { if (cpu.isRunning()) { cpu.setPC(this.cpu.getLastPC()); this.stopCPU(); - return true; + throw -1; // TODO: Review the appropriate-ness of throwing a bogus vector number in order to immediately stop the instruction } return false; }; diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 021bd0704..7446f09b7 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -425,6 +425,9 @@ var PDP11 = { LKS: 0o177546, // KW11-L Clock Status + PRS: 0o177550, // PC11/PR11 Reader Status Register + PRB: 0o177552, // PC11/PR11 Reader Buffer Register + RCSR: 0o177560, // Display Terminal: Receiver Status Register RBUF: 0o177562, // Display Terminal: Receiver Data Buffer Register XCSR: 0o177564, // Display Terminal: Transmitter Status Register @@ -507,6 +510,20 @@ var PDP11 = { SL: 0o177774, // Stack Limit Register PSW: 0o177776 // 777776 17777776 0x3FFFFE Processor Status Word }, + PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit) + PRS: { + RE: 0x0001, // Reader Enable (W/O) + RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt) + DONE: 0x0080, // Done (R/O) + BUSY: 0x0800, // Busy (R/O) + ERROR: 0x8000, // Error (R/O) + CLEAR: 0x08C0, // bits cleared on INIT + WMASK: 0x0041 // bits writable + }, + PRB: { + MASK: 0x00FF // Data + } + }, DL11: { // Serial Line Interface (program compatible with the KL11 for control of console teleprinters) PRI: 4, RVEC: 0o60, diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 567d0115b..d892c0e7f 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -39,6 +39,7 @@ if (NODE) { var State = require("../../shared/lib/state"); var BusPDP11 = require("./bus"); var MessagesPDP11 = require("./messages"); + var PC11 = require("./pc11"); } /** @@ -137,6 +138,31 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.setReady(); }; +/** + * reset() + * + * @this {DevicePDP11} + */ +DevicePDP11.prototype.reset = function() +{ + this.console.misc = (this.console.misc & ~0x77) | 0x14; // kernel 16 bit + this.kw11.lks = 0; +}; + +/** + * kw11_interrupt() + * + * @this {DevicePDP11} + */ +DevicePDP11.prototype.kw11_interrupt = function() +{ + this.kw11.lks |= PDP11.KW11.LKS.MON; + if (this.kw11.lks & PDP11.KW11.LKS.IE) { + this.cpu.setTrigger(this.kw11.trigger); + this.cpu.setTimer(this.kw11.timer, 1000/60); + } +}; + /** * readLKS(addr) * @@ -1028,33 +1054,6 @@ DevicePDP11.prototype.writeIgnored = function(data, addr) } }; -/** - * kw11_interrupt() - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.kw11_interrupt = function() -{ - this.kw11.lks |= PDP11.KW11.LKS.MON; - if (this.kw11.lks & PDP11.KW11.LKS.IE) { - this.cpu.setTrigger(this.kw11.trigger); - this.cpu.setTimer(this.kw11.timer, 1000/60); - } -}; - -/** - * reset() - * - * Formerly reset_iopage(). - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.reset = function() -{ - this.console.misc = (this.console.misc & ~0x77) | 0x14; // kernel 16 bit - this.kw11.lks = 0; -}; - /* * ES6 ALERT: As you can see below, I've finally started using computed property names. */ @@ -1220,11 +1219,16 @@ DevicePDP11.init = function() { var aeDevice = Component.getElementsByClass(document, PDP11.APPCLASS, "device"); for (var iDevice = 0; iDevice < aeDevice.length; iDevice++) { + var device; var eDevice = aeDevice[iDevice]; var parmsDevice = Component.getComponentParms(eDevice); - switch(parmsDevice['name']) { + switch(parmsDevice['type']) { case 'default': - var device = new DevicePDP11(parmsDevice); + device = new DevicePDP11(parmsDevice); + Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); + break; + case 'pc11': + device = new PC11(parmsDevice); Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); break; } diff --git a/modules/pdp11/lib/pc11.js b/modules/pdp11/lib/pc11.js new file mode 100644 index 000000000..e1e6f74c8 --- /dev/null +++ b/modules/pdp11/lib/pc11.js @@ -0,0 +1,236 @@ +/** + * @fileoverview Implements the PC11 High-Speed Paper Tape Reader/Punch + * @author Jeff Parsons + * @copyright © Jeff Parsons 2012-2016 + * + * This file is part of PCjs, a computer emulation software project at . + * + * PCjs is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCjs. If not, + * see . + * + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . + * + * Some PCjs files also attempt to load external resource files, such as character-image files, + * ROM files, and disk image files. Those external resource files are not considered part of PCjs + * for purposes of the GNU General Public License, and the author does not claim any copyright + * as to their contents. + */ + +"use strict"; + +if (NODE) { + var str = require("../../shared/lib/strlib"); + var web = require("../../shared/lib/weblib"); + var Component = require("../../shared/lib/component"); + var State = require("../../shared/lib/state"); + var PDP11 = require("./defines"); + var MessagesPDP11 = require("./messages"); +} + +/** + * PC11(parms) + * + * @constructor + * @extends Component + * @param {Object} parms + */ +function PC11(parms) +{ + Component.call(this, "PC11", parms, PC11); + + /* + * TODO: Technically, the PC11 should have a timer that "clocks" data from the abReader buffer into the + * PRB register at the appropriate rate (300 CPS for the high-speed version, 10 CPS for the low-speed version). + */ + this.prs = 0; // PRS register + this.prb = 0; // PRB register + this.iReader = 0; // buffer index + this.abReader = []; // buffer for the PRB register +} + +Component.subclass(PC11); + +/** + * setBinding(sType, sBinding, control, sValue) + * + * @this {PC11} + * @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc) + * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "buffer") + * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) + * @param {string} [sValue] optional data value + * @return {boolean} true if binding was successful, false if unrecognized binding request + */ +PC11.prototype.setBinding = function(sType, sBinding, control, sValue) +{ + return false; +}; + +/** + * initBus(cmp, bus, cpu, dbg) + * + * @this {PC11} + * @param {ComputerPDP11} cmp + * @param {BusPDP11} bus + * @param {CPUStatePDP11} cpu + * @param {DebuggerPDP11} dbg + */ +PC11.prototype.initBus = function(cmp, bus, cpu, dbg) +{ + this.cmp = cmp; + this.bus = bus; + this.cpu = cpu; + this.dbg = dbg; + this.setReady(); +}; + +/** + * powerUp(data, fRepower) + * + * @this {PC11} + * @param {Object|null} data + * @param {boolean} [fRepower] + * @return {boolean} true if successful, false if failure + */ +PC11.prototype.powerUp = function(data, fRepower) +{ + if (!fRepower) { + if (!data || !this.restore) { + this.reset(); + } else { + if (!this.restore(data)) return false; + } + } + return true; +}; + +/** + * powerDown(fSave, fShutdown) + * + * @this {PC11} + * @param {boolean} [fSave] + * @param {boolean} [fShutdown] + * @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure + */ +PC11.prototype.powerDown = function(fSave, fShutdown) +{ + return fSave? this.save() : true; +}; + +/** + * reset() + * + * @this {PC11} + */ +PC11.prototype.reset = function() +{ + this.prs &= ~PDP11.PC11.PRS.CLEAR; + this.prb = 0; + this.iReader = 0; + this.abReader = []; +}; + +/** + * save() + * + * This implements save support for the PC11 component. + * + * @this {PC11} + * @return {Object} + */ +PC11.prototype.save = function() +{ + var state = new State(this); + return state.data(); +}; + +/** + * restore(data) + * + * This implements restore support for the PC11 component. + * + * @this {PC11} + * @param {Object} data + * @return {boolean} true if successful, false if failure + */ +PC11.prototype.restore = function(data) +{ + return true; +}; + +/** + * readPRS(addr) + * + * @this {PC11} + * @param {number} addr (eg, PDP11.UNIBUS.PRS or 177550) + * @return {number} + */ +PC11.prototype.readPRS = function(addr) +{ + return this.prs; +}; + +/** + * writePRS(data, addr) + * + * @this {PC11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.PRS or 177550) + */ +PC11.prototype.writePRS = function(data, addr) +{ + if (data & PDP11.PC11.PRS.RE) { + if (this.prs & PDP11.PC11.PRS.ERROR) { + data &= ~PDP11.PC11.PRS.RE; + // if (this.prs & PDP11.PC11.PRS.RIE) { + // TODO: Generate an interrupt + // } + } else { + this.prs &= ~PDP11.PC11.PRS.DONE; + this.prs |= PDP11.PC11.PRS.BUSY; + } + } + this.prs = (this.prs & ~PDP11.PC11.PRS.WMASK) | (data & PDP11.PC11.PRS.WMASK); +}; + +/** + * readPRB(addr) + * + * @this {PC11} + * @param {number} addr (eg, PDP11.UNIBUS.PRB or 177552) + * @return {number} + */ +PC11.prototype.readPRB = function(addr) +{ + return this.prb; +}; + +/** + * writePRB(data, addr) + * + * @this {PC11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.PRB or 177552) + */ +PC11.prototype.writePRB = function(data, addr) +{ +}; + +/* + * ES6 ALERT: As you can see below, I've finally started using computed property names. + */ +PC11.UNIBUS_IOTABLE = { + [PDP11.UNIBUS.PRS]: /* 177550 */ [null, null, PC11.prototype.readPRS, PC11.prototype.writePRS, "PRS"], + [PDP11.UNIBUS.PRB]: /* 177552 */ [null, null, PC11.prototype.readPRB, PC11.prototype.writePRB, "PRB"] +}; + +if (NODE) module.exports = PC11; diff --git a/modules/shared/templates/components.xsl b/modules/shared/templates/components.xsl index 7b72d6fb9..35c18170b 100644 --- a/modules/shared/templates/components.xsl +++ b/modules/shared/templates/components.xsl @@ -714,16 +714,16 @@ - + - + device - ,name:'' + ,type:'' diff --git a/package.json b/package.json index d9a488be1..f5171f3ce 100644 --- a/package.json +++ b/package.json @@ -197,6 +197,7 @@ "./modules/pdp11/lib/ram.js", "./modules/pdp11/lib/keyboard.js", "./modules/pdp11/lib/serialport.js", + "./modules/pdp11/lib/pc11.js", "./modules/shared/lib/debugger.js", "./modules/pdp11/lib/debugger.js", "./modules/pdp11/lib/computer.js", diff --git a/versions/pc8080/1.30.1/components.xsl b/versions/pc8080/1.30.1/components.xsl index 1bf53a560..2631d86f2 100644 --- a/versions/pc8080/1.30.1/components.xsl +++ b/versions/pc8080/1.30.1/components.xsl @@ -712,16 +712,16 @@ - + - + device - ,name:'' + ,type:'' diff --git a/versions/pcx86/1.30.1/components.xsl b/versions/pcx86/1.30.1/components.xsl index 3dc004f64..2fdfafed3 100644 --- a/versions/pcx86/1.30.1/components.xsl +++ b/versions/pcx86/1.30.1/components.xsl @@ -712,16 +712,16 @@ - + - + device - ,name:'' + ,type:'' diff --git a/versions/pdpjs/1.30.1/components.xsl b/versions/pdpjs/1.30.1/components.xsl index 0fe803637..2ed955772 100644 --- a/versions/pdpjs/1.30.1/components.xsl +++ b/versions/pdpjs/1.30.1/components.xsl @@ -712,16 +712,16 @@ - + - + device - ,name:'' + ,type:'' diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 7209829a3..77ffbd639 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -24,11 +24,12 @@ http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 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 h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function pa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ua(a){return a.replace(/[&<>"']/g,function(a){return ta[a]})}function wa(a,b){return(a+" ").slice(0,b)} @@ -40,216 +41,218 @@ function n(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window. function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Gb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,jb:!1,Hb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; +function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Vb=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ua=this.id:(this.Gb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,jb:!1,Hb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.g=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.A=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&E(this.i,64)&&B(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&E(this.i,64)&&B(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Qb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&E(this.i,64)&&B(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&E(this.i,64)&&B(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&E(this.i,64)&&B(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&E(this.i,64)&&B(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Vb(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.w)return m.tb+=m.w-f,m.w=f,!0;if(f>=m.w+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.w+q;f=p+a.sa;g-=q;l++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.sa,d,e);Sb(f,a.i,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Cb(a&this.A,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Jb(a&this.A,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].qa(a&this.A,a)}; -h.mb=function(a){var b=a&this.A,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Kb(b,a);this.C--;return a};h.Db=function(a,b){this.W[(a&this.f)>>>this.ga].Fb(a&this.A,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Pb(a&this.A,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.A,b&65535,a)};h.Eb=function(a,b){var c=a&this.A,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Qb(c,b&65535,a);this.C--}; -function kc(a){for(var b=0,c=[],d=0;da.b.Ya)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));lc(a,e,e,g,l,m,p,f[4])}}}function nc(a,b){a.B.push(b)} -function oc(a,b){a.C||(a.i&&E(a.i,536870912)&&B(a.i,"memory fault on address "+J(a.i,b),!0,!0),a.b.ea(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.j={data:0,Ld:0,Bb:20,bd:0};this.f={Md:0,Ob:-1}}u(K);h=K.prototype; -h.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;var e=this;this.f.Ob=pc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(qc(e.b,e.f.cd),rc(e.b,e.f.Ob,1E3/60))});this.f.cd=sc(64,6);mc(b,this,L);nc(b,this.reset.bind(this));G(this)};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&rc(this.b,this.f.Ob,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535};h.ed=function(a){this.j.data=a}; -h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,tc(b))}uc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma};h.pd=function(a){var b=this.b;1170>b.Ya&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),tc(b));uc(this)}; -function uc(a){a.j.Bb=a.j.Bb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.pa[1][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.pa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.pa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.pa[1][b]=a;this.b.P[1][b]&=65295}; -h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.pa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.wc=function(a){return this.b.pa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.pa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]}; -h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.pa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.pa[3][(a>>1&7)+8]};h.Ed=function(a,b){b=(b>>1&7)+8;this.b.pa[3][b]=a;this.b.P[3][b]&=65295};h.bb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]}; -h.gb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.cb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]};h.hb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]}; -h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){};h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc}; -h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Mb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Lb(this.b)};h.rd=function(a){vc(this.b,a&-1809|Lb(this.b)&1808);this.b.F|=128};h.ec=function(a,b){E(this)&&B(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)};h.reset=function(){this.j.Bb=this.j.Bb&-120|20;this.f.Ia=0}; -var M={},L=(M[62592]=[null,null,K.prototype.Rc,K.prototype.Bd,"SISDR",1145],M[62608]=[null,null,K.prototype.Pc,K.prototype.zd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Qc,K.prototype.Ad,"SISAR",1145],M[62640]=[null,null,K.prototype.Oc,K.prototype.yd,"SDSAR",1145],M[62656]=[null,null,K.prototype.zc,K.prototype.ld,"KISDR",1145],M[62672]=[null,null,K.prototype.xc,K.prototype.jd,"KDSDR",1145],M[62688]=[null,null,K.prototype.yc,K.prototype.kd,"KISAR",1145],M[62704]=[null,null,K.prototype.wc,K.prototype.hd, -"KDSAR",1145],M[62798]=[null,null,K.prototype.Fc,K.prototype.pd,"MMR3",1145],M[65382]=[null,null,K.prototype.Ac,K.prototype.md,"LKS"],M[65400]=[null,null,K.prototype.tc,K.prototype.ed,"CNSL"],M[65402]=[null,null,K.prototype.Cc,K.prototype.od,"MMR0",1145],M[65404]=[null,null,K.prototype.Dc,K.prototype.ec,"MMR1",1145],M[65406]=[null,null,K.prototype.Ec,K.prototype.ec,"MMR2",1145],M[65408]=[null,null,K.prototype.Xc,K.prototype.Hd,"UISDR",1145],M[65424]=[null,null,K.prototype.Vc,K.prototype.Fd,"UDSDR", -1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Gd,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Ed,"UDSAR",1145],M[65472]=[null,null,K.prototype.bb,K.prototype.gb,"R0SET0"],M[65473]=[null,null,K.prototype.bb,K.prototype.gb,"R1SET0"],M[65474]=[null,null,K.prototype.bb,K.prototype.gb,"R2SET0"],M[65475]=[null,null,K.prototype.bb,K.prototype.gb,"R3SET0"],M[65476]=[null,null,K.prototype.bb,K.prototype.gb,"R4SET0"],M[65477]=[null,null,K.prototype.bb,K.prototype.gb,"R5SET0"],M[65478]= -[null,null,K.prototype.Ic,K.prototype.sd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Lc,K.prototype.vd,"R7KERNEL"],M[65480]=[null,null,K.prototype.cb,K.prototype.hb,"R0SET1",1145],M[65481]=[null,null,K.prototype.cb,K.prototype.hb,"R1SET1",1145],M[65482]=[null,null,K.prototype.cb,K.prototype.hb,"R2SET1",1145],M[65483]=[null,null,K.prototype.cb,K.prototype.hb,"R3SET1",1145],M[65484]=[null,null,K.prototype.cb,K.prototype.hb,"R4SET1",1145],M[65485]=[null,null,K.prototype.cb,K.prototype.hb,"R5SET1",1145], -M[65486]=[null,null,K.prototype.Jc,K.prototype.td,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Kc,K.prototype.ud,"R6USER",1145],M[65504]=[null,null,K.prototype.vc,K.prototype.gd,"CTRL",1170],M[65520]=[null,null,K.prototype.$b,K.prototype.fc,"LSIZE",1170],M[65522]=[null,null,K.prototype.$b,K.prototype.fc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Tc,K.prototype.Dd,"SYSID",1170],M[65526]=[null,null,K.prototype.uc,K.prototype.fd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Bc,K.prototype.nd, -"MB",1170],M[65530]=[null,null,K.prototype.Gc,K.prototype.qd,"PIR"],M[65532]=[null,null,K.prototype.Sc,K.prototype.Cd,"SL"],M[65534]=[null,null,K.prototype.Hc,K.prototype.rd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; -L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; -L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; -L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];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];Ta(function(){for(var a=A(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&oc(this.A,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,1,c.M)&&c.da(!0)}return this.Jb(a,b)},ba:function(a,b){if(this.i&&null!=this.w){var c=this.i;Jc(c,this.w+a,2,c.M)&&c.da(!0)}return this.Kb(a,b)},ma:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a, -1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.w){var d=this.i;Jc(d,this.w+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Qb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&E(this.i,128)&&B(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},aa:function(a,b){a&1&&oc(this.A,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&oc(this.A,b);a=this.I[a>>1];this.i&&E(this.i,128)&&B(this.i,"Memory.readWord("+ -J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},oa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},va:function(a,b,c){a&1&&oc(this.A,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&oc(this.A,c);this.I[a>>1]=b;this.Ha=!0;this.i&&E(this.i,128)&&B(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0)}}; -function Sb(a,b,c){a.i=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Fb=a.f?a.J:a.Pb,a.ub=a.f?a.H:a.Qb):--a.j||(a.Cb=a.Jb,a.qa=a.Kb)}function Gc(a,b,c){c&&a.B||(a.Fb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Pb=b[1]||a.J,a.Qb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Cb=b[0]||a.K,a.qa=b[2]||a.M);if(c||void 0===c)a.Jb=b[0]||a.K,a.Kb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} -var Lc=[],Fc=[I.prototype.V,I.prototype.ua,I.prototype.ja,I.prototype.xa],Hc=[I.prototype.T,I.prototype.ma,I.prototype.ba,I.prototype.wa];if(Gb)var Ec=[I.prototype.R,I.prototype.la,I.prototype.aa,I.prototype.va],Dc=[I.prototype.U,I.prototype.oa,I.prototype.fa,I.prototype.Ua]; -function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Nb=!1;this.v.ib=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.K=[];this.Ab=this.ad.bind(this);G(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; -h.Da=function(a,b,c,d){this.B=a;this.A=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Za,c=!0);0<=a.$a&&a.$a<=Tc(a)&&(a.Za=a.$a=-1,Qc(a),a.da(),c=!0);c&&a.g(Tc(a)+" cycles: checksum="+k(a.nb))}} -h.ra=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;c>2;this.w=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Nb,Ob,Pb,Qb];a=new J(this);Rb(a,this.g);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.g&&G(this.g,64)&&E(this.g,e[4]+".readByte("+K(this.g,b)+"): "+K(this.g,c),!0,!0),c;c=Tb(d,b,!0);this.g&&G(this.g,64)&&E(this.g,"warning: unconverted read access to byte @"+K(this.g,b)+": "+K(this.g,c),!0,!0);return c} +function Ob(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.g&&G(this.g,64)&&E(this.g,f[4]+".writeByte("+K(this.g,c)+","+K(this.g,b)+")",!0,!0):(Tb(e,c,!0,b),this.g&&G(this.g,64)&&E(this.g,"warning: unconverted write access to byte @"+K(this.g,c)+": "+K(this.g,b),!0,!0))} +function Pb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.g&&G(this.g,64)&&E(this.g,a[4]+".readWord("+K(this.g,b)+"): "+K(this.g,c),!0,!0),c;c=Tb(d,b,!1);this.g&&G(this.g,64)&&E(this.g,"warning: unconverted read access to word @"+K(this.g,b)+": "+K(this.g,c),!0,!0);return c} +function Qb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.g&&G(this.g,64)&&E(this.g,a[4]+".writeWord("+K(this.g,c)+","+K(this.g,b)+")",!0,!0):(Tb(e,c,!1,b),this.g&&G(this.g,64)&&E(this.g,"warning: unconverted write access to word @"+K(this.g,c)+": "+K(this.g,b),!0,!0))} +function Ub(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.tb+=m.A-f,m.A=f,!0;if(f>=m.A+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.A+q;f=p+a.sa;g-=q;l++;continue}}return $b(1,f,g)}f=new J(a,f,q,a.sa,d,e);Rb(f,a.g,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Cb(a&this.w,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Jb(a&this.w,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].ra(a&this.w,a)}; +h.mb=function(a){var b=a&this.w,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Kb(b,a);this.C--;return a};h.Db=function(a,b){this.W[(a&this.f)>>>this.ga].Fb(a&this.w,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Pb(a&this.w,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.w,b&65535,a)};h.Eb=function(a,b){var c=a&this.w,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Qb(c,b&65535,a);this.C--}; +function bc(a){for(var b=0,c=[],d=0;da.b.Ya)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));kc(a,e,e,g,l,m,p,f[4])}}}function mc(a,b){a.B.push(b)} +function nc(a,b){a.C||(a.g&&G(a.g,536870912)&&E(a.g,"memory fault on address "+K(a.g,b),!0,!0),a.b.ea(4,b))}function $b(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.j={data:0,Ld:0,Bb:20,bd:0};this.f={Md:0,Ob:-1}}u(L);h=L.prototype; +h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.g=d;var e=this;this.f.Ob=oc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(pc(e.b,e.f.cd),qc(e.b,e.f.Ob,1E3/60))});this.f.cd=rc(64,6);lc(b,this,M);mc(b,this.reset.bind(this));H(this)};h.reset=function(){this.j.Bb=this.j.Bb&-120|20;this.f.Ia=0};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&qc(this.b,this.f.Ob,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535}; +h.ed=function(a){this.j.data=a};h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,sc(b))}tc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma}; +h.pd=function(a){var b=this.b;1170>b.Ya&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),sc(b));tc(this)};function tc(a){a.j.Bb=a.j.Bb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.qa[1][a>>1&7]}; +h.Ad=function(a,b){b=b>>1&7;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.qa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.qa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.qa[0][b]=a;this.b.P[0][b]&=65295}; +h.wc=function(a){return this.b.qa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.qa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]};h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.qa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.qa[3][(a>>1&7)+8]}; +h.Ed=function(a,b){b=(b>>1&7)+8;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.bb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.cb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]}; +h.hb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]};h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){}; +h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc};h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Mb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Kb(this.b)};h.rd=function(a){uc(this.b,a&-1809|Kb(this.b)&1808);this.b.F|=128}; +h.ec=function(a,b){G(this)&&E(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)}; +var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR",1145],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR",1145],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR",1145],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR",1145],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR",1145],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR",1145],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR",1145],N[62704]=[null,null,L.prototype.wc,L.prototype.hd, +"KDSAR",1145],N[62798]=[null,null,L.prototype.Fc,L.prototype.pd,"MMR3",1145],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0",1145],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1",1145],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2",1145],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR",1145],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR", +1145],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR",1145],N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR",1145],N[65472]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET0"],N[65473]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET0"],N[65474]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET0"],N[65475]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET0"],N[65476]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET0"],N[65477]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET0"],N[65478]= +[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.cb,L.prototype.hb,"R0SET1",1145],N[65481]=[null,null,L.prototype.cb,L.prototype.hb,"R1SET1",1145],N[65482]=[null,null,L.prototype.cb,L.prototype.hb,"R2SET1",1145],N[65483]=[null,null,L.prototype.cb,L.prototype.hb,"R3SET1",1145],N[65484]=[null,null,L.prototype.cb,L.prototype.hb,"R4SET1",1145],N[65485]=[null,null,L.prototype.cb,L.prototype.hb,"R5SET1",1145], +N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER",1145],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud,"R6USER",1145],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd, +"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"],N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; +M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; +M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; +M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];Ta(function(){for(var a=B(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&nc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.g&&null!=this.A){var c=this.g;Jc(c,this.A+a,1,c.M)&&c.da(!0)}return this.Jb(a,b)},ba:function(a,b){if(this.g&&null!=this.A){var c=this.g;Jc(c,this.A+a,2,c.M)&&c.da(!0)}return this.Kb(a,b)},ma:function(a,b,c){if(this.g&&null!=this.A){var d=this.g;Jc(d,this.A+a, +1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},wa:function(a,b,c){if(this.g&&null!=this.A){var d=this.g;Jc(d,this.A+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Qb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.g&&G(this.g,128)&&E(this.g,"Memory.readByte("+K(this.g,b)+"): "+K(this.g,a),!0);return a},aa:function(a,b){a&1&&nc(this.w,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&nc(this.w,b);a=this.I[a>>1];this.g&&G(this.g,128)&&E(this.g,"Memory.readWord("+ +K(this.g,b)+"): "+K(this.g,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},pa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.g&&G(this.g,128)&&E(this.g,"Memory.writeByte("+K(this.g,c)+","+K(this.g,b)+")",!0)},va:function(a,b,c){a&1&&nc(this.w,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&nc(this.w,c);this.I[a>>1]=b;this.Ha=!0;this.g&&G(this.g,128)&&E(this.g,"Memory.writeWord("+K(this.g,c)+","+K(this.g,b)+")",!0)}}; +function Rb(a,b,c){a.g=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Fb=a.f?a.J:a.Pb,a.ub=a.f?a.H:a.Qb):--a.j||(a.Cb=a.Jb,a.ra=a.Kb)}function Gc(a,b,c){c&&a.B||(a.Fb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Pb=b[1]||a.J,a.Qb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Cb=b[0]||a.K,a.ra=b[2]||a.M);if(c||void 0===c)a.Jb=b[0]||a.K,a.Kb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} +var Lc=[],Fc=[J.prototype.V,J.prototype.ua,J.prototype.ja,J.prototype.za],Hc=[J.prototype.T,J.prototype.ma,J.prototype.ba,J.prototype.wa];if(Fb)var Ec=[J.prototype.R,J.prototype.la,J.prototype.aa,J.prototype.va],Dc=[J.prototype.U,J.prototype.pa,J.prototype.fa,J.prototype.Ua]; +function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Nb=!1;this.v.ib=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.K=[];this.Ab=this.ad.bind(this);H(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; +h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.g=d;for(b=0;b=a.ja&&(a.ja+=a.Za,c=!0);0<=a.$a&&a.$a<=Tc(a)&&(a.Za=a.$a=-1,Qc(a),a.da(),c=!0);c&&a.i(Tc(a)+" cycles: checksum="+k(a.nb))}} +h.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function pc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function rc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} -function Yc(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 rd(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 Xc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} -h.ad=function(){if(this.v.ca){this.kb>=this.Fa&&Wc(this,!0);this.oa=0;this.xa=Aa();if(this.aa){var a=this.xa-this.aa;a>this.wb&&(this.R+=a,this.R>this.xa&&(this.R=this.xa))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.oa+=b;this.T+=b;Sc(this,b);rd(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));Fb(this, -e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Ab;this.aa=Aa();var c=this.wb;this.oa&&(c=Math.round(c*this.oa/this.Oa));var c=c-(this.aa-this.xa),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.kb+=this.oa;this.aa+=c;a(b,c)}}}; -h.eb=function(a){if(rb(this))return!1;if(this.v.ca)return this.g(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Nb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Ab,0);return!0};h.fb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; +function Pc(a){a.V=0;a.yb=0;a.fa=a.T=a.ba=a.b=0;Qc(a);Uc(a,1)}function Uc(a,b,c){var d=!1;if(void 0!==b){.8>a.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function oc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function qc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} +function Yc(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 Zc(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 Xc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} +h.ad=function(){if(this.v.ca){this.kb>=this.Fa&&Wc(this,!0);this.pa=0;this.za=Aa();if(this.aa){var a=this.za-this.aa;a>this.wb&&(this.R+=a,this.R>this.za&&(this.R=this.za))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.pa+=b;this.T+=b;Sc(this,b);Zc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));rb(this, +e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Ab;this.aa=Aa();var c=this.wb;this.pa&&(c=Math.round(c*this.pa/this.Oa));var c=c-(this.aa-this.za),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.kb+=this.pa;this.aa+=c;a(b,c)}}}; +h.eb=function(a){if(qb(this))return!1;if(this.v.ca)return this.i(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Nb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Ab,0);return!0};h.fb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; function sd(a){this.Ya=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.Ya?td.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(sd,Mc);h=sd.prototype;h.reset=function(){this.status("model "+this.Ya);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; -function vd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.pa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Mb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.A&&tc(a)}function tc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.qa=a.Yc,a.ub=a.Id,Vb(a.A,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.qa=a.ac,a.ub=a.gc,Vb(a.A,16))}h.Wb=function(){return 0}; -h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,kc(this.A));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Uc(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Bd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Cd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Dd(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Ed(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} -h.ea=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Lb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.qa(a|this.M),e=this.qa(a+2&65535|this.M);vc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Fd(this,this.ma);Fd(this,this.u[7]);Ad(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Gd(a){var b=Hd(a),c=Hd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);Ad(a,b);vc(a,c);a.F&=-17} -function Id(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.pa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.ea(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.ea(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.qa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.qa(e)|g; -a.b-=8;break;case 6:return e=zd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=zd(a),e=e+a.u[c]&65535,e=a.qa(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.A.zb(a);this.C++;a=Jd(this,Id(this,a,3));this.C--;return a}; -h.mb=function(a){if(!this.Ja)return this.A.mb(a);this.C++;a=this.ac(Id(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Kd(this,Id(this,a,5),b),this.C--):this.A.rb(a,b)};h.Eb=function(a,b){this.Ja?(this.C++,this.gc(Id(this,a,4),b),this.C--):this.A.Eb(a,b)};h.mc=function(a,b,c){return Ld(this,a,b,c)};h.nc=function(a,b,c){return Id(this,Ld(this,a,b,c),c)};h.ac=function(a){return this.A.ka(a)};h.Yc=function(a){return this.A.ka(Id(this,a,2))};h.gc=function(a,b){this.A.Sa(a,b&65535)}; -h.Id=function(a,b){this.A.Sa(Id(this,a,4),b)};function Md(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=Ld(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.qa(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Nd(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=Ld(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Id(a,e|c&65536,4),a.D=a.L>>14&3,a.A.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} -function Od(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]}function Qd(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return Ld(a,b,c,8)}function Rd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?Jd(a,a.Y(b,c,3)):a.u[c]&255}function Sd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.A.ka(a.Y(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Kd(a,e,d.call(a,c,Jd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.A.Sa(e,d.call(a,c,a.A.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Td(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?Kd(a,a.Y(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 Ud(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.A.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} -function S(a,b,c){c&&(Ad(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.fb=function(a){this.v.complete=!0;var b=this.v.kc=this.i&&Vd(this.i),c=a?this.v.Nb?0:1:-1;this.v.Nb=!1;this.ba=this.b=a;do{if(b){if(Wd(this.i,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Mb&224)>>5;if(a=this.U&&this.U.ab>e?this.U:null)d=a.dd,e=a.ab;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; -if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(zd(this))}while(0>1|b<<16;Dd(this,a);return a&65535}function be(a,b){a=b&2048|b>>1|b<<8;Dd(this,a<<8);return a&255}function ce(a,b){a=b&~a;P(this,a);return a}function de(a,b){a=b&~a;P(this,a<<8);return a}function ee(a,b){a|=b;P(this,a);return a}function fe(a,b){a|=b;P(this,a<<8);return a} -function ge(a,b){a=~b|65536;Bd(this,a);return a&65535}function he(a,b){a=~b|256;Bd(this,a<<8);return a&255}function ie(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function je(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function ke(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function le(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} -function me(a,b){a=-b;Bd(this,a,a&b&32768);return a&65535}function ne(a,b){a=-b;Bd(this,a<<8,(a&b&128)<<8);return a&255}function oe(a,b){a=b<<1|this.N>>16&1;Dd(this,a);return a&65535}function pe(a,b){a=b<<1|this.N>>16&1;Dd(this,a<<8);return a&255}function qe(a,b){a=(this.N&65536|b)>>1|b<<16;Dd(this,a);return a&65535}function re(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Dd(this,a<<8);return a&255}function se(a,b){var c=b-a;Ed(this,c,a,b);return c&65535} -function te(a,b){var c=b-a;Ed(this,c<<8,a<<8,b<<8);return c&255}function ue(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function ve(a,b){a^=b;P(this,a);return a&65535}function we(a){R(this,a,Pd(this,a),Xd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function xe(a){var b=Sd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} -function ye(a){var b=Sd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function ze(a){S(this,a,!O(this))}function Ae(a){S(this,a,O(this))} -function Be(a){R(this,a,Pd(this,a),ce);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ce(a){Q(this,a,Od(this,a),de);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){R(this,a,Pd(this,a),ee);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){Q(this,a,Od(this,a),fe);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function Fe(a){P(this,Pd(this,a)&Sd(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ge(a){P(this,(Od(this,a)&Rd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function He(a){S(this,a,yd(this))}function Ie(a){S(this,a,!this.Ca()==!xd(this))}function Je(a){S(this,a,!yd(this)&&!this.Ca()==!xd(this))}function Ke(a){S(this,a,!O(this)&&!yd(this))}function Le(a){S(this,a,yd(this)||!this.Ca()!=!xd(this))} -function Me(a){S(this,a,O(this)||yd(this))}function Ne(a){S(this,a,!this.Ca()!=!xd(this))}function Oe(a){S(this,a,this.Ca())}function Pe(a){S(this,a,!yd(this))}function Qe(a){S(this,a,!this.Ca())}function Re(){this.ea(12,1);this.b-=5}function Se(a){S(this,a,!0)}function Te(a){S(this,a,!xd(this))}function Ue(a){S(this,a,xd(this))}function U(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function Ve(a){var b=Pd(this,a);a=Sd(this,a);Ed(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function We(a){var b=Od(this,a)<<8;a=Rd(this,a)<<8;Ed(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} -function Xe(a){var b=Sd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Ye(){this.ea(24,2);this.b-=25}function Ze(){this.L&49152?(this.Z|=128,this.ea(4,3)):this.da();this.b-=7} -function $e(){this.ea(16,4);this.b-=25}var af=[0,7,7,10,7,11,9,13];function bf(a){var b=this.b;Ad(this,Qd(this,a));this.b=b-af[this.j]}var cf=[0,14,14,17,14,18,16,20];function df(a){var b=this.b,c=Qd(this,a);a=a>>6&7;Fd(this,this.u[a]);this.u[a]=this.u[7];Ad(this,c);this.b=b-cf[this.j]}var ef=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ff(a){var b=Pd(this,a),c=this.b;P(this,Ud(this,a,b));this.b=c-ef[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)} -function gf(a){var b=Od(this,a);P(this,Td(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var hf=[7,13,13,17,14,18,17,21];function jf(a){var b=Sd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Ad(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function pf(a){R(this,a,Pd(this,a),se);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function qf(a){R(this,a,0,ue);this.b-=this.j?9:3+(7==this.f?2:0)}function rf(){this.ea(28,5);this.b-=5}function sf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function tf(a){R(this,a,Pd(this,a),ve);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,B(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ea(8,6)}function td(a){uf[a>>12].call(this,a)}function vf(a){wf[a>>6&3].call(this,a)}function xf(a){yf[a>>6&3].call(this,a)} -function zf(a){Af[a>>6&3].call(this,a)}function Bf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} -var uf=[function(a){dg[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,V,function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],dg=[function(a){fg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,V,V,V],wf=[function(a){Bd(this,Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ge);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ie);this.b-=this.j?9:3+(7==this.f?2:0)}],yf=[function(a){R(this,a,0, -me);this.b-=this.j?11:6},function(a){R(this,a,O(this)?1:0,Xd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,O(this)?1:0,se);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Bd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Af=[function(a){R(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,oe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)}], -fg=[function(a){gg[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,V,Bf,Wf,qf,qf,qf,qf],gg=[Ze,sf,mf,Re,$e,lf,V,V,V,V,V,V,V,V,V,V],Vf=[kf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},U,function(){this.X=1;this.b-=5},U,U,U,function(){this.S=0;this.b-=5},U,U,U,U,U,U,U],Xf=[kf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],eg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,V,V,V],Zf=[function(a){Bd(this, -Td(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,le);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,je);this.b-=this.j?9:3+(7==this.f?2:0)}],ag=[function(a){Q(this,a,0,ne);this.b-=this.j?11:6},function(a){Q(this,a,O(this)?1:0,Yd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,O(this)?1:0,te);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Rd(this,a);Bd(this,a<<8);this.b-=this.j?4:3+(7==this.f? -2:0)}],cg=[function(a){Q(this,a,0,re);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,pe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,be);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,$d);this.b-=this.j?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} -var hg=[function(a){ig[a>>8&15].call(this,a)},ff,Ve,Fe,Be,De,we,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,pf,V],ig=[function(a){lg[a>>4&15].call(this,a)},Se,Pe,He,Ie,Ne,Je,Le,df,df,vf,xf,zf,function(a){mg[a>>6&3].call(this,a)},V,V],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.M);Ad(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Md(this,a,0);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c= -this.b;Nd(this,a,0,b);P(this,b);this.b=c-hf[this.j]},function(a){P(this,Ud(this,a,this.Ca?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},V,V,V,bf,bf,bf,bf,nf,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Bf,Wf,qf,qf,qf,qf],ng=[Ze,sf,mf,Re,$e,lf,function(){Gd(this);this.b-=13},V,V,V,V,V,V,V,V,V],jg=[jf,jf,Xe,Xe,xe,xe,ye,ye,tf,tf,V,V,V,V,of,of],kg=[Qe,Oe,Ke,Me,Te,Ue,ze,Ae,Ye,rf,Yf,$f,bg,function(a){og[a>>6&3].call(this, -a)},V,V],og=[V,function(a){a=Md(this,a,65536);Fd(this,a);P(this,a);this.b-=11},function(a){var b=Hd(this),c=this.b;Nd(this,a,65536,b);P(this,b);this.b=c-hf[this.j]},V];function pg(a){r.call(this,"ROM",a,pg);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){qg(c,a,b,f)})}}u(pg); -pg.prototype.Da=function(a,b,c,d){this.A=b;this.b=c;this.i=d;rg(this)};pg.prototype.Aa=function(){if(this.Ba){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.j,e=this.Ba,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Sb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,w:c,sc:d,Ba:e,Rb:f})}delete this.Ba}return!0};pg.prototype.za=function(){return!0}; -function qg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Gb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ba=l.symbols;if(!a.f.length){n("Empty ROM: "+ -b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Gb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.Aa=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.za=function(a){return a?this.save():!0};h.reset=function(){wg(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return wg(this)};function wg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Lb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;rc(this.b,this.V,1)}};var xg={},vg=(xg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],xg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],xg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],xg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],xg);Ta(function(){for(var a=A(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yg.prototype.Xb=function(){return-1};yg.prototype.Yb=function(){}; -function Ag(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(xa(b.substring(c,f))),c=f+1}}return a} -function Bg(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; +function vd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.qa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Mb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.w&&sc(a)}function sc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.ra=a.Yc,a.ub=a.Id,Ub(a.w,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.ra=a.ac,a.ub=a.gc,Ub(a.w,16))}h.Wb=function(){return 0}; +h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,bc(this.w));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Uc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Cd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Dd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Ed(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Fd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} +h.ea=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Kb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.ra(a|this.M),e=this.ra(a+2&65535|this.M);uc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Gd(this,this.ma);Gd(this,this.u[7]);Bd(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Hd(a){var b=Id(a),c=Id(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);Bd(a,b);uc(a,c);a.F&=-17} +function Jd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.qa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.ea(4,12))}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.P[a.D][d]=e;if(4194170!==f||a.D)a.ua=a.D,a.va=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ua<<5|a.va<<1),a.ea(168,16)),a.G&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)|g; +a.b-=8;break;case 6:return e=Ad(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=Ad(a),e=e+a.u[c]&65535,e=a.ra(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.w.zb(a);this.C++;a=Kd(this,Jd(this,a,3));this.C--;return a}; +h.mb=function(a){if(!this.Ja)return this.w.mb(a);this.C++;a=this.ac(Jd(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Ld(this,Jd(this,a,5),b),this.C--):this.w.rb(a,b)};h.Eb=function(a,b){this.Ja?(this.C++,this.gc(Jd(this,a,4),b),this.C--):this.w.Eb(a,b)};h.mc=function(a,b,c){return Md(this,a,b,c)};h.nc=function(a,b,c){return Jd(this,Md(this,a,b,c),c)};h.ac=function(a){return this.w.ka(a)};h.Yc=function(a){return this.w.ka(Jd(this,a,2))};h.gc=function(a,b){this.w.Sa(a,b&65535)}; +h.Id=function(a,b){this.w.Sa(Jd(this,a,4),b)};function Nd(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=Md(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.ra(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Od(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=Md(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Jd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} +function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Qd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]}function Rd(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return Md(a,b,c,8)}function Sd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Td(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Ld(a,e,d.call(a,c,Kd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Ud(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?Ld(a,a.Y(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 Vd(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.w.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +function S(a,b,c){c&&(Bd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +h.fb=function(a){this.v.complete=!0;var b=this.v.kc=this.g&&Wd(this.g),c=a?this.v.Nb?0:1:-1;this.v.Nb=!1;this.ba=this.b=a;do{if(b){if(Xd(this.g,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Mb&224)>>5;if(a=this.U&&this.U.ab>e?this.U:null)d=a.dd,e=a.ab;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; +if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(Ad(this))}while(0>1|b<<16;Ed(this,a);return a&65535}function ce(a,b){a=b&2048|b>>1|b<<8;Ed(this,a<<8);return a&255}function de(a,b){a=b&~a;P(this,a);return a}function ee(a,b){a=b&~a;P(this,a<<8);return a}function fe(a,b){a|=b;P(this,a);return a}function ge(a,b){a|=b;P(this,a<<8);return a} +function he(a,b){a=~b|65536;Cd(this,a);return a&65535}function ie(a,b){a=~b|256;Cd(this,a<<8);return a&255}function je(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function ke(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function le(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function me(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} +function ne(a,b){a=-b;Cd(this,a,a&b&32768);return a&65535}function oe(a,b){a=-b;Cd(this,a<<8,(a&b&128)<<8);return a&255}function pe(a,b){a=b<<1|this.N>>16&1;Ed(this,a);return a&65535}function qe(a,b){a=b<<1|this.N>>16&1;Ed(this,a<<8);return a&255}function re(a,b){a=(this.N&65536|b)>>1|b<<16;Ed(this,a);return a&65535}function se(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Ed(this,a<<8);return a&255}function te(a,b){var c=b-a;Fd(this,c,a,b);return c&65535} +function ue(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function ve(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function we(a,b){a^=b;P(this,a);return a&65535}function xe(a){R(this,a,Qd(this,a),Yd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function ye(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} +function ze(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function Ae(a){S(this,a,!xd(this))}function Be(a){S(this,a,xd(this))} +function Ce(a){R(this,a,Qd(this,a),de);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){Q(this,a,Pd(this,a),ee);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){R(this,a,Qd(this,a),fe);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Pd(this,a),ge);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Ge(a){P(this,Qd(this,a)&Td(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function He(a){P(this,(Pd(this,a)&Sd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ie(a){S(this,a,zd(this))}function Je(a){S(this,a,!this.Da()==!yd(this))}function Ke(a){S(this,a,!zd(this)&&!this.Da()==!yd(this))}function Le(a){S(this,a,!xd(this)&&!zd(this))}function Me(a){S(this,a,zd(this)||!this.Da()!=!yd(this))} +function Ne(a){S(this,a,xd(this)||zd(this))}function Oe(a){S(this,a,!this.Da()!=!yd(this))}function Pe(a){S(this,a,this.Da())}function Qe(a){S(this,a,!zd(this))}function Re(a){S(this,a,!this.Da())}function Se(){this.ea(12,1);this.b-=5}function Te(a){S(this,a,!0)}function Ue(a){S(this,a,!yd(this))}function Ve(a){S(this,a,yd(this))}function T(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} +function We(a){var b=Qd(this,a);a=Td(this,a);Fd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Xe(a){var b=Pd(this,a)<<8;a=Sd(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} +function Ye(a){var b=Td(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Ze(){this.ea(24,2);this.b-=25}function $e(){this.L&49152?(this.Z|=128,this.ea(4,3)):this.da();this.b-=7} +function af(){this.ea(16,4);this.b-=25}var bf=[0,7,7,10,7,11,9,13];function cf(a){var b=this.b;Bd(this,Rd(this,a));this.b=b-bf[this.j]}var df=[0,14,14,17,14,18,16,20];function ef(a){var b=this.b,c=Rd(this,a);a=a>>6&7;Gd(this,this.u[a]);this.u[a]=this.u[7];Bd(this,c);this.b=b-df[this.j]}var ff=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function gf(a){var b=Qd(this,a),c=this.b;P(this,Vd(this,a,b));this.b=c-ff[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)} +function hf(a){var b=Pd(this,a);P(this,Ud(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var jf=[7,13,13,17,14,18,17,21];function kf(a){var b=Td(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Bd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function qf(a){R(this,a,Qd(this,a),te);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function rf(a){R(this,a,0,ve);this.b-=this.j?9:3+(7==this.f?2:0)}function sf(){this.ea(28,5);this.b-=5}function tf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function uf(a){R(this,a,Qd(this,a),we);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.g)b=this.g,E(b,"undefined opcode "+K(b,a),!0,!0),b=Zb(b);b||this.ea(8,6)}function td(a){vf[a>>12].call(this,a)}function wf(a){xf[a>>6&3].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)} +function Af(a){Bf[a>>6&3].call(this,a)}function Cf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} +var vf=[function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,xe,V,function(a){fg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,qf,V],eg=[function(a){gg[a>>4&15].call(this,a)},Te,Qe,Ie,Je,Oe,Ke,Me,ef,ef,wf,yf,Af,V,V,V],xf=[function(a){Cd(this,Vd(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,je);this.b-=this.j?9:3+(7==this.f?2:0)}],zf=[function(a){R(this,a,0, +ne);this.b-=this.j?11:6},function(a){R(this,a,xd(this)?1:0,Yd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,xd(this)?1:0,te);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Td(this,a);Cd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0,re);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,pe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.j?9:3+(7==this.f?2:0)}], +gg=[function(a){hg[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,V,Cf,Xf,rf,rf,rf,rf],hg=[$e,tf,nf,Se,af,mf,V,V,V,V,V,V,V,V,V,V],Wf=[lf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},T,function(){this.X=1;this.b-=5},T,T,T,function(){this.S=0;this.b-=5},T,T,T,T,T,T,T],Yf=[lf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],fg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,V,V,V],$f=[function(a){Cd(this, +Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ie);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)}],bg=[function(a){Q(this,a,0,oe);this.b-=this.j?11:6},function(a){Q(this,a,xd(this)?1:0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,xd(this)?1:0,ue);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Cd(this,a<<8);this.b-=this.j?4:3+(7== +this.f?2:0)}],dg=[function(a){Q(this,a,0,se);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)}];function ud(a){ig[a>>12].call(this,a)} +var ig=[function(a){jg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,xe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,qf,V],jg=[function(a){mg[a>>4&15].call(this,a)},Te,Qe,Ie,Je,Oe,Ke,Me,ef,ef,wf,yf,Af,function(a){ng[a>>6&3].call(this,a)},V,V],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.M);Bd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Nd(this,a,0);Gd(this,a);P(this,a);this.b-=11},function(a){var b=Id(this),c= +this.b;Od(this,a,0,b);P(this,b);this.b=c-jf[this.j]},function(a){P(this,Vd(this,a,this.Da?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Cf,Xf,rf,rf,rf,rf],og=[$e,tf,nf,Se,af,mf,function(){Hd(this);this.b-=13},V,V,V,V,V,V,V,V,V],kg=[kf,kf,Ye,Ye,ye,ye,ze,ze,uf,uf,V,V,V,V,pf,pf],lg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,function(a){pg[a>>6&3].call(this, +a)},V,V],pg=[V,function(a){a=Nd(this,a,65536);Gd(this,a);P(this,a);this.b-=11},function(a){var b=Id(this),c=this.b;Od(this,a,65536,b);P(this,b);this.b=c-jf[this.j]},V];function qg(a){r.call(this,"ROM",a,qg);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){rg(c,a,b,f)})}}u(qg); +qg.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.g=d;sg(this)};qg.prototype.ya=function(){if(this.Ca){if(this.g){var a=this.g,b=this.id,c=this.D,d=this.j,e=this.Ca,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Sb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,A:c,sc:d,Ca:e,Rb:f})}delete this.Ca}return!0};qg.prototype.xa=function(){return!0}; +function rg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Gb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ca=l.symbols;if(!a.f.length){n("Empty ROM: "+ +b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Gb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.xa=function(a){return a?this.save():!0};h.reset=function(){xg(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return xg(this)};function xg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Lb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;qc(this.b,this.V,1)}};var yg={},wg=(yg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],yg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],yg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],yg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],yg);Ta(function(){for(var a=B(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};zg.prototype.Xb=function(){return-1};zg.prototype.Yb=function(){}; +function Bg(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(xa(b.substring(c,f))),c=f+1}}return a} +function Cg(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 Cg(a,b,c){var d;if(b){b=Dg(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function Gg(a,b){if(b)return Fg(a,b,a.aa[b]);var c=0;for(b in a.aa)Fg(a,b,a.aa[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function Hg(a,b){if(b)return Gg(a,b,a.aa[b]);var c=0;for(b in a.aa)Gg(a,b,a.aa[b]),c++;return 0this.b.Ya?Pg:[];Qg(this,function(a){a:{var b=d.A.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Rg(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.A.ga;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=jc[c],q&&d.g(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Yb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Lb(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.qb).w));this.ia&1073741824?this.ua.push(a):this.oa&&a==this.oa||(this.oa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; -function Jg(a){var b;if(Vd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} -h.Pa=function(a,b,c){var d=!0;c||ah(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.g("invalid address: "+J(this,b.w)),d=!1;else{var f=this.A;f.W[e>>>f.ga].Pa(e&f.A,a==this.D)}}d&&(a.push(b),c?b.ya=!0:(bh(this,a,a.length-1,"set"),Jg(this)));return d};function ah(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.ya||Jg(a);break}}return f} -function ch(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==D)w=w.w-((f&63)<<1)&65535,y=J(x,w);else if(12288==D)y=J(x,f&7,1);else if(24576==D)y=J(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y= -Wg(C);break;case 8:y="@"+Wg(C);break;case 16:7>C?y="("+Wg(C)+")+":(D=x.ka(w,2),y="#"+J(x,D,0,!0));break;case 24:7>C?y="@("+Wg(C)+")+":(D=x.ka(w,2),y="@#"+J(x,D,0,!0));break;case 32:y="-("+Wg(C)+")";break;case 40:y="@-("+Wg(C)+")";break;case 48:D=x.ka(w,2);y=J(x,D,0,!0)+"("+Wg(C)+")";7==C&&(y=[y,J(x,D+w.w&65535)]);break;case 56:D=x.ka(w,2),y="@"+J(x,D)+"("+Wg(C)+")",7==C&&(y=[y,J(x,D+w.w&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=Wg(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ta[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function hh(a){var b,c="";for(b=0;6>b;b++)c+=gh(a,b);c=c+"\n"+(gh(a,6)+gh(a,7)+gh(a,20));return c+=fh(a,"T")+fh(a,"N")+fh(a,"Z")+fh(a,"V")+fh(a,"C")}h.Sb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.B.$();a.g("updated registers:")}a.g(hh(a));c&&(a.K=Z(d.u[7]),Zg(a,J(a,a.K.w)))}}function mh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=eh(a,b,g,f);a.g(f);a.K=b;e-=b.w-m;c++}}} -function dh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.T.w)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(qb(a)&&0q||"z"ia.length&&(a.g("note: only "+ia.length+" available"),X=ia.length);ba-=X;0>ba&&(null==ia[ia.length-1].w?(X=ba+X,ba=0):ba+=ia.length);var bd=[];"call"==Hf&&(sb=1E5,bd=["CALL"]);for(void 0!==Gf&&a.g(X+" instructions earlier:");0=ia.length&&(ba=0);a.Va=X;Jf++;sb--}}Jf||(a.g("no "+If+"history available"),a.Va=void 0)}else{var ub=Rg(a,ha);if(ub){var bc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Gh),bc=Eg(a,Ca)>>>0,65536>4||1;Ih--&&0ec?String.fromCharCode(ec):".";cc--}vb&&(vb+="\n");vb+=ha+" "+cd+(0==xb?" "+Mf:"")}vb&&a.g(vb);a.Oa=ub}}}}break;case "e":if("else"==g[0])break;var Za,ed,fd,gd,hd=g[0],id=g[1];"eb"==hd?(Za=1,ed=255,fd=a.lb,gd=a.Db):"e"==hd||"ew"==hd?(Za=2,ed=65535,fd=a.ka,gd=a.Sa):id=null;if(null==id)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var fc=Rg(a,id);if(fc)for(var gc=2;gc< -g.length;gc++){var yb=Cg(a,g[gc]);if(void 0===yb){a.g("unrecognized value: "+g[gc]);break}yb&~ed&&a.g("warning: "+k(yb)+" exceeds "+Za+"-byte value");var Jh=fd.call(a,fc);a.g("changing "+J(a,fc.w)+" from "+J(a,Jh,Za)+" to "+J(a,yb,Za));gd.call(a,fc,yb,Za)}}break;case "g":a:{var Nf=g[1],Kh=b;if(void 0!==Nf){var jd=Rg(a,Nf,!0);if(!jd)break a;Vg(a,jd,Kh);a.Pa(a.f,jd,!0)}a.eb(!0,c)}break;case "h":a.v.ca?(c||a.g("halting"),a.da()):pb(a,!0)||c||a.g("already halted");break;case "i":if("if"==g[0]){var kd; -var zb=b.substr(2),zb=xa(zb);Cg(a,zb)?(c||a.g("true: "+zb),kd=!0):(c||a.g("false: "+zb),kd=!1);kd||(d=!1);break}f=!0;break;case "k":var Lh=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ld=0,md=Z(),Ab=Z(a.b.u[6]);for(a.g("stack trace for "+J(a,Ab.w));10>ld;){for(var Da=null,Mh=256;65536>Ab.w>>>0;){md.w=a.ka(Ab,2);if(null==Ab.w||!Mh--)break;if(!(md.w&1)){for(var Nh=a,hc=md,Of=null,Bb=hc.w,Pf=Bb,nd=1;6>=nd&&Bb;nd++){if(2< -nd){hc.w=Bb;var ic=eh(Nh,hc);if(0<=ic.indexOf("JSR")){var Qf=ic.indexOf(" ");if(Bb+(ic.indexOf(" ",Qf+1)-Qf-1)/2==Pf){Of=ic;break}}}Bb-=2}hc.w=Pf;if(Da=Of)break}}if(!Da||null==Da)break;var Rf=null;if("ks"==Lh){var Sf=Da.match(/[0-9A-F]+$/);Sf&&(Rf=lh(a,Sf[0]))}Da=wa(Da,50)+" ;"+(Rf||"stack="+J(a,Ab.w));a.g(Da);ld++}ld||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){lh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== -F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){va=H[ja];ka=!!(a.ia&va);break}if(!va){a.g("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var od=0;od\nLicense: GPL version 3 or later ");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;brh){if(th(d,this.I)){this.D=new N(this,"1.30.1","failsafe");th(this.D)&&(yh(this,d),a=2,zh(this.D));this.D.set("timestamp",Ea());Ah(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=xh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?th(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.g(f+": "+g),zh(d),th(d)?(c=xh(d),e=!0):c=!1))}e&&wh(this,c?d:null)}else 2==a&&d.clear()}else wh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(Bh(this,this.b,b,c,a),this.b.ib());this.T&&(yh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function yh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} -function oh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.da(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mthis.b.Ya?Qg:[];Rg(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Sg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.w.ga;m=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=ac[c],q&&d.i(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Yb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Kb(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+K(this,Z(this.b.qb).A));this.ia&1073741824?this.ua.push(a):this.pa&&a==this.pa||(this.pa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; +function Kg(a){var b;if(Wd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||bh(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.i("invalid address: "+K(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.ga].Pa(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Aa=!0:(ch(this,a,a.length-1,"set"),Kg(this)));return d};function bh(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.Aa||Kg(a);break}}return f} +function dh(a,b){for(var c=1;c>23)&65535,y=K(x,w);else if(8192==D)w=w.A-((f&63)<<1)&65535,y=K(x,w);else if(12288==D)y=K(x,f&7,1);else if(24576==D)y=K(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y= +Xg(C);break;case 8:y="@"+Xg(C);break;case 16:7>C?y="("+Xg(C)+")+":(D=x.ka(w,2),y="#"+K(x,D,0,!0));break;case 24:7>C?y="@("+Xg(C)+")+":(D=x.ka(w,2),y="@#"+K(x,D,0,!0));break;case 32:y="-("+Xg(C)+")";break;case 40:y="@-("+Xg(C)+")";break;case 48:D=x.ka(w,2);y=K(x,D,0,!0)+"("+Xg(C)+")";7==C&&(y=[y,K(x,D+w.A&65535)]);break;case 56:D=x.ka(w,2),y="@"+K(x,D)+"("+Xg(C)+")",7==C&&(y=[y,K(x,D+w.A&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=Xg(b),c+="="+K(a,d.u[b])):13>b?c="A"+(b-8)+"="+K(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+K(a,d.ta[b-16]):20==b&&(c="PS="+K(a,Kb(d)));c&&(c+=" ");return c}function ih(a){var b,c="";for(b=0;6>b;b++)c+=hh(a,b);c=c+"\n"+(hh(a,6)+hh(a,7)+hh(a,20));return c+=gh(a,"T")+gh(a,"N")+gh(a,"Z")+gh(a,"V")+gh(a,"C")}h.Sb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}a.B.$();a.i("updated registers:")}a.i(ih(a));c&&(a.K=Z(d.u[7]),$g(a,K(a,a.K.A)))}}function nh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=fh(a,b,g,f);a.i(f);a.K=b;e-=b.A-m;c++}}} +function eh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+K(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.pa=null;if(pb(a)&&0q||"z"ia.length&&(a.i("note: only "+ia.length+" available"),X=ia.length);ca-=X;0>ca&&(null==ia[ia.length-1].A?(X=ca+X,ca=0):ca+=ia.length);var cd=[];"call"==If&&(sb=1E5,cd=["CALL"]);for(void 0!==Hf&&a.i(X+" instructions earlier:");0=ia.length&&(ca=0);a.Va=X;Kf++;sb--}}Kf||(a.i("no "+Jf+"history available"),a.Va=void 0)}else{var ub=Sg(a,ha);if(ub){var cc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Hh),cc=Fg(a,Ca)>>>0,65536>4||1;Jh--&&0fc?String.fromCharCode(fc):".";dc--}vb&&(vb+="\n");vb+=ha+" "+dd+(0==xb?" "+Nf:"")}vb&&a.i(vb);a.Oa=ub}}}}break;case "e":if("else"==g[0])break;var Za,fd,gd,hd,id=g[0],jd=g[1];"eb"==id?(Za=1,fd=255,gd=a.lb,hd=a.Db):"e"==id||"ew"==id?(Za=2,fd=65535,gd=a.ka,hd=a.Sa):jd=null;if(null==jd)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var gc=Sg(a,jd);if(gc)for(var hc=2;hc< +g.length;hc++){var yb=Dg(a,g[hc]);if(void 0===yb){a.i("unrecognized value: "+g[hc]);break}yb&~fd&&a.i("warning: "+k(yb)+" exceeds "+Za+"-byte value");var Kh=gd.call(a,gc);a.i("changing "+K(a,gc.A)+" from "+K(a,Kh,Za)+" to "+K(a,yb,Za));hd.call(a,gc,yb,Za)}}break;case "g":a:{var Of=g[1],Lh=b;if(void 0!==Of){var kd=Sg(a,Of,!0);if(!kd)break a;Wg(a,kd,Lh);a.Pa(a.f,kd,!0)}a.eb(!0,c)}break;case "h":a.v.ca?(c||a.i("halting"),a.da()):ob(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var ld; +var zb=b.substr(2),zb=xa(zb);Dg(a,zb)?(c||a.i("true: "+zb),ld=!0):(c||a.i("false: "+zb),ld=!1);ld||(d=!1);break}f=!0;break;case "k":var Mh=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var md=0,nd=Z(),Ab=Z(a.b.u[6]);for(a.i("stack trace for "+K(a,Ab.A));10>md;){for(var Da=null,Nh=256;65536>Ab.A>>>0;){nd.A=a.ka(Ab,2);if(null==Ab.A||!Nh--)break;if(!(nd.A&1)){for(var Oh=a,ic=nd,Pf=null,Bb=ic.A,Qf=Bb,od=1;6>=od&&Bb;od++){if(2< +od){ic.A=Bb;var jc=fh(Oh,ic);if(0<=jc.indexOf("JSR")){var Rf=jc.indexOf(" ");if(Bb+(jc.indexOf(" ",Rf+1)-Rf-1)/2==Qf){Pf=jc;break}}}Bb-=2}ic.A=Qf;if(Da=Pf)break}}if(!Da||null==Da)break;var Sf=null;if("ks"==Mh){var Tf=Da.match(/[0-9A-F]+$/);Tf&&(Sf=mh(a,Tf[0]))}Da=wa(Da,50)+" ;"+(Sf||"stack="+K(a,Ab.A));a.i(Da);md++}md||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){mh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== +F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in I)if(F==ja){va=I[ja];ka=!!(a.ia&va);break}if(!va){a.i("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var pd=0;pd\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsh){if(uh(d,this.I)){this.D=new O(this,"1.30.1","failsafe");uh(this.D)&&(zh(this,d),a=2,Ah(this.D));this.D.set("timestamp",Ea());Bh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?uh(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.i(f+": "+g),Ah(d),uh(d)?(c=yh(d),e=!0):c=!1))}e&&xh(this,c?d:null)}else 2==a&&d.clear()}else xh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(Ch(this,this.b,b,c,a),this.b.ib());this.T&&(zh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function zh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} +function ph(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.da(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Th(a,b,c)}})}else c(a,null)} -function Uh(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Fh||ab(!0));m=!1}var g,l,m=!0;Fh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Rh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Fh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Fh||ab(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Rh(b,a,d,!0,e,p):Sh(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Uh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map +h.oa=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.B||(d.v.ha?ph(d,!1,!0):wh(d,d.pb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.ha&&!d.B)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");ph(d,a,!0);!a&&d.R?window&&window.location.reload():d.pb(sh)}else d.reset(),d.b&&d.b.ib()},!0;case "save":if(ra())c.parentNode.removeChild(c);else return this.J[b]= +c,c.onclick=function(){var a=th(d,!0);if(a){var b=!!(d.f&&!d.H||d.R),c=ph(d,b);b?Dh(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function th(a,b){var c=a.j;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Eh(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function Eh(a,b){a.j=null;b=Fa(sa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.j=b.data)}catch(d){n(d.message+" ("+c+")")}return a.j}function vh(a){var b=null;a.j&&(b=sa()+"/api/v1/user?req=load&user="+a.j+"&state="+Fh(a,"1.30.1"));return b} +function Dh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Fh(a,"1.30.1");d.data=c;b=Fa(sa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Uh(a,b,c)}})}else c(a,null)} +function Vh(a,b,c,d){function e(a){if(void 0===l){var b=g&&B(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Gh||ab(!0));m=!1}var g,l,m=!0;Gh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Sh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Gh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Gh||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Sh(b,a,d,!0,e,p):Th(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Vh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 4ed88e858..2bf5e0b94 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -24,6 +24,7 @@ http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 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 */ @@ -43,31 +44,32 @@ function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name= if(window){Ha||(Ha=window.location.search.substr(1));for(var Ja,Ka=/\+/g,La=/([^&=]+)=?([^&]*)/g;Ja=La.exec(Ha);)Ia[decodeURIComponent(Ja[1].replace(Ka," "))]=decodeURIComponent(Ja[2].replace(Ka," "))}function Ma(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 x(a,b){b||(b=v);a.prototype=Ma(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Na=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Na={},w=[];function Oa(a,b,c){Na[a]&&b&&(Na[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ha=[];this.R=0;this.o=[];this.vb=[Za,$a,ab,bb];a=new G(this);cb(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ha[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=eb(d,b)}function $a(a,b,c){var d=!1,e=this.controller,f=e.ha[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ha[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||eb(e,c)} -function ab(a,b){var c=-1,d=this.controller;(a=d.ha[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=eb(d,b)}function bb(a,b,c){var d=!1,e=this.controller;if(a=e.ha[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||eb(e,c)}function fb(a,b){if(b!=a.l){var c;a.l&&(c=(1<>>a.m;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Qa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Qa){t=n.size-(f-r);t>k&&(t=k);n.Qa=f-n.za+t;f=r+a.c;k-=t;l++;continue}}return kb(1,f,k)}f=new G(a,f,t,a.c,d,e);cb(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var B;e="";B?10>>=a.m;0>>=a.m;0>>a.m].Ya(b&a.g,b)}function nb(a,b){return a.b[(b&a.i)>>>a.m].S(b&a.g,b)}Ya.prototype.bb=function(a,b){this.R++;this.b[(a&this.i)>>>this.m].sb(a&this.g,b&255,a);this.R--}; -function ob(a,b,c){a.b[(b&a.i)>>>a.m].Ra(b&a.g,c&65535,b)}function pb(a){for(var b=0,c=[],d=0;d>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ia=[];this.R=0;this.o=[];this.vb=[Za,$a,ab,bb];a=new G(this);cb(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ia[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=eb(d,b)}function $a(a,b,c){var d=!1,e=this.controller,f=e.ia[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ia[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||eb(e,c)} +function ab(a,b){var c=-1,d=this.controller;(a=d.ia[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=eb(d,b)}function bb(a,b,c){var d=!1,e=this.controller;if(a=e.ia[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||eb(e,c)}function fb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.l;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Qa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Qa){t=n.size-(f-r);t>k&&(t=k);n.Qa=f-n.za+t;f=r+a.c;k-=t;l++;continue}}return kb(1,f,k)}f=new G(a,f,t,a.c,d,e);cb(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var D;e="";D?10>>=a.l;0>>=a.l;0>>a.l].Ya(b&a.g,b)}function nb(a,b){return a.b[(b&a.i)>>>a.l].S(b&a.g,b)}Ya.prototype.bb=function(a,b){this.R++;this.b[(a&this.i)>>>this.l].sb(a&this.g,b&255,a);this.R--}; +function ob(a,b,c){a.b[(b&a.i)>>>a.l].Ra(b&a.g,c&65535,b)}function pb(a){for(var b=0,c=[],d=0;da.a.Ia)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,r=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));qb(a,e,e,k,l,n,r,f[4])}}}function sb(a,b){a.o.push(b)}function tb(a,b){a.R||H(a.a,4,b)} -function kb(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Pa:20,nc:0};this.b={$c:0,cb:-1}}x(I);g=I.prototype;g.ka=function(a,b,c,d){this.m=b;this.a=c;this.G=d;var e=this;this.b.cb=ub(c,function(){e.b.la|=128;e.b.la&64&&(vb(e.a,e.b.oc),wb(e.a,e.b.cb,1E3/60))});this.b.oc=xb(64,6);rb(b,this,J);sb(b,this.reset.bind(this));D(this)};g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a}; -g.xc=function(a){this.b.la=a;a&64&&wb(this.a,this.b.cb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,yb(b))}zb(this)};g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.$a};g.Qb=function(){return this.a.na}; -g.Ac=function(a){var b=this.a;1170>b.Ia&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Wa=4194303,b.Ha=3915776):(b.Wa=262143,b.Ha=253952),yb(b));zb(this)};function zb(a){a.c.Pa=a.c.Pa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]};g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295}; -g.Zb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Jc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.wc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.uc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295};g.Jb=function(a){return this.a.P[0][a>>1&7]};g.vc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]}; -g.tc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.hc=function(a){return this.a.C[3][a>>1&7]};g.Sc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Qc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.P[3][a>>1&7]};g.Rc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ec=function(a){return this.a.P[3][(a>>1&7)+8]};g.Pc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295}; -g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Tb=function(){return this.a.u&49152?this.a.X[0]:this.a.f[6]};g.Dc=function(a){this.a.u&49152?this.a.X[0]=a:this.a.f[6]=a};g.Wb=function(){return this.a.f[7]};g.Gc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a}; -g.Ub=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[1]};g.Ec=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[1]=a};g.Vb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.X[3]};g.Fc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.X[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]};g.sc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.dc=function(){return 1};g.Oc=function(){};g.Fb=function(){return this.a.F}; -g.rc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.yc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.ab:0};g.Bc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255};g.Sb=function(){return Xa(this.a)};g.Cc=function(a){Ab(this.a,a&-1809|Xa(this.a)&1808);this.a.j|=128};g.tb=function(){};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.b.la=0}; +function kb(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Pa:20,nc:0};this.b={$c:0,cb:-1}}x(I);g=I.prototype;g.ca=function(a,b,c,d){this.l=b;this.a=c;this.G=d;var e=this;this.b.cb=ub(c,function(){e.b.la|=128;e.b.la&64&&(vb(e.a,e.b.oc),wb(e.a,e.b.cb,1E3/60))});this.b.oc=xb(64,6);rb(b,this,J);sb(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.b.la=0}; +g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a};g.xc=function(a){this.b.la=a;a&64&&wb(this.a,this.b.cb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,yb(b))}zb(this)}; +g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.$a};g.Qb=function(){return this.a.na};g.Ac=function(a){var b=this.a;1170>b.Ia&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Wa=4194303,b.Ha=3915776):(b.Wa=262143,b.Ha=253952),yb(b));zb(this)};function zb(a){a.c.Pa=a.c.Pa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]}; +g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Zb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Jc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.wc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.uc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295}; +g.Jb=function(a){return this.a.P[0][a>>1&7]};g.vc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]};g.tc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.hc=function(a){return this.a.C[3][a>>1&7]};g.Sc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Qc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.P[3][a>>1&7]}; +g.Rc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ec=function(a){return this.a.P[3][(a>>1&7)+8]};g.Pc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Tb=function(){return this.a.u&49152?this.a.Z[0]:this.a.f[6]};g.Dc=function(a){this.a.u&49152?this.a.Z[0]=a:this.a.f[6]=a};g.Wb=function(){return this.a.f[7]}; +g.Gc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a};g.Ub=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[1]};g.Ec=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[1]=a};g.Vb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[3]};g.Fc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]}; +g.sc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.dc=function(){return 1};g.Oc=function(){};g.Fb=function(){return this.a.F};g.rc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.yc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.ab:0};g.Bc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255}; +g.Sb=function(){return Xa(this.a)};g.Cc=function(a){Ab(this.a,a&-1809|Xa(this.a)&1808);this.a.j|=128};g.tb=function(){}; var K={},J=(K[62592]=[null,null,I.prototype.bc,I.prototype.Mc,"SISDR",1145],K[62608]=[null,null,I.prototype.$b,I.prototype.Kc,"SDSDR",1145],K[62624]=[null,null,I.prototype.ac,I.prototype.Lc,"SISAR",1145],K[62640]=[null,null,I.prototype.Zb,I.prototype.Jc,"SDSAR",1145],K[62656]=[null,null,I.prototype.Kb,I.prototype.wc,"KISDR",1145],K[62672]=[null,null,I.prototype.Ib,I.prototype.uc,"KDSDR",1145],K[62688]=[null,null,I.prototype.Jb,I.prototype.vc,"KISAR",1145],K[62704]=[null,null,I.prototype.Hb,I.prototype.tc, "KDSAR",1145],K[62798]=[null,null,I.prototype.Qb,I.prototype.Ac,"MMR3",1145],K[65382]=[null,null,I.prototype.Lb,I.prototype.xc,"LKS"],K[65400]=[null,null,I.prototype.Eb,I.prototype.qc,"CNSL"],K[65402]=[null,null,I.prototype.Nb,I.prototype.zc,"MMR0",1145],K[65404]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR1",1145],K[65406]=[null,null,I.prototype.Pb,I.prototype.tb,"MMR2",1145],K[65408]=[null,null,I.prototype.hc,I.prototype.Sc,"UISDR",1145],K[65424]=[null,null,I.prototype.fc,I.prototype.Qc,"UDSDR", 1145],K[65440]=[null,null,I.prototype.gc,I.prototype.Rc,"UISAR",1145],K[65456]=[null,null,I.prototype.ec,I.prototype.Pc,"UDSAR",1145],K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]= @@ -76,106 +78,107 @@ K[65486]=[null,null,I.prototype.Ub,I.prototype.Ec,"R6SUPER",1145],K[65487]=[null "MB",1170],K[65530]=[null,null,I.prototype.Rb,I.prototype.Bc,"PIR"],K[65532]=[null,null,I.prototype.cc,I.prototype.Nc,"SL"],K[65534]=[null,null,I.prototype.Sb,I.prototype.Cc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624]; J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688]; J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440]; -J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),Hb(this,Db?Ib:Jb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},Y:function(a,b){a&1&&tb(this.m,b);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},ea: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.ia=!0},H:function(a,b){return this.I(a,b)}, -R:function(a,b){return this.V(a,b)},$:function(a,b,c){this.v||this.sb(a,b,c)},ga:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&tb(this.m,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&tb(this.m,b);return this.o[a>>1]},Z:function(a,b){this.c[a]=b;this.ia=!0},da:function(a,b){this.c[a]=b;this.ia=!0},fa:function(a,b,c){a&1&&tb(this.m,c);this.g.setUint16(a,b,!0);this.ia=!0},qa:function(a,b,c){a&1&&tb(this.m,c);this.o[a>> -1]=b;this.ia=!0}};function cb(a,b,c){a.G=b;a.i=a.l=0;c&&((a.i=c.i)&&Lb(a,Mb,!1),(a.l=c.l)&&Nb(a,Mb,!1))}function Nb(a,b,c){c&&a.l||(a.eb=!a.v&&b[1]||a.A,a.Ra=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Lb(a,b,c){c&&a.i||(a.Ya=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function Hb(a,b){b||(b=Ob);Lb(a,b,void 0);Nb(a,b,void 0)} -var Ob=[],Kb=[G.prototype.M,G.prototype.ea,G.prototype.Y,G.prototype.ra],Mb=[G.prototype.H,G.prototype.$,G.prototype.R,G.prototype.ga];if(Sa)var Jb=[G.prototype.D,G.prototype.Z,G.prototype.N,G.prototype.fa],Ib=[G.prototype.J,G.prototype.da,G.prototype.W,G.prototype.qa]; -function Pb(a,b){v.call(this,"CPU",a,Pb);var c=a.multiplier||1;this.La=a.cycles||b;this.$=c;this.Va=Math.round(this.La/1E4)/100;this.da=this.Va*this.$;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Ja=this.fa=0;this.Ka=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.mb=this.mc.bind(this);D(this)}x(Pb);var Qb=["power","reset"];g=Pb.prototype; -g.ka=function(a,b,c,d){this.w=a;this.m=b;this.G=d;for(b=0;ba.Y/a.da&&(b=1),a.$=b,b=a.Va*a.$,a.da!=b)){a.da=b;b=a.da.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=sa();a.Z=0;Wb(a)}function ub(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function wb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.La*a.$/1E3*c|0,a.H[b][0]=c+Yb(a))}function Yb(a,b){var c=a.ea-=a.a;a.a=0;b&&(a.ea=0);return c} -g.mc=function(){if(this.h.T){this.Xa>=this.La&&Wb(this,!0);this.ya=0;this.Da=sa();if(this.Z){var a=this.Da-this.Z;a>this.kb&&(this.N+=a,this.N>this.Da&&(this.N=this.Da))}try{do{for(var b,c=this.h.Ma?1:this.Na,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Yb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Ja=this.Ja+this.hb()|0;this.fa-=a;0>=this.fa&&(this.fa+=this.pa,f=!0);0<=this.qa&&this.qa<=Xb(this)&& -(this.pa=this.qa=-1,Tb(this),E(this),f=!0);f&&this.O(Xb(this)+" cycles: checksum="+h(this.Ja))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.Na;15<=++this.lb&&(this.w&&this.w.ca(),this.lb=0);break}}while(this.h.T)}catch(n){E(this);this.w&&this.w.stop(sa(),Xb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.Z=sa();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ -this.Na));d-=this.Z-this.Da;if(e=this.Z-this.N)this.Y=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Vb(this));if(0>d||this.Yd&&(this.N-=d),d=0;this.Xa+=this.ya;this.Z+=d;b(c,d)}}};function Ub(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Vb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Xb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; -function E(a){if(a.h.T){Yb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Xb(a))}a.h.complete=void 0}function Zb(a){this.Ia=+a.model||1170;this.Cb=a.resetAddr||0;Pb.call(this,a,6666667);this.decode=1120==this.Ia?$b.bind(this):ac.bind(this);bc(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x(Zb,Pb);g=Zb.prototype;g.reset=function(){this.status("model "+this.Ia);this.h.T&&E(this);bc(this);Sb(this);this.h.error=!1;this.parent.reset.call(this)}; -function bc(a){a.l=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.X=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Ta=0;a.ga=-1;cc(a)}function cc(a){a.oa=255;a.F=0;a.ab=0;a.A=0;a.ma=0;a.$a=0;a.na=0;a.Ba=0;a.Fa=0;a.Wa=262143;a.Ha=253952;a.j|=2;a.m&&yb(a)}function yb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.jc,a.Ra=a.Uc,fb(a.m,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.ic,a.Ra=a.Tc,fb(a.m,16))}g.hb=function(){return 0}; -g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.$]);a.set(2,pb(this.m));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Vb(this,b[3]);a:{b=this.m;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.X[c]=a.f[6],a.f[6]=a.X[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.l=b,a.g=c||0)}function ec(a,b,c,d){a.j&128||(a.o=a.i=a.l=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.l=b,a.g=a.o^a.l>>1)}function fc(a,b,c,d){a.j&128||(a.o=a.i=a.l=b,a.g=(c^d)&(d^b))} -function H(a,b,c){if(!a.R){var d=!1;0>a.ga?a.ga=Xa(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.$a=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);Ab(a,f&-12289|a.ga>>2&12288);d&&(a.F|=4,a.f[6]=4);gc(a,a.ga);gc(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ga=-1;if(26!=c)throw b;}}function hc(a){var b=ic(a),c=ic(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;Ab(a,c);a.j&=-17} -function jc(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: -128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ga&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.m].eb(b&a.g,c&255,b)}function ic(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} -function gc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= -8;break;case 6:return e=dc(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=dc(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.bb=function(a,b){this.Ba?(this.R++,kc(this,jc(this,a,5),b),this.R--):this.m.bb(a,b)};g.yb=function(a,b,c){return lc(this,a,b,c)};g.zb=function(a,b,c){return jc(this,lc(this,a,b,c),c)}; -g.ic=function(a){return nb(this.m,a)};g.jc=function(a){return nb(this.m,jc(this,a,2))};g.Tc=function(a,b){ob(this.m,a,b&65535)};g.Uc=function(a,b){ob(this.m,jc(this,a,4),b)};function mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=lc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.X[a.u>>12&3];return c} -function nc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=lc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=jc(a,e|c&65536,4),a.s=a.u>>14&3,ob(a.m,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.X[a.u>>12&3]=d}function oc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.m,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?nb(a.m,a.I(b,c,2)):a.f[c]}function pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return lc(a,b,c,8)} -function qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.m,c)):a=a.f[c]&255;return a}function rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?nb(a.m,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ta=a.I(b,e,7),kc(a,e,d.call(a,c,mb(a.m,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),ob(a.m,e,d.call(a,c,nb(a.m,e)))):a.f[e]=d.call(a,c,a.f[e])} -function sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?kc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?ob(a.m,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.ea=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.ab&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& -1&&this.j++;this.A&57344||(this.ma=0,this.$a=this.f[7]);this.j=this.j&7|this.u&16;this.decode(dc(this))}while(0>1|b<<16;P(this,a);return a&65535}function zc(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function Ac(a,b){a=b&~a;N(this,a);return a}function Bc(a,b){a=b&~a;N(this,a<<8);return a}function Cc(a,b){a|=b;N(this,a);return a}function Dc(a,b){a|=b;N(this,a<<8);return a}function Ec(a,b){a=~b|65536;O(this,a);return a&65535}function Fc(a,b){a=~b|256;O(this,a<<8);return a&255} -function Gc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function Hc(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function Ic(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function Jc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function Kc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function Lc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} -function Mc(a,b){a=b<<1|this.l>>16&1;P(this,a);return a&65535}function Nc(a,b){a=b<<1|this.l>>16&1;P(this,a<<8);return a&255}function Oc(a,b){a=(this.l&65536|b)>>1|b<<16;P(this,a);return a&65535}function Pc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Qc(a,b){var c=b-a;fc(this,c,a,b);return c&65535}function Rc(a,b){var c=b-a;fc(this,c<<8,a<<8,b<<8);return c&255}function Sc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535} -function Tc(a,b){a^=b;N(this,a);return a&65535}function Uc(a){S(this,a,Q(this,a),uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Vc(a){var b=rc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} -function Wc(a){var b=rc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Xc(a){T(this,a,!M(this))}function Yc(a){T(this,a,M(this))} -function Zc(a){S(this,a,Q(this,a),Ac);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function $c(a){R(this,a,oc(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ad(a){S(this,a,Q(this,a),Cc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function bd(a){R(this,a,oc(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function cd(a){N(this,Q(this,a)&rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function dd(a){N(this,(oc(this,a)&qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ed(a){T(this,a,this.i&65535?0:4)}function fd(a){T(this,a,!this.ja()==!(this.g&32768))}function gd(a){T(this,a,!!(this.i&65535)&&!this.ja()==!(this.g&32768))}function hd(a){T(this,a,!M(this)&&!!(this.i&65535))} -function id(a){T(this,a,(this.i&65535?0:4)||!this.ja()!=!(this.g&32768))}function jd(a){T(this,a,M(this)||(this.i&65535?0:4))}function kd(a){T(this,a,!this.ja()!=!(this.g&32768))}function ld(a){T(this,a,this.ja())}function md(a){T(this,a,!!(this.i&65535))}function nd(a){T(this,a,!this.ja())}function od(){H(this,12,1);this.a-=5}function pd(a){T(this,a,!0)}function qd(a){T(this,a,!(this.g&32768))}function rd(a){T(this,a,this.g&32768?2:0)} -function U(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5}function sd(a){var b=Q(this,a);a=rc(this,a);fc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function td(a){var b=oc(this,a)<<8;a=qc(this,a)<<8;fc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} -function ud(a){var b=rc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.l=65536,this.a-=7}function vd(){H(this,24,2);this.a-=25}function wd(){this.u&49152?(this.F|=128,H(this,4,3)):E(this);this.a-=7} -function xd(){H(this,16,4);this.a-=25}var yd=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;a=pc(this,a);this.f[7]=a&65535;this.a=b-yd[this.c]}var zd=[0,14,14,17,14,18,16,20];function Ad(a){var b=this.a,c=pc(this,a);a=a>>6&7;gc(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-zd[this.c]}var Bd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Cd(a){var b=Q(this,a),c=this.a;N(this,tc(this,a,b));this.a=c-Bd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} -function Dd(a){var b=oc(this,a);N(this,sc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Ed=[7,13,13,17,14,18,17,21];function Fd(a){var b=rc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Md(a){S(this,a,Q(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function X(a){S(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)}function Nd(){H(this,28,5);this.a-=5}function Od(){this.j&4||this.w.ca();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Pd(a){S(this,a,Q(this,a),Tc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){H(this,8,6)}function $b(a){Qd[a>>12].call(this,a)}function Rd(a){Sd[a>>6&3].call(this,a)}function Td(a){Ud[a>>6&3].call(this,a)}function Vd(a){Wd[a>>6&3].call(this,a)}function Xd(a){Yd[a&15].call(this,a)} -function Zd(a){$d[a&15].call(this,a)}function ae(a){be[a>>6&3].call(this,a)}function ce(a){de[a>>6&3].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)} -var Qd=[function(a){ge[a>>8&15].call(this,a)},Cd,sd,cd,Zc,ad,Uc,Y,function(a){he[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Md,Y],ge=[function(a){ie[a>>4&15].call(this,a)},pd,md,ed,fd,kd,gd,id,Ad,Ad,Rd,Td,Vd,Y,Y,Y],Sd=[function(a){O(this,tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Ec);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Gc);this.a-=this.c?9:3+(7==this.b?2:0)}],Ud=[function(a){S(this,a,0,Kc); -this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=rc(this,a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Wd=[function(a){S(this,a,0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,wc);this.a-=this.c?9:3+(7==this.b?2:0)}],ie=[function(a){je[a& -15].call(this,a)},Y,Y,Y,V,V,V,V,Jd,Y,Xd,Zd,X,X,X,X],je=[wd,Od,Id,od,xd,Hd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Yd=[Gd,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},U,function(){this.i=1;this.a-=5},U,U,U,function(){this.o=0;this.a-=5},U,U,U,U,U,U,U],$d=[Gd,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],he=[nd,ld,hd,jd,qd,rd,Xc,Yc,vd,Nd,ae,ce,ee,Y,Y,Y],be=[function(a){O(this,sc(this,a,0)); -this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Hc);this.a-=this.c?9:3+(7==this.b?2:0)}],de=[function(a){R(this,a,0,Lc);this.a-=this.c?11:6},function(a){R(this,a,M(this)?1:0,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,M(this)?1:0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=qc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],fe= -[function(a){R(this,a,0,Pc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,zc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ac(a){ke[a>>12].call(this,a)} -var ke=[function(a){le[a>>8&15].call(this,a)},Cd,sd,cd,Zc,ad,Uc,function(a){me[a>>8&15].call(this,a)},function(a){ne[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Md,Y],le=[function(a){oe[a>>4&15].call(this,a)},pd,md,ed,fd,kd,gd,id,Ad,Ad,Rd,Td,Vd,function(a){pe[a>>6&3].call(this,a)},Y,Y],pe=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=mc(this,a,0);gc(this,a);N(this,a);this.a-=11},function(a){var b=ic(this), -c=this.a;nc(this,a,0,b);N(this,b);this.a=c-Ed[this.c]},function(a){N(this,tc(this,a,this.ja?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],oe=[function(a){qe[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Jd,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},Xd,Zd,X,X,X,X],qe=[wd,Od,Id,od,xd,Hd,function(){hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],me=[Fd,Fd,ud,ud,Vc,Vc,Wc,Wc,Pd,Pd,Y,Y,Y,Y,Kd,Kd],ne=[nd,ld,hd,jd,qd,rd,Xc,Yc,vd,Nd,ae,ce,ee,function(a){re[a>>6&3].call(this, -a)},Y,Y],re=[Y,function(a){a=mc(this,a,65536);gc(this,a);N(this,a);this.a-=11},function(a){var b=ic(this),c=this.a;nc(this,a,65536,b);N(this,b);this.a=c-Ed[this.c]},Y];function se(a){v.call(this,"ROM",a,se);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ka(this.i);if(this.i){a=this.i;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){te(c,a,b,f)})}}x(se); -se.prototype.ka=function(a,b,c,d){this.m=b;this.a=c;this.G=d;ue(this)};se.prototype.ba=function(){this.l&&(this.G&&this.G.a(this.id,this.o,this.c,this.l),delete this.l);return!0};se.prototype.aa=function(){return!0}; -function te(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Oa(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.l=l.symbols;if(!a.b.length){p("Empty ROM: "+b); -return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.Ea)return;b=qa(b[1]);if(this.s=Pa(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.aa=function(a){return a?this.save():!0};g.reset=function(){ze(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return ze(this)};function ze(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Za=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),Ib(this,Eb?Jb:Kb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},$:function(a,b){a&1&&tb(this.l,b);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},fa: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.ja=!0},H:function(a,b){return this.I(a,b)}, +R:function(a,b){return this.V(a,b)},ba:function(a,b,c){this.v||this.sb(a,b,c)},ha:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&tb(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&tb(this.l,b);return this.o[a>>1]},aa:function(a,b){this.c[a]=b;this.ja=!0},ea:function(a,b){this.c[a]=b;this.ja=!0},ga:function(a,b,c){a&1&&tb(this.l,c);this.g.setUint16(a,b,!0);this.ja=!0},qa:function(a,b,c){a&1&&tb(this.l,c);this.o[a>> +1]=b;this.ja=!0}};function cb(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&Mb(a,Nb,!1),(a.m=c.m)&&Ob(a,Nb,!1))}function Ob(a,b,c){c&&a.m||(a.eb=!a.v&&b[1]||a.A,a.Ra=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Mb(a,b,c){c&&a.i||(a.Ya=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function Ib(a,b){b||(b=Pb);Mb(a,b,void 0);Ob(a,b,void 0)} +var Pb=[],Lb=[G.prototype.M,G.prototype.fa,G.prototype.$,G.prototype.ra],Nb=[G.prototype.H,G.prototype.ba,G.prototype.R,G.prototype.ha];if(Sa)var Kb=[G.prototype.D,G.prototype.aa,G.prototype.N,G.prototype.ga],Jb=[G.prototype.J,G.prototype.ea,G.prototype.W,G.prototype.qa]; +function Qb(a,b){v.call(this,"CPU",a,Qb);var c=a.multiplier||1;this.La=a.cycles||b;this.ba=c;this.Va=Math.round(this.La/1E4)/100;this.ea=this.Va*this.ba;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Ja=this.ga=0;this.Ka=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.mb=this.mc.bind(this);C(this)}x(Qb);var Rb=["power","reset"];g=Qb.prototype; +g.ca=function(a,b,c,d){this.w=a;this.l=b;this.G=d;for(b=0;ba.$/a.ea&&(b=1),a.ba=b,b=a.Va*a.ba,a.ea!=b)){a.ea=b;b=a.ea.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=sa();a.aa=0;Xb(a)}function ub(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function wb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.La*a.ba/1E3*c|0,a.H[b][0]=c+Zb(a))}function Zb(a,b){var c=a.fa-=a.a;a.a=0;b&&(a.fa=0);return c} +g.mc=function(){if(this.h.T){this.Xa>=this.La&&Xb(this,!0);this.ya=0;this.Da=sa();if(this.aa){var a=this.Da-this.aa;a>this.kb&&(this.N+=a,this.N>this.Da&&(this.N=this.Da))}try{do{for(var b,c=this.h.Ma?1:this.Na,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Zb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Ja=this.Ja+this.hb()|0;this.ga-=a;0>=this.ga&&(this.ga+=this.pa,f=!0);0<=this.qa&&this.qa<=Yb(this)&& +(this.pa=this.qa=-1,Ub(this),E(this),f=!0);f&&this.O(Yb(this)+" cycles: checksum="+h(this.Ja))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.Na;15<=++this.lb&&(this.w&&this.w.da(),this.lb=0);break}}while(this.h.T)}catch(n){E(this);this.w&&this.w.stop(sa(),Yb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.aa=sa();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ +this.Na));d-=this.aa-this.Da;if(e=this.aa-this.N)this.$=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Wb(this));if(0>d||this.$d&&(this.N-=d),d=0;this.Xa+=this.ya;this.aa+=d;b(c,d)}}};function Vb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Wb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Yb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; +function E(a){if(a.h.T){Zb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Yb(a))}a.h.complete=void 0}function $b(a){this.Ia=+a.model||1170;this.Cb=a.resetAddr||0;Qb.call(this,a,6666667);this.decode=1120==this.Ia?ac.bind(this):bc.bind(this);cc(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x($b,Qb);g=$b.prototype;g.reset=function(){this.status("model "+this.Ia);this.h.T&&E(this);cc(this);Tb(this);this.h.error=!1;this.parent.reset.call(this)}; +function cc(a){a.m=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.Z=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Ta=0;a.ha=-1;dc(a)}function dc(a){a.oa=255;a.F=0;a.ab=0;a.A=0;a.ma=0;a.$a=0;a.na=0;a.Ba=0;a.Fa=0;a.Wa=262143;a.Ha=253952;a.j|=2;a.l&&yb(a)}function yb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.jc,a.Ra=a.Uc,fb(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.ic,a.Ra=a.Tc,fb(a.l,16))}g.hb=function(){return 0}; +g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.ba]);a.set(2,pb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Wb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function fc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function gc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function H(a,b,c){if(!a.R){var d=!1;0>a.ha?a.ha=Xa(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.$a=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);Ab(a,f&-12289|a.ha>>2&12288);d&&(a.F|=4,a.f[6]=4);hc(a,a.ha);hc(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ha=-1;if(26!=c)throw b;}}function ic(a){var b=jc(a),c=jc(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;Ab(a,c);a.j&=-17} +function kc(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: +128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ha&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.l].eb(b&a.g,c&255,b)}function jc(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} +function hc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= +8;break;case 6:return e=ec(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=ec(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.bb=function(a,b){this.Ba?(this.R++,lc(this,kc(this,a,5),b),this.R--):this.l.bb(a,b)};g.yb=function(a,b,c){return mc(this,a,b,c)};g.zb=function(a,b,c){return kc(this,mc(this,a,b,c),c)}; +g.ic=function(a){return nb(this.l,a)};g.jc=function(a){return nb(this.l,kc(this,a,2))};g.Tc=function(a,b){ob(this.l,a,b&65535)};g.Uc=function(a,b){ob(this.l,kc(this,a,4),b)};function nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=mc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.Z[a.u>>12&3];return c} +function oc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=mc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=kc(a,e|c&65536,4),a.s=a.u>>14&3,ob(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.Z[a.u>>12&3]=d}function pc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?nb(a.l,a.I(b,c,2)):a.f[c]}function qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return mc(a,b,c,8)} +function rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.l,c)):a=a.f[c]&255;return a}function sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?nb(a.l,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ta=a.I(b,e,7),lc(a,e,d.call(a,c,mb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),ob(a.l,e,d.call(a,c,nb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?lc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?ob(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.fa=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.ab&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +1&&this.j++;this.A&57344||(this.ma=0,this.$a=this.f[7]);this.j=this.j&7|this.u&16;this.decode(ec(this))}while(0>1|b<<16;P(this,a);return a&65535}function Ac(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){a=b&~a;N(this,a);return a}function Cc(a,b){a=b&~a;N(this,a<<8);return a}function Dc(a,b){a|=b;N(this,a);return a}function Ec(a,b){a|=b;N(this,a<<8);return a}function Fc(a,b){a=~b|65536;O(this,a);return a&65535}function Gc(a,b){a=~b|256;O(this,a<<8);return a&255} +function Hc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function Ic(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function Jc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function Kc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function Lc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function Mc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} +function Nc(a,b){a=b<<1|this.m>>16&1;P(this,a);return a&65535}function Oc(a,b){a=b<<1|this.m>>16&1;P(this,a<<8);return a&255}function Pc(a,b){a=(this.m&65536|b)>>1|b<<16;P(this,a);return a&65535}function Qc(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;P(this,a<<8);return a&255}function Rc(a,b){var c=b-a;gc(this,c,a,b);return c&65535}function Sc(a,b){var c=b-a;gc(this,c<<8,a<<8,b<<8);return c&255}function Tc(a,b){this.j&128||(this.o=this.i=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} +function Uc(a,b){a^=b;N(this,a);return a&65535}function Vc(a){S(this,a,Q(this,a),vc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Wc(a){var b=sc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.o=this.i=c;this.a-=(this.c?6:7)+b} +function Xc(a){var b=sc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Yc(a){T(this,a,!M(this))}function Zc(a){T(this,a,M(this))} +function $c(a){S(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ad(a){R(this,a,pc(this,a),Cc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function bd(a){S(this,a,Q(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function cd(a){R(this,a,pc(this,a),Ec);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function dd(a){N(this,Q(this,a)&sc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ed(a){N(this,(pc(this,a)&rc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function fd(a){T(this,a,this.i&65535?0:4)}function gd(a){T(this,a,!this.ka()==!(this.g&32768))}function hd(a){T(this,a,!!(this.i&65535)&&!this.ka()==!(this.g&32768))}function id(a){T(this,a,!M(this)&&!!(this.i&65535))} +function jd(a){T(this,a,(this.i&65535?0:4)||!this.ka()!=!(this.g&32768))}function kd(a){T(this,a,M(this)||(this.i&65535?0:4))}function ld(a){T(this,a,!this.ka()!=!(this.g&32768))}function md(a){T(this,a,this.ka())}function nd(a){T(this,a,!!(this.i&65535))}function od(a){T(this,a,!this.ka())}function pd(){H(this,12,1);this.a-=5}function qd(a){T(this,a,!0)}function rd(a){T(this,a,!(this.g&32768))}function sd(a){T(this,a,this.g&32768?2:0)} +function U(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5}function td(a){var b=Q(this,a);a=sc(this,a);gc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ud(a){var b=pc(this,a)<<8;a=rc(this,a)<<8;gc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} +function vd(a){var b=sc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}function wd(){H(this,24,2);this.a-=25}function xd(){this.u&49152?(this.F|=128,H(this,4,3)):E(this);this.a-=7} +function yd(){H(this,16,4);this.a-=25}var zd=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;a=qc(this,a);this.f[7]=a&65535;this.a=b-zd[this.c]}var Ad=[0,14,14,17,14,18,16,20];function Bd(a){var b=this.a,c=qc(this,a);a=a>>6&7;hc(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Ad[this.c]}var Cd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Dd(a){var b=Q(this,a),c=this.a;N(this,uc(this,a,b));this.a=c-Cd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} +function Ed(a){var b=pc(this,a);N(this,tc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Fd=[7,13,13,17,14,18,17,21];function Gd(a){var b=sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Nd(a){S(this,a,Q(this,a),Rc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function X(a){S(this,a,0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}function Od(){H(this,28,5);this.a-=5}function Pd(){this.j&4||this.w.da();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Qd(a){S(this,a,Q(this,a),Uc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){H(this,8,6)}function ac(a){Rd[a>>12].call(this,a)}function Sd(a){Td[a>>6&3].call(this,a)}function Ud(a){Vd[a>>6&3].call(this,a)}function Wd(a){Xd[a>>6&3].call(this,a)}function Yd(a){Zd[a&15].call(this,a)} +function $d(a){ae[a&15].call(this,a)}function be(a){ce[a>>6&3].call(this,a)}function de(a){ee[a>>6&3].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)} +var Rd=[function(a){he[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,Y,function(a){ie[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Nd,Y],he=[function(a){je[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,Y,Y,Y],Td=[function(a){O(this,uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Hc);this.a-=this.c?9:3+(7==this.b?2:0)}],Vd=[function(a){S(this,a,0,Lc); +this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=sc(this,a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Xd=[function(a){S(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)}],je=[function(a){ke[a& +15].call(this,a)},Y,Y,Y,V,V,V,V,Kd,Y,Yd,$d,X,X,X,X],ke=[xd,Pd,Jd,pd,yd,Id,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Zd=[Hd,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},U,function(){this.i=1;this.a-=5},U,U,U,function(){this.o=0;this.a-=5},U,U,U,U,U,U,U],ae=[Hd,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],ie=[od,md,id,kd,rd,sd,Yc,Zc,wd,Od,be,de,fe,Y,Y,Y],ce=[function(a){O(this,tc(this,a,0)); +this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Ic);this.a-=this.c?9:3+(7==this.b?2:0)}],ee=[function(a){R(this,a,0,Mc);this.a-=this.c?11:6},function(a){R(this,a,M(this)?1:0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,M(this)?1:0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=rc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],ge= +[function(a){R(this,a,0,Qc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Ac);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function bc(a){le[a>>12].call(this,a)} +var le=[function(a){me[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,function(a){ne[a>>8&15].call(this,a)},function(a){oe[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Nd,Y],me=[function(a){pe[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,function(a){qe[a>>6&3].call(this,a)},Y,Y],qe=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=nc(this,a,0);hc(this,a);N(this,a);this.a-=11},function(a){var b=jc(this), +c=this.a;oc(this,a,0,b);N(this,b);this.a=c-Fd[this.c]},function(a){N(this,uc(this,a,this.ka?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],pe=[function(a){re[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Kd,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},Yd,$d,X,X,X,X],re=[xd,Pd,Jd,pd,yd,Id,function(){ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ne=[Gd,Gd,vd,vd,Wc,Wc,Xc,Xc,Qd,Qd,Y,Y,Y,Y,Ld,Ld],oe=[od,md,id,kd,rd,sd,Yc,Zc,wd,Od,be,de,fe,function(a){se[a>>6&3].call(this, +a)},Y,Y],se=[Y,function(a){a=nc(this,a,65536);hc(this,a);N(this,a);this.a-=11},function(a){var b=jc(this),c=this.a;oc(this,a,65536,b);N(this,b);this.a=c-Fd[this.c]},Y];function te(a){v.call(this,"ROM",a,te);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ka(this.i);if(this.i){a=this.i;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){ue(c,a,b,f)})}}x(te); +te.prototype.ca=function(a,b,c,d){this.l=b;this.a=c;this.G=d;ve(this)};te.prototype.Y=function(){this.m&&(this.G&&this.G.a(this.id,this.o,this.c,this.m),delete this.m);return!0};te.prototype.X=function(){return!0}; +function ue(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Oa(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); +return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.Ea)return;b=qa(b[1]);if(this.s=Pa(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.Y=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +g.X=function(a){return a?this.save():!0};g.reset=function(){Ae(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return Ae(this)};function Ae(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Za=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.O(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;wb(this.a,this.J,1)}};var Ae={},ye=(Ae[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],Ae[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],Ae[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],Ae[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],Ae);u(function(){for(var a=C(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bDe){if(Fe(d,this.s)){this.l=new L(this,"1.30.1","failsafe");Fe(this.l)&&(Ke(this,d),a=2,Le(this.l));this.l.set("timestamp",ta());Me(this.l);var e=this.b&&!this.o;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Je(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Fe(d,k):("error"== -f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(ya("user",""),this.c=null)):this.O(f+": "+k),Le(d),Fe(d)?(c=Je(d),e=!0):c=!1))}e&&Ie(this,c?d:null)}else 2==a&&d.clear()}else Ie(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Ne(this,this.a,b,c,a),this.a.Aa());this.H&&(Ke(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.g=0}; -function Ke(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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Oe(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&E(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);Ve(a,b,c)}})}else c(a,null)} -function We(a,b,c,d){function e(a){if(void 0===l){var b=k&&C(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--Se||Fa(!0));n=!1}var k,l,n=!0;Se++;Na[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=r:B.appendChild(document.createTextNode(r));t.appendChild(B)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?Te(c,null,null,!1,e,function(d,n){n?(Oa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Se||Fa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Se||Fa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Te(b,a,d,!0,e,r):Ue(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Ld){f(Ld.message)}return n}window.embedPDP11=function(a,b,c,d){Fa(!1);return We(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map +g.Vc=function(a){if(a&=255){this.A&&this.A.call(this.s,a);if(this.g)if(13==a)this.o=0;else if(8==a)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;wb(this.a,this.J,1)}};var Be={},ze=(Be[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],Be[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],Be[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],Be[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],Be);u(function(){for(var a=B(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bEe){if(Ge(d,this.s)){this.m=new L(this,"1.30.1","failsafe");Ge(this.m)&&(Le(this,d),a=2,Me(this.m));this.m.set("timestamp",ta());Ne(this.m);var e=this.b&&!this.o;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ke(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Ge(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(ya("user",""),this.c=null)):this.O(f+": "+k),Me(d),Ge(d)?(c=Ke(d),e=!0):c=!1))}e&&Je(this,c?d:null)}else 2==a&&d.clear()}else Je(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Oe(this,this.a,b,c,a),this.a.Aa());this.H&&(Le(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function Le(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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Pe(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.X&&(c&&E(a.a),d=a.a.X(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);We(a,b,c)}})}else c(a,null)} +function Xe(a,b,c,d){function e(a){if(void 0===l){var b=k&&B(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--Te||Fa(!0));n=!1}var k,l,n=!0;Te++;Na[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=r:D.appendChild(document.createTextNode(r));t.appendChild(D)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?Ue(c,null,null,!1,e,function(d,n){n?(Oa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Te||Fa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Te||Fa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ue(b,a,d,!0,e,r):Ve(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Md){f(Md.message)}return n}window.embedPDP11=function(a,b,c,d){Fa(!1);return Xe(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map From 6bec38acb4e5ca91f12cea45afd5f4f6d15dc048 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 17:13:43 -0700 Subject: [PATCH 34/36] Updated READMEs --- devices/pdp11/README.md | 5 ++++- devices/pdp11/machine/1170/panel/README.md | 2 ++ devices/pdp11/machine/1170/test/README.md | 2 ++ devices/pdp11/machine/1170/vt100/README.md | 2 ++ devices/pdp11/panel/1170/README.md | 10 ++++++++++ devices/pdp11/panel/README.md | 11 +++++++++++ devices/pdp11/panel/test/README.md | 10 ++++++++++ devices/pdp11/rom/README.md | 2 +- modules/pdp11/README.md | 2 +- 9 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 devices/pdp11/panel/1170/README.md create mode 100644 devices/pdp11/panel/README.md create mode 100644 devices/pdp11/panel/test/README.md diff --git a/devices/pdp11/README.md b/devices/pdp11/README.md index 69ffee6fb..34379cd02 100644 --- a/devices/pdp11/README.md +++ b/devices/pdp11/README.md @@ -7,9 +7,12 @@ permalink: /devices/pdp11/ PDP-11 Device Configurations ---------------------------- -PDP-11 resources used by [PDPjs](/modules/pdp11/), our PDP-11 emulation module, include: +[PDP-11 Machines](/devices/pdp11/machine/) powered by [PDPjs](/modules/pdp11/) rely on a variety of devices and resources, including: * [Loaders](loader/) * [Machines](machine/) * [Panels](panel/) * [ROMs](rom/) + +Our collection of sample machines includes a +[PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) and [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/). diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md index 820a36b2d..279007e60 100644 --- a/devices/pdp11/machine/1170/panel/README.md +++ b/devices/pdp11/machine/1170/panel/README.md @@ -8,3 +8,5 @@ machines: --- {% include machine.html id="test1170" %} + +This machine is also available with our built-in [Debugger](debugger/). diff --git a/devices/pdp11/machine/1170/test/README.md b/devices/pdp11/machine/1170/test/README.md index 6bda346ad..6a57ed094 100644 --- a/devices/pdp11/machine/1170/test/README.md +++ b/devices/pdp11/machine/1170/test/README.md @@ -8,3 +8,5 @@ machines: --- {% include machine.html id="test1170" %} + +This machine is also available with our built-in [Debugger](debugger/). diff --git a/devices/pdp11/machine/1170/vt100/README.md b/devices/pdp11/machine/1170/vt100/README.md index 16ecf323e..c6ba79122 100644 --- a/devices/pdp11/machine/1170/vt100/README.md +++ b/devices/pdp11/machine/1170/vt100/README.md @@ -15,4 +15,6 @@ machines: {% include machine.html id="test1170" %} +This PDP-11/70 is also available with our built-in [Debugger](debugger/). + {% include machine.html id="vt100" %} diff --git a/devices/pdp11/panel/1170/README.md b/devices/pdp11/panel/1170/README.md new file mode 100644 index 000000000..c85e24b89 --- /dev/null +++ b/devices/pdp11/panel/1170/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11/70 Control Panels +permalink: /devices/pdp11/panel/1170/ +--- + +PDP-11/70 Control Panels +------------------------ + +* [PDP-11/70 Front Panel](front.xml) ([Debugger](debugger/front.xml)) diff --git a/devices/pdp11/panel/README.md b/devices/pdp11/panel/README.md new file mode 100644 index 000000000..7b0b537c7 --- /dev/null +++ b/devices/pdp11/panel/README.md @@ -0,0 +1,11 @@ +--- +layout: page +title: PDP-11 Control Panels +permalink: /devices/pdp11/panel/ +--- + +PDP-11 Control Panels +--------------------- + +* [11/70 Front Panels](1170/) +* [Terminal Test Panels](test/) diff --git a/devices/pdp11/panel/test/README.md b/devices/pdp11/panel/test/README.md new file mode 100644 index 000000000..868f069da --- /dev/null +++ b/devices/pdp11/panel/test/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11 Test Panels +permalink: /devices/pdp11/panel/test/ +--- + +PDP-11 Test Panels +------------------ + +* [Terminal Test Panel](terminal.xml) ([Debugger](debugger/terminal.xml)) diff --git a/devices/pdp11/rom/README.md b/devices/pdp11/rom/README.md index 0907e7fe0..c33d8afe3 100644 --- a/devices/pdp11/rom/README.md +++ b/devices/pdp11/rom/README.md @@ -7,4 +7,4 @@ permalink: /devices/pdp11/rom/ PDP-11 ROMs ----------- -* [Test ROM](custom/) ([original version](http://skn.noip.me/pdp11/boot.mac) created by [Paul Nankervis](paulnank@hotmail.com)) +* [Test ROM](test/) (based on [BOOT.MAC](http://skn.noip.me/pdp11/boot.mac) written by [Paul Nankervis](mailto:paulnank@hotmail.com)) diff --git a/modules/pdp11/README.md b/modules/pdp11/README.md index ae7a7f3e3..b56b76354 100644 --- a/modules/pdp11/README.md +++ b/modules/pdp11/README.md @@ -10,7 +10,7 @@ PDP-11 Machine Emulation Module (PDPjs) Overview --- PDPjs is our PDP-11 machine emulation module. The code is being adapted from -the JavaScript [PDP 11/70 Emulator (v1.3)](http://skn.noip.me/pdp11/pdp11.html) written by +the JavaScript [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by [Paul Nankervis](mailto:paulnank@hotmail.com). See the list of available [PDP-11 Machines](/devices/pdp11/machine/), which includes a From d928bef56295619dc76eb2a8a634780a3453e946 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 17:54:45 -0700 Subject: [PATCH 35/36] Register PC11 I/O handlers --- modules/pdp11/lib/pc11.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/pdp11/lib/pc11.js b/modules/pdp11/lib/pc11.js index e1e6f74c8..b8f886396 100644 --- a/modules/pdp11/lib/pc11.js +++ b/modules/pdp11/lib/pc11.js @@ -90,6 +90,9 @@ PC11.prototype.initBus = function(cmp, bus, cpu, dbg) this.bus = bus; this.cpu = cpu; this.dbg = dbg; + + bus.addIOTable(this, PC11.UNIBUS_IOTABLE); + this.setReady(); }; From e44bd4acec7d407188c9db81221e8cd81aa2bfd7 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 15 Oct 2016 17:55:16 -0700 Subject: [PATCH 36/36] Register PC11 I/O handlers --- versions/pdpjs/1.30.1/pdp11-dbg.js | 343 +++++++++++++++-------------- versions/pdpjs/1.30.1/pdp11.js | 205 ++++++++--------- 2 files changed, 275 insertions(+), 273 deletions(-) diff --git a/versions/pdpjs/1.30.1/pdp11-dbg.js b/versions/pdpjs/1.30.1/pdp11-dbg.js index 77ffbd639..b773c3a4e 100644 --- a/versions/pdpjs/1.30.1/pdp11-dbg.js +++ b/versions/pdpjs/1.30.1/pdp11-dbg.js @@ -32,86 +32,86 @@ for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:fu ma!=la&&null!=ma&&aa(ba,ga,{configurable:!0,writable:!0,value:ma}); function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function pa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ua(a){return a.replace(/[&<>"']/g,function(a){return ta[a]})}function wa(a,b){return(a+" ").slice(0,b)} +function pa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ua(a){return a.replace(/[&<>"']/g,function(a){return ta[a]})}function va(a,b){return(a+" ").slice(0,b)} function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ya={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,l;l=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Fa(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 l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function sa(){return"http://"+(window?window.location.host:"www.pcjs.org")} function n(a){window&&window.alert(a)}function Ga(a){var b=!1;window&&(b=window.confirm(a));return b}var Ha=null;function Ia(){if(null==Ha){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}Ha=a}return Ha}function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function Ka(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function La(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ua=this.id:(this.Gb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,jb:!1,Hb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.g=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; +function Ua(a){if(Ra)try{for(var b=0;bb?this.Ua=this.id:(this.Gb=this.id.substr(0,b),this.Ua=this.id.substr(b+1));this[a]=c;this.v={ready:!1,jb:!1,Hb:!1,ha:!1,error:!1};this.xb=null;this.v.error=!1;this.J={};this.i=null;this.ia=d||0;t.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Nb,Ob,Pb,Qb];a=new J(this);Rb(a,this.g);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.g&&G(this.g,64)&&E(this.g,e[4]+".readByte("+K(this.g,b)+"): "+K(this.g,c),!0,!0),c;c=Tb(d,b,!0);this.g&&G(this.g,64)&&E(this.g,"warning: unconverted read access to byte @"+K(this.g,b)+": "+K(this.g,c),!0,!0);return c} -function Ob(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.g&&G(this.g,64)&&E(this.g,f[4]+".writeByte("+K(this.g,c)+","+K(this.g,b)+")",!0,!0):(Tb(e,c,!0,b),this.g&&G(this.g,64)&&E(this.g,"warning: unconverted write access to byte @"+K(this.g,c)+": "+K(this.g,b),!0,!0))} -function Pb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.g&&G(this.g,64)&&E(this.g,a[4]+".readWord("+K(this.g,b)+"): "+K(this.g,c),!0,!0),c;c=Tb(d,b,!1);this.g&&G(this.g,64)&&E(this.g,"warning: unconverted read access to word @"+K(this.g,b)+": "+K(this.g,c),!0,!0);return c} -function Qb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.g&&G(this.g,64)&&E(this.g,a[4]+".writeWord("+K(this.g,c)+","+K(this.g,b)+")",!0,!0):(Tb(e,c,!1,b),this.g&&G(this.g,64)&&E(this.g,"warning: unconverted write access to word @"+K(this.g,c)+": "+K(this.g,b),!0,!0))} -function Ub(a,b){if(b!=a.j){var c;a.j&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.tb+=m.A-f,m.A=f,!0;if(f>=m.A+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.A+q;f=p+a.sa;g-=q;l++;continue}}return $b(1,f,g)}f=new J(a,f,q,a.sa,d,e);Rb(f,a.g,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>2;this.w=this.sa-1;this.D=this.H/this.sa|0;this.Ga=[];this.C=0;this.B=[];this.ic=[Nb,Ob,Pb,Qb];a=new J(this);Rb(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ga[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&G(this.i,64)&&E(this.i,e[4]+".readByte("+K(this.i,b)+"): "+K(this.i,c),!0,!0),c;c=Tb(d,b,!0);this.i&&G(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+K(this.i,b)+": "+K(this.i,c),!0,!0);return c} +function Ob(a,b,c){var d=!1,e=this.controller,f=e.Ga[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ga[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&G(this.i,64)&&E(this.i,f[4]+".writeByte("+K(this.i,c)+","+K(this.i,b)+")",!0,!0):(Tb(e,c,!0,b),this.i&&G(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+K(this.i,c)+": "+K(this.i,b),!0,!0))} +function Pb(a,b){var c=-1,d=this.controller;(a=d.Ga[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&G(this.i,64)&&E(this.i,a[4]+".readWord("+K(this.i,b)+"): "+K(this.i,c),!0,!0),c;c=Tb(d,b,!1);this.i&&G(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+K(this.i,b)+": "+K(this.i,c),!0,!0);return c} +function Qb(a,b,c){var d=!1,e=this.controller;if(a=e.Ga[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&G(this.i,64)&&E(this.i,a[4]+".writeWord("+K(this.i,c)+","+K(this.i,b)+")",!0,!0):(Tb(e,c,!1,b),this.i&&G(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+K(this.i,c)+": "+K(this.i,b),!0,!0))} +function Ub(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.ga;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.tb+=m.A-f,m.A=f,!0;if(f>=m.A+m.tb){q=m.size-(f-p);q>g&&(q=g);m.tb=f-m.A+q;f=p+a.sa;g-=q;l++;continue}}return $b(1,f,g)}f=new J(a,f,q,a.sa,d,e);Rb(f,a.i,m);a.W[l++]=f;f=p+a.sa;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ga;0>>=a.ga;0>>this.ga].Cb(a&this.w,a)};h.zb=function(a){this.C++;a=this.W[(a&this.f)>>>this.ga].Jb(a&this.w,a);this.C--;return a};h.ka=function(a){return this.W[(a&this.f)>>>this.ga].ra(a&this.w,a)}; h.mb=function(a){var b=a&this.w,c=(a&this.f)>>>this.ga;this.C++;a=this.W[c].Kb(b,a);this.C--;return a};h.Db=function(a,b){this.W[(a&this.f)>>>this.ga].Fb(a&this.w,b&255,a)};h.rb=function(a,b){this.C++;this.W[(a&this.f)>>>this.ga].Pb(a&this.w,b&255,a);this.C--};h.Sa=function(a,b){this.W[(a&this.f)>>>this.ga].ub(a&this.w,b&65535,a)};h.Eb=function(a,b){var c=a&this.w,d=(a&this.f)>>>this.ga;this.C++;this.W[d].Qb(c,b&65535,a);this.C--}; function bc(a){for(var b=0,c=[],d=0;da.b.Ya)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));kc(a,e,e,g,l,m,p,f[4])}}}function mc(a,b){a.B.push(b)} -function nc(a,b){a.C||(a.g&&G(a.g,536870912)&&E(a.g,"memory fault on address "+K(a.g,b),!0,!0),a.b.ea(4,b))}function $b(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.j={data:0,Ld:0,Bb:20,bd:0};this.f={Md:0,Ob:-1}}u(L);h=L.prototype; -h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.g=d;var e=this;this.f.Ob=oc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(pc(e.b,e.f.cd),qc(e.b,e.f.Ob,1E3/60))});this.f.cd=rc(64,6);lc(b,this,M);mc(b,this.reset.bind(this));H(this)};h.reset=function(){this.j.Bb=this.j.Bb&-120|20;this.f.Ia=0};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.md=function(a){this.f.Ia=a;a&64&&qc(this.b,this.f.Ob,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.j.bd:this.j.data)&65535}; -h.ed=function(a){this.j.data=a};h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.od=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,sc(b))}tc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma}; -h.pd=function(a){var b=this.b;1170>b.Ya&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),sc(b));tc(this)};function tc(a){a.j.Bb=a.j.Bb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Rc=function(a){return this.b.P[1][a>>1&7]};h.Bd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Pc=function(a){return this.b.P[1][(a>>1&7)+8]};h.zd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.b.qa[1][a>>1&7]}; -h.Ad=function(a,b){b=b>>1&7;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.Oc=function(a){return this.b.qa[1][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.zc=function(a){return this.b.P[0][a>>1&7]};h.ld=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.jd=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.qa[0][a>>1&7]};h.kd=function(a,b){b=b>>1&7;this.b.qa[0][b]=a;this.b.P[0][b]&=65295}; -h.wc=function(a){return this.b.qa[0][(a>>1&7)+8]};h.hd=function(a,b){b=(b>>1&7)+8;this.b.qa[0][b]=a;this.b.P[0][b]&=65295};h.Xc=function(a){return this.b.P[3][a>>1&7]};h.Hd=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Vc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Fd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.b.qa[3][a>>1&7]};h.Gd=function(a,b){b=b>>1&7;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.Uc=function(a){return this.b.qa[3][(a>>1&7)+8]}; -h.Ed=function(a,b){b=(b>>1&7)+8;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.bb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Ic=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.sd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Lc=function(){return this.b.u[7]};h.vd=function(a){this.b.u[7]=a};h.cb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]}; -h.hb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Jc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]};h.td=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Kc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.ud=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.gd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){}; -h.Tc=function(){return 1};h.Dd=function(){};h.uc=function(){return this.b.Z};h.fd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc};h.nd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Mb:0};h.qd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.F|=2};h.Sc=function(a){return a?this.b.Na&65280:0};h.Cd=function(a){this.b.Na=a|255};h.Hc=function(){return Kb(this.b)};h.rd=function(a){uc(this.b,a&-1809|Kb(this.b)&1808);this.b.F|=128}; +function nc(a,b){a.C||(a.i&&G(a.i,536870912)&&E(a.i,"memory fault on address "+K(a.i,b),!0,!0),a.b.ea(4,b))}function $b(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function L(a){r.call(this,"Device",a,L,256);this.g={data:0,Pd:0,Bb:20,dd:0};this.f={Qd:0,Ob:-1}}u(L);h=L.prototype; +h.Ba=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.Ob=oc(c,function(){e.f.Ia|=128;e.f.Ia&64&&(pc(e.b,e.f.ed),qc(e.b,e.f.Ob,1E3/60))});this.f.ed=rc(64,6);lc(b,this,M);mc(b,this.reset.bind(this));H(this)};h.reset=function(){this.g.Bb=this.g.Bb&-120|20;this.f.Ia=0};h.Ac=function(){var a=this.f.Ia;this.f.Ia&=-129;return a};h.od=function(a){this.f.Ia=a;a&64&&qc(this.b,this.f.Ob,1E3/60);this.f.Ia=a&-129};h.tc=function(a){return(a?this.g.dd:this.g.data)&65535}; +h.gd=function(a){this.g.data=a};h.Cc=function(){var a=this.b;return a.G&62337|a.ua<<5|a.va<<1};h.qd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ua=a>>5&3;b.va=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ja!=c&&(b.Ja=c,sc(b))}tc(this)};h.Dc=function(){var a=this.b.La;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ec=function(){return this.b.qb};h.Fc=function(){return this.b.Ma}; +h.rd=function(a){var b=this.b;1170>b.Ya&&(a&=-49);b.Ma!=a&&(b.Ma=a,a&16?(b.Wa=4194303,b.wa=3915776):(b.Wa=262143,b.wa=253952),sc(b));tc(this)};function tc(a){a.g.Bb=a.g.Bb&-8|(a.b.Ja?a.b.Ma&16?1:2:4)}h.Tc=function(a){return this.b.P[1][a>>1&7]};h.Fd=function(a,b){this.b.P[1][b>>1&7]=a&65295};h.Rc=function(a){return this.b.P[1][(a>>1&7)+8]};h.Dd=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};h.Sc=function(a){return this.b.qa[1][a>>1&7]}; +h.Ed=function(a,b){b=b>>1&7;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.Qc=function(a){return this.b.qa[1][(a>>1&7)+8]};h.Cd=function(a,b){b=(b>>1&7)+8;this.b.qa[1][b]=a;this.b.P[1][b]&=65295};h.zc=function(a){return this.b.P[0][a>>1&7]};h.nd=function(a,b){this.b.P[0][b>>1&7]=a&65295};h.xc=function(a){return this.b.P[0][(a>>1&7)+8]};h.ld=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295};h.yc=function(a){return this.b.qa[0][a>>1&7]};h.md=function(a,b){b=b>>1&7;this.b.qa[0][b]=a;this.b.P[0][b]&=65295}; +h.wc=function(a){return this.b.qa[0][(a>>1&7)+8]};h.kd=function(a,b){b=(b>>1&7)+8;this.b.qa[0][b]=a;this.b.P[0][b]&=65295};h.Zc=function(a){return this.b.P[3][a>>1&7]};h.Ld=function(a,b){this.b.P[3][b>>1&7]=a&65295};h.Xc=function(a){return this.b.P[3][(a>>1&7)+8]};h.Jd=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.b.qa[3][a>>1&7]};h.Kd=function(a,b){b=b>>1&7;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.Wc=function(a){return this.b.qa[3][(a>>1&7)+8]}; +h.Id=function(a,b){b=(b>>1&7)+8;this.b.qa[3][b]=a;this.b.P[3][b]&=65295};h.bb=function(a){a&=7;return this.b.L&2048?this.b.Ea[a]:this.b.u[a]};h.gb=function(a,b){b&=7;this.b.L&2048?this.b.Ea[b]=a:this.b.u[b]=a};h.Kc=function(){return this.b.L&49152?this.b.ta[0]:this.b.u[6]};h.wd=function(a){this.b.L&49152?this.b.ta[0]=a:this.b.u[6]=a};h.Nc=function(){return this.b.u[7]};h.zd=function(a){this.b.u[7]=a};h.cb=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Ea[a]}; +h.hb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Ea[b]=a};h.Lc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[1]};h.xd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[1]=a};h.Mc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ta[3]};h.yd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ta[3]=a};h.vc=function(a){return this.b.cc[a-65504>>1]};h.jd=function(a,b){this.b.cc[b-65504>>1]=a};h.$b=function(a){return 65520==a?61183:0};h.fc=function(){}; +h.Vc=function(){return 1};h.Hd=function(){};h.uc=function(){return this.b.Z};h.hd=function(){this.b.Z=0};h.Bc=function(){return this.b.bc};h.pd=function(a,b){b&1||(a&=255);this.b.bc=a};h.Gc=function(a){return a?this.b.Mb:0};h.sd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.F|=2};h.Uc=function(a){return a?this.b.Na&65280:0};h.Gd=function(a){this.b.Na=a|255};h.Jc=function(){return Kb(this.b)};h.vd=function(a){uc(this.b,a&-1809|Kb(this.b)&1808);this.b.F|=128}; h.ec=function(a,b){G(this)&&E(this,"writeIgnored("+oa(b)+"): "+oa(a),!0,!0)}; -var N={},M=(N[62592]=[null,null,L.prototype.Rc,L.prototype.Bd,"SISDR",1145],N[62608]=[null,null,L.prototype.Pc,L.prototype.zd,"SDSDR",1145],N[62624]=[null,null,L.prototype.Qc,L.prototype.Ad,"SISAR",1145],N[62640]=[null,null,L.prototype.Oc,L.prototype.yd,"SDSAR",1145],N[62656]=[null,null,L.prototype.zc,L.prototype.ld,"KISDR",1145],N[62672]=[null,null,L.prototype.xc,L.prototype.jd,"KDSDR",1145],N[62688]=[null,null,L.prototype.yc,L.prototype.kd,"KISAR",1145],N[62704]=[null,null,L.prototype.wc,L.prototype.hd, -"KDSAR",1145],N[62798]=[null,null,L.prototype.Fc,L.prototype.pd,"MMR3",1145],N[65382]=[null,null,L.prototype.Ac,L.prototype.md,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.ed,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.od,"MMR0",1145],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1",1145],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2",1145],N[65408]=[null,null,L.prototype.Xc,L.prototype.Hd,"UISDR",1145],N[65424]=[null,null,L.prototype.Vc,L.prototype.Fd,"UDSDR", -1145],N[65440]=[null,null,L.prototype.Wc,L.prototype.Gd,"UISAR",1145],N[65456]=[null,null,L.prototype.Uc,L.prototype.Ed,"UDSAR",1145],N[65472]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET0"],N[65473]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET0"],N[65474]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET0"],N[65475]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET0"],N[65476]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET0"],N[65477]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET0"],N[65478]= -[null,null,L.prototype.Ic,L.prototype.sd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Lc,L.prototype.vd,"R7KERNEL"],N[65480]=[null,null,L.prototype.cb,L.prototype.hb,"R0SET1",1145],N[65481]=[null,null,L.prototype.cb,L.prototype.hb,"R1SET1",1145],N[65482]=[null,null,L.prototype.cb,L.prototype.hb,"R2SET1",1145],N[65483]=[null,null,L.prototype.cb,L.prototype.hb,"R3SET1",1145],N[65484]=[null,null,L.prototype.cb,L.prototype.hb,"R4SET1",1145],N[65485]=[null,null,L.prototype.cb,L.prototype.hb,"R5SET1",1145], -N[65486]=[null,null,L.prototype.Jc,L.prototype.td,"R6SUPER",1145],N[65487]=[null,null,L.prototype.Kc,L.prototype.ud,"R6USER",1145],N[65504]=[null,null,L.prototype.vc,L.prototype.gd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Tc,L.prototype.Dd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.fd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.nd, -"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.qd,"PIR"],N[65532]=[null,null,L.prototype.Sc,L.prototype.Cd,"SL"],N[65534]=[null,null,L.prototype.Hc,L.prototype.rd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; +var N={},M=(N[62592]=[null,null,L.prototype.Tc,L.prototype.Fd,"SISDR",1145],N[62608]=[null,null,L.prototype.Rc,L.prototype.Dd,"SDSDR",1145],N[62624]=[null,null,L.prototype.Sc,L.prototype.Ed,"SISAR",1145],N[62640]=[null,null,L.prototype.Qc,L.prototype.Cd,"SDSAR",1145],N[62656]=[null,null,L.prototype.zc,L.prototype.nd,"KISDR",1145],N[62672]=[null,null,L.prototype.xc,L.prototype.ld,"KDSDR",1145],N[62688]=[null,null,L.prototype.yc,L.prototype.md,"KISAR",1145],N[62704]=[null,null,L.prototype.wc,L.prototype.kd, +"KDSAR",1145],N[62798]=[null,null,L.prototype.Fc,L.prototype.rd,"MMR3",1145],N[65382]=[null,null,L.prototype.Ac,L.prototype.od,"LKS"],N[65400]=[null,null,L.prototype.tc,L.prototype.gd,"CNSL"],N[65402]=[null,null,L.prototype.Cc,L.prototype.qd,"MMR0",1145],N[65404]=[null,null,L.prototype.Dc,L.prototype.ec,"MMR1",1145],N[65406]=[null,null,L.prototype.Ec,L.prototype.ec,"MMR2",1145],N[65408]=[null,null,L.prototype.Zc,L.prototype.Ld,"UISDR",1145],N[65424]=[null,null,L.prototype.Xc,L.prototype.Jd,"UDSDR", +1145],N[65440]=[null,null,L.prototype.Yc,L.prototype.Kd,"UISAR",1145],N[65456]=[null,null,L.prototype.Wc,L.prototype.Id,"UDSAR",1145],N[65472]=[null,null,L.prototype.bb,L.prototype.gb,"R0SET0"],N[65473]=[null,null,L.prototype.bb,L.prototype.gb,"R1SET0"],N[65474]=[null,null,L.prototype.bb,L.prototype.gb,"R2SET0"],N[65475]=[null,null,L.prototype.bb,L.prototype.gb,"R3SET0"],N[65476]=[null,null,L.prototype.bb,L.prototype.gb,"R4SET0"],N[65477]=[null,null,L.prototype.bb,L.prototype.gb,"R5SET0"],N[65478]= +[null,null,L.prototype.Kc,L.prototype.wd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Nc,L.prototype.zd,"R7KERNEL"],N[65480]=[null,null,L.prototype.cb,L.prototype.hb,"R0SET1",1145],N[65481]=[null,null,L.prototype.cb,L.prototype.hb,"R1SET1",1145],N[65482]=[null,null,L.prototype.cb,L.prototype.hb,"R2SET1",1145],N[65483]=[null,null,L.prototype.cb,L.prototype.hb,"R3SET1",1145],N[65484]=[null,null,L.prototype.cb,L.prototype.hb,"R4SET1",1145],N[65485]=[null,null,L.prototype.cb,L.prototype.hb,"R5SET1",1145], +N[65486]=[null,null,L.prototype.Lc,L.prototype.xd,"R6SUPER",1145],N[65487]=[null,null,L.prototype.Mc,L.prototype.yd,"R6USER",1145],N[65504]=[null,null,L.prototype.vc,L.prototype.jd,"CTRL",1170],N[65520]=[null,null,L.prototype.$b,L.prototype.fc,"LSIZE",1170],N[65522]=[null,null,L.prototype.$b,L.prototype.fc,"HSIZE",1170],N[65524]=[null,null,L.prototype.Vc,L.prototype.Hd,"SYSID",1170],N[65526]=[null,null,L.prototype.uc,L.prototype.hd,"CPUERR",1170],N[65528]=[null,null,L.prototype.Bc,L.prototype.pd, +"MB",1170],N[65530]=[null,null,L.prototype.Gc,L.prototype.sd,"PIR"],N[65532]=[null,null,L.prototype.Uc,L.prototype.Gd,"SL"],N[65534]=[null,null,L.prototype.Jc,L.prototype.vd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];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];Ta(function(){for(var a=B(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>1),this.b=new Int32Array(this.C,0,d>>2),Cc(this,yc?Dc:Ec);else{this.b=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&nc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= -this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.g&&null!=this.A){var c=this.g;Jc(c,this.A+a,1,c.M)&&c.da(!0)}return this.Jb(a,b)},ba:function(a,b){if(this.g&&null!=this.A){var c=this.g;Jc(c,this.A+a,2,c.M)&&c.da(!0)}return this.Kb(a,b)},ma:function(a,b,c){if(this.g&&null!=this.A){var d=this.g;Jc(d,this.A+a, -1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},wa:function(a,b,c){if(this.g&&null!=this.A){var d=this.g;Jc(d,this.A+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Qb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.g&&G(this.g,128)&&E(this.g,"Memory.readByte("+K(this.g,b)+"): "+K(this.g,a),!0);return a},aa:function(a,b){a&1&&nc(this.w,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&nc(this.w,b);a=this.I[a>>1];this.g&&G(this.g,128)&&E(this.g,"Memory.readWord("+ -K(this.g,b)+"): "+K(this.g,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},pa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.g&&G(this.g,128)&&E(this.g,"Memory.writeByte("+K(this.g,c)+","+K(this.g,b)+")",!0)},va:function(a,b,c){a&1&&nc(this.w,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&nc(this.w,c);this.I[a>>1]=b;this.Ha=!0;this.g&&G(this.g,128)&&E(this.g,"Memory.writeWord("+K(this.g,c)+","+K(this.g,b)+")",!0)}}; -function Rb(a,b,c){a.g=b;a.j=a.B=0;c&&((a.j=c.j)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Fb=a.f?a.J:a.Pb,a.ub=a.f?a.H:a.Qb):--a.j||(a.Cb=a.Jb,a.ra=a.Kb)}function Gc(a,b,c){c&&a.B||(a.Fb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Pb=b[1]||a.J,a.Qb=b[3]||a.H}function Ic(a,b,c){c&&a.j||(a.Cb=b[0]||a.K,a.ra=b[2]||a.M);if(c||void 0===c)a.Jb=b[0]||a.K,a.Kb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} -var Lc=[],Fc=[J.prototype.V,J.prototype.ua,J.prototype.ja,J.prototype.za],Hc=[J.prototype.T,J.prototype.ma,J.prototype.ba,J.prototype.wa];if(Fb)var Ec=[J.prototype.R,J.prototype.la,J.prototype.aa,J.prototype.va],Dc=[J.prototype.U,J.prototype.pa,J.prototype.fa,J.prototype.Ua]; -function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Nb=!1;this.v.ib=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.K=[];this.Ab=this.ad.bind(this);H(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; -h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.g=d;for(b=0;b=a.ja&&(a.ja+=a.Za,c=!0);0<=a.$a&&a.$a<=Tc(a)&&(a.Za=a.$a=-1,Qc(a),a.da(),c=!0);c&&a.i(Tc(a)+" cycles: checksum="+k(a.nb))}} +J.prototype={constructor:J,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(sb)for(a=Array(this.size>>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ja:function(a,b){a&1&&nc(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]= +this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ha=!0},T:function(a,b){if(this.i&&null!=this.A){var c=this.i;Jc(c,this.A+a,1,c.M)&&c.da(!0)}return this.Jb(a,b)},ba:function(a,b){if(this.i&&null!=this.A){var c=this.i;Jc(c,this.A+a,2,c.M)&&c.da(!0)}return this.Kb(a,b)},ma:function(a,b,c){if(this.i&&null!=this.A){var d=this.i;Jc(d,this.A+a, +1,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Pb(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.A){var d=this.i;Jc(d,this.A+a,2,d.D)&&d.da(!0)}this.f?this.J(a,b,c):this.Qb(a,b,c)},R:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.i&&G(this.i,128)&&E(this.i,"Memory.readByte("+K(this.i,b)+"): "+K(this.i,a),!0);return a},aa:function(a,b){a&1&&nc(this.w,b);return this.G.getUint16(a,!0)},fa:function(a,b){a&1&&nc(this.w,b);a=this.I[a>>1];this.i&&G(this.i,128)&&E(this.i,"Memory.readWord("+ +K(this.i,b)+"): "+K(this.i,a),!0);return a},la:function(a,b){this.D[a]=b;this.Ha=!0},pa:function(a,b,c){this.D[a]=b;this.Ha=!0;this.i&&G(this.i,128)&&E(this.i,"Memory.writeByte("+K(this.i,c)+","+K(this.i,b)+")",!0)},va:function(a,b,c){a&1&&nc(this.w,c);this.G.setUint16(a,b,!0);this.Ha=!0},Ua:function(a,b,c){a&1&&nc(this.w,c);this.I[a>>1]=b;this.Ha=!0;this.i&&G(this.i,128)&&E(this.i,"Memory.writeWord("+K(this.i,c)+","+K(this.i,b)+")",!0)}}; +function Rb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Ic(a,Hc,!1),(a.B=c.B)&&Gc(a,Hc,!1))}function Kc(a,b){b?--a.B||(a.Fb=a.f?a.J:a.Pb,a.ub=a.f?a.H:a.Qb):--a.g||(a.Cb=a.Jb,a.ra=a.Kb)}function Gc(a,b,c){c&&a.B||(a.Fb=!a.f&&b[1]||a.J,a.ub=!a.f&&b[3]||a.H);if(c||void 0===c)a.Pb=b[1]||a.J,a.Qb=b[3]||a.H}function Ic(a,b,c){c&&a.g||(a.Cb=b[0]||a.K,a.ra=b[2]||a.M);if(c||void 0===c)a.Jb=b[0]||a.K,a.Kb=b[2]||a.M}function Cc(a,b){b||(b=Lc);Ic(a,b,void 0);Gc(a,b,void 0)} +var Lc=[],Fc=[J.prototype.V,J.prototype.ua,J.prototype.ja,J.prototype.za],Hc=[J.prototype.T,J.prototype.ma,J.prototype.ba,J.prototype.wa];if(sb)var Ec=[J.prototype.R,J.prototype.la,J.prototype.aa,J.prototype.va],Dc=[J.prototype.U,J.prototype.pa,J.prototype.fa,J.prototype.Ua]; +function Mc(a,b){r.call(this,"CPU",a,Mc,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.Ka=c;this.Va=Math.round(this.Fa/1E4)/100;this.Ra=this.Va*this.Ka;this.v.ca=!1;this.v.Nb=!1;this.v.ib=a.autoStart;this.v.Xa=!1;this.nb=this.ja=0;this.ob=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.K=[];this.Ab=this.cd.bind(this);H(this)}u(Mc);var Nc=["power","reset"];h=Mc.prototype; +h.Ba=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ja&&(a.ja+=a.Za,c=!0);0<=a.$a&&a.$a<=Tc(a)&&(a.Za=a.$a=-1,Qc(a),a.da(),c=!0);c&&a.j(Tc(a)+" cycles: checksum="+k(a.nb))}} h.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,l=kb(a.id);for(c=0;ca.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function oc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function qc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} +function Pc(a){a.V=0;a.yb=0;a.fa=a.T=a.ba=a.b=0;Qc(a);Uc(a,1)}function Uc(a,b,c){var d=!1;if(void 0!==b){.8>a.V/a.Ra?b=1:d=!0;a.Ka=b;b=a.Va*a.Ka;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}Vc(a,a.T);a.T=0;a.R=Aa();a.aa=0;Wc(a);return d}function oc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function qc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Fa*a.Ka/1E3*c|0,a.K[b][0]=c+Xc(a))} function Yc(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 Zc(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 Xc(a,b){var c=a.ba-=a.b;a.b=0;b&&(a.ba=0);return c} -h.ad=function(){if(this.v.ca){this.kb>=this.Fa&&Wc(this,!0);this.pa=0;this.za=Aa();if(this.aa){var a=this.za-this.aa;a>this.wb&&(this.R+=a,this.R>this.za&&(this.R=this.za))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.pa+=b;this.T+=b;Sc(this,b);Zc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));rb(this, +h.cd=function(){if(this.v.ca){this.kb>=this.Fa&&Wc(this,!0);this.pa=0;this.za=Aa();if(this.aa){var a=this.za-this.aa;a>this.wb&&(this.R+=a,this.R>this.za&&(this.R=this.za))}try{do{var b=Yc(this,this.v.Xa?1:this.Oa);try{this.fb(b)}catch(e){if("number"!=typeof e)throw e;}b=Xc(this,!0);this.pa+=b;this.T+=b;Sc(this,b);Zc(this,b);this.la-=b;if(0>=this.la){this.la+=this.Oa;15<=++this.yb&&(this.B&&this.B.$(),this.yb=0);break}}while(this.v.ca)}catch(e){this.da();this.B&&this.B.stop(Aa(),Tc(this));rb(this, e.stack||e.message);return}if(this.v.ca){a=setTimeout;b=this.Ab;this.aa=Aa();var c=this.wb;this.pa&&(c=Math.round(c*this.pa/this.Oa));var c=c-(this.aa-this.za),d=this.aa-this.R;d&&(this.V=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Uc(this)));if(0>c||this.Vc&&(this.R-=c),c=0;this.kb+=this.pa;this.aa+=c;a(b,c)}}}; -h.eb=function(a){if(qb(this))return!1;if(this.v.ca)return this.i(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Nb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Ab,0);return!0};h.fb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; -function sd(a){this.Ya=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.Ya?td.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u(sd,Mc);h=sd.prototype;h.reset=function(){this.status("model "+this.Ya);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; +h.eb=function(a){if(qb(this))return!1;if(this.v.ca)return this.j(this.toString()+" busy"),!1;Uc(this);this.v.ca=!0;this.v.Nb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,Tc(this)));setTimeout(this.Ab,0);return!0};h.fb=function(){return 0};h.da=function(a){if(this.v.ca){Xc(this);Vc(this,this.T);this.T=0;this.v.ca=!1;var b=this.J.run;b&&(b.textContent="Run");this.B&&this.B.stop(Aa(),Tc(this))}this.v.complete=a}; +function $c(a){this.Ya=+a.model||1170;this.qc=a.resetAddr||0;Mc.call(this,a,6666667);this.decode=1120==this.Ya?ad.bind(this):ud.bind(this);vd(this);this.C=0;this.U=null;this.v.complete=this.v.kc=!1}u($c,Mc);h=$c.prototype;h.reset=function(){this.status("model "+this.Ya);this.v.ca&&this.da();vd(this);Pc(this);this.v.error=!1;this.parent.reset.call(this)}; function vd(a){a.N=65536;a.O=32768;a.X=65535;a.S=32768;a.L=15;a.u=[0,0,0,0,0,0,0,a.qc];a.Ea=[0,0,0,0,0,0];a.ta=[0,0,0,0];a.D=0;a.va=0;a.oc=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.qa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.j=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Mb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.w&&sc(a)}function sc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.ra=a.Yc,a.ub=a.Id,Ub(a.w,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.ra=a.ac,a.ub=a.gc,Ub(a.w,16))}h.Wb=function(){return 0}; +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.F=0;a.H=a.I=0;a.g=a.f=a.Ta=0;a.ma=-1;wd(a)}function wd(a){a.Na=255;a.Z=0;a.Mb=0;a.G=0;a.La=0;a.qb=0;a.Ma=0;a.Ja=0;a.ua=0;a.Wa=262143;a.wa=253952;a.F|=2;a.w&&sc(a)}function sc(a){a.Ja?(a.M=65536,a.Y=a.nc,a.ra=a.$c,a.ub=a.Md,Ub(a.w,a.Ma&16?22:18)):(a.M=0,a.Y=a.mc,a.ra=a.ac,a.ub=a.gc,Ub(a.w,16))}h.Wb=function(){return 0}; h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.fa,this.Ka]);a.set(2,bc(this.w));return a.data()};h.restore=function(a){var b=a[1];this.fa=b[1];Uc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.L>>14&3;a.D!=c&&(a.ta[c]=a.u[6],a.u[6]=a.ta[a.D]);a.L=b;a.F|=2}function P(a,b){a.F&128||(a.S=a.X=b,a.O=0)}function Cd(a,b,c){a.F&128||(a.S=a.X=a.N=b,a.O=c||0)}function Dd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^b)&(d^b))}function Ed(a,b){a.F&128||(a.S=a.X=a.N=b,a.O=a.S^a.N>>1)}function Fd(a,b,c,d){a.F&128||(a.S=a.X=a.N=b,a.O=(c^d)&(d^b))} h.ea=function(a,b){if(!this.C){var c=!1;0>this.ma?this.ma=Kb(this):this.D||(a=4,c=!0);this.G&57344||(this.La=63222,this.qb=a);this.D=0;var d=this.ra(a|this.M),e=this.ra(a+2&65535|this.M);uc(this,e&-12289|this.ma>>2&12288);c&&(this.Z|=4,this.u[6]=4);Gd(this,this.ma);Gd(this,this.u[7]);Bd(this,d);this.F&=-113;this.ma=-1;if(26!=b)throw a;}};function Hd(a){var b=Id(a),c=Id(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);Bd(a,b);uc(a,c);a.F&=-17} function Jd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f=(a.qa[a.D][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ma&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.wa&&4186112>f&&(a.Z|=32,a.ea(4,12))}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? @@ -119,140 +119,141 @@ function Jd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ma&a.oc[a.D]||(d&=7);e=a.P[a.D][d];f= function Gd(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.G&57344||(a.La=a.La<<8|246);!a.D&&c<=a.Na&&4c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)|g; a.b-=8;break;case 6:return e=Ad(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=Ad(a),e=e+a.u[c]&65535,e=a.ra(e|a.M)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.La=a.La<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.Na||65534<=a.u[6])&&(a.u[6]<=a.Na-32?(a.Z|=4,a.u[6]=4,a.ea(4,24)):(a.Z|=8,a.F|=64));return e}h.zb=function(a){if(!this.Ja)return this.w.zb(a);this.C++;a=Kd(this,Jd(this,a,3));this.C--;return a}; -h.mb=function(a){if(!this.Ja)return this.w.mb(a);this.C++;a=this.ac(Jd(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Ld(this,Jd(this,a,5),b),this.C--):this.w.rb(a,b)};h.Eb=function(a,b){this.Ja?(this.C++,this.gc(Jd(this,a,4),b),this.C--):this.w.Eb(a,b)};h.mc=function(a,b,c){return Md(this,a,b,c)};h.nc=function(a,b,c){return Jd(this,Md(this,a,b,c),c)};h.ac=function(a){return this.w.ka(a)};h.Yc=function(a){return this.w.ka(Jd(this,a,2))};h.gc=function(a,b){this.w.Sa(a,b&65535)}; -h.Id=function(a,b){this.w.Sa(Jd(this,a,4),b)};function Nd(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?(d=Md(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.ra(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Od(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=Md(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Jd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} -function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Qd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]}function Rd(a,b){var c=a.f=b&7;b=a.j=(b&56)>>3;return Md(a,b,c,8)}function Sd(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Td(a,b){var c=a.f=b&7;return(b=a.j=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Ld(a,e,d.call(a,c,Kd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?(e=a.Y(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Ud(a,b,c,d){var e=a.f=b&7;(b=a.j=(b&56)>>3)?Ld(a,a.Y(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 Vd(a,b,c){var d=a.f=b&7;(b=a.j=(b&56)>>3)?a.w.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} +h.mb=function(a){if(!this.Ja)return this.w.mb(a);this.C++;a=this.ac(Jd(this,a,2));this.C--;return a};h.rb=function(a,b){this.Ja?(this.C++,Ld(this,Jd(this,a,5),b),this.C--):this.w.rb(a,b)};h.Eb=function(a,b){this.Ja?(this.C++,this.gc(Jd(this,a,4),b),this.C--):this.w.Eb(a,b)};h.mc=function(a,b,c){return Md(this,a,b,c)};h.nc=function(a,b,c){return Jd(this,Md(this,a,b,c),c)};h.ac=function(a){return this.w.ka(a)};h.$c=function(a){return this.w.ka(Jd(this,a,2))};h.gc=function(a,b){this.w.Sa(a,b&65535)}; +h.Md=function(a,b){this.w.Sa(Jd(this,a,4),b)};function Nd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Md(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.ra(d|c&a.M),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ta[a.L>>12&3];return c}function Od(a,b,c,d){a.G&57344||(a.La=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Md(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=Jd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ta[a.L>>12&3]=d} +function Pd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Qd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]}function Rd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Md(a,b,c,8)}function Sd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Kd(a,a.Y(b,c,3)):a.u[c]&255}function Td(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.ka(a.Y(b,c,2)):a.u[c]} +function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ta=a.Y(b,e,7),Ld(a,e,d.call(a,c,Kd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Y(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ka(e)))):a.u[e]=d.call(a,c,a.u[e])}function Ud(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Ld(a,a.Y(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 Vd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.Sa(a.Y(b,d,4),c):a.u[d]=c&65535;return c} function S(a,b,c){c&&(Bd(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -h.fb=function(a){this.v.complete=!0;var b=this.v.kc=this.g&&Wd(this.g),c=a?this.v.Nb?0:1:-1;this.v.Nb=!1;this.ba=this.b=a;do{if(b){if(Xd(this.g,this.u[7],c)){this.da();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.ea(168,28):this.F&64?this.ea(4,30):this.F&16&&this.ea(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;var d=160,e=(this.Mb&224)>>5;if(a=this.U&&this.U.ab>e?this.U:null)d=a.dd,e=a.ab;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; -if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(Ad(this))}while(0>5;if(a=this.U&&this.U.ab>e?this.U:null)d=a.fd,e=a.ab;e>(this.L&224)>>5?(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),this.ea(d,26),e=!0):e=!1; +if(e&&a)if(e=this.U,e==a)this.U=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e=d}}else this.F&1&&this.F++;this.G&57344||(this.La=0,this.qb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(Ad(this))}while(0>1|b<<16;Ed(this,a);return a&65535}function ce(a,b){a=b&2048|b>>1|b<<8;Ed(this,a<<8);return a&255}function de(a,b){a=b&~a;P(this,a);return a}function ee(a,b){a=b&~a;P(this,a<<8);return a}function fe(a,b){a|=b;P(this,a);return a}function ge(a,b){a|=b;P(this,a<<8);return a} function he(a,b){a=~b|65536;Cd(this,a);return a&65535}function ie(a,b){a=~b|256;Cd(this,a<<8);return a&255}function je(a,b){a=b-a;this.F&128||(this.S=this.X=a,this.O=b&(b^a));return a&65535}function ke(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.S=this.X=c,this.O=b&(b^c));return a&255}function le(a,b){a=b+a;this.F&128||(this.S=this.X=a,this.O=a&(b^a));return a&65535}function me(a,b){a=b+a;var c=a<<8;this.F&128||(this.S=this.X=c,this.O=c&(b<<8^c));return a&255} function ne(a,b){a=-b;Cd(this,a,a&b&32768);return a&65535}function oe(a,b){a=-b;Cd(this,a<<8,(a&b&128)<<8);return a&255}function pe(a,b){a=b<<1|this.N>>16&1;Ed(this,a);return a&65535}function qe(a,b){a=b<<1|this.N>>16&1;Ed(this,a<<8);return a&255}function re(a,b){a=(this.N&65536|b)>>1|b<<16;Ed(this,a);return a&65535}function se(a,b){a=((this.N&65536)>>8|b)>>1|b<<8;Ed(this,a<<8);return a&255}function te(a,b){var c=b-a;Fd(this,c,a,b);return c&65535} -function ue(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function ve(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function we(a,b){a^=b;P(this,a);return a&65535}function xe(a){R(this,a,Qd(this,a),Yd);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function ye(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.j?6:7)+b} -function ze(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.j?6:7)+b}function Ae(a){S(this,a,!xd(this))}function Be(a){S(this,a,xd(this))} -function Ce(a){R(this,a,Qd(this,a),de);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){Q(this,a,Pd(this,a),ee);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){R(this,a,Qd(this,a),fe);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Pd(this,a),ge);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function Ge(a){P(this,Qd(this,a)&Td(this,a));this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function He(a){P(this,(Pd(this,a)&Sd(this,a))<<8);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ie(a){S(this,a,zd(this))}function Je(a){S(this,a,!this.Da()==!yd(this))}function Ke(a){S(this,a,!zd(this)&&!this.Da()==!yd(this))}function Le(a){S(this,a,!xd(this)&&!zd(this))}function Me(a){S(this,a,zd(this)||!this.Da()!=!yd(this))} +function ue(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function ve(a,b){this.F&128||(this.S=this.X=b&65280,this.O=this.N=0);return(b<<8|b>>8)&65535}function we(a,b){a^=b;P(this,a);return a&65535}function xe(a){R(this,a,Qd(this,a),Yd);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function ye(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.N=this.O=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.O=32768)}this.u[a]=c&65535;this.S=this.X=c;this.b-=(this.g?6:7)+b} +function ze(a){var b=Td(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&=63;if(b&32){b=64-b;32>b-1;this.N=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.S=d>>16;this.X=d>>16|d;this.b-=(this.g?6:7)+b}function Ae(a){S(this,a,!xd(this))}function Be(a){S(this,a,xd(this))} +function Ce(a){R(this,a,Qd(this,a),de);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function De(a){Q(this,a,Pd(this,a),ee);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ee(a){R(this,a,Qd(this,a),fe);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Pd(this,a),ge);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Ge(a){P(this,Qd(this,a)&Td(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function He(a){P(this,(Pd(this,a)&Sd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Ie(a){S(this,a,zd(this))}function Je(a){S(this,a,!this.Da()==!yd(this))}function Ke(a){S(this,a,!zd(this)&&!this.Da()==!yd(this))}function Le(a){S(this,a,!xd(this)&&!zd(this))}function Me(a){S(this,a,zd(this)||!this.Da()!=!yd(this))} function Ne(a){S(this,a,xd(this)||zd(this))}function Oe(a){S(this,a,!this.Da()!=!yd(this))}function Pe(a){S(this,a,this.Da())}function Qe(a){S(this,a,!zd(this))}function Re(a){S(this,a,!this.Da())}function Se(){this.ea(12,1);this.b-=5}function Te(a){S(this,a,!0)}function Ue(a){S(this,a,!yd(this))}function Ve(a){S(this,a,yd(this))}function T(a){a&1&&(this.N=0);a&2&&(this.O=0);a&4&&(this.X=1);a&8&&(this.S=0);this.b-=5} -function We(a){var b=Qd(this,a);a=Td(this,a);Fd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Xe(a){var b=Pd(this,a)<<8;a=Sd(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.j?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} +function We(a){var b=Qd(this,a);a=Td(this,a);Fd(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function Xe(a){var b=Pd(this,a)<<8;a=Sd(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} function Ye(a){var b=Td(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.N=this.O=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.S=d>>16):(this.O=32768,this.X=d>>15|d,this.S=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.S=0,this.O=32768,this.N=65536,this.b-=7}function Ze(){this.ea(24,2);this.b-=25}function $e(){this.L&49152?(this.Z|=128,this.ea(4,3)):this.da();this.b-=7} -function af(){this.ea(16,4);this.b-=25}var bf=[0,7,7,10,7,11,9,13];function cf(a){var b=this.b;Bd(this,Rd(this,a));this.b=b-bf[this.j]}var df=[0,14,14,17,14,18,16,20];function ef(a){var b=this.b,c=Rd(this,a);a=a>>6&7;Gd(this,this.u[a]);this.u[a]=this.u[7];Bd(this,c);this.b=b-df[this.j]}var ff=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function gf(a){var b=Qd(this,a),c=this.b;P(this,Vd(this,a,b));this.b=c-ff[(this.H?8:0)+this.j]+(7!=this.f||this.j?0:2)} -function hf(a){var b=Pd(this,a);P(this,Ud(this,a,b,1)<<8);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var jf=[7,13,13,17,14,18,17,21];function kf(a){var b=Td(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Bd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function qf(a){R(this,a,Qd(this,a),te);this.b-=this.j?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function rf(a){R(this,a,0,ve);this.b-=this.j?9:3+(7==this.f?2:0)}function sf(){this.ea(28,5);this.b-=5}function tf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function uf(a){R(this,a,Qd(this,a),we);this.b-=this.j?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.g)b=this.g,E(b,"undefined opcode "+K(b,a),!0,!0),b=Zb(b);b||this.ea(8,6)}function td(a){vf[a>>12].call(this,a)}function wf(a){xf[a>>6&3].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)} -function Af(a){Bf[a>>6&3].call(this,a)}function Cf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} -var vf=[function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,xe,V,function(a){fg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,qf,V],eg=[function(a){gg[a>>4&15].call(this,a)},Te,Qe,Ie,Je,Oe,Ke,Me,ef,ef,wf,yf,Af,V,V,V],xf=[function(a){Cd(this,Vd(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,he);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,1,je);this.b-=this.j?9:3+(7==this.f?2:0)}],zf=[function(a){R(this,a,0, -ne);this.b-=this.j?11:6},function(a){R(this,a,xd(this)?1:0,Yd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,xd(this)?1:0,te);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Td(this,a);Cd(this,a);this.b-=this.j?4:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0,re);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,pe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.j?9:3+(7==this.f?2:0)}], -gg=[function(a){hg[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,V,Cf,Xf,rf,rf,rf,rf],hg=[$e,tf,nf,Se,af,mf,V,V,V,V,V,V,V,V,V,V],Wf=[lf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},T,function(){this.X=1;this.b-=5},T,T,T,function(){this.S=0;this.b-=5},T,T,T,T,T,T,T],Yf=[lf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],fg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,V,V,V],$f=[function(a){Cd(this, -Ud(this,a,0));this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ie);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ke);this.b-=this.j?9:3+(7==this.f?2:0)}],bg=[function(a){Q(this,a,0,oe);this.b-=this.j?11:6},function(a){Q(this,a,xd(this)?1:0,Zd);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,xd(this)?1:0,ue);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Cd(this,a<<8);this.b-=this.j?4:3+(7== -this.f?2:0)}],dg=[function(a){Q(this,a,0,se);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,qe);this.b-=this.j?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.j?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.j?9:3+(7==this.f?2:0)}];function ud(a){ig[a>>12].call(this,a)} +function af(){this.ea(16,4);this.b-=25}var bf=[0,7,7,10,7,11,9,13];function cf(a){var b=this.b;Bd(this,Rd(this,a));this.b=b-bf[this.g]}var df=[0,14,14,17,14,18,16,20];function ef(a){var b=this.b,c=Rd(this,a);a=a>>6&7;Gd(this,this.u[a]);this.u[a]=this.u[7];Bd(this,c);this.b=b-df[this.g]}var ff=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function gf(a){var b=Qd(this,a),c=this.b;P(this,Vd(this,a,b));this.b=c-ff[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)} +function hf(a){var b=Pd(this,a);P(this,Ud(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var jf=[7,13,13,17,14,18,17,21];function kf(a){var b=Td(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.S=b>>16,this.X=this.S|b,this.O=0,this.N=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)Bd(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function qf(a){R(this,a,Qd(this,a),te);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function rf(a){R(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)}function sf(){this.ea(28,5);this.b-=5}function tf(){this.F&4||this.B.$();this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3}function uf(a){R(this,a,Qd(this,a),we);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+K(b,a),!0,!0),b=Zb(b);b||this.ea(8,6)}function ad(a){vf[a>>12].call(this,a)}function wf(a){xf[a>>6&3].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)} +function Af(a){Bf[a>>6&3].call(this,a)}function Cf(a){Df[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} +var vf=[function(a){eg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,xe,V,function(a){fg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,qf,V],eg=[function(a){gg[a>>4&15].call(this,a)},Te,Qe,Ie,Je,Oe,Ke,Me,ef,ef,wf,yf,Af,V,V,V],xf=[function(a){Cd(this,Vd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,je);this.b-=this.g?9:3+(7==this.f?2:0)}],zf=[function(a){R(this,a,0, +ne);this.b-=this.g?11:6},function(a){R(this,a,xd(this)?1:0,Yd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,xd(this)?1:0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Td(this,a);Cd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,$d);this.b-=this.g?9:3+(7==this.f?2:0)}], +gg=[function(a){hg[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,V,Cf,Xf,rf,rf,rf,rf],hg=[$e,tf,nf,Se,af,mf,V,V,V,V,V,V,V,V,V,V],Df=[lf,function(){this.N=0;this.b-=5},function(){this.O=0;this.b-=5},T,function(){this.X=1;this.b-=5},T,T,T,function(){this.S=0;this.b-=5},T,T,T,T,T,T,T],Yf=[lf,function(){this.N=65536;this.b-=5},function(){this.O=32768;this.b-=5},W,function(){this.X=0;this.b-=5},W,W,W,function(){this.S=32768;this.b-=5},W,W,W,W,W,W,W],fg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,V,V,V],$f=[function(a){Cd(this, +Ud(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,ke);this.b-=this.g?9:3+(7==this.f?2:0)}],bg=[function(a){Q(this,a,0,oe);this.b-=this.g?11:6},function(a){Q(this,a,xd(this)?1:0,Zd);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,xd(this)?1:0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Sd(this,a);Cd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],dg=[function(a){Q(this,a,0,se);this.b-=this.g?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.g?9+(this.Ta&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.g?9:3+(7==this.f?2:0)}];function ud(a){ig[a>>12].call(this,a)} var ig=[function(a){jg[a>>8&15].call(this,a)},gf,We,Ge,Ce,Ee,xe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},hf,Xe,He,De,Fe,qf,V],jg=[function(a){mg[a>>4&15].call(this,a)},Te,Qe,Ie,Je,Oe,Ke,Me,ef,ef,wf,yf,Af,function(a){ng[a>>6&3].call(this,a)},V,V],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.M);Bd(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Nd(this,a,0);Gd(this,a);P(this,a);this.b-=11},function(a){var b=Id(this),c= -this.b;Od(this,a,0,b);P(this,b);this.b=c-jf[this.j]},function(a){P(this,Vd(this,a,this.Da?65535:0));this.b-=this.j?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Cf,Xf,rf,rf,rf,rf],og=[$e,tf,nf,Se,af,mf,function(){Hd(this);this.b-=13},V,V,V,V,V,V,V,V,V],kg=[kf,kf,Ye,Ye,ye,ye,ze,ze,uf,uf,V,V,V,V,pf,pf],lg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,function(a){pg[a>>6&3].call(this, -a)},V,V],pg=[V,function(a){a=Nd(this,a,65536);Gd(this,a);P(this,a);this.b-=11},function(a){var b=Id(this),c=this.b;Od(this,a,65536,b);P(this,b);this.b=c-jf[this.j]},V];function qg(a){r.call(this,"ROM",a,qg);this.f=null;this.D=a.addr;this.j=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){rg(c,a,b,f)})}}u(qg); -qg.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.g=d;sg(this)};qg.prototype.ya=function(){if(this.Ca){if(this.g){var a=this.g,b=this.id,c=this.D,d=this.j,e=this.Ca,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Sb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Nd:b,A:c,sc:d,Ca:e,Rb:f})}delete this.Ca}return!0};qg.prototype.xa=function(){return!0}; +this.b;Od(this,a,0,b);P(this,b);this.b=c-jf[this.g]},function(a){P(this,Vd(this,a,this.Da?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},V,V,V,cf,cf,cf,cf,of,function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):V.call(this,a)},Cf,Xf,rf,rf,rf,rf],og=[$e,tf,nf,Se,af,mf,function(){Hd(this);this.b-=13},V,V,V,V,V,V,V,V,V],kg=[kf,kf,Ye,Ye,ye,ye,ze,ze,uf,uf,V,V,V,V,pf,pf],lg=[Re,Pe,Le,Ne,Ue,Ve,Ae,Be,Ze,sf,Zf,ag,cg,function(a){pg[a>>6&3].call(this, +a)},V,V],pg=[V,function(a){a=Nd(this,a,65536);Gd(this,a);P(this,a);this.b-=11},function(a){var b=Id(this),c=this.b;Od(this,a,65536,b);P(this,b);this.b=c-jf[this.g]},V];function qg(a){r.call(this,"ROM",a,qg);this.f=null;this.D=a.addr;this.g=a.size;this.G=a.writable;this.B=a.alias;this.C=a.file;this.H=pa(this.C);if(this.C){a=this.C;var b=qa(this.H);"json"!=b&&"hex"!=b&&(a=sa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Fa(a,null,!0,function(a,b,f){rg(c,a,b,f)})}}u(qg); +qg.prototype.Ba=function(a,b,c,d){this.w=b;this.b=c;this.i=d;sg(this)};qg.prototype.ya=function(){if(this.Ca){if(this.i){var a=this.i,b=this.id,c=this.D,d=this.g,e=this.Ca,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],v=za(q,m,a.Sb);0>v&&q.splice(-(v+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Rd:b,A:c,sc:d,Ca:e,Rb:f})}delete this.Ca}return!0};qg.prototype.xa=function(){return!0}; function rg(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{jb(a.Gb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.Ca=l.symbols;if(!a.f.length){n("Empty ROM: "+ b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=xa(b[0]);if(c!=this.Ua)return;b=xa(b[1]);if(this.I=lb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.Gb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.xa=function(a){return a?this.save():!0};h.reset=function(){xg(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return xg(this)};function xg(a){a.R=0;a.f=0;a.j=128;a.D=[];return!0}h.Lb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=wa("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.i(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.j&=-129;qc(this.b,this.V,1)}};var yg={},wg=(yg[65392]=[null,null,Y.prototype.Nc,Y.prototype.xd,"RCSR"],yg[65394]=[null,null,Y.prototype.Mc,Y.prototype.wd,"RBUF"],yg[65396]=[null,null,Y.prototype.$c,Y.prototype.Kd,"XCSR"],yg[65398]=[null,null,Y.prototype.Zc,Y.prototype.Jd,"XBUF"],yg);Ta(function(){for(var a=B(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};zg.prototype.Xb=function(){return-1};zg.prototype.Yb=function(){}; -function Bg(a,b,c,d){if(c)if(b){0>a.C&&a.j.length&&(a.C=0);if(0>a.C||b!=a.j[a.C])a.j.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.j[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(xa(b.substring(c,f))),c=f+1}}return a} -function Cg(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; +h.xa=function(a){return a?this.save():!0};h.reset=function(){xg(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return xg(this)};function xg(a){a.R=0;a.f=0;a.g=128;a.D=[];return!0}h.Lb=function(a){if("number"==typeof a)this.D.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.T||8,c=a-this.H%a,this.T&&(b=va("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.j(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;qc(this.b,this.V,1)}};var yg={},wg=(yg[65392]=[null,null,Y.prototype.Pc,Y.prototype.Bd,"RCSR"],yg[65394]=[null,null,Y.prototype.Oc,Y.prototype.Ad,"RBUF"],yg[65396]=[null,null,Y.prototype.bd,Y.prototype.Od,"XCSR"],yg[65398]=[null,null,Y.prototype.ad,Y.prototype.Nd,"XBUF"],yg);Ta(function(){for(var a=B(document,"pdp11","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Bg.prototype.Xb=function(){return-1};Bg.prototype.Yb=function(){}; +function Dg(a,b,c,d){if(c)if(b){0>a.C&&a.g.length&&(a.C=0);if(0>a.C||b!=a.g[a.C])a.g.splice(0,0,b),a.C=0;a.C--}else a.U?b="end":b=a.g[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(xa(b.substring(c,f))),c=f+1}}return a} +function Eg(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 Dg(a,b,c){var d;if(b){b=Eg(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function Hg(a,b){if(b)return Gg(a,b,a.aa[b]);var c=0;for(b in a.aa)Gg(a,b,a.aa[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+oa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Jg(a,b){if(b)return Ig(a,b,a.aa[b]);var c=0;for(b in a.aa)Ig(a,b,a.aa[b]),c++;return 0this.b.Ya?Qg:[];Rg(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Sg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.w.ga;m=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.i("..."):(c=q.type,p=ac[c],q&&d.i(k(q.id,8)+" %"+k(e<this.b.Ya?Sg:[];Tg(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.Y(Ug(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ga;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.j("..."):(c=q.type,p=ac[c],q&&d.j(k(q.id,8)+" %"+k(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Yb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Kb(this.b)));return b}; -h.message=function(a,b){b&&(a+=" @"+K(this,Z(this.b.qb).A));this.ia&1073741824?this.ua.push(a):this.pa&&a==this.pa||(this.pa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.i(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; -function Kg(a){var b;if(Wd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} -h.Pa=function(a,b,c){var d=!0;c||bh(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.i("invalid address: "+K(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.ga].Pa(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Aa=!0:(ch(this,a,a.length-1,"set"),Kg(this)));return d};function bh(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.Aa||Kg(a);break}}return f} -function dh(a,b){for(var c=1;c>23)&65535,y=K(x,w);else if(8192==D)w=w.A-((f&63)<<1)&65535,y=K(x,w);else if(12288==D)y=K(x,f&7,1);else if(24576==D)y=K(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y= -Xg(C);break;case 8:y="@"+Xg(C);break;case 16:7>C?y="("+Xg(C)+")+":(D=x.ka(w,2),y="#"+K(x,D,0,!0));break;case 24:7>C?y="@("+Xg(C)+")+":(D=x.ka(w,2),y="@#"+K(x,D,0,!0));break;case 32:y="-("+Xg(C)+")";break;case 40:y="@-("+Xg(C)+")";break;case 48:D=x.ka(w,2);y=K(x,D,0,!0)+"("+Xg(C)+")";7==C&&(y=[y,K(x,D+w.A&65535)]);break;case 56:D=x.ka(w,2),y="@"+K(x,D)+"("+Xg(C)+")",7==C&&(y=[y,K(x,D+w.A&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=Xg(b),c+="="+K(a,d.u[b])):13>b?c="A"+(b-8)+"="+K(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+K(a,d.ta[b-16]):20==b&&(c="PS="+K(a,Kb(d)));c&&(c+=" ");return c}function ih(a){var b,c="";for(b=0;6>b;b++)c+=hh(a,b);c=c+"\n"+(hh(a,6)+hh(a,7)+hh(a,20));return c+=gh(a,"T")+gh(a,"N")+gh(a,"Z")+gh(a,"V")+gh(a,"C")}h.Sb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.i("unknown register: "+e);return}a.B.$();a.i("updated registers:")}a.i(ih(a));c&&(a.K=Z(d.u[7]),$g(a,K(a,a.K.A)))}}function nh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.i(p)}l[3]&&(g=l[3],f=null);f=fh(a,b,g,f);a.i(f);a.K=b;e-=b.A-m;c++}}} -function eh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+K(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.pa=null;if(pb(a)&&0q||"z"ia.length&&(a.i("note: only "+ia.length+" available"),X=ia.length);ca-=X;0>ca&&(null==ia[ia.length-1].A?(X=ca+X,ca=0):ca+=ia.length);var cd=[];"call"==If&&(sb=1E5,cd=["CALL"]);for(void 0!==Hf&&a.i(X+" instructions earlier:");0=ia.length&&(ca=0);a.Va=X;Kf++;sb--}}Kf||(a.i("no "+Jf+"history available"),a.Va=void 0)}else{var ub=Sg(a,ha);if(ub){var cc=0;Ca&&("l"==Ca.charAt(0)&&(Ca=Ca.substr(1)||Hh),cc=Fg(a,Ca)>>>0,65536>4||1;Jh--&&0fc?String.fromCharCode(fc):".";dc--}vb&&(vb+="\n");vb+=ha+" "+dd+(0==xb?" "+Nf:"")}vb&&a.i(vb);a.Oa=ub}}}}break;case "e":if("else"==g[0])break;var Za,fd,gd,hd,id=g[0],jd=g[1];"eb"==id?(Za=1,fd=255,gd=a.lb,hd=a.Db):"e"==id||"ew"==id?(Za=2,fd=65535,gd=a.ka,hd=a.Sa):jd=null;if(null==jd)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var gc=Sg(a,jd);if(gc)for(var hc=2;hc< -g.length;hc++){var yb=Dg(a,g[hc]);if(void 0===yb){a.i("unrecognized value: "+g[hc]);break}yb&~fd&&a.i("warning: "+k(yb)+" exceeds "+Za+"-byte value");var Kh=gd.call(a,gc);a.i("changing "+K(a,gc.A)+" from "+K(a,Kh,Za)+" to "+K(a,yb,Za));hd.call(a,gc,yb,Za)}}break;case "g":a:{var Of=g[1],Lh=b;if(void 0!==Of){var kd=Sg(a,Of,!0);if(!kd)break a;Wg(a,kd,Lh);a.Pa(a.f,kd,!0)}a.eb(!0,c)}break;case "h":a.v.ca?(c||a.i("halting"),a.da()):ob(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var ld; -var zb=b.substr(2),zb=xa(zb);Dg(a,zb)?(c||a.i("true: "+zb),ld=!0):(c||a.i("false: "+zb),ld=!1);ld||(d=!1);break}f=!0;break;case "k":var Mh=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var md=0,nd=Z(),Ab=Z(a.b.u[6]);for(a.i("stack trace for "+K(a,Ab.A));10>md;){for(var Da=null,Nh=256;65536>Ab.A>>>0;){nd.A=a.ka(Ab,2);if(null==Ab.A||!Nh--)break;if(!(nd.A&1)){for(var Oh=a,ic=nd,Pf=null,Bb=ic.A,Qf=Bb,od=1;6>=od&&Bb;od++){if(2< -od){ic.A=Bb;var jc=fh(Oh,ic);if(0<=jc.indexOf("JSR")){var Rf=jc.indexOf(" ");if(Bb+(jc.indexOf(" ",Rf+1)-Rf-1)/2==Qf){Pf=jc;break}}}Bb-=2}ic.A=Qf;if(Da=Pf)break}}if(!Da||null==Da)break;var Sf=null;if("ks"==Mh){var Tf=Da.match(/[0-9A-F]+$/);Tf&&(Sf=mh(a,Tf[0]))}Da=wa(Da,50)+" ;"+(Sf||"stack="+K(a,Ab.A));a.i(Da);md++}md||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){mh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var va=0;if("all"== -F)va=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in I)if(F==ja){va=I[ja];ka=!!(a.ia&va);break}if(!va){a.i("unknown message category: "+F);break a}}if(va)if("on"==g[2])a.ia|=va,ka=!0;else if("off"==g[2]&&(a.ia&=~va,ka=!1,1073741824==va)){for(var pd=0;pd\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsh){if(uh(d,this.I)){this.D=new O(this,"1.30.1","failsafe");uh(this.D)&&(zh(this,d),a=2,Ah(this.D));this.D.set("timestamp",Ea());Bh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?uh(d,g):("error"== -f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.j=null)):this.i(f+": "+g),Ah(d),uh(d)?(c=yh(d),e=!0):c=!1))}e&&xh(this,c?d:null)}else 2==a&&d.clear()}else xh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(Ch(this,this.b,b,c,a),this.b.ib());this.T&&(zh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; -function zh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} -function ph(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=Ea();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.da(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;md&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}h.Yb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ea[a-8]:20>a?b=this.b.ta[a-16]:20==a&&(b=Kb(this.b)));return b}; +h.message=function(a,b){b&&(a+=" @"+K(this,Z(this.b.qb).A));this.ia&1073741824?this.ua.push(a):this.pa&&a==this.pa||(this.pa=a,this.ia&-2147483648&&(this.da(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,Xc(a),a.la=0,a.B.$()))}; +function Mg(a){var b;if(Wd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b>>d.ga],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ga],!0);a.D=["bw"];a.Ta=0} +h.Pa=function(a,b,c){var d=!0;c||dh(this,a,b,!1,!0);if(a!=this.f){var e=this.Y(b);if(-1===e)this.j("invalid address: "+K(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.ga].Pa(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Aa=!0:(eh(this,a,a.length-1,"set"),Mg(this)));return d};function dh(a,b,c,d,e){var f=!1;c=a.Y(c);for(var g=1;g>>d.ga],b==a.D));l.Aa||Mg(a);break}}return f} +function fh(a,b){for(var c=1;c>23)&65535,y=K(x,w);else if(8192==D)w=w.A-((f&63)<<1)&65535,y=K(x,w);else if(12288==D)y=K(x,f&7,1);else if(24576==D)y=K(x,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:y= +Zg(C);break;case 8:y="@"+Zg(C);break;case 16:7>C?y="("+Zg(C)+")+":(D=x.ka(w,2),y="#"+K(x,D,0,!0));break;case 24:7>C?y="@("+Zg(C)+")+":(D=x.ka(w,2),y="@#"+K(x,D,0,!0));break;case 32:y="-("+Zg(C)+")";break;case 40:y="@-("+Zg(C)+")";break;case 48:D=x.ka(w,2);y=K(x,D,0,!0)+"("+Zg(C)+")";7==C&&(y=[y,K(x,D+w.A&65535)]);break;case 56:D=x.ka(w,2),y="@"+K(x,D)+"("+Zg(C)+")",7==C&&(y=[y,K(x,D+w.A&65535)])}x=y;if(!x||!x.length){l="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]);0b?(c=Zg(b),c+="="+K(a,d.u[b])):13>b?c="A"+(b-8)+"="+K(a,d.Ea[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+K(a,d.ta[b-16]):20==b&&(c="PS="+K(a,Kb(d)));c&&(c+=" ");return c}function kh(a){var b,c="";for(b=0;6>b;b++)c+=jh(a,b);c=c+"\n"+(jh(a,6)+jh(a,7)+jh(a,20));return c+=ih(a,"T")+ih(a,"N")+ih(a,"Z")+ih(a,"V")+ih(a,"C")}h.Sb=function(a,b){return a[0]>b[0]?1:a[0]>>0;for(b=0;b>>0,l=f.sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.$();a.j("updated registers:")}a.j(kh(a));c&&(a.K=Z(d.u[7]),bh(a,K(a,a.K.A)))}}function ph(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.j(p)}l[3]&&(g=l[3],f=null);f=hh(a,b,g,f);a.j(f);a.K=b;e-=b.A-m;c++}}} +function gh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.U&&(a.j("ended assemble at "+K(a,a.T.A)),a.K=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.pa=null;if(pb(a)&&0q||"z"ia.length&&(a.j("note: only "+ia.length+" available"),X=ia.length);ca-=X;0>ca&&(null==ia[ia.length-1].A?(X=ca+X,ca=0):ca+=ia.length);var ed=[];"call"==Jf&&(tb=1E5,ed=["CALL"]);for(void 0!==If&&a.j(X+" instructions earlier:");0=ia.length&&(ca=0);a.Va=X;Lf++;tb--}}Lf||(a.j("no "+Kf+"history available"),a.Va=void 0)}else{var vb=Ug(a,ha);if(vb){var cc=0;Da&&("l"==Da.charAt(0)&&(Da=Da.substr(1)||Jh),cc=Hg(a,Da)>>>0,65536>4||1;Lh--&&0fc?String.fromCharCode(fc):".";dc--}wb&&(wb+="\n");wb+=ha+" "+fd+(0==yb?" "+Of:"")}wb&&a.j(wb);a.Oa=vb}}}}break;case "e":if("else"==g[0])break;var $a,hd,id,jd,kd=g[0],ld=g[1];"eb"==kd?($a=1,hd=255,id=a.lb,jd=a.Db):"e"==kd||"ew"==kd?($a=2,hd=65535,id=a.ka,jd=a.Sa):ld=null;if(null==ld)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=Ug(a,ld);if(gc)for(var hc=2;hc< +g.length;hc++){var zb=Fg(a,g[hc]);if(void 0===zb){a.j("unrecognized value: "+g[hc]);break}zb&~hd&&a.j("warning: "+k(zb)+" exceeds "+$a+"-byte value");var Mh=id.call(a,gc);a.j("changing "+K(a,gc.A)+" from "+K(a,Mh,$a)+" to "+K(a,zb,$a));jd.call(a,gc,zb,$a)}}break;case "g":a:{var Pf=g[1],Nh=b;if(void 0!==Pf){var md=Ug(a,Pf,!0);if(!md)break a;Yg(a,md,Nh);a.Pa(a.f,md,!0)}a.eb(!0,c)}break;case "h":a.v.ca?(c||a.j("halting"),a.da()):ob(a,!0)||c||a.j("already halted");break;case "i":if("if"==g[0]){var nd; +var Ab=b.substr(2),Ab=xa(Ab);Fg(a,Ab)?(c||a.j("true: "+Ab),nd=!0):(c||a.j("false: "+Ab),nd=!1);nd||(d=!1);break}f=!0;break;case "k":var Oh=g[0];if("?"==g[1])a.j("stack trace commands:"),a.j("\tk\tshow frame addresses"),a.j("\tks\tshow symbol information");else{var od=0,pd=Z(),Bb=Z(a.b.u[6]);for(a.j("stack trace for "+K(a,Bb.A));10>od;){for(var Ea=null,Ph=256;65536>Bb.A>>>0;){pd.A=a.ka(Bb,2);if(null==Bb.A||!Ph--)break;if(!(pd.A&1)){for(var Qh=a,ic=pd,Qf=null,Cb=ic.A,Rf=Cb,qd=1;6>=qd&&Cb;qd++){if(2< +qd){ic.A=Cb;var jc=hh(Qh,ic);if(0<=jc.indexOf("JSR")){var Sf=jc.indexOf(" ");if(Cb+(jc.indexOf(" ",Sf+1)-Sf-1)/2==Rf){Qf=jc;break}}}Cb-=2}ic.A=Rf;if(Ea=Qf)break}}if(!Ea||null==Ea)break;var Tf=null;if("ks"==Oh){var Uf=Ea.match(/[0-9A-F]+$/);Uf&&(Tf=oh(a,Uf[0]))}Ea=va(Ea,50)+" ;"+(Tf||"stack="+K(a,Bb.A));a.j(Ea);od++}od||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){oh(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);if(void 0!==F){var wa=0;if("all"== +F)wa=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in I)if(F==ja){wa=I[ja];ka=!!(a.ia&wa);break}if(!wa){a.j("unknown message category: "+F);break a}}if(wa)if("on"==g[2])a.ia|=wa,ka=!0;else if("off"==g[2]&&(a.ia&=~wa,ka=!1,1073741824==wa)){for(var rd=0;rd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;buh){if(wh(d,this.I)){this.D=new O(this,"1.30.1","failsafe");wh(this.D)&&(Bh(this,d),a=2,Ch(this.D));this.D.set("timestamp",Ba());Dh(this.D);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ah(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?wh(d,g):("error"== +f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.g=null)):this.j(f+": "+g),Ch(d),wh(d)?(c=Ah(d),e=!0):c=!1))}e&&zh(this,c?d:null)}else 2==a&&d.clear()}else zh(this);delete this.I;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.v.ha=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(Eh(this,this.b,b,c,a),this.b.ib());this.T&&(Bh(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.B=0}; +function Bh(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Fa("http://www.pcjs.org/api/v1/report",d,!0)}} +function rh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.1"),g=new O(a,"1.30.1","validate"),l=Ba();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.da(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var l=kb(a.id),m=0;mf.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Uh(a,b,c)}})}else c(a,null)} -function Vh(a,b,c,d){function e(a){if(void 0===l){var b=g&&B(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Gh||ab(!0));m=!1}var g,l,m=!0;Gh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Sh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Gh||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Gh||ab(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Sh(b,a,d,!0,e,p):Th(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Vh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map +h.oa=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.B||(d.v.ha?rh(d,!1,!0):yh(d,d.pb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.ha&&!d.B)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");rh(d,a,!0);!a&&d.R?window&&window.location.reload():d.pb(uh)}else d.reset(),d.b&&d.b.ib()},!0;case "save":if(ra())c.parentNode.removeChild(c);else return this.J[b]= +c,c.onclick=function(){var a=vh(d,!0);if(a){var b=!!(d.f&&!d.H||d.R),c=rh(d,b);b?Fh(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1}; +function vh(a,b){var c=a.g;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Gh(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c} +function Gh(a,b){a.g=null;b=Fa(sa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ka("user",b.data),a.g=b.data)}catch(d){n(d.message+" ("+c+")")}return a.g}function xh(a){var b=null;a.g&&(b=sa()+"/api/v1/user?req=load&user="+a.g+"&state="+Hh(a,"1.30.1"));return b} +function Fh(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Hh(a,"1.30.1");d.data=c;b=Fa(sa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Fa(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Wh(a,b,c)}})}else c(a,null)} +function Xh(a,b,c,d){function e(a){if(void 0===l){var b=g&&B(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ua(a))}function f(a){e("Error: "+a);m&&(--Ih||ab(!0));m=!1}var g,l,m=!0;Ih++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");p=function(d,l){l?Uh(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Ih||ab(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Ih||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Uh(b,a,d,!0,e,p):Vh(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){ab(!1);return Xh(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.1/pdp11.js b/versions/pdpjs/1.30.1/pdp11.js index 2bf5e0b94..7fd52ef1b 100644 --- a/versions/pdpjs/1.30.1/pdp11.js +++ b/versions/pdpjs/1.30.1/pdp11.js @@ -40,7 +40,7 @@ typeof b){var n="",r;for(r in b)b.hasOwnProperty(r)&&(n&&(n+="&"),n+=r+"="+encod function p(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va}function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b} function ya(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function za(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var q={init:[],show:[],exit:[]},Aa=!1,Ba=!1,Ca=!0;function Da(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function u(a){q.init.push(a)} function Ea(a){if(Ca)try{for(var b=0;bb?this.Ea=this.id:(this.Ua=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,Yc:!1,Zc:!1,L:!1,error:!1};this.Oa=null;this.h.error=!1;this.v={};this.G=null;w.push(this)}var Ha=void 0,Ia={}; +function v(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.jb=b.comment;this.Bb=b;b=this.id.indexOf(".");0>b?this.Ea=this.id:(this.Ua=this.id.substr(0,b),this.Ea=this.id.substr(b+1));this[a]=c;this.h={ready:!1,bd:!1,cd:!1,L:!1,error:!1};this.Oa=null;this.h.error=!1;this.v={};this.G=null;w.push(this)}var Ha=void 0,Ia={}; if(window){Ha||(Ha=window.location.search.substr(1));for(var Ja,Ka=/\+/g,La=/([^&=]+)=?([^&]*)/g;Ja=La.exec(Ha);)Ia[decodeURIComponent(Ja[1].replace(Ka," "))]=decodeURIComponent(Ja[2].replace(Ka," "))}function Ma(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 x(a,b){b||(b=v);a.prototype=Ma(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Na=window.PCjs.Machines||(window.PCjs.Machines={}),w=window.PCjs.Components||(window.PCjs.Components=[])}else Na={},w=[];function Oa(a,b,c){Na[a]&&b&&(Na[a][b]=c)}function y(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ia=[];this.R=0;this.o=[];this.vb=[Za,$a,ab,bb];a=new G(this);cb(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ia[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=eb(d,b)}function $a(a,b,c){var d=!1,e=this.controller,f=e.ia[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ia[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||eb(e,c)} -function ab(a,b){var c=-1,d=this.controller;(a=d.ia[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=eb(d,b)}function bb(a,b,c){var d=!1,e=this.controller;if(a=e.ia[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||eb(e,c)}function fb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.l;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Qa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Qa){t=n.size-(f-r);t>k&&(t=k);n.Qa=f-n.za+t;f=r+a.c;k-=t;l++;continue}}return kb(1,f,k)}f=new G(a,f,t,a.c,d,e);cb(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var D;e="";D?10>>=a.l;0>>=a.l;0>>a.l].Ya(b&a.g,b)}function nb(a,b){return a.b[(b&a.i)>>>a.l].S(b&a.g,b)}Ya.prototype.bb=function(a,b){this.R++;this.b[(a&this.i)>>>this.l].sb(a&this.g,b&255,a);this.R--}; -function ob(a,b,c){a.b[(b&a.i)>>>a.l].Ra(b&a.g,c&65535,b)}function pb(a){for(var b=0,c=[],d=0;da.a.Ia)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,r=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));qb(a,e,e,k,l,n,r,f[4])}}}function sb(a,b){a.o.push(b)}function tb(a,b){a.R||H(a.a,4,b)} -function kb(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function I(a){v.call(this,"Device",a,I);this.c={data:0,Xc:0,Pa:20,nc:0};this.b={$c:0,cb:-1}}x(I);g=I.prototype;g.ca=function(a,b,c,d){this.l=b;this.a=c;this.G=d;var e=this;this.b.cb=ub(c,function(){e.b.la|=128;e.b.la&64&&(vb(e.a,e.b.oc),wb(e.a,e.b.cb,1E3/60))});this.b.oc=xb(64,6);rb(b,this,J);sb(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.b.la=0}; -g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a};g.xc=function(a){this.b.la=a;a&64&&wb(this.a,this.b.cb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.nc:this.c.data)&65535};g.qc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.zc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,yb(b))}zb(this)}; -g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.$a};g.Qb=function(){return this.a.na};g.Ac=function(a){var b=this.a;1170>b.Ia&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Wa=4194303,b.Ha=3915776):(b.Wa=262143,b.Ha=253952),yb(b));zb(this)};function zb(a){a.c.Pa=a.c.Pa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.bc=function(a){return this.a.C[1][a>>1&7]};g.Mc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.$b=function(a){return this.a.C[1][(a>>1&7)+8]}; -g.Kc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.ac=function(a){return this.a.P[1][a>>1&7]};g.Lc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Zb=function(a){return this.a.P[1][(a>>1&7)+8]};g.Jc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.wc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.uc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295}; -g.Jb=function(a){return this.a.P[0][a>>1&7]};g.vc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]};g.tc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.hc=function(a){return this.a.C[3][a>>1&7]};g.Sc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.fc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Qc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.gc=function(a){return this.a.P[3][a>>1&7]}; -g.Rc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ec=function(a){return this.a.P[3][(a>>1&7)+8]};g.Pc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Tb=function(){return this.a.u&49152?this.a.Z[0]:this.a.f[6]};g.Dc=function(a){this.a.u&49152?this.a.Z[0]=a:this.a.f[6]=a};g.Wb=function(){return this.a.f[7]}; -g.Gc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a};g.Ub=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[1]};g.Ec=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[1]=a};g.Vb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[3]};g.Fc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]}; -g.sc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.dc=function(){return 1};g.Oc=function(){};g.Fb=function(){return this.a.F};g.rc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.yc=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.ab:0};g.Bc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.cc=function(a){return a?this.a.oa&65280:0};g.Nc=function(a){this.a.oa=a|255}; -g.Sb=function(){return Xa(this.a)};g.Cc=function(a){Ab(this.a,a&-1809|Xa(this.a)&1808);this.a.j|=128};g.tb=function(){}; -var K={},J=(K[62592]=[null,null,I.prototype.bc,I.prototype.Mc,"SISDR",1145],K[62608]=[null,null,I.prototype.$b,I.prototype.Kc,"SDSDR",1145],K[62624]=[null,null,I.prototype.ac,I.prototype.Lc,"SISAR",1145],K[62640]=[null,null,I.prototype.Zb,I.prototype.Jc,"SDSAR",1145],K[62656]=[null,null,I.prototype.Kb,I.prototype.wc,"KISDR",1145],K[62672]=[null,null,I.prototype.Ib,I.prototype.uc,"KDSDR",1145],K[62688]=[null,null,I.prototype.Jb,I.prototype.vc,"KISAR",1145],K[62704]=[null,null,I.prototype.Hb,I.prototype.tc, -"KDSAR",1145],K[62798]=[null,null,I.prototype.Qb,I.prototype.Ac,"MMR3",1145],K[65382]=[null,null,I.prototype.Lb,I.prototype.xc,"LKS"],K[65400]=[null,null,I.prototype.Eb,I.prototype.qc,"CNSL"],K[65402]=[null,null,I.prototype.Nb,I.prototype.zc,"MMR0",1145],K[65404]=[null,null,I.prototype.Ob,I.prototype.tb,"MMR1",1145],K[65406]=[null,null,I.prototype.Pb,I.prototype.tb,"MMR2",1145],K[65408]=[null,null,I.prototype.hc,I.prototype.Sc,"UISDR",1145],K[65424]=[null,null,I.prototype.fc,I.prototype.Qc,"UDSDR", -1145],K[65440]=[null,null,I.prototype.gc,I.prototype.Rc,"UISAR",1145],K[65456]=[null,null,I.prototype.ec,I.prototype.Pc,"UDSAR",1145],K[65472]=[null,null,I.prototype.ua,I.prototype.wa,"R0SET0"],K[65473]=[null,null,I.prototype.ua,I.prototype.wa,"R1SET0"],K[65474]=[null,null,I.prototype.ua,I.prototype.wa,"R2SET0"],K[65475]=[null,null,I.prototype.ua,I.prototype.wa,"R3SET0"],K[65476]=[null,null,I.prototype.ua,I.prototype.wa,"R4SET0"],K[65477]=[null,null,I.prototype.ua,I.prototype.wa,"R5SET0"],K[65478]= -[null,null,I.prototype.Tb,I.prototype.Dc,"R6KERNEL"],K[65479]=[null,null,I.prototype.Wb,I.prototype.Gc,"R7KERNEL"],K[65480]=[null,null,I.prototype.va,I.prototype.xa,"R0SET1",1145],K[65481]=[null,null,I.prototype.va,I.prototype.xa,"R1SET1",1145],K[65482]=[null,null,I.prototype.va,I.prototype.xa,"R2SET1",1145],K[65483]=[null,null,I.prototype.va,I.prototype.xa,"R3SET1",1145],K[65484]=[null,null,I.prototype.va,I.prototype.xa,"R4SET1",1145],K[65485]=[null,null,I.prototype.va,I.prototype.xa,"R5SET1",1145], -K[65486]=[null,null,I.prototype.Ub,I.prototype.Ec,"R6SUPER",1145],K[65487]=[null,null,I.prototype.Vb,I.prototype.Fc,"R6USER",1145],K[65504]=[null,null,I.prototype.Gb,I.prototype.sc,"CTRL",1170],K[65520]=[null,null,I.prototype.nb,I.prototype.ub,"LSIZE",1170],K[65522]=[null,null,I.prototype.nb,I.prototype.ub,"HSIZE",1170],K[65524]=[null,null,I.prototype.dc,I.prototype.Oc,"SYSID",1170],K[65526]=[null,null,I.prototype.Fb,I.prototype.rc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Mb,I.prototype.yc, -"MB",1170],K[65530]=[null,null,I.prototype.Rb,I.prototype.Bc,"PIR"],K[65532]=[null,null,I.prototype.cc,I.prototype.Nc,"SL"],K[65534]=[null,null,I.prototype.Sb,I.prototype.Cc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624]; -J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688]; -J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440]; -J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];u(function(){for(var a=B(document,"pdp11","device"),b=0;b>2;this.g=this.c-1;this.w=this.A/this.c|0;this.ia=[];this.R=0;this.o=[];this.vb=[$a,ab,bb,cb];a=new F(this);db(a,this.G);this.b=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ia[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=fb(d,b)}function ab(a,b,c){var d=!1,e=this.controller,f=e.ia[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ia[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||fb(e,c)} +function bb(a,b){var c=-1,d=this.controller;(a=d.ia[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=fb(d,b)}function cb(a,b,c){var d=!1,e=this.controller;if(a=e.ia[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||fb(e,c)}function gb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.l;0k&&(t=k);if(!e&&n&&n.size){if(n.type==d){if(f+k<=n.za)return n.Qa+=n.za-f,n.za=f,!0;if(f>=n.za+n.Qa){t=n.size-(f-r);t>k&&(t=k);n.Qa=f-n.za+t;f=r+a.c;k-=t;l++;continue}}return lb(1,f,k)}f=new F(a,f,t,a.c,d,e);db(f,a.G,n);a.b[l++]=f;f=r+a.c;k-=t}if(0>=k){c/=1024;var D;e="";D?10>>=a.l;0>>=a.l;0>>a.l].Ya(b&a.g,b)}function ob(a,b){return a.b[(b&a.i)>>>a.l].S(b&a.g,b)}Za.prototype.bb=function(a,b){this.R++;this.b[(a&this.i)>>>this.l].sb(a&this.g,b&255,a);this.R--}; +function pb(a,b,c){a.b[(b&a.i)>>>a.l].Ra(b&a.g,c&65535,b)}function qb(a){for(var b=0,c=[],d=0;da.a.Ia)){var k=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,r=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&r&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(r)));rb(a,e,e,k,l,n,r,f[4])}}}function tb(a,b){a.o.push(b)}function ub(a,b){a.R||G(a.a,4,b)} +function lb(a,b,c){p("Memory block error ("+a+": "+h(b)+","+h(c)+")");return!1}function H(a){v.call(this,"Device",a,H);this.c={data:0,ad:0,Pa:20,pc:0};this.b={dd:0,cb:-1}}x(H);g=H.prototype;g.ca=function(a,b,c,d){this.l=b;this.a=c;this.G=d;var e=this;this.b.cb=vb(c,function(){e.b.la|=128;e.b.la&64&&(wb(e.a,e.b.qc),xb(e.a,e.b.cb,1E3/60))});this.b.qc=yb(64,6);sb(b,this,I);tb(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Pa=this.c.Pa&-120|20;this.b.la=0}; +g.Lb=function(){var a=this.b.la;this.b.la&=-129;return a};g.zc=function(a){this.b.la=a;a&64&&xb(this.a,this.b.cb,1E3/60);this.b.la=a&-129};g.Eb=function(a){return(a?this.c.pc:this.c.data)&65535};g.sc=function(a){this.c.data=a};g.Nb=function(){var a=this.a;return a.A&62337|a.Fa<<5|a.Ga<<1};g.Bc=function(a){var b=this.a;a&=62337;if(b.A!=a){b.A=a;b.Fa=a>>5&3;b.Ga=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,zb(b))}Ab(this)}; +g.Ob=function(){var a=this.a.ma;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Pb=function(){return this.a.$a};g.Qb=function(){return this.a.na};g.Cc=function(a){var b=this.a;1170>b.Ia&&(a&=-49);b.na!=a&&(b.na=a,a&16?(b.Wa=4194303,b.Ha=3915776):(b.Wa=262143,b.Ha=253952),zb(b));Ab(this)};function Ab(a){a.c.Pa=a.c.Pa&-8|(a.a.Ba?a.a.na&16?1:2:4)}g.dc=function(a){return this.a.C[1][a>>1&7]};g.Qc=function(a,b){this.a.C[1][b>>1&7]=a&65295};g.bc=function(a){return this.a.C[1][(a>>1&7)+8]}; +g.Oc=function(a,b){this.a.C[1][(b>>1&7)+8]=a&65295};g.cc=function(a){return this.a.P[1][a>>1&7]};g.Pc=function(a,b){b=b>>1&7;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.ac=function(a){return this.a.P[1][(a>>1&7)+8]};g.Nc=function(a,b){b=(b>>1&7)+8;this.a.P[1][b]=a;this.a.C[1][b]&=65295};g.Kb=function(a){return this.a.C[0][a>>1&7]};g.yc=function(a,b){this.a.C[0][b>>1&7]=a&65295};g.Ib=function(a){return this.a.C[0][(a>>1&7)+8]};g.wc=function(a,b){this.a.C[0][(b>>1&7)+8]=a&65295}; +g.Jb=function(a){return this.a.P[0][a>>1&7]};g.xc=function(a,b){b=b>>1&7;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.Hb=function(a){return this.a.P[0][(a>>1&7)+8]};g.vc=function(a,b){b=(b>>1&7)+8;this.a.P[0][b]=a;this.a.C[0][b]&=65295};g.jc=function(a){return this.a.C[3][a>>1&7]};g.Wc=function(a,b){this.a.C[3][b>>1&7]=a&65295};g.hc=function(a){return this.a.C[3][(a>>1&7)+8]};g.Uc=function(a,b){this.a.C[3][(b>>1&7)+8]=a&65295};g.ic=function(a){return this.a.P[3][a>>1&7]}; +g.Vc=function(a,b){b=b>>1&7;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.gc=function(a){return this.a.P[3][(a>>1&7)+8]};g.Tc=function(a,b){b=(b>>1&7)+8;this.a.P[3][b]=a;this.a.C[3][b]&=65295};g.ua=function(a){a&=7;return this.a.u&2048?this.a.sa[a]:this.a.f[a]};g.wa=function(a,b){b&=7;this.a.u&2048?this.a.sa[b]=a:this.a.f[b]=a};g.Vb=function(){return this.a.u&49152?this.a.Z[0]:this.a.f[6]};g.Hc=function(a){this.a.u&49152?this.a.Z[0]=a:this.a.f[6]=a};g.Yb=function(){return this.a.f[7]}; +g.Kc=function(a){this.a.f[7]=a};g.va=function(a){a&=7;return this.a.u&2048?this.a.f[a]:this.a.sa[a]};g.xa=function(a,b){b&=7;this.a.u&2048?this.a.f[b]=a:this.a.sa[b]=a};g.Wb=function(){return 1==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[1]};g.Ic=function(a){1==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[1]=a};g.Xb=function(){return 3==(this.a.u&49152)>>14?this.a.f[6]:this.a.Z[3]};g.Jc=function(a){3==(this.a.u&49152)>>14?this.a.f[6]=a:this.a.Z[3]=a};g.Gb=function(a){return this.a.pb[a-65504>>1]}; +g.uc=function(a,b){this.a.pb[b-65504>>1]=a};g.nb=function(a){return 65520==a?61183:0};g.ub=function(){};g.fc=function(){return 1};g.Sc=function(){};g.Fb=function(){return this.a.F};g.tc=function(){this.a.F=0};g.Mb=function(){return this.a.ob};g.Ac=function(a,b){b&1||(a&=255);this.a.ob=a};g.Rb=function(a){return a?this.a.ab:0};g.Dc=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ab=a;b.j|=2};g.ec=function(a){return a?this.a.oa&65280:0};g.Rc=function(a){this.a.oa=a|255}; +g.Ub=function(){return Ya(this.a)};g.Gc=function(a){Bb(this.a,a&-1809|Ya(this.a)&1808);this.a.j|=128};g.tb=function(){}; +var J={},I=(J[62592]=[null,null,H.prototype.dc,H.prototype.Qc,"SISDR",1145],J[62608]=[null,null,H.prototype.bc,H.prototype.Oc,"SDSDR",1145],J[62624]=[null,null,H.prototype.cc,H.prototype.Pc,"SISAR",1145],J[62640]=[null,null,H.prototype.ac,H.prototype.Nc,"SDSAR",1145],J[62656]=[null,null,H.prototype.Kb,H.prototype.yc,"KISDR",1145],J[62672]=[null,null,H.prototype.Ib,H.prototype.wc,"KDSDR",1145],J[62688]=[null,null,H.prototype.Jb,H.prototype.xc,"KISAR",1145],J[62704]=[null,null,H.prototype.Hb,H.prototype.vc, +"KDSAR",1145],J[62798]=[null,null,H.prototype.Qb,H.prototype.Cc,"MMR3",1145],J[65382]=[null,null,H.prototype.Lb,H.prototype.zc,"LKS"],J[65400]=[null,null,H.prototype.Eb,H.prototype.sc,"CNSL"],J[65402]=[null,null,H.prototype.Nb,H.prototype.Bc,"MMR0",1145],J[65404]=[null,null,H.prototype.Ob,H.prototype.tb,"MMR1",1145],J[65406]=[null,null,H.prototype.Pb,H.prototype.tb,"MMR2",1145],J[65408]=[null,null,H.prototype.jc,H.prototype.Wc,"UISDR",1145],J[65424]=[null,null,H.prototype.hc,H.prototype.Uc,"UDSDR", +1145],J[65440]=[null,null,H.prototype.ic,H.prototype.Vc,"UISAR",1145],J[65456]=[null,null,H.prototype.gc,H.prototype.Tc,"UDSAR",1145],J[65472]=[null,null,H.prototype.ua,H.prototype.wa,"R0SET0"],J[65473]=[null,null,H.prototype.ua,H.prototype.wa,"R1SET0"],J[65474]=[null,null,H.prototype.ua,H.prototype.wa,"R2SET0"],J[65475]=[null,null,H.prototype.ua,H.prototype.wa,"R3SET0"],J[65476]=[null,null,H.prototype.ua,H.prototype.wa,"R4SET0"],J[65477]=[null,null,H.prototype.ua,H.prototype.wa,"R5SET0"],J[65478]= +[null,null,H.prototype.Vb,H.prototype.Hc,"R6KERNEL"],J[65479]=[null,null,H.prototype.Yb,H.prototype.Kc,"R7KERNEL"],J[65480]=[null,null,H.prototype.va,H.prototype.xa,"R0SET1",1145],J[65481]=[null,null,H.prototype.va,H.prototype.xa,"R1SET1",1145],J[65482]=[null,null,H.prototype.va,H.prototype.xa,"R2SET1",1145],J[65483]=[null,null,H.prototype.va,H.prototype.xa,"R3SET1",1145],J[65484]=[null,null,H.prototype.va,H.prototype.xa,"R4SET1",1145],J[65485]=[null,null,H.prototype.va,H.prototype.xa,"R5SET1",1145], +J[65486]=[null,null,H.prototype.Wb,H.prototype.Ic,"R6SUPER",1145],J[65487]=[null,null,H.prototype.Xb,H.prototype.Jc,"R6USER",1145],J[65504]=[null,null,H.prototype.Gb,H.prototype.uc,"CTRL",1170],J[65520]=[null,null,H.prototype.nb,H.prototype.ub,"LSIZE",1170],J[65522]=[null,null,H.prototype.nb,H.prototype.ub,"HSIZE",1170],J[65524]=[null,null,H.prototype.fc,H.prototype.Sc,"SYSID",1170],J[65526]=[null,null,H.prototype.Fb,H.prototype.tc,"CPUERR",1170],J[65528]=[null,null,H.prototype.Mb,H.prototype.Ac, +"MB",1170],J[65530]=[null,null,H.prototype.Rb,H.prototype.Dc,"PIR"],J[65532]=[null,null,H.prototype.ec,H.prototype.Rc,"SL"],J[65534]=[null,null,H.prototype.Ub,H.prototype.Gc,"PSW"],J);I[62594]=I[62592];I[62596]=I[62592];I[62598]=I[62592];I[62600]=I[62592];I[62602]=I[62592];I[62604]=I[62592];I[62606]=I[62592];I[62610]=I[62608];I[62612]=I[62608];I[62614]=I[62608];I[62616]=I[62608];I[62618]=I[62608];I[62620]=I[62608];I[62622]=I[62608];I[62626]=I[62624];I[62628]=I[62624];I[62630]=I[62624];I[62632]=I[62624]; +I[62634]=I[62624];I[62636]=I[62624];I[62638]=I[62624];I[62642]=I[62640];I[62644]=I[62640];I[62646]=I[62640];I[62648]=I[62640];I[62650]=I[62640];I[62652]=I[62640];I[62654]=I[62640];I[62658]=I[62656];I[62660]=I[62656];I[62662]=I[62656];I[62664]=I[62656];I[62666]=I[62656];I[62668]=I[62656];I[62670]=I[62656];I[62674]=I[62672];I[62676]=I[62672];I[62678]=I[62672];I[62680]=I[62672];I[62682]=I[62672];I[62684]=I[62672];I[62686]=I[62672];I[62690]=I[62688];I[62692]=I[62688];I[62694]=I[62688];I[62696]=I[62688]; +I[62698]=I[62688];I[62700]=I[62688];I[62702]=I[62688];I[62706]=I[62704];I[62708]=I[62704];I[62710]=I[62704];I[62712]=I[62704];I[62714]=I[62704];I[62716]=I[62704];I[62718]=I[62704];I[65410]=I[65408];I[65412]=I[65408];I[65414]=I[65408];I[65416]=I[65408];I[65418]=I[65408];I[65420]=I[65408];I[65422]=I[65408];I[65426]=I[65424];I[65428]=I[65424];I[65430]=I[65424];I[65432]=I[65424];I[65434]=I[65424];I[65436]=I[65424];I[65438]=I[65424];I[65442]=I[65440];I[65444]=I[65440];I[65446]=I[65440];I[65448]=I[65440]; +I[65450]=I[65440];I[65452]=I[65440];I[65454]=I[65440];I[65458]=I[65456];I[65460]=I[65456];I[65462]=I[65456];I[65464]=I[65456];I[65466]=I[65456];I[65468]=I[65456];I[65470]=I[65456];I[65506]=I[65504];I[65508]=I[65504];I[65510]=I[65504];I[65512]=I[65504];I[65514]=I[65504];I[65516]=I[65504];I[65518]=I[65504];u(function(){for(var a=B(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,d>>2),Ib(this,Eb?Jb:Kb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},$:function(a,b){a&1&&tb(this.l,b);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},fa: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.ja=!0},H:function(a,b){return this.I(a,b)}, -R:function(a,b){return this.V(a,b)},ba:function(a,b,c){this.v||this.sb(a,b,c)},ha:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&tb(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&tb(this.l,b);return this.o[a>>1]},aa:function(a,b){this.c[a]=b;this.ja=!0},ea:function(a,b){this.c[a]=b;this.ja=!0},ga:function(a,b,c){a&1&&tb(this.l,c);this.g.setUint16(a,b,!0);this.ja=!0},qa:function(a,b,c){a&1&&tb(this.l,c);this.o[a>> -1]=b;this.ja=!0}};function cb(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&Mb(a,Nb,!1),(a.m=c.m)&&Ob(a,Nb,!1))}function Ob(a,b,c){c&&a.m||(a.eb=!a.v&&b[1]||a.A,a.Ra=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Mb(a,b,c){c&&a.i||(a.Ya=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function Ib(a,b){b||(b=Pb);Mb(a,b,void 0);Ob(a,b,void 0)} -var Pb=[],Lb=[G.prototype.M,G.prototype.fa,G.prototype.$,G.prototype.ra],Nb=[G.prototype.H,G.prototype.ba,G.prototype.R,G.prototype.ha];if(Sa)var Kb=[G.prototype.D,G.prototype.aa,G.prototype.N,G.prototype.ga],Jb=[G.prototype.J,G.prototype.ea,G.prototype.W,G.prototype.qa]; -function Qb(a,b){v.call(this,"CPU",a,Qb);var c=a.multiplier||1;this.La=a.cycles||b;this.ba=c;this.Va=Math.round(this.La/1E4)/100;this.ea=this.Va*this.ba;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Ja=this.ga=0;this.Ka=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.mb=this.mc.bind(this);C(this)}x(Qb);var Rb=["power","reset"];g=Qb.prototype; +function F(a,b,c,d,e,f){this.l=a;this.id=Fb+=2;this.a=null;this.za=b;this.Qa=c;this.size=d||0;this.type=e||Gb;this.v=e==Hb;this.controller=null;db(this);this.ja=this.xb=!1;if(d)if(f)this.controller=f,this.a=null,Ib(this,f.vb);else if(Sa)this.b=new ArrayBuffer(d),this.g=new DataView(this.b,0,d),this.c=new Uint8Array(this.b,0,d),this.o=new Uint16Array(this.b,0,d>>1),this.a=new Int32Array(this.b,0,d>>2),Ib(this,Eb?Jb:Kb);else{this.a=Array(d>>2);for(a=0;a>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},$:function(a,b){a&1&&ub(this.l,b);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},fa: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.ja=!0},H:function(a,b){return this.I(a,b)}, +R:function(a,b){return this.V(a,b)},ba:function(a,b,c){this.v||this.sb(a,b,c)},ha:function(a,b,c){this.v||this.pa(a,b,c)},D:function(a){return this.c[a]},J:function(a){return this.c[a]},N:function(a,b){a&1&&ub(this.l,b);return this.g.getUint16(a,!0)},W:function(a,b){a&1&&ub(this.l,b);return this.o[a>>1]},aa:function(a,b){this.c[a]=b;this.ja=!0},ea:function(a,b){this.c[a]=b;this.ja=!0},ga:function(a,b,c){a&1&&ub(this.l,c);this.g.setUint16(a,b,!0);this.ja=!0},qa:function(a,b,c){a&1&&ub(this.l,c);this.o[a>> +1]=b;this.ja=!0}};function db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&Mb(a,Nb,!1),(a.m=c.m)&&Ob(a,Nb,!1))}function Ob(a,b,c){c&&a.m||(a.eb=!a.v&&b[1]||a.A,a.Ra=!a.v&&b[3]||a.B);if(c||void 0===c)a.sb=b[1]||a.A,a.pa=b[3]||a.B}function Mb(a,b,c){c&&a.i||(a.Ya=b[0]||a.w,a.S=b[2]||a.s);if(c||void 0===c)a.I=b[0]||a.w,a.V=b[2]||a.s}function Ib(a,b){b||(b=Pb);Mb(a,b,void 0);Ob(a,b,void 0)} +var Pb=[],Lb=[F.prototype.M,F.prototype.fa,F.prototype.$,F.prototype.ra],Nb=[F.prototype.H,F.prototype.ba,F.prototype.R,F.prototype.ha];if(Sa)var Kb=[F.prototype.D,F.prototype.aa,F.prototype.N,F.prototype.ga],Jb=[F.prototype.J,F.prototype.ea,F.prototype.W,F.prototype.qa]; +function Qb(a,b){v.call(this,"CPU",a,Qb);var c=a.multiplier||1;this.La=a.cycles||b;this.ba=c;this.Va=Math.round(this.La/1E4)/100;this.ea=this.Va*this.ba;this.h.T=!1;this.h.qb=!1;this.h.Aa=a.autoStart;this.h.Ma=!1;this.Ja=this.ga=0;this.Ka=a.csStart;this.pa=a.csInterval;this.qa=a.csStop;this.H=[];this.mb=this.oc.bind(this);C(this)}x(Qb);var Rb=["power","reset"];g=Qb.prototype; g.ca=function(a,b,c,d){this.w=a;this.l=b;this.G=d;for(b=0;ba.$/a.ea&&(b=1),a.ba=b,b=a.Va*a.ba,a.ea!=b)){a.ea=b;b=a.ea.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=sa();a.aa=0;Xb(a)}function ub(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function wb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.La*a.ba/1E3*c|0,a.H[b][0]=c+Zb(a))}function Zb(a,b){var c=a.fa-=a.a;a.a=0;b&&(a.fa=0);return c} -g.mc=function(){if(this.h.T){this.Xa>=this.La&&Xb(this,!0);this.ya=0;this.Da=sa();if(this.aa){var a=this.Da-this.aa;a>this.kb&&(this.N+=a,this.N>this.Da&&(this.N=this.Da))}try{do{for(var b,c=this.h.Ma?1:this.Na,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Zb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Ja=this.Ja+this.hb()|0;this.ga-=a;0>=this.ga&&(this.ga+=this.pa,f=!0);0<=this.qa&&this.qa<=Yb(this)&& -(this.pa=this.qa=-1,Ub(this),E(this),f=!0);f&&this.O(Yb(this)+" cycles: checksum="+h(this.Ja))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.Na;15<=++this.lb&&(this.w&&this.w.da(),this.lb=0);break}}while(this.h.T)}catch(n){E(this);this.w&&this.w.stop(sa(),Yb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.aa=sa();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ +function Wb(a,b){if(void 0!==b&&(.8>a.$/a.ea&&(b=1),a.ba=b,b=a.Va*a.ba,a.ea!=b)){a.ea=b;b=a.ea.toFixed(2)+"Mhz";var c=a.v.setSpeed;c&&(c.textContent=b);a.O("target speed: "+b)}a.J+=a.V;a.V=0;a.N=sa();a.aa=0;Xb(a)}function vb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function xb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.La*a.ba/1E3*c|0,a.H[b][0]=c+Zb(a))}function Zb(a,b){var c=a.fa-=a.a;a.a=0;b&&(a.fa=0);return c} +g.oc=function(){if(this.h.T){this.Xa>=this.La&&Xb(this,!0);this.ya=0;this.Da=sa();if(this.aa){var a=this.Da-this.aa;a>this.kb&&(this.N+=a,this.N>this.Da&&(this.N=this.Da))}try{do{for(var b,c=this.h.Ma?1:this.Na,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.rb(b)}catch(n){if("number"!=typeof n)throw n;}b=Zb(this,!0);this.ya+=b;this.V+=b;a=b;if(this.h.Ma){var f=!1;this.Ja=this.Ja+this.hb()|0;this.ga-=a;0>=this.ga&&(this.ga+=this.pa,f=!0);0<=this.qa&&this.qa<=Yb(this)&& +(this.pa=this.qa=-1,Ub(this),Wa(this),f=!0);f&&this.O(Yb(this)+" cycles: checksum="+h(this.Ja))}for(var a=b,k=this.H.length-1;0<=k;k--){var l=this.H[k];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.ra-=b;if(0>=this.ra){this.ra+=this.Na;15<=++this.lb&&(this.w&&this.w.da(),this.lb=0);break}}while(this.h.T)}catch(n){Wa(this);this.w&&this.w.stop(sa(),Yb(this));b=n.stack||n.message;this.h.error=!0;this.K(b);return}if(this.h.T){b=setTimeout;c=this.mb;this.aa=sa();d=this.kb;this.ya&&(d=Math.round(d*this.ya/ this.Na));d-=this.aa-this.Da;if(e=this.aa-this.N)this.$=Math.round(this.V/(10*e))/100,864E5<=e&&(this.J=0,Wb(this));if(0>d||this.$d&&(this.N-=d),d=0;this.Xa+=this.ya;this.aa+=d;b(c,d)}}};function Vb(a){var b;a.h.error?(a.O(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.T)a.O(a.toString()+" busy");else{Wb(a);a.h.T=!0;a.h.qb=!0;if(b=a.v.run)b.textContent="Halt";a.w&&a.w.start(a.N,Yb(a));setTimeout(a.mb,0)}}g.rb=function(){return 0}; -function E(a){if(a.h.T){Zb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Yb(a))}a.h.complete=void 0}function $b(a){this.Ia=+a.model||1170;this.Cb=a.resetAddr||0;Qb.call(this,a,6666667);this.decode=1120==this.Ia?ac.bind(this):bc.bind(this);cc(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x($b,Qb);g=$b.prototype;g.reset=function(){this.status("model "+this.Ia);this.h.T&&E(this);cc(this);Tb(this);this.h.error=!1;this.parent.reset.call(this)}; +function Wa(a){if(a.h.T){Zb(a);a.J+=a.V;a.V=0;a.h.T=!1;var b=a.v.run;b&&(b.textContent="Run");a.w&&a.w.stop(sa(),Yb(a))}a.h.complete=void 0}function $b(a){this.Ia=+a.model||1170;this.Cb=a.resetAddr||0;Qb.call(this,a,6666667);this.decode=1120==this.Ia?ac.bind(this):bc.bind(this);cc(this);this.R=0;this.W=null;this.h.complete=this.h.wb=!1}x($b,Qb);g=$b.prototype;g.reset=function(){this.status("model "+this.Ia);this.h.T&&Wa(this);cc(this);Tb(this);this.h.error=!1;this.parent.reset.call(this)}; function cc(a){a.m=65536;a.g=32768;a.i=65535;a.o=32768;a.u=15;a.f=[0,0,0,0,0,0,0,a.Cb];a.sa=[0,0,0,0,0,0];a.Z=[0,0,0,0];a.s=0;a.Ga=0;a.Ab=[4,2,0,1];a.C=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Ta=0;a.ha=-1;dc(a)}function dc(a){a.oa=255;a.F=0;a.ab=0;a.A=0;a.ma=0;a.$a=0;a.na=0;a.Ba=0;a.Fa=0;a.Wa=262143;a.Ha=253952;a.j|=2;a.l&&yb(a)}function yb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.jc,a.Ra=a.Uc,fb(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.ic,a.Ra=a.Tc,fb(a.l,16))}g.hb=function(){return 0}; -g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.ba]);a.set(2,pb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Wb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function fc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function gc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} -function H(a,b,c){if(!a.R){var d=!1;0>a.ha?a.ha=Xa(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.$a=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);Ab(a,f&-12289|a.ha>>2&12288);d&&(a.F|=4,a.f[6]=4);hc(a,a.ha);hc(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ha=-1;if(26!=c)throw b;}}function ic(a){var b=jc(a),c=jc(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;Ab(a,c);a.j&=-17} -function kc(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,H(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: -128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ha&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),H(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.l].eb(b&a.g,c&255,b)}function jc(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} -function hc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= -8;break;case 6:return e=ec(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=ec(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,H(a,4,24)):(a.F|=8,a.j|=64));return e}g.bb=function(a,b){this.Ba?(this.R++,lc(this,kc(this,a,5),b),this.R--):this.l.bb(a,b)};g.yb=function(a,b,c){return mc(this,a,b,c)};g.zb=function(a,b,c){return kc(this,mc(this,a,b,c),c)}; -g.ic=function(a){return nb(this.l,a)};g.jc=function(a){return nb(this.l,kc(this,a,2))};g.Tc=function(a,b){ob(this.l,a,b&65535)};g.Uc=function(a,b){ob(this.l,kc(this,a,4),b)};function nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=mc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.Z[a.u>>12&3];return c} -function oc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=mc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=kc(a,e|c&65536,4),a.s=a.u>>14&3,ob(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.Z[a.u>>12&3]=d}function pc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?nb(a.l,a.I(b,c,2)):a.f[c]}function qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return mc(a,b,c,8)} -function rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=mb(a.l,c)):a=a.f[c]&255;return a}function sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?nb(a.l,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ta=a.I(b,e,7),lc(a,e,d.call(a,c,mb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),ob(a.l,e,d.call(a,c,nb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?lc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?ob(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} -g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.fa=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?H(this,168,28):this.j&64?H(this,4,30):this.j&16&&H(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.ab&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.pc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),H(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.pb=[0,0,0,0,0,0,0,0];a.ob=0;a.j=0;a.B=a.D=0;a.c=a.b=a.Ta=0;a.ha=-1;dc(a)}function dc(a){a.oa=255;a.F=0;a.ab=0;a.A=0;a.ma=0;a.$a=0;a.na=0;a.Ba=0;a.Fa=0;a.Wa=262143;a.Ha=253952;a.j|=2;a.l&&zb(a)}function zb(a){a.Ba?(a.M=65536,a.I=a.zb,a.S=a.lc,a.Ra=a.Yc,gb(a.l,a.na&16?22:18)):(a.M=0,a.I=a.yb,a.S=a.kc,a.Ra=a.Xc,gb(a.l,16))}g.hb=function(){return 0}; +g.save=function(){var a=new L(this);a.set(0,[]);a.set(1,[this.J,this.ba]);a.set(2,qb(this.l));return a.data()};g.restore=function(a){var b=a[1];this.J=b[1];Wb(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.u>>14&3;a.s!=c&&(a.Z[c]=a.f[6],a.f[6]=a.Z[a.s]);a.u=b;a.j|=2}function N(a,b){a.j&128||(a.o=a.i=b,a.g=0)}function O(a,b,c){a.j&128||(a.o=a.i=a.m=b,a.g=c||0)}function fc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^b)&(d^b))}function P(a,b){a.j&128||(a.o=a.i=a.m=b,a.g=a.o^a.m>>1)}function gc(a,b,c,d){a.j&128||(a.o=a.i=a.m=b,a.g=(c^d)&(d^b))} +function G(a,b,c){if(!a.R){var d=!1;0>a.ha?a.ha=Ya(a):a.s||(b=4,d=!0);a.A&57344||(a.ma=63222,a.$a=b);a.s=0;var e=a.S(b|a.M),f=a.S(b+2&65535|a.M);Bb(a,f&-12289|a.ha>>2&12288);d&&(a.F|=4,a.f[6]=4);hc(a,a.ha);hc(a,a.f[7]);a.f[7]=e&65535;a.j&=-113;a.ha=-1;if(26!=c)throw b;}}function ic(a){var b=jc(a),c=jc(a)&-1793;a.u&49152&&(c=c&-225|a.u&63712);a.f[7]=b&65535;Bb(a,c);a.j&=-17} +function kc(a,b,c){var d,e,f,k=0;d=b>>13;a.na&a.Ab[a.s]||(d&=7);e=a.C[a.s][d];f=(a.P[a.s][d]<<6)+(b&8191)&a.Wa;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.na&32&&(f=a.Db[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ha&&4186112>f&&(a.F|=32,G(a,4,12))}switch(e&7){case 1:k=4096;case 2:e|=128;c&4&&(k=8192);break;case 4:k=4096;case 5:c&4&&(k=4096);case 6:e|=c&4?192: +128;break;default:k=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(k|=16384):(b&8128)>(e>>2&8128)&&(k|=16384));a.C[a.s][d]=e;if(4194170!==f||a.s)a.Fa=a.s,a.Ga=d;k&&(k&57344&&(0<=a.ha&&(k|=128),a.A&57344||(a.A=a.A|k|a.Fa<<5|a.Ga<<1),G(a,168,16)),a.A&61440||!(4191360>f||4194239>>a.l].eb(b&a.g,c&255,b)}function jc(a){var b=a.S(a.f[6]|a.M);a.f[6]=a.f[6]+2&65535;return b} +function hc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A&57344||(a.ma=a.ma<<8|246);!a.s&&c<=a.oa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=k);e=a.S(e);e|=k;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=k);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=k);e=a.S(e)|k;a.a-= +8;break;case 6:return e=ec(a),e=e+a.f[c]&65535|k,a.a-=6,e;case 7:return e=ec(a),e=e+a.f[c]&65535,e=a.S(e|a.M)|k,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!k||a.A&57344||(a.ma=a.ma<<8|f<<3&248|c);6==c&&!a.s&&d&4&&0>=f&&(a.f[6]<=a.oa||65534<=a.f[6])&&(a.f[6]<=a.oa-32?(a.F|=4,a.f[6]=4,G(a,4,24)):(a.F|=8,a.j|=64));return e}g.bb=function(a,b){this.Ba?(this.R++,lc(this,kc(this,a,5),b),this.R--):this.l.bb(a,b)};g.yb=function(a,b,c){return mc(this,a,b,c)};g.zb=function(a,b,c){return kc(this,mc(this,a,b,c),c)}; +g.kc=function(a){return ob(this.l,a)};g.lc=function(a){return ob(this.l,kc(this,a,2))};g.Xc=function(a,b){pb(this.l,a,b&65535)};g.Yc=function(a,b){pb(this.l,kc(this,a,4),b)};function nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=mc(a,b,d,2),c&65536||61440!==(a.u&61440)&&(d&=65535),a.s=a.u>>12&3,c=a.S(d|c&a.M),a.s=a.u>>14&3):c=6!=d||(a.u>>2&12288)===(a.u&12288)?a.f[d]:a.Z[a.u>>12&3];return c} +function oc(a,b,c,d){a.A&57344||(a.ma=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=mc(a,b,e,4),c&65536||(e&=65535),a.s=a.u>>12&3,e=kc(a,e|c&65536,4),a.s=a.u>>14&3,pb(a.l,e,d)):6!=e||(a.u>>2&12288)===(a.u&12288)?a.f[e]=d:a.Z[a.u>>12&3]=d}function pc(a,b){b>>=6;var c=a.D=b&7;(b=a.B=(b&56)>>3)?(c=a.I(b,c,3),a=nb(a.l,c)):a=a.f[c]&255;return a}function Q(a,b){b>>=6;var c=a.D=b&7;return(b=a.B=(b&56)>>3)?ob(a.l,a.I(b,c,2)):a.f[c]}function qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return mc(a,b,c,8)} +function rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.I(b,c,3),a=nb(a.l,c)):a=a.f[c]&255;return a}function sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?ob(a.l,a.I(b,c,2)):a.f[c]}function R(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Ta=a.I(b,e,7),lc(a,e,d.call(a,c,nb(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.I(b,e,6),pb(a.l,e,d.call(a,c,ob(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?lc(a,a.I(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?pb(a.l,a.I(b,d,4),c):a.f[d]=c&65535;return c}function T(a,b,c){c&&(a.f[7]=a.f[7]+(b<<24>>23)&65535,a.a-=2);a.a-=3} +g.rb=function(a){this.h.complete=!0;this.h.wb=!1;this.h.qb=!1;this.fa=this.a=a;do{if(this.j&&(this.j&112&&(this.j&32?G(this,168,28):this.j&64?G(this,4,30):this.j&16&&G(this,12,32),this.j&=-113),this.j&7))if(this.j&2){this.j&=-3;var b=160,c=(this.ab&224)>>5;if(a=this.W&&this.W.ta>c?this.W:null)b=a.rc,c=a.ta;c>(this.u&224)>>5?(this.j&4&&(this.f[7]=this.f[7]+2&65535,this.j&=-5),G(this,b,26),c=!0):c=!1;if(c&&a)if(c=this.W,c==a)this.W=a.next;else for(;c;){b=c.next;if(b==a){c.next=b.next;break}c=b}}else this.j& 1&&this.j++;this.A&57344||(this.ma=0,this.$a=this.f[7]);this.j=this.j&7|this.u&16;this.decode(ec(this))}while(0>1|b<<16;P(this,a);return a&65535}function Ac(a,b){a=b&2048|b>>1|b<<8;P(this,a<<8);return a&255}function Bc(a,b){a=b&~a;N(this,a);return a}function Cc(a,b){a=b&~a;N(this,a<<8);return a}function Dc(a,b){a|=b;N(this,a);return a}function Ec(a,b){a|=b;N(this,a<<8);return a}function Fc(a,b){a=~b|65536;O(this,a);return a&65535}function Gc(a,b){a=~b|256;O(this,a<<8);return a&255} function Hc(a,b){a=b-a;this.j&128||(this.o=this.i=a,this.g=b&(b^a));return a&65535}function Ic(a,b){a=b-a;var c=a<<8;b<<=8;this.j&128||(this.o=this.i=c,this.g=b&(b^c));return a&255}function Jc(a,b){a=b+a;this.j&128||(this.o=this.i=a,this.g=a&(b^a));return a&65535}function Kc(a,b){a=b+a;var c=a<<8;this.j&128||(this.o=this.i=c,this.g=c&(b<<8^c));return a&255}function Lc(a,b){a=-b;O(this,a,a&b&32768);return a&65535}function Mc(a,b){a=-b;O(this,a<<8,(a&b&128)<<8);return a&255} @@ -121,64 +121,65 @@ function Uc(a,b){a^=b;N(this,a);return a&65535}function Vc(a){S(this,a,Q(this,a) function Xc(a){var b=sc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=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.f[a|1]=d&65535;this.o=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Yc(a){T(this,a,!M(this))}function Zc(a){T(this,a,M(this))} function $c(a){S(this,a,Q(this,a),Bc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ad(a){R(this,a,pc(this,a),Cc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function bd(a){S(this,a,Q(this,a),Dc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function cd(a){R(this,a,pc(this,a),Ec);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} function dd(a){N(this,Q(this,a)&sc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ed(a){N(this,(pc(this,a)&rc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function fd(a){T(this,a,this.i&65535?0:4)}function gd(a){T(this,a,!this.ka()==!(this.g&32768))}function hd(a){T(this,a,!!(this.i&65535)&&!this.ka()==!(this.g&32768))}function id(a){T(this,a,!M(this)&&!!(this.i&65535))} -function jd(a){T(this,a,(this.i&65535?0:4)||!this.ka()!=!(this.g&32768))}function kd(a){T(this,a,M(this)||(this.i&65535?0:4))}function ld(a){T(this,a,!this.ka()!=!(this.g&32768))}function md(a){T(this,a,this.ka())}function nd(a){T(this,a,!!(this.i&65535))}function od(a){T(this,a,!this.ka())}function pd(){H(this,12,1);this.a-=5}function qd(a){T(this,a,!0)}function rd(a){T(this,a,!(this.g&32768))}function sd(a){T(this,a,this.g&32768?2:0)} +function jd(a){T(this,a,(this.i&65535?0:4)||!this.ka()!=!(this.g&32768))}function kd(a){T(this,a,M(this)||(this.i&65535?0:4))}function ld(a){T(this,a,!this.ka()!=!(this.g&32768))}function md(a){T(this,a,this.ka())}function nd(a){T(this,a,!!(this.i&65535))}function od(a){T(this,a,!this.ka())}function pd(){G(this,12,1);this.a-=5}function qd(a){T(this,a,!0)}function rd(a){T(this,a,!(this.g&32768))}function sd(a){T(this,a,this.g&32768?2:0)} function U(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.i=1);a&8&&(this.o=0);this.a-=5}function td(a){var b=Q(this,a);a=sc(this,a);gc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ud(a){var b=pc(this,a)<<8;a=rc(this,a)<<8;gc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} -function vd(a){var b=sc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}function wd(){H(this,24,2);this.a-=25}function xd(){this.u&49152?(this.F|=128,H(this,4,3)):E(this);this.a-=7} -function yd(){H(this,16,4);this.a-=25}var zd=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;a=qc(this,a);this.f[7]=a&65535;this.a=b-zd[this.c]}var Ad=[0,14,14,17,14,18,16,20];function Bd(a){var b=this.a,c=qc(this,a);a=a>>6&7;hc(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Ad[this.c]}var Cd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Dd(a){var b=Q(this,a),c=this.a;N(this,uc(this,a,b));this.a=c-Cd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} +function vd(a){var b=sc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.o=d>>16):(this.g=32768,this.i=d>>15|d,this.o=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.o=0,this.g=32768,this.m=65536,this.a-=7}function wd(){G(this,24,2);this.a-=25}function xd(){this.u&49152?(this.F|=128,G(this,4,3)):Wa(this);this.a-=7} +function yd(){G(this,16,4);this.a-=25}var zd=[0,7,7,10,7,11,9,13];function V(a){var b=this.a;a=qc(this,a);this.f[7]=a&65535;this.a=b-zd[this.c]}var Ad=[0,14,14,17,14,18,16,20];function Bd(a){var b=this.a,c=qc(this,a);a=a>>6&7;hc(this,this.f[a]);this.f[a]=this.f[7];this.f[7]=c&65535;this.a=b-Ad[this.c]}var Cd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Dd(a){var b=Q(this,a),c=this.a;N(this,uc(this,a,b));this.a=c-Cd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)} function Ed(a){var b=pc(this,a);N(this,tc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Fd=[7,13,13,17,14,18,17,21];function Gd(a){var b=sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.j&128||(this.o=b>>16,this.i=this.o|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Nd(a){S(this,a,Q(this,a),Rc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function X(a){S(this,a,0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}function Od(){H(this,28,5);this.a-=5}function Pd(){this.j&4||this.w.da();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Qd(a){S(this,a,Q(this,a),Uc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){H(this,8,6)}function ac(a){Rd[a>>12].call(this,a)}function Sd(a){Td[a>>6&3].call(this,a)}function Ud(a){Vd[a>>6&3].call(this,a)}function Wd(a){Xd[a>>6&3].call(this,a)}function Yd(a){Zd[a&15].call(this,a)} +function Jd(){ic(this);this.j|=this.u&16;this.a-=13}function Kd(a){if(a&8)G(this,8,6);else{var b=jc(this);a&=7;this.f[7]=this.f[a]&65535;this.f[a]=b;this.a-=9}}function W(a){a&1&&(this.m=65536);a&2&&(this.g=32768);a&4&&(this.i=0);a&8&&(this.o=32768);this.a-=5}function Ld(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)this.f[7]=this.f[7]-((a&63)<<1)&65535,this.a+=1;this.a-=6}function Md(a){S(this,a,Q(this,a),Rc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function X(a){S(this,a,0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}function Od(){G(this,28,5);this.a-=5}function Pd(){this.j&4||this.w.da();this.j|=4;this.f[7]=this.f[7]+-2&65535;this.a-=3}function Qd(a){S(this,a,Q(this,a),Uc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){G(this,8,6)}function ac(a){Rd[a>>12].call(this,a)}function Sd(a){Td[a>>6&3].call(this,a)}function Ud(a){Vd[a>>6&3].call(this,a)}function Wd(a){Xd[a>>6&3].call(this,a)}function Yd(a){Zd[a&15].call(this,a)} function $d(a){ae[a&15].call(this,a)}function be(a){ce[a>>6&3].call(this,a)}function de(a){ee[a>>6&3].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)} -var Rd=[function(a){he[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,Y,function(a){ie[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Nd,Y],he=[function(a){je[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,Y,Y,Y],Td=[function(a){O(this,uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Hc);this.a-=this.c?9:3+(7==this.b?2:0)}],Vd=[function(a){S(this,a,0,Lc); +var Rd=[function(a){he[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,Y,function(a){ie[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Md,Y],he=[function(a){je[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,Y,Y,Y],Td=[function(a){O(this,uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Fc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,Hc);this.a-=this.c?9:3+(7==this.b?2:0)}],Vd=[function(a){S(this,a,0,Lc); this.a-=this.c?11:6},function(a){S(this,a,M(this)?1:0,vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,M(this)?1:0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=sc(this,a);O(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Xd=[function(a){S(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,xc);this.a-=this.c?9:3+(7==this.b?2:0)}],je=[function(a){ke[a& 15].call(this,a)},Y,Y,Y,V,V,V,V,Kd,Y,Yd,$d,X,X,X,X],ke=[xd,Pd,Jd,pd,yd,Id,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Zd=[Hd,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},U,function(){this.i=1;this.a-=5},U,U,U,function(){this.o=0;this.a-=5},U,U,U,U,U,U,U],ae=[Hd,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},W,function(){this.i=0;this.a-=5},W,W,W,function(){this.o=32768;this.a-=5},W,W,W,W,W,W,W],ie=[od,md,id,kd,rd,sd,Yc,Zc,wd,Od,be,de,fe,Y,Y,Y],ce=[function(a){O(this,tc(this,a,0)); this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,1,Ic);this.a-=this.c?9:3+(7==this.b?2:0)}],ee=[function(a){R(this,a,0,Mc);this.a-=this.c?11:6},function(a){R(this,a,M(this)?1:0,wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,M(this)?1:0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=rc(this,a);O(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}],ge= [function(a){R(this,a,0,Qc);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){R(this,a,0,Ac);this.a-=this.c?9+(this.Ta&1):3+(7==this.b?2:0)},function(a){R(this,a,0,yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function bc(a){le[a>>12].call(this,a)} -var le=[function(a){me[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,function(a){ne[a>>8&15].call(this,a)},function(a){oe[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Nd,Y],me=[function(a){pe[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,function(a){qe[a>>6&3].call(this,a)},Y,Y],qe=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=nc(this,a,0);hc(this,a);N(this,a);this.a-=11},function(a){var b=jc(this), -c=this.a;oc(this,a,0,b);N(this,b);this.a=c-Fd[this.c]},function(a){N(this,uc(this,a,this.ka?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],pe=[function(a){re[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Kd,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):H(this,8,6)},Yd,$d,X,X,X,X],re=[xd,Pd,Jd,pd,yd,Id,function(){ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ne=[Gd,Gd,vd,vd,Wc,Wc,Xc,Xc,Qd,Qd,Y,Y,Y,Y,Ld,Ld],oe=[od,md,id,kd,rd,sd,Yc,Zc,wd,Od,be,de,fe,function(a){se[a>>6&3].call(this, +var le=[function(a){me[a>>8&15].call(this,a)},Dd,td,dd,$c,bd,Vc,function(a){ne[a>>8&15].call(this,a)},function(a){oe[a>>8&15].call(this,a)},Ed,ud,ed,ad,cd,Md,Y],me=[function(a){pe[a>>4&15].call(this,a)},qd,nd,fd,gd,ld,hd,jd,Bd,Bd,Sd,Ud,Wd,function(a){qe[a>>6&3].call(this,a)},Y,Y],qe=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.M);this.f[7]=this.f[5]&65535;this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=nc(this,a,0);hc(this,a);N(this,a);this.a-=11},function(a){var b=jc(this), +c=this.a;oc(this,a,0,b);N(this,b);this.a=c-Fd[this.c]},function(a){N(this,uc(this,a,this.ka?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],pe=[function(a){re[a&15].call(this,a)},Y,Y,Y,V,V,V,V,Kd,function(a){a&8?(this.u&49152||(this.u=this.u&-2017|(a&7)<<5,this.j|=1),this.a-=5):G(this,8,6)},Yd,$d,X,X,X,X],re=[xd,Pd,Jd,pd,yd,Id,function(){ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ne=[Gd,Gd,vd,vd,Wc,Wc,Xc,Xc,Qd,Qd,Y,Y,Y,Y,Ld,Ld],oe=[od,md,id,kd,rd,sd,Yc,Zc,wd,Od,be,de,fe,function(a){se[a>>6&3].call(this, a)},Y,Y],se=[Y,function(a){a=nc(this,a,65536);hc(this,a);N(this,a);this.a-=11},function(a){var b=jc(this),c=this.a;oc(this,a,65536,b);N(this,b);this.a=c-Fd[this.c]},Y];function te(a){v.call(this,"ROM",a,te);this.b=null;this.o=a.addr;this.c=a.size;this.w=a.writable;this.g=a.alias;this.i=a.file;this.s=ka(this.i);if(this.i){a=this.i;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;m(a,null,!0,function(a,b,f){ue(c,a,b,f)})}}x(te); te.prototype.ca=function(a,b,c,d){this.l=b;this.a=c;this.G=d;ve(this)};te.prototype.Y=function(){this.m&&(this.G&&this.G.a(this.id,this.o,this.c,this.m),delete this.m);return!0};te.prototype.X=function(){return!0}; function ue(a,b,c,d){if(d)a.K("Unable to load system ROM (error "+d+": "+b+")");else{Oa(a.Ua,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,k,l=eval("("+c+")");if(f=l.bytes)a.b=f;else if(f=l.words)for(a.b=Array(2*f.length),k=e=0;e>8&255;else if(f=l.data)for(a.b=Array(4*f.length),k=e=0;e>8&255,a.b[k++]=f[e]>>16&255,a.b[k++]=f[e]>>24&255;else a.b=l;a.m=l.symbols;if(!a.b.length){p("Empty ROM: "+b); return}if(1==a.b.length){p(a.b[0]);return}}catch(n){a.K("ROM data error: "+n.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.Ea)return;b=qa(b[1]);if(this.s=Pa(b)){var d=this.s.exports;if(d){var e=d.connect;e&&e.call(this.s);if(this.A=d.receiveData){this.status(this.Ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.Y=function(a,b){if(!b)if(this.ib(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.X=function(a){return a?this.save():!0};g.reset=function(){Ae(this)};g.save=function(){var a=new L(this);a.set(0,[]);return a.data()};g.restore=function(){return Ae(this)};function Ae(a){a.D=0;a.b=0;a.c=128;a.i=[];return!0}g.Za=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.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;wb(this.a,this.J,1)}};var Be={},ze=(Be[65392]=[null,null,Z.prototype.Yb,Z.prototype.Ic,"RCSR"],Be[65394]=[null,null,Z.prototype.Xb,Z.prototype.Hc,"RBUF"],Be[65396]=[null,null,Z.prototype.lc,Z.prototype.Wc,"XCSR"],Be[65398]=[null,null,Z.prototype.kc,Z.prototype.Vc,"XBUF"],Be);u(function(){for(var a=B(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bEe){if(Ge(d,this.s)){this.m=new L(this,"1.30.1","failsafe");Ge(this.m)&&(Le(this,d),a=2,Me(this.m));this.m.set("timestamp",ta());Ne(this.m);var e=this.b&&!this.o;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ke(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Ge(d,k):("error"== -f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(ya("user",""),this.c=null)):this.O(f+": "+k),Me(d),Ge(d)?(c=Ke(d),e=!0):c=!1))}e&&Je(this,c?d:null)}else 2==a&&d.clear()}else Je(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Oe(this,this.a,b,c,a),this.a.Aa());this.H&&(Le(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; -function Le(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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} -function Pe(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.X&&(c&&E(a.a),d=a.a.X(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;n":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.H||8,c=a-this.o%a,this.H&&(b=" ".slice(0,c)));this.B&&!this.o&&c&&(b=String.fromCharCode(this.B)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.o+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.O(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;xb(this.a,this.J,1)}};var Be={},ze=(Be[65392]=[null,null,Z.prototype.$b,Z.prototype.Mc,"RCSR"],Be[65394]=[null,null,Z.prototype.Zb,Z.prototype.Lc,"RBUF"],Be[65396]=[null,null,Z.prototype.nc,Z.prototype.$c,"XCSR"],Be[65398]=[null,null,Z.prototype.mc,Z.prototype.Zc,"XBUF"],Be);u(function(){for(var a=B(document,"pdp11","serial"),b=0;b\nLicense: GPL version 3 or later ");this.O("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bGe){if(Ie(d,this.s)){this.m=new L(this,"1.30.1","failsafe");Ie(this.m)&&(Ne(this,d),a=2,Oe(this.m));this.m.set("timestamp",ta());Pe(this.m);var e=this.b&&!this.o;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Me(d)){var f=d.get("code"),k=d.get("data");f&&("ok"==f?Ie(d,k):("error"== +f&&"no machine state"!=k?(this.K("Error: "+k),"unable to verify user"==k&&(ya("user",""),this.c=null)):this.O(f+": "+k),Oe(d),Ie(d)?(c=Me(d),e=!0):c=!1))}e&&Le(this,c?d:null)}else 2==a&&d.clear()}else Le(this);delete this.s;delete this.A}e=y(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.h.L=!0;var d=this.v.power;d&&(d.textContent="Shutdown");this.a&&(Qe(this,this.a,b,c,a),this.a.Aa());this.H&&(Ne(this,b),b.clear());!c&&this.m&&(this.m.clear(),delete this.m);this.g=0}; +function Ne(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.1"};d.url=a.N;d.user=c;d.type="bug";d.data=b;m("http://www.pcjs.org/api/v1/report",d,!0)}} +function Re(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new L(a,"1.30.1"),k=new L(a,"1.30.1","validate"),l=ta();k.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.X&&(c&&Wa(a.a),d=a.a.X(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.h.L=!1,!1===d&&(e=null)));for(var l=y(a.id),n=0;nf.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);We(a,b,c)}})}else c(a,null)} -function Xe(a,b,c,d){function e(a){if(void 0===l){var b=k&&B(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--Te||Fa(!0));n=!1}var k,l,n=!0;Te++;Na[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=r:D.appendChild(document.createTextNode(r));t.appendChild(D)}c|| -(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?Ue(c,null,null,!1,e,function(d,n){n?(Oa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Te||Fa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Te||Fa(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ue(b,a,d,!0,e,r):Ve(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Md){f(Md.message)}return n}window.embedPDP11=function(a,b,c,d){Fa(!1);return Xe(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map +g.U=function(a,b,c){var d=this;switch(b){case "power":return this.v[b]=c,c.onclick=function(){d.g||(d.h.L?Re(d,!1,!0):Ke(d,d.Ca))},!0;case "reset":return this.v[b]=c,c.onclick=function(){if(d.h.L&&!d.g)if(d.b&&!d.w){var a=ua("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Re(d,a,!0);!a&&d.D?window&&window.location.reload():d.Ca(Ge)}else d.reset(),d.a&&d.a.Aa()},!0;case "save":if(ma())c.parentNode.removeChild(c);else return this.v[b]= +c,c.onclick=function(){var a=He(d,!0);if(a){var b=!!(d.b&&!d.w||d.D),c=Re(d,b);b?Se(d,a,c):d.K("Resume disabled, machine state not saved")}},!0}return!1}; +function He(a,b){var c=a.c;c||((c=xa("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Te(a,c))||a.K("The user ID is invalid.")):b&&a.K("Browser local storage is not available"));return c} +function Te(a,b){a.c=null;b=m(na()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(ya("user",b.data),a.c=b.data)}catch(d){p(d.message+" ("+c+")")}return a.c}function Je(a){var b=null;a.c&&(b=na()+"/api/v1/user?req=load&user="+a.c+"&state="+Ue(a,"1.30.1"));return b} +function Se(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Ue(a,"1.30.1");d.data=c;b=m(na()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.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(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");m(e,null,!0,function(f,k,l){if(l||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],r,t=/( [a-z]+=)(['"])(.*?)\2/g;r=t.exec(f);)n=0>n.indexOf(r[1])?n.replace(">",r[0]+">"):n.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[0]);l[0]!=n&&(k=k.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],k);Ye(a,b,c)}})}else c(a,null)} +function Ze(a,b,c,d){function e(a){if(void 0===l){var b=k&&B(k,"machine-warning");l=b&&b[0]||k}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--Ve||Fa(!0));n=!1}var k,l,n=!0;Ve++;Na[a]={};try{if(k=document.getElementById(a)){var r;if("object"==typeof resources&&(r=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=r:D.appendChild(document.createTextNode(r));t.appendChild(D)}c|| +(c="/versions/pdpjs/1.30.1/components.xsl");r=function(d,l){l?We(c,null,null,!1,e,function(d,n){n?(Oa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(k.outerHTML=n,--Ve||Fa(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?k.parentNode?(k.parentNode.replaceChild(n,k),--Ve||Fa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?We(b,a,d,!0,e,r):Xe(b,null,a,d,!1,e,r)}else f("missing machine element: "+a)}catch(Nd){f(Nd.message)}return n}window.embedPDP11=function(a,b,c,d){Fa(!1);return Ze(a,b,c,d)};window.enableEvents=Fa;window.sendEvent=Ga;})();//# sourceMappingURL=/tmp/pdpjs/1.30.1/pdp11.map