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.

This commit is contained in:
Jeff Parsons 2016-10-15 11:05:38 -07:00 • committed by Jeff Parsons
commit 3a7b769fa3
31 changed files with 1117 additions and 751 deletions

View file

@ -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/))

View file

@ -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" %}

View file

@ -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" %}

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.1/machine.xsl"?>
<machine id="test1120" class="pdp11" border="1" pos="center" background="#FAEBD7">
<name pos="center">PDP-11/20 Test Machine with Debugger</name>
<computer id="computer" busWidth="16"/>
<cpu id="cpu" model="1120" cycles="6666667" resetAddr="0xC000"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/test/debugger/terminal.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
</machine>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.1/machine.xsl"?>
<machine id="test1120" class="pdp11" border="1" pos="center" background="#FAEBD7">
<name pos="center">PDP-11/20 Test Machine</name>
<computer id="computer" busWidth="16"/>
<cpu id="cpu" model="1120" cycles="6666667" resetAddr="0xC000" autoStart="true"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/test/terminal.xml"/>
</machine>

View file

@ -5,10 +5,10 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/1170/debugger/leds.xml"/>
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
</machine>

View file

@ -5,9 +5,9 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000" autoStart="true"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/1170/leds.xml"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
</machine>

View file

@ -5,10 +5,10 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/1170/debugger/test.xml"/>
<panel ref="/devices/pdp11/panel/test/debugger/terminal.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
</machine>

View file

@ -5,9 +5,9 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000" autoStart="true"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0" binding="print"/>
<panel ref="/devices/pdp11/panel/1170/test.xml"/>
<panel ref="/devices/pdp11/panel/test/terminal.xml"/>
</machine>

View file

@ -5,10 +5,10 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000" autoStart="true"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0"/>
<panel ref="/devices/pdp11/panel/1170/debugger/leds.xml"/>
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
</machine>

View file

@ -5,9 +5,9 @@
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667" resetAddr="0xC000" autoStart="true"/>
<ram id="ram" addr="0x0000" size="0xC000"/>
<rom id="rom" addr="0xC000" size="0x0570" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<rom id="rom" addr="0xC000" file="/devices/pdp11/rom/custom/boot.json" writable="true"/>
<ram id="ram" addr="0x10000" size="0x34000"/>
<device id="default" name="default"/>
<serial id="dl11" adapter="0"/>
<panel ref="/devices/pdp11/panel/1170/leds.xml"/>
<panel ref="/devices/pdp11/panel/1170/front.xml"/>
</machine>

View file

@ -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/)

View file

@ -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*/]
}

View file

@ -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

View file

@ -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

View file

@ -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.<number>}
*/
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) {
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);
}

View file

@ -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;
}

View file

@ -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;
};
/**

View file

@ -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
];

View file

@ -123,7 +123,11 @@ var Trigger;
*/
CPUStatePDP11.prototype.initProcessor = function()
{
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

View file

@ -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

View file

@ -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],

View file

@ -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

View file

@ -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)
}

View file

@ -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)
*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long