From f43d1c174521413a1974e2f197890bbf02231c6b Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 8 Nov 2016 14:21:07 -0800 Subject: [PATCH 1/2] Revert back to propagating R0 to the Front Panel data path on a WAIT instruction (per PDP-11 lore) --- apps/pdp11/boot/monitor/BOOTMON.json | 171 +++-- apps/pdp11/boot/monitor/BOOTMON.mac | 4 +- apps/pdp11/boot/monitor/BOOTMON.txt | 1044 +++++++++++++------------- apps/pdp11/boot/monitor/README.md | 5 +- modules/pdp11/lib/cpu.js | 1 + modules/pdp11/lib/cpuops.js | 9 + modules/pdp11/lib/panel.js | 25 +- 7 files changed, 642 insertions(+), 617 deletions(-) diff --git a/apps/pdp11/boot/monitor/BOOTMON.json b/apps/pdp11/boot/monitor/BOOTMON.json index b1321ca02..b4d18c95a 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.json +++ b/apps/pdp11/boot/monitor/BOOTMON.json @@ -1,90 +1,89 @@ {"load":0xC000/*140000*/,"exec":0xC000/*140000*/, "words":[ 0x0005/*000005*/,0x0A1F/*005037*/,0xFFFE/*177776*/,0x15C6/*012706*/,0xC000/*140000*/,0x0A1F/*005037*/,0xFF74/*177564*/,0x15C0/*012700*/, -0xC255/*141125*/,0x09F7/*004767*/,0x0056/*000126*/,0x15DF/*012737*/,0xC058/*140130*/,0x0040/*000100*/,0x15DF/*012737*/,0x00E0/*000340*/, -0x0042/*000102*/,0x55DF/*052737*/,0x0040/*000100*/,0xFF66/*177546*/,0x15C0/*012700*/,0xC26D/*141155*/,0x09F7/*004767*/,0x003C/*000074*/, -0xE5C6/*162706*/,0x00AE/*000256*/,0x1180/*010600*/,0x09F7/*004767*/,0x006E/*000156*/,0x0A00/*005000*/,0x101F/*010037*/,0xFF78/*177570*/, -0x0001/*000001*/,0x0A80/*005200*/,0x0BF7/*005767*/,0x000C/*000014*/,0x03F9/*001771*/,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*/,0xC08C/*140214*/,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*/,0xC0C4/*140304*/,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*/,0xC223/*141043*/,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*/,0xC14A/*140512*/,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*/,0xC220/*141040*/,0x09F7/*004767*/,0xFF0C/*177414*/, -0xB5DF/*132737*/,0x0040/*000100*/,0xFF74/*177564*/,0x02FC/*001374*/,0x0A04/*005004*/,0x15C3/*012703*/,0xC227/*141047*/,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*/, -0xC1C4/*140704*/,0x0104/*000404*/,0x15C0/*012700*/,0xC243/*141103*/,0x09F7/*004767*/,0xFEC0/*177300*/,0x0A37/*005067*/,0xFEF6/*177366*/, -0x15C0/*012700*/,0xC26D/*141155*/,0x09F7/*004767*/,0xFEB4/*177264*/,0x1584/*012604*/,0x1583/*012603*/,0x1582/*012602*/,0x1581/*012601*/, -0x1580/*012600*/,0x0002/*000002*/,0xC42C/*142054*/,0xC2A8/*141250*/,0xC2B4/*141264*/,0xC2F8/*141370*/,0xC29E/*141236*/,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*/,0x5044/*050104*/,0x312D/*030455*/,0x2031/*020061*/,0x4F4D/*047515*/,0x494E/*044516*/, -0x4F54/*047524*/,0x2052/*020122*/,0x3156/*030526*/,0x302E/*030056*/,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*/, -0xC1CE/*140716*/,0x09F7/*004767*/,0xFDC6/*176706*/,0x0087/*000207*/,0x0000/*000000*/,0x15C0/*012700*/,0xC220/*141040*/,0x09F7/*004767*/, -0xFDBA/*176672*/,0x0087/*000207*/,0x0A37/*005067*/,0xFD9E/*176636*/,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*/,0xC28F/*141217*/,0x1DC3/*016703*/, -0xFD74/*176564*/,0x0A02/*005002*/,0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/,0x1083/*010203*/, -0x02F8/*001370*/,0x09F7/*004767*/,0xFD76/*176566*/,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*/,0xC388/*141610*/,0x14A6/*012246*/,0x0D93/*006623*/,0x2097/*020227*/,0xC42C/*142054*/,0x87FB/*103773*/, -0x15F7/*012767*/,0x4080/*040200*/,0xFCCE/*176316*/,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*/, -0xC274/*141164*/,0x09F7/*004767*/,0xFC26/*176046*/,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*/,0xC243/*141103*/, -0x09F7/*004767*/,0xFBD8/*175730*/,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*/] +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*/,0xC269/*141151*/,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*/,0xC269/*141151*/, +0x09F7/*004767*/,0xFEB4/*177264*/,0x1584/*012604*/,0x1583/*012603*/,0x1582/*012602*/,0x1581/*012601*/,0x1580/*012600*/,0x0002/*000002*/, +0xC428/*142050*/,0xC2A4/*141244*/,0xC2B0/*141260*/,0xC2F4/*141364*/,0xC29A/*141232*/,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*/,0x5044/*050104*/,0x312D/*030455*/,0x2031/*020061*/,0x4F4D/*047515*/,0x494E/*044516*/,0x4F54/*047524*/,0x2052/*020122*/, +0x3156/*030526*/,0x302E/*030056*/,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*/, +0xFDC6/*176706*/,0x0087/*000207*/,0x0000/*000000*/,0x15C0/*012700*/,0xC21C/*141034*/,0x09F7/*004767*/,0xFDBA/*176672*/,0x0087/*000207*/, +0x0A37/*005067*/,0xFD9E/*176636*/,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*/,0xC28B/*141213*/,0x1DC3/*016703*/,0xFD74/*176564*/,0x0A02/*005002*/, +0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/,0x1083/*010203*/,0x02F8/*001370*/,0x09F7/*004767*/, +0xFD76/*176566*/,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*/, +0xC384/*141604*/,0x14A6/*012246*/,0x0D93/*006623*/,0x2097/*020227*/,0xC428/*142050*/,0x87FB/*103773*/,0x15F7/*012767*/,0x4080/*040200*/, +0xFCCE/*176316*/,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*/,0xC270/*141160*/,0x09F7/*004767*/, +0xFC26/*176046*/,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*/,0xFBD8/*175730*/, +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/apps/pdp11/boot/monitor/BOOTMON.mac b/apps/pdp11/boot/monitor/BOOTMON.mac index fc0b55005..1b6e8f30a 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.mac +++ b/apps/pdp11/boot/monitor/BOOTMON.mac @@ -4,7 +4,6 @@ ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? PSW = 177776 -CNSW = 177570 DL11XCSR = 177564 DL11VEC = 64 @@ -29,8 +28,7 @@ START: RESET MOV SP,R0 JSR PC,INPUT CLR R0 -1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 - WAIT +1$: WAIT INC R0 TST LGHTON BEQ 1$ diff --git a/apps/pdp11/boot/monitor/BOOTMON.txt b/apps/pdp11/boot/monitor/BOOTMON.txt index 669313e92..870f34698 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.txt +++ b/apps/pdp11/boot/monitor/BOOTMON.txt @@ -4,532 +4,530 @@ 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? 5 6 177776 PSW = 177776 - 7 177570 CNSW = 177570 - 8 177564 DL11XCSR = 177564 - 9 000064 DL11VEC = 64 - 10 - 11 177546 KW11LKS = 177546 - 12 000100 KW11VEC = 100 - 13 - 14 .ASECT - 15 140000 .=140000 - 16 140000 000005 START: RESET - 17 140002 005037 177776 CLR @#PSW - 18 140006 012706 140000 MOV #START,SP - 19 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR - 20 140016 012700 141125 MOV #BANNER,R0 - 21 140022 004767 140154' JSR PC,PRINT - 22 140026 012737 140130 000100 MOV #CLKAST,@#KW11VEC - 23 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 - 24 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING - 25 - 26 140050 012700 141155 MOV #PROMPT,R0 - 27 140054 004767 140154' JSR PC,PRINT - 28 140060 162706 000256 SUB #256,SP - 29 140064 010600 MOV SP,R0 - 30 140066 004767 140250' JSR PC,INPUT - 31 140072 005000 CLR R0 - 32 140074 010037 177570 1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 - 33 140100 000001 WAIT - 34 140102 005200 INC R0 - 35 140104 005767 140124' TST LGHTON - 36 140110 001771 BEQ 1$ - 37 140112 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG - 38 140116 016746 140124' MOV LGHTON,-(SP) ; CALL SUPER LOOP START - 39 140122 000002 RTI - 40 - 41 140124 000000 LGHTON: .WORD 0 - 42 140126 000000 CLKTIC: .WORD 0 - 43 - 44 CLKAST: - 45 140130 005267 140126' INC CLKTIC - 46 140134 000002 RTI - 47 - 48 ONECHR: - 49 140136 105737 177564 TSTB @#DL11XCSR - 50 140142 100375 BPL ONECHR - 51 140144 110037 177566 MOVB R0,@#177566 - 52 140150 000207 RTS PC + 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 + 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 141151 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: + 43 140124 005267 140122' INC CLKTIC + 44 140130 000002 RTI + 45 + 46 ONECHR: + 47 140132 105737 177564 TSTB @#DL11XCSR + 48 140136 100375 BPL ONECHR + 49 140140 110037 177566 MOVB R0,@#177566 + 50 140144 000207 RTS PC + 51 + 52 140146 000000 PRTPTR: .WORD 0 53 - 54 140152 000000 PRTPTR: .WORD 0 - 55 - 56 PRINT: - 57 140154 132737 000100 177564 BITB #100,@#DL11XCSR - 58 140162 001374 BNE PRINT - 59 140164 010067 140152' MOV R0,PRTPTR - 60 140170 012737 140214 000064 MOV #PRTAST,@#DL11VEC - 61 140176 012737 000200 000066 MOV #200,@#DL11VEC+2 - 62 140204 152737 000100 177564 BISB #100,@#DL11XCSR - 63 140212 000207 RTS PC - 64 - 65 PRTAST: - 66 140214 105777 140152' TSTB @PRTPTR - 67 140220 001406 BEQ 2$ - 68 140222 117737 140152' 177566 MOVB @PRTPTR,@#177566 - 69 140230 005267 140152' INC PRTPTR - 70 140234 000002 RTI - 71 140236 105037 177564 2$: CLRB @#177564 - 72 140242 000002 RTI - 73 - 74 140244 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER - 75 140246 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH - 76 - 77 INPUT: - 78 140250 010067 140244' MOV R0,BUFFER - 79 140254 005067 140246' CLR LENGTH - 80 140260 012737 140304 000060 MOV #INPAST,@#60 - 81 140266 012737 000200 000062 MOV #200,@#62 - 82 140274 152737 000100 177560 BISB #100,@#177560 - 83 140302 000207 RTS PC - 84 - 85 INPAST: - 86 140304 010046 MOV R0,-(SP) - 87 140306 113700 177562 MOVB @#177562,R0 - 88 140312 120027 000015 CMPB R0,#15 - 89 140316 001455 BEQ 7$ ; CARRIAGE RETURN - 90 140320 120027 000177 CMPB R0,#127. - 91 140324 001403 BEQ 2$ ; - 92 140326 120027 000010 CMPB R0,#10 - 93 140332 001012 BNE 4$ ; BACK SPACE - 94 140334 005767 140246' 2$: TST LENGTH ; DATA IN BUFFER? - 95 140340 001406 BEQ 3$ - 96 140342 005367 140246' DEC LENGTH ; LENGTH - 97 140346 012700 141043 MOV #DEL,R0 - 98 140352 004767 140154' JSR PC,PRINT - 99 140356 000453 3$: BR 9$ - 100 140360 120027 000040 4$: CMPB R0,#40 - 101 140364 002450 BLT 9$ ; BELOW SPACE - 102 140366 120027 000177 CMPB R0,#177 - 103 140372 002045 BGE 9$ ; SKIP STUFF TOO BIG - 104 140374 004767 140136' JSR PC,ONECHR ; ECHO CHAR - 105 140400 120027 000172 CMPB R0,#172 - 106 140404 003005 BGT 5$ ; ABOVE Z - 107 140406 120027 000141 CMPB R0,#141 - 108 140412 002402 BLT 5$ ; BELOW A - 109 140414 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE - 110 140420 026727 140246' 000254 5$: CMP LENGTH,#254 - 111 140426 002027 BGE 9$ - 112 140430 110046 MOVB R0,-(SP) - 113 140432 016700 140244' MOV BUFFER,R0 - 114 140436 066700 140246' ADD LENGTH,R0 - 115 140442 112610 MOVB (SP)+,(R0) - 116 140444 005267 140246' INC LENGTH - 117 140450 000416 BR 9$ - 118 - 119 140452 016700 140244' 7$: MOV BUFFER,R0 - 120 140456 066700 140246' ADD LENGTH,R0 - 121 140462 105010 CLRB (R0) - 122 140464 012737 140512 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 - 123 140472 012737 000100 000242 MOV #100,@#242 - 124 140500 012737 002000 177772 MOV #2000,@#177772 - 125 140506 012600 9$: MOV (SP)+,R0 - 126 140510 000002 RTI - 127 - 128 CMD: - 129 140512 005037 177772 CLR @#177772 ; NO MORE PIR CALLS - 130 140516 010046 MOV R0,-(SP) - 131 140520 010146 MOV R1,-(SP) - 132 140522 010246 MOV R2,-(SP) - 133 140524 010346 MOV R3,-(SP) - 134 140526 010446 MOV R4,-(SP) - 135 140530 012700 141040 MOV #EOL,R0 - 136 140534 004767 140154' JSR PC,PRINT - 137 140540 132737 000100 177564 1$: BITB #100,@#177564 - 138 140546 001374 BNE 1$ - 139 140550 005004 CLR R4 - 140 140552 012703 141047 MOV #CMDLST,R3 ; CMD LIST - 141 140556 112300 3$: MOVB (R3)+,R0 - 142 140560 001431 BEQ 13$ - 143 140562 016702 140244' MOV BUFFER,R2 ; USER CMD - 144 140566 112201 4$: MOVB (R2)+,R1 - 145 140570 001431 BEQ 15$ ; NULL COMMAND? - 146 140572 120127 000040 CMPB R1,#40 - 147 140576 001773 BEQ 4$ ; SKIP SPACE - 148 140600 120001 5$: CMPB R0,R1 - 149 140602 001010 BNE 7$ - 150 140604 112300 MOVB (R3)+,R0 - 151 140606 001412 BEQ 9$ - 152 140610 112201 MOVB (R2)+,R1 - 153 140612 001410 BEQ 9$ - 154 140614 120127 000040 CMPB R1,#40 - 155 140620 001367 BNE 5$ - 156 140622 000404 BR 9$ - 157 140624 112300 7$: MOVB (R3)+,R0 - 158 140626 001376 BNE 7$ - 159 140630 005204 INC R4 - 160 140632 000751 BR 3$ - 161 140634 006304 9$: ASL R4 - 162 140636 004774 140704 JSR PC,@CMDTBL(R4) ; EXECUTE - 163 140642 000404 BR 15$ - 164 - 165 140644 012700 141103 13$: MOV #UNKMSG,R0 - 166 140650 004767 140154' JSR PC,PRINT - 167 - 168 140654 005067 140246' 15$: CLR LENGTH - 169 140660 012700 141155 MOV #PROMPT,R0 - 170 140664 004767 140154' JSR PC,PRINT - 171 140670 012604 MOV (SP)+,R4 - 172 140672 012603 MOV (SP)+,R3 - 173 140674 012602 MOV (SP)+,R2 - 174 140676 012601 MOV (SP)+,R1 - 175 140700 012600 MOV (SP)+,R0 - 176 140702 000002 RTI - 177 - 178 - 179 140704 142054 141250 141264 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP - 140712 141370 141236 - 180 140716 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> - 140721 115 101 116 - 140724 104 123 040 - 140727 101 122 105 - 140732 040 102 117 - 140735 117 124 054 - 140740 040 110 101 - 140743 114 124 054 - 140746 040 114 111 - 140751 107 110 124 - 140754 123 054 040 - 140757 124 105 123 - 140762 124 040 101 - 140765 116 104 040 - 140770 110 105 114 - 140773 120 015 012 - 140776 102 117 117 - 141001 124 040 104 - 141004 105 126 111 - 141007 103 105 123 - 141012 040 101 122 - 141015 105 040 122 - 141020 113 077 040 - 141023 122 114 077 - 141026 040 117 122 - 141031 040 122 120 - 141034 077 015 012 - 141037 000 - 181 141040 015 012 000 EOL: .BYTE 15,12,0 - 182 141043 010 040 010 DEL: .BYTE 10,40,10,0 - 141046 000 - 183 141047 102 117 117 CMDLST: .ASCIZ 'BOOT' - 141052 124 000 - 184 141054 110 101 114 .ASCIZ 'HALT' - 141057 124 000 - 185 141061 124 105 123 .ASCIZ 'TEST' - 141064 124 000 - 186 141066 114 111 107 .ASCIZ 'LIGHTS' - 141071 110 124 123 - 141074 000 - 187 141075 110 105 114 .ASCIZ 'HELP' - 141100 120 000 - 188 141102 000 .BYTE 0 - 189 141103 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> - 141106 116 117 127 - 141111 116 040 103 - 141114 117 115 115 - 141117 101 116 104 - 141122 012 015 000 - 190 141125 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> - 141130 055 061 061 - 141133 040 115 117 - 141136 116 111 124 - 141141 117 122 040 - 141144 126 061 056 - 141147 060 012 015 - 141152 012 015 000 - 191 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> - 192 141155 102 117 117 PROMPT: .ASCIZ 'BOOT> ' - 141160 124 076 040 - 141163 000 - 193 141164 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> - 141167 116 117 127 - 141172 116 040 102 - 141175 117 117 124 - 141200 040 104 105 - 141203 126 111 103 - 141206 105 012 015 - 141211 000 - 194 141212 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> - 141215 040 040 040 - 141220 103 114 117 - 141223 103 113 040 - 141226 124 111 103 - 141231 113 123 012 - 141234 015 000 + 54 PRINT: + 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: + 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 + 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: + 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: + 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 141151 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 142050 141244 141260 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP + 140706 141364 141232 + 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 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> + 141124 055 061 061 + 141127 040 115 117 + 141132 116 111 124 + 141135 117 122 040 + 141140 126 061 056 + 141143 060 012 015 + 141146 012 015 000 + 189 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> + 190 141151 102 117 117 PROMPT: .ASCIZ 'BOOT> ' + 141154 124 076 040 + 141157 000 + 191 141160 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> + 141163 116 117 127 + 141166 116 040 102 + 141171 117 117 124 + 141174 040 104 105 + 141177 126 111 103 + 141202 105 012 015 + 141205 000 + 192 141206 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> + 141211 040 040 040 + 141214 103 114 117 + 141217 103 113 040 + 141222 124 111 103 + 141225 113 123 012 + 141230 015 000 + 193 + 194 .EVEN 195 - 196 .EVEN - 197 - 198 HELP: - 199 141236 012700 140716 MOV #HLPMSG,R0 - 200 141242 004767 140154' JSR PC,PRINT - 201 141246 000207 RTS PC - 202 - 203 HALT: - 204 141250 000000 HALT - 205 141252 012700 141040 MOV #EOL,R0 - 206 141256 004767 140154' JSR PC,PRINT - 207 141262 000207 RTS PC - 208 - 209 TEST: - 210 141264 005067 140126' CLR CLKTIC - 211 - 212 141270 012705 015000 MOV #15000,R5 - 213 141274 010537 177570 10$: MOV R5,@#177570 ; DISPLAY - 214 141300 010504 MOV R5,R4 - 215 141302 006204 ASR R4 - 216 141304 005000 15$: CLR R0 - 217 141306 010501 MOV R5,R1 - 218 141310 071004 DIV R4,R0 - 219 141312 010002 MOV R0,R2 - 220 141314 070204 MUL R4,R2 - 221 141316 060301 ADD R3,R1 - 222 141320 020105 CMP R1,R5 - 223 141322 001401 BEQ 20$ - 224 141324 000000 HALT - 225 141326 077412 20$: SOB R4,15$ - 226 141330 077517 SOB R5,10$ - 227 - 228 141332 012700 141217 MOV #PERMSG+5,R0 - 229 141336 016703 140126' MOV CLKTIC,R3 - 230 - 231 141342 005002 25$: CLR R2 - 232 141344 071227 000010 DIV #10,R2 - 233 141350 062703 000060 ADD #'0,R3 - 234 141354 110340 MOVB R3,-(R0) - 235 141356 010203 MOV R2,R3 - 236 141360 001370 BNE 25$ - 237 - 238 141362 004767 140154' JSR PC,PRINT - 239 141366 000207 RTS PC - 240 - 241 - 242 177572 MMR0=177572 - 243 177574 MMR1=177574 - 244 177576 MMR2=177576 - 245 172516 MMR3=172516 - 246 - 247 LIGHTS: - 248 141370 012703 077406 MOV #77406,R3 ; DEFAULT PDR - 249 141374 005002 CLR R2 - 250 141376 005001 CLR R1 - 251 141400 012700 000010 MOV #8.,R0 - 252 141404 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR - 253 141410 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR - 254 141414 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR - 255 141420 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR - 256 141424 010361 172200 MOV R3,172200(R1) ; SUPER I PDR - 257 141430 010261 172240 MOV R2,172240(R1) ; SUPER I PAR - 258 141434 010361 172220 MOV R3,172220(R1) ; SUPER D PDR - 259 141440 010261 172260 MOV R2,172260(R1) ; SUPER D PAR - 260 141444 010361 177600 MOV R3,177600(R1) ; USER I PDR - 261 141450 010261 177640 MOV R2,177640(R1) ; USER I PAR - 262 141454 010361 177620 MOV R3,177620(R1) ; USER D PDR - 263 141460 010361 177660 MOV R3,177660(R1) ; USER D PAR - 264 141464 062702 000200 ADD #200,R2 - 265 141470 062701 000002 ADD #2,R1 - 266 141474 077035 SOB R0,1$ - 267 141476 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE - 268 141504 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE - 269 141512 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE - 270 141520 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT - 271 141526 012737 000001 177572 MOV #1,@#MMR0 - 272 - 273 141534 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 - 274 141542 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 - 275 141550 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER - 276 - 277 141556 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS - 278 141562 012702 141610 MOV #SUPERS,R2 ; ADDRESS SUPER CODE - 279 141566 012246 10$: MOV (R2)+,-(SP) - 280 141570 006623 MTPI (R3)+ - 281 141572 020227 142054 CMP R2,#SUPERE - 282 141576 103773 BLO 10$ - 283 - 284 141600 012767 040200 140124' MOV #40200,LGHTON ; CHANGE IDLE TASK - 285 141606 000207 RTS PC - 286 - 287 ; - 288 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 - 289 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS - 290 ; - 291 SUPERS: - 292 141610 012700 000037 MOV #37,R0 ; LOAD PATTERN - 293 141614 012701 174000 MOV #174000,R1 - 294 141620 032737 000001 177570 BIT #1,@#177570 - 295 141626 001414 BEQ 10$ - 296 141630 012700 007417 MOV #7417,R0 - 297 141634 010001 MOV R0,R1 - 298 141636 005101 COM R1 - 299 141640 032737 000002 177570 BIT #2,@#177570 - 300 141646 001404 BEQ 10$ - 301 141650 012700 036163 MOV #36163,R0 - 302 141654 012701 037000 MOV #37000,R1 - 303 141660 010102 10$: MOV R1,R2 - 304 141662 162702 000002 SUB #2,R2 - 305 141666 042702 000001 BIC #1,R2 ; WAIT ADDRESS - 306 141672 010203 MOV R2,R3 - 307 141674 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET - 308 141700 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT - 309 141706 062703 000002 ADD #2,R3 - 310 141712 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) - 311 - 312 141720 010204 MOV R2,R4 - 313 141722 072427 177772 ASH #-6,R4 - 314 141726 042704 177600 BIC #177600,R4 - 315 141732 012705 001700 MOV #1700,R5 - 316 141736 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT - 317 141740 010204 MOV R2,R4 - 318 141742 072427 177764 ASH #-12.,R4 - 319 141746 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET - 320 141752 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE - 321 - 322 141756 010103 MOV R1,R3 - 323 141760 072327 177764 ASH #-12.,R3 - 324 141764 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET - 325 141770 020304 CMP R3,R4 ; SAME PAR - 326 141772 001412 BEQ 30$ - 327 141774 010104 MOV R1,R4 - 328 141776 072427 177772 ASH #-6,R4 - 329 142002 042704 177600 BIC #177600,R4 - 330 142006 012705 001700 MOV #1700,R5 - 331 142012 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP - 332 142014 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE - 333 30$: - 334 142020 012704 000003 MOV #3,R4 - 335 142024 063704 177570 ADD @#177570,R4 - 336 142030 012703 000002 MOV #2,R3 - 337 142034 060703 ADD PC,R3 - 338 142036 000112 40$: JMP (R2) - 339 142040 077402 SOB R4,40$ - 340 142042 010002 MOV R0,R2 - 341 142044 006002 ROR R2 ; ROTATE PATTERN - 342 142046 006101 ROL R1 - 343 142050 006000 ROR R0 - 344 142052 000702 BR 10$ - 345 SUPERE: - 346 - 347 BOOT: - 348 142054 005003 CLR R3 ; UNIT - 349 142056 112201 1$: MOVB (R2)+,R1 - 350 142060 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 - 351 142062 120127 000040 CMPB R1,#40 - 352 142066 001773 BEQ 1$ - 353 142070 120127 000122 CMPB R1,#'R - 354 142074 001405 BEQ 5$ - 355 - 356 142076 012700 141164 MOV #BADBOO,R0 - 357 142102 004767 140154' JSR PC,PRINT - 358 142106 000207 RTS PC - 359 - 360 142110 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P - 361 142112 112200 7$: MOVB (R2)+,R0 ; DIGIT - 362 142114 001416 BEQ 9$ - 363 142116 120027 000040 CMPB R0,#40 - 364 142122 001413 BEQ 9$ - 365 142124 120027 000067 CMPB R0,#'7 - 366 142130 003031 BGT 11$ - 367 142132 162700 000060 SUB #'0,R0 - 368 142136 002426 BLT 11$ + 196 HELP: + 197 141232 012700 140712 MOV #HLPMSG,R0 + 198 141236 004767 140150' JSR PC,PRINT + 199 141242 000207 RTS PC + 200 + 201 HALT: + 202 141244 000000 HALT + 203 141246 012700 141034 MOV #EOL,R0 + 204 141252 004767 140150' JSR PC,PRINT + 205 141256 000207 RTS PC + 206 + 207 TEST: + 208 141260 005067 140122' CLR CLKTIC + 209 + 210 141264 012705 015000 MOV #15000,R5 + 211 141270 010537 177570 10$: MOV R5,@#177570 ; DISPLAY + 212 141274 010504 MOV R5,R4 + 213 141276 006204 ASR R4 + 214 141300 005000 15$: CLR R0 + 215 141302 010501 MOV R5,R1 + 216 141304 071004 DIV R4,R0 + 217 141306 010002 MOV R0,R2 + 218 141310 070204 MUL R4,R2 + 219 141312 060301 ADD R3,R1 + 220 141314 020105 CMP R1,R5 + 221 141316 001401 BEQ 20$ + 222 141320 000000 HALT + 223 141322 077412 20$: SOB R4,15$ + 224 141324 077517 SOB R5,10$ + 225 + 226 141326 012700 141213 MOV #PERMSG+5,R0 + 227 141332 016703 140122' MOV CLKTIC,R3 + 228 + 229 141336 005002 25$: CLR R2 + 230 141340 071227 000010 DIV #10,R2 + 231 141344 062703 000060 ADD #'0,R3 + 232 141350 110340 MOVB R3,-(R0) + 233 141352 010203 MOV R2,R3 + 234 141354 001370 BNE 25$ + 235 + 236 141356 004767 140150' JSR PC,PRINT + 237 141362 000207 RTS PC + 238 + 239 + 240 177572 MMR0=177572 + 241 177574 MMR1=177574 + 242 177576 MMR2=177576 + 243 172516 MMR3=172516 + 244 + 245 LIGHTS: + 246 141364 012703 077406 MOV #77406,R3 ; DEFAULT PDR + 247 141370 005002 CLR R2 + 248 141372 005001 CLR R1 + 249 141374 012700 000010 MOV #8.,R0 + 250 141400 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR + 251 141404 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR + 252 141410 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR + 253 141414 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR + 254 141420 010361 172200 MOV R3,172200(R1) ; SUPER I PDR + 255 141424 010261 172240 MOV R2,172240(R1) ; SUPER I PAR + 256 141430 010361 172220 MOV R3,172220(R1) ; SUPER D PDR + 257 141434 010261 172260 MOV R2,172260(R1) ; SUPER D PAR + 258 141440 010361 177600 MOV R3,177600(R1) ; USER I PDR + 259 141444 010261 177640 MOV R2,177640(R1) ; USER I PAR + 260 141450 010361 177620 MOV R3,177620(R1) ; USER D PDR + 261 141454 010361 177660 MOV R3,177660(R1) ; USER D PAR + 262 141460 062702 000200 ADD #200,R2 + 263 141464 062701 000002 ADD #2,R1 + 264 141470 077035 SOB R0,1$ + 265 141472 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE + 266 141500 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE + 267 141506 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE + 268 141514 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT + 269 141522 012737 000001 177572 MOV #1,@#MMR0 + 270 + 271 141530 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 + 272 141536 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 + 273 141544 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER + 274 + 275 141552 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS + 276 141556 012702 141604 MOV #SUPERS,R2 ; ADDRESS SUPER CODE + 277 141562 012246 10$: MOV (R2)+,-(SP) + 278 141564 006623 MTPI (R3)+ + 279 141566 020227 142050 CMP R2,#SUPERE + 280 141572 103773 BLO 10$ + 281 + 282 141574 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK + 283 141602 000207 RTS PC + 284 + 285 ; + 286 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 + 287 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS + 288 ; + 289 SUPERS: + 290 141604 012700 000037 MOV #37,R0 ; LOAD PATTERN + 291 141610 012701 174000 MOV #174000,R1 + 292 141614 032737 000001 177570 BIT #1,@#177570 + 293 141622 001414 BEQ 10$ + 294 141624 012700 007417 MOV #7417,R0 + 295 141630 010001 MOV R0,R1 + 296 141632 005101 COM R1 + 297 141634 032737 000002 177570 BIT #2,@#177570 + 298 141642 001404 BEQ 10$ + 299 141644 012700 036163 MOV #36163,R0 + 300 141650 012701 037000 MOV #37000,R1 + 301 141654 010102 10$: MOV R1,R2 + 302 141656 162702 000002 SUB #2,R2 + 303 141662 042702 000001 BIC #1,R2 ; WAIT ADDRESS + 304 141666 010203 MOV R2,R3 + 305 141670 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET + 306 141674 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT + 307 141702 062703 000002 ADD #2,R3 + 308 141706 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) + 309 + 310 141714 010204 MOV R2,R4 + 311 141716 072427 177772 ASH #-6,R4 + 312 141722 042704 177600 BIC #177600,R4 + 313 141726 012705 001700 MOV #1700,R5 + 314 141732 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT + 315 141734 010204 MOV R2,R4 + 316 141736 072427 177764 ASH #-12.,R4 + 317 141742 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET + 318 141746 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE + 319 + 320 141752 010103 MOV R1,R3 + 321 141754 072327 177764 ASH #-12.,R3 + 322 141760 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET + 323 141764 020304 CMP R3,R4 ; SAME PAR + 324 141766 001412 BEQ 30$ + 325 141770 010104 MOV R1,R4 + 326 141772 072427 177772 ASH #-6,R4 + 327 141776 042704 177600 BIC #177600,R4 + 328 142002 012705 001700 MOV #1700,R5 + 329 142006 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP + 330 142010 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE + 331 30$: + 332 142014 012704 000003 MOV #3,R4 + 333 142020 063704 177570 ADD @#177570,R4 + 334 142024 012703 000002 MOV #2,R3 + 335 142030 060703 ADD PC,R3 + 336 142032 000112 40$: JMP (R2) + 337 142034 077402 SOB R4,40$ + 338 142036 010002 MOV R0,R2 + 339 142040 006002 ROR R2 ; ROTATE PATTERN + 340 142042 006101 ROL R1 + 341 142044 006000 ROR R0 + 342 142046 000702 BR 10$ + 343 SUPERE: + 344 + 345 BOOT: + 346 142050 005003 CLR R3 ; UNIT + 347 142052 112201 1$: MOVB (R2)+,R1 + 348 142054 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 + 349 142056 120127 000040 CMPB R1,#40 + 350 142062 001773 BEQ 1$ + 351 142064 120127 000122 CMPB R1,#'R + 352 142070 001405 BEQ 5$ + 353 + 354 142072 012700 141160 MOV #BADBOO,R0 + 355 142076 004767 140150' JSR PC,PRINT + 356 142102 000207 RTS PC + 357 + 358 142104 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P + 359 142106 112200 7$: MOVB (R2)+,R0 ; DIGIT + 360 142110 001416 BEQ 9$ + 361 142112 120027 000040 CMPB R0,#40 + 362 142116 001413 BEQ 9$ + 363 142120 120027 000067 CMPB R0,#'7 + 364 142124 003031 BGT 11$ + 365 142126 162700 000060 SUB #'0,R0 + 366 142132 002426 BLT 11$ + 367 142134 006303 ASL R3 + 368 142136 006303 ASL R3 369 142140 006303 ASL R3 - 370 142142 006303 ASL R3 - 371 142144 006303 ASL R3 - 372 142146 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT - 373 142150 000760 BR 7$ - 374 142152 005002 9$: CLR R2 - 375 142154 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 - 376 142160 012722 140000 MOV #START,(R2)+ - 377 142164 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 - 378 142170 005022 CLR (R2)+ - 379 142172 120127 000113 CMPB R1,#'K - 380 142176 001476 BEQ BOOTRK - 381 142200 120127 000114 CMPB R1,#'L - 382 142204 001410 BEQ BOOTRL - 383 142206 120127 000120 CMPB R1,#'P - 384 142212 001517 BEQ BOOTRP - 385 - 386 142214 012700 141103 11$: MOV #UNKMSG,R0 - 387 142220 004767 140154' JSR PC,PRINT - 388 142224 000207 RTS PC - 389 - 390 174400 RLCS=174400 - 391 BOOTRL: - 392 142226 000005 RESET - 393 142230 000303 SWAB R3 ; UNIT NUMBER - 394 142232 012701 174400 MOV #RLCS,R1 ; CSR - 395 142236 012761 000013 000004 MOV #13,4(R1) ; CLR ERR - 396 142244 052703 000004 BIS #4,R3 ; UNIT+GSTAT - 397 142250 010311 MOV R3,(R1) ; ISSUE CMD - 398 142252 105711 TSTB (R1) ; WAIT - 399 142254 100376 BPL .-2 - 400 142256 105003 CLRB R3 - 401 142260 052703 000010 BIS #10,R3 ; UNIT+RDHDR - 402 142264 010311 MOV R3,(R1) ; ISSUE CMD - 403 142266 105711 TSTB (R1) ; WAIT - 404 142270 100376 BPL .-2 - 405 142272 016102 000006 MOV 6(R1),R2 ; GET HDR - 406 142276 042702 000077 BIC #77,R2 ; CLR SECTOR - 407 142302 005202 INC R2 ; MAGIC BIT - 408 142304 010261 000004 MOV R2,4(R1) ; SEEK TO 0 - 409 142310 105003 CLRB R3 - 410 142312 052703 000006 BIS #6,R3 ; UNIT+SEEK - 411 142316 010311 MOV R3,(R1) ; ISSUE CMD - 412 142320 105711 TSTB (R1) ; WAIT - 413 142322 100376 BPL .-2 - 414 142324 005061 000002 CLR 2(R1) ; CLR BA - 415 142330 005061 000004 CLR 4(R1) ; CLR DA - 416 142334 012761 177000 000006 MOV #-512.,6(R1) ; SET WC - 417 142342 105003 CLRB R3 - 418 142344 052703 000014 BIS #14,R3 ; UNIT+READ - 419 142350 010311 MOV R3,(R1) ; ISSUE CMD - 420 142352 105711 TSTB (R1) ; WAIT - 421 142354 100376 BPL .-2 - 422 142356 042711 000377 BIC #377,(R1) - 423 142362 005002 CLR R2 - 424 142364 005003 CLR R3 - 425 142366 005004 CLR R4 - 426 142370 005005 CLR R5 - 427 142372 005007 CLR PC - 428 - 429 177412 RKDA=177412 - 430 000005 READGO=5 - 431 BOOTRK: - 432 142374 000005 RESET - 433 142376 000303 SWAB R3 ; UNIT NUMBER + 370 142142 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT + 371 142144 000760 BR 7$ + 372 142146 005002 9$: CLR R2 + 373 142150 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 + 374 142154 012722 140000 MOV #START,(R2)+ + 375 142160 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 + 376 142164 005022 CLR (R2)+ + 377 142166 120127 000113 CMPB R1,#'K + 378 142172 001476 BEQ BOOTRK + 379 142174 120127 000114 CMPB R1,#'L + 380 142200 001410 BEQ BOOTRL + 381 142202 120127 000120 CMPB R1,#'P + 382 142206 001517 BEQ BOOTRP + 383 + 384 142210 012700 141077 11$: MOV #UNKMSG,R0 + 385 142214 004767 140150' JSR PC,PRINT + 386 142220 000207 RTS PC + 387 + 388 174400 RLCS=174400 + 389 BOOTRL: + 390 142222 000005 RESET + 391 142224 000303 SWAB R3 ; UNIT NUMBER + 392 142226 012701 174400 MOV #RLCS,R1 ; CSR + 393 142232 012761 000013 000004 MOV #13,4(R1) ; CLR ERR + 394 142240 052703 000004 BIS #4,R3 ; UNIT+GSTAT + 395 142244 010311 MOV R3,(R1) ; ISSUE CMD + 396 142246 105711 TSTB (R1) ; WAIT + 397 142250 100376 BPL .-2 + 398 142252 105003 CLRB R3 + 399 142254 052703 000010 BIS #10,R3 ; UNIT+RDHDR + 400 142260 010311 MOV R3,(R1) ; ISSUE CMD + 401 142262 105711 TSTB (R1) ; WAIT + 402 142264 100376 BPL .-2 + 403 142266 016102 000006 MOV 6(R1),R2 ; GET HDR + 404 142272 042702 000077 BIC #77,R2 ; CLR SECTOR + 405 142276 005202 INC R2 ; MAGIC BIT + 406 142300 010261 000004 MOV R2,4(R1) ; SEEK TO 0 + 407 142304 105003 CLRB R3 + 408 142306 052703 000006 BIS #6,R3 ; UNIT+SEEK + 409 142312 010311 MOV R3,(R1) ; ISSUE CMD + 410 142314 105711 TSTB (R1) ; WAIT + 411 142316 100376 BPL .-2 + 412 142320 005061 000002 CLR 2(R1) ; CLR BA + 413 142324 005061 000004 CLR 4(R1) ; CLR DA + 414 142330 012761 177000 000006 MOV #-512.,6(R1) ; SET WC + 415 142336 105003 CLRB R3 + 416 142340 052703 000014 BIS #14,R3 ; UNIT+READ + 417 142344 010311 MOV R3,(R1) ; ISSUE CMD + 418 142346 105711 TSTB (R1) ; WAIT + 419 142350 100376 BPL .-2 + 420 142352 042711 000377 BIC #377,(R1) + 421 142356 005002 CLR R2 + 422 142360 005003 CLR R3 + 423 142362 005004 CLR R4 + 424 142364 005005 CLR R5 + 425 142366 005007 CLR PC + 426 + 427 177412 RKDA=177412 + 428 000005 READGO=5 + 429 BOOTRK: + 430 142370 000005 RESET + 431 142372 000303 SWAB R3 ; UNIT NUMBER + 432 142374 006303 ASL R3 + 433 142376 006303 ASL R3 434 142400 006303 ASL R3 435 142402 006303 ASL R3 436 142404 006303 ASL R3 - 437 142406 006303 ASL R3 - 438 142410 006303 ASL R3 - 439 142412 012701 177412 MOV #RKDA,R1 ; CSR - 440 142416 010311 MOV R3,(R1) ; LOAD DA - 441 142420 005041 CLR -(R1) ; CLEAR BA - 442 142422 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC - 443 142426 012741 000005 MOV #READGO,-(R1) ; READ & GO - 444 142432 005002 CLR R2 - 445 142434 005003 CLR R3 - 446 142436 005004 CLR R4 - 447 142440 005005 CLR R5 - 448 142442 105711 TSTB (R1) - 449 142444 100376 BPL .-2 - 450 142446 105011 CLRB (R1) - 451 142450 005007 CLR PC - 452 - 453 176700 RPCSR=0176700 - 454 BOOTRP: - 455 142452 000005 RESET - 456 142454 012701 176700 MOV #RPCSR, R1 - 457 142460 012761 000040 000010 MOV #0000040, 10(R1) ; RESET - 458 142466 010361 000010 MOV R3, 10(R1) ; SET UNIT - 459 142472 012711 000021 MOV #0000021, (R1) ; PACK ACK - 460 142476 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE - 461 142504 012761 177000 000002 MOV #-512., 2(R1) ; SET WC - 462 142512 005061 000004 CLR 4(R1) ; CLR BA - 463 142516 005061 000006 CLR 6(R1) ; CLR DA - 464 142522 005061 000034 CLR 34(R1) ; CLR CYL - 465 142526 012711 000071 MOV #0000071, (R1) ; READ - 466 142532 105711 TSTB (R1) ; WAIT - 467 142534 100376 BPL .-2 - 468 142536 105011 CLRB (R1) - 469 142540 010300 MOV R3,R0 - 470 142542 005007 CLR PC - 471 - 472 .END START - 472 + 437 142406 012701 177412 MOV #RKDA,R1 ; CSR + 438 142412 010311 MOV R3,(R1) ; LOAD DA + 439 142414 005041 CLR -(R1) ; CLEAR BA + 440 142416 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC + 441 142422 012741 000005 MOV #READGO,-(R1) ; READ & GO + 442 142426 005002 CLR R2 + 443 142430 005003 CLR R3 + 444 142432 005004 CLR R4 + 445 142434 005005 CLR R5 + 446 142436 105711 TSTB (R1) + 447 142440 100376 BPL .-2 + 448 142442 105011 CLRB (R1) + 449 142444 005007 CLR PC + 450 + 451 176700 RPCSR=0176700 + 452 BOOTRP: + 453 142446 000005 RESET + 454 142450 012701 176700 MOV #RPCSR, R1 + 455 142454 012761 000040 000010 MOV #0000040, 10(R1) ; RESET + 456 142462 010361 000010 MOV R3, 10(R1) ; SET UNIT + 457 142466 012711 000021 MOV #0000021, (R1) ; PACK ACK + 458 142472 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE + 459 142500 012761 177000 000002 MOV #-512., 2(R1) ; SET WC + 460 142506 005061 000004 CLR 4(R1) ; CLR BA + 461 142512 005061 000006 CLR 6(R1) ; CLR DA + 462 142516 005061 000034 CLR 34(R1) ; CLR CYL + 463 142522 012711 000071 MOV #0000071, (R1) ; READ + 464 142526 105711 TSTB (R1) ; WAIT + 465 142530 100376 BPL .-2 + 466 142532 105011 CLRB (R1) + 467 142534 010300 MOV R3,R0 + 468 142536 005007 CLR PC + 469 + 470 .END START + 470 diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index 3a7ab062e..4e47edd08 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -4,6 +4,7 @@ title: PDP-11 Boot Monitor permalink: /apps/pdp11/boot/monitor/ redirect_from: - /devices/pdp11/rom/test/ + - /apps/pdp11/boot/test/ --- PDP-11 Boot Monitor @@ -26,7 +27,6 @@ The **BOOTMON.mac** source code is shown below. ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? PSW = 177776 - CNSW = 177570 DL11XCSR = 177564 DL11VEC = 64 @@ -51,8 +51,7 @@ The **BOOTMON.mac** source code is shown below. MOV SP,R0 JSR PC,INPUT CLR R0 - 1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 - WAIT + 1$: WAIT INC R0 TST LGHTON BEQ 1$ diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index aa09ba5ab..0498a56b4 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -186,6 +186,7 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.cmp = cmp; this.bus = bus; this.dbg = dbg; + this.panel = cmp.panel; for (var i = 0; i < CPUPDP11.BUTTONS.length; i++) { var control = this.bindings[CPUPDP11.BUTTONS[i]]; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 2e285e1f0..e1d522fef 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1785,7 +1785,16 @@ PDP11.opWAIT = function(opCode) * the PDP-11 KW11 (60Hz Line Clock) timer is the perfect candidate. See device.js. * * if (!(this.opFlags & PDP11.OPFLAG.WAIT) && this.cmp) this.cmp.updateDisplays(); + * + * However, that being said, it's been reported that the WAIT instruction puts the contents of R0 into the + * Front Panel's "DATA PATH". However, I can't find any supporting documentation of that. Another explanation + * would be that the data path is being updated constantly, and that when R0 is the last register to be updated + * before a WAIT instruction, it simply predominates the data being displayed. + * + * But for now, we'll go with popular lore and propagate R0 to the Panel's "DATA PATH" setting. */ + if (this.panel) this.panel.setDataPath(this.regsGen[0]); + this.opFlags |= PDP11.OPFLAG.WAIT; this.advancePC(-2); this.nStepCycles -= 3; diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 97324ece7..ea7950f6f 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -853,6 +853,24 @@ PanelPDP11.prototype.setData = function(value) return this.regData; }; +/** + * setDataPath(value) + * + * This interface is for refreshing the Front Panel's "DATA PATH" display, which technically, + * is separate from the "DISPLAY REGISTER" (regData). However, our Front Panel doesn't currently + * provide a toggle between "DISPLAY REGISTER" and "DATA PATH" views, so we use the same variable + * for both. + * + * Because this is a potentially high-frequency function, we do NOT update the LED array here. + * + * @this {PanelPDP11} + * @param {number} value + */ +PanelPDP11.prototype.setDataPath = function(value) +{ + this.regData = value; +}; + /** * setLED(sBinding, value) * @@ -983,8 +1001,8 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate) /** * readCNSW(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. + * If addr is set, then this a normal read, so we should return normal results (ie, SWITCH register); + * if addr is NOT set, then this is a read-before-write, so we must return the DISPLAY register value. * * @this {PanelPDP11} * @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570) @@ -998,6 +1016,9 @@ PanelPDP11.prototype.readCNSW = function(addr) /** * writeCNSW(value, addr) * + * Handler for DISPLAY register writes. Because this is a potentially high-frequency function, + * we do NOT update the LED array here. + * * @this {PanelPDP11} * @param {number} value * @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570) From 0de3db14b67b95e1498d7d72143f87e6f9fc2eee Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 8 Nov 2016 14:22:23 -0800 Subject: [PATCH 2/2] Revert back to propagating R0 to the Front Panel data path on a WAIT instruction (per PDP-11 lore) --- versions/pdpjs/1.30.3/pdp11-dbg.js | 432 ++++++++++++++--------------- versions/pdpjs/1.30.3/pdp11.js | 278 +++++++++---------- 2 files changed, 355 insertions(+), 355 deletions(-) diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 0126defbe..e3dbc98e6 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -46,267 +46,267 @@ function Fa(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Ka(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Na(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Oa(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 Pa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;u.push(this)}var $a=void 0,ab={}; +function t(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.tc=b.comment;this.Vc=b;b=this.id.indexOf(".");0>b?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;u.push(this)}var $a=void 0,ab={}; if(window){$a||($a=window.location.search.substr(1));for(var bb,cb=/\+/g,db=/([^&=]+)=?([^&]*)/g;bb=db.exec($a);)ab[decodeURIComponent(bb[1].replace(cb," "))]=decodeURIComponent(bb[2].replace(cb," "))}function kb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=t);a.prototype=kb(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={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},u=[];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;ba;a++)this.g["S"+a]=[0,0,!1,!1,this.ed,a]}z(xb);var yb=7;function zb(a,b){return a.g[b]&&a.g[b][1]}k=xb.prototype;k.reset=function(){this.stop()}; -k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Ab(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Bb(a,b)}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; +function xb(a){t.call(this,"Panel",a,xb);this.f=this.qb=this.Va=this.H=this.w=0;this.J=this.K=this.D=!1;this.L=yb;this.C={};this.g={START:[1,1,!0,!1,this.ed],STEP:[1,1,!1,!1,this.fd],ENABLE:[1,1,!1,!1,this.ad],CONT:[1,1,!0,!1,this.Zc],DEP:[0,0,!0,!1,this.$c],EXAM:[1,1,!0,!1,this.bd],LOAD:[1,1,!0,!1,this.dd],TEST:[0,0,!0,!1,this.cd]};for(a=0;22>a;a++)this.g["S"+a]=[0,0,!1,!1,this.gd,a]}z(xb);var yb=7;function zb(a,b){return a.g[b]&&a.g[b][1]}k=xb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.w++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.w++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Ab(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Bb(a,b)}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Fa=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Xb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Xb(a,b,a.g[b][1])}function Yb(a,b,c,d){a.G[b]&&(void 0===c&&(ub(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?qa(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -function Ab(a,b){var c=a.g[b];Xb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}function Bb(a,b){var c=a.g[b];c[2]&&c[3]&&(Xb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.cd=function(a){a||this.b.A.Y||(this.w.reset(),Zb(this.b),zb(this,"ENABLE")&&this.b.ib())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()}; -k.Xc=function(a){if(!a&&!this.b.A.Y)if(zb(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!rb(a,!0))qb(a,!0),a.jb(0),qb(a,!1);else try{var b=this.b.jb(1);0c;c++)gc(a,"A"+c,b&1<a.b.ob?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Ma;zb(a,"STEP")||(b=-b);ec(a,a.f&~c|a.f+b&c)}function dc(a,b){a.v=b&65535;b=a.v;for(var c=0;16>c;c++)gc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.cc=0;this.C=[];this.Jc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function mc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i, -b),!0,!e.la))}function nc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function oc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function rc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d==xc&&(a.cc+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} -function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Ma)>>>this.ka].hc(a&this.w,a);this.la--;return a}; -k.pa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Ma)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Ma)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; -k.hb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Cb=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.w,d=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; -function Ac(a){for(var b=0,c=[],d=0;da.b.ob)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.pb};k.le=function(a){var b=this.b;1170>b.ob&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; -k.Me=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ha[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ha[1]}; -k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.w.cc}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; -k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.fb&65280:0};k.Ge=function(a){this.b.fb=a|255};k.xd=function(){return Rc(this.b)};k.pe=function(a){Sc(this.b,a&-1809|Rc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; -var L={},Pc=(L[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.md, -K.prototype.ge,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],L[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],L[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],L[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Rd, -K.prototype.Je,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],L[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],L[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],L[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],L[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],L[65477]=[null,null,K.prototype.Ab,K.prototype.Db, -"R5SET0"],L[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],L[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],L[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Bb, -K.prototype.Eb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],L[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",8,1170],L[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],L[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],L[65528]= -[null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],L[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],L[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],L);Wa(function(){for(var a=D(document,"pdp11","device"),b=0;bc;c++)gc(a,"A"+c,b&1<a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.v.Ma;zb(a,"STEP")||(b=-b);ec(a,a.f&~c|a.f+b&c)}function dc(a,b){a.qb=b&65535;b=a.qb;for(var c=0;16>c;c++)gc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<>2;this.v=this.za-1;this.D=this.H/this.za|0;this.$a=[];this.ma=0;this.f=!1;this.dc=0;this.w=[];this.Lc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.X=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Ea(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function mc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Ea(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i, +b),!0,!e.ma))}function nc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Ea(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function oc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Ea(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function rc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Ob+=l.F-f,l.F=f,!0;if(f>=l.F+l.Ob){n=l.size-(f-m);n>g&&(n=g);l.Ob=f-l.F+n;f=m+a.za;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.za,d,e);pc(f,a.i,l);a.X[h++]=f;f=m+a.za;g-=n}return 0>=g?(d==xc&&(a.dc+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} +function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.v,a)};k.Vb=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.ma++;a=this.X[(a&this.Ma)>>>this.ka].ic(a&this.v,a);this.ma--;return a}; +k.pa=function(a){3932160<=a&&(a=zc(this.b,a));return this.X[(a&this.Ma)>>>this.ka].sa(a&this.v,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.v,c=(a&this.Ma)>>>this.ka;this.f=!1;this.ma++;a=this.X[c].jc(b,a);this.ma--;return a};k.Yb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.X[(a&this.Ma)>>>this.ka].$b(a&this.v,b&255,a)};k.sb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.ma++;this.X[(a&this.Ma)>>>this.ka].ac(a&this.v,b&255,a);this.ma--}; +k.hb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.X[(a&this.Ma)>>>this.ka].Pb(a&this.v,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.v,d=(a&this.Ma)>>>this.ka;this.f=!1;this.ma++;this.X[d].nc(c,b&65535,a);this.ma--}; +function Ac(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Za=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.td=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.ud=function(){return this.b.Mb};k.vd=function(){return this.b.rb};k.ne=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.rb!=a&&(b.rb=a,b.Ub=a&16?4194303:262143,Qc(b))};k.Wd=function(a){a=a>>1&63;var b=this.b.Nb[a>>1];return a&1?b>>16:b&65535}; +k.Oe=function(a,b){b=b>>1&63;var c=b>>1;this.b.Nb[c]=b&1?this.b.Nb[c]&65535|(a&63)<<16:this.b.Nb[c]&-65536|a&65534};k.Pd=function(a){return this.b.V[1][a>>1&7]};k.He=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Nd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Od=function(a){return this.b.ya[1][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.ya[1][b]=a;this.b.V[1][b]&=65295};k.Md=function(a){return this.b.ya[1][(a>>1&7)+8]}; +k.Ee=function(a,b){b=(b>>1&7)+8;this.b.ya[1][b]=a;this.b.V[1][b]&=65295};k.pd=function(a){return this.b.V[0][a>>1&7]};k.je=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.nd=function(a){return this.b.V[0][(a>>1&7)+8]};k.he=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.od=function(a){return this.b.ya[0][a>>1&7]};k.ie=function(a,b){b=b>>1&7;this.b.ya[0][b]=a;this.b.V[0][b]&=65295};k.md=function(a){return this.b.ya[0][(a>>1&7)+8]};k.ge=function(a,b){b=(b>>1&7)+8;this.b.ya[0][b]=a;this.b.V[0][b]&=65295}; +k.Vd=function(a){return this.b.V[3][a>>1&7]};k.Ne=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Td=function(a){return this.b.V[3][(a>>1&7)+8]};k.Le=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Ud=function(a){return this.b.ya[3][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ya[3][b]=a;this.b.V[3][b]&=65295};k.Sd=function(a){return this.b.ya[3][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ya[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.Ad=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.se=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Dd=function(){return this.b.u[7]};k.ve=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.Bd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.te=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Cd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.ue=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.kd=function(a){return this.b.Ec[a-65504>>1]};k.ee=function(a,b){this.b.Ec[b-65504>>1]=a};k.Bc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.v.dc}a=(a>>6)-1}else a=0;return a};k.Ic=function(){};k.Rd=function(){return 1};k.Je=function(){};k.jd=function(){return this.b.fa}; +k.de=function(){this.b.fa=0};k.rd=function(){return this.b.Dc};k.le=function(a,b){b&1||(a&=255);this.b.Dc=a};k.wd=function(a){return a?this.b.lc:0};k.oe=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.lc=a;b.I|=2};k.Qd=function(a){return a?this.b.fb&65280:0};k.Ie=function(a){this.b.fb=a|255};k.zd=function(){return Rc(this.b)};k.re=function(a){Sc(this.b,a&-1809|Rc(this.b)&1808);this.b.I|=128};k.Hc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; +var L={},Pc=(L[61568]=[null,null,K.prototype.Wd,K.prototype.Oe,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Pd,K.prototype.He,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Nd,K.prototype.Fe,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Od,K.prototype.Ge,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Md,K.prototype.Ee,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.pd,K.prototype.je,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.nd,K.prototype.he,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.od, +K.prototype.ie,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.md,K.prototype.ge,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.vd,K.prototype.ne,"MMR3",1,1145],L[65382]=[null,null,K.prototype.qd,K.prototype.ke,"LKS"],L[65402]=[null,null,K.prototype.sd,K.prototype.me,"MMR0",1,1145],L[65404]=[null,null,K.prototype.td,K.prototype.Hc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.ud,K.prototype.Hc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Vd,K.prototype.Ne,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Td, +K.prototype.Le,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Ud,K.prototype.Me,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Sd,K.prototype.Ke,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],L[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],L[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],L[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],L[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],L[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],L[65478]=[null,null,K.prototype.Ad,K.prototype.se,"R6KERNEL"],L[65479]=[null,null,K.prototype.Dd,K.prototype.ve,"R7KERNEL"],L[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.Bd,K.prototype.te,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Cd,K.prototype.ue,"R6USER",1,1145],L[65504]=[null,null,K.prototype.kd,K.prototype.ee,"CTRL",8,1170],L[65520]=[null,null,K.prototype.Bc,K.prototype.Ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.Bc,K.prototype.Ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Rd,K.prototype.Je,"SYSID",1,1170],L[65526]=[null,null,K.prototype.jd,K.prototype.de,"CPUERR",1,1170],L[65528]= +[null,null,K.prototype.rd,K.prototype.le,"MB",1,1170],L[65530]=[null,null,K.prototype.wd,K.prototype.oe,"PIR"],L[65532]=[null,null,K.prototype.Qd,K.prototype.Ie,"SL"],L[65534]=[null,null,K.prototype.zd,K.prototype.re,"PSW"],L);Wa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),$c(this,Wc?ad:bd);else{a=this.b=Array(this.size>> +function I(a,b,c,d,e,f){this.v=a;this.id=Xc+=2;this.b=null;this.F=b;this.Ob=c;this.size=d||0;this.type=e||Yc;this.f=e==Zc;this.controller=null;pc(this);this.Sa=this.Rc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],$c(this,f.Lc);else if(vb)this.w=new ArrayBuffer(this.size),this.D=new DataView(this.w,0,this.size),this.G=new Uint8Array(this.w,0,this.size),this.J=new Uint16Array(this.w,0,this.size>>1),this.b=new Int32Array(this.w,0,this.size>>2),$c(this,Wc?ad:bd);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Z:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},na:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ia:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&fd(a,ed,!1),(a.B=c.B)&&dd(a,ed,!1))}function hd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.mc):--a.g||(a.Wb=a.hc,a.sa=a.ic)}function dd(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.mc=b[3]||a.H}function fd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function $c(a,b){b||(b=id);fd(a,b,void 0);dd(a,b,void 0)} -var id=[],cd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],ed=[I.prototype.P,I.prototype.Ya,I.prototype.Z,I.prototype.Aa];if(vb)var bd=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],ad=[I.prototype.R,I.prototype.na,I.prototype.$,I.prototype.Ia]; -function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.cb=c;this.ub=Math.round(this.lb/1E4)/100;this.nb=this.ub*this.cb;this.A.Y=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.xb,c=!0);0<=a.yb&&a.yb<=qd(a)&&(a.xb=a.yb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Z/a.nb?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.rb()}ac(a,a.S);a.S=0;a.R=Aa();a.$=0;sd(a);return d}function Lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&ba.K[b][0])&&(c=a.lb*a.cb/1E3*c|0,a.K[b][0]=c+td(a))} -function ud(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 $b(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 td(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Yd=function(){if(this.A.Y){this.vb>=this.lb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Tb&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Y)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); -return}if(this.A.Y){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Z=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Zc&&(this.R-=c),c=0;this.vb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(tb(this))return!1;if(this.A.Y)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Y=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Y){td(this);ac(this,this.S);this.S=0;this.A.Y=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; -function vd(a){this.ob=+a.model||1170;this.Ob=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.ob?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.ob);this.A.Y&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; -function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Zb(a)}function Zb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ia=0;a.Rb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.pb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Ob=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; -k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,Ac(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];rd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.N=b;a.I|=2}function Q(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Yd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.ma=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Rc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Sc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.wa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; -function ae(a){var b=be(a),c=be(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);N(a,b);Sc(a,c);a.I&=-17}function zc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.ma(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=de(this,ce(this,a,3));this.L--;return a}; -k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.qb(a,b)};k.Cb=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.pa(a)};k.Vd=function(a){return this.w.pa(ce(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; -k.Ne=function(a,b){this.w.hb(ce(this,a,4),b)};function ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=fe(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ha[a.N>>12&3];return c}function he(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=fe(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ce(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ha[a.N>>12&3]=d} -function ie(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]} -function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):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.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} +I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(vb)for(a=Array(this.size>>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.v.Ea(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},O:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,1,c.N)&&c.ga(!0)}return this.ic(a,b)},Qa:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,2,c.N)&&c.ga(!0)}return this.jc(a,b)},la:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.C(a,b,c):this.ac(a,b,c)},xa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.C(a,b,c):this.nc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},W:function(a,b){a&1&&this.v.Ea(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.v.Ea(b,64,2);a= +this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},Ya:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.v.Ea(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ba:function(a,b,c){a&1&&this.v.Ea(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&fd(a,ed,!1),(a.B=c.B)&&dd(a,ed,!1))}function hd(a,b){b?--a.B||(a.$b=a.f?a.C:a.ac,a.Pb=a.f?a.H:a.nc):--a.g||(a.Xb=a.ic,a.sa=a.jc)}function dd(a,b,c){c&&a.B||(a.$b=!a.f&&b[1]||a.C,a.Pb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ac=b[1]||a.C,a.nc=b[3]||a.H}function fd(a,b,c){c&&a.g||(a.Xb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.ic=b[0]||a.K,a.jc=b[2]||a.L}function $c(a,b){b||(b=id);fd(a,b,void 0);dd(a,b,void 0)} +var id=[],cd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],ed=[I.prototype.O,I.prototype.la,I.prototype.Qa,I.prototype.xa];if(vb)var bd=[I.prototype.N,I.prototype.ja,I.prototype.W,I.prototype.wa],ad=[I.prototype.R,I.prototype.Ya,I.prototype.$,I.prototype.Ba]; +function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.kb=a.cycles||b;this.cb=c;this.wb=Math.round(this.kb/1E4)/100;this.ob=this.wb*this.cb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Jb=this.ua=0;this.Kb=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.L=[];this.zc=this.$d.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; +k.Fa=function(a,b,c,d){this.B=a;this.v=b;this.i=d;this.C=a.C;for(b=0;b=a.ua&&(a.ua+=a.yb,c=!0);0<=a.zb&&a.zb<=qd(a)&&(a.yb=a.zb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Jb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.$/a.ob?b=1:d=!0;a.cb=b;b=a.wb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.tb()}ac(a,a.W);a.W=0;a.S=Aa();a.ca=0;sd(a);return d}function Lc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.kb*a.cb/1E3*c|0,a.L[b][0]=c+td(a))} +function ud(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 $b(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function td(a,b){var c=a.ja-=a.b;a.b=a.K=0;b&&(a.ja=0);return c} +k.$d=function(){if(this.A.Z){this.Gb>=this.kb&&sd(this,!0);this.Ba=0;this.lb=Aa();if(this.ca){var a=this.lb-this.ca;a>this.Wb&&(this.S+=a,this.S>this.lb&&(this.S=this.lb))}try{do{var b=ud(this,this.A.xb?1:this.mb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Ba+=b;this.W+=b;bc(this,b);$b(this,b);this.wa-=b;if(0>=this.wa){this.wa+=this.mb;15<=++this.xc&&(this.qa(),this.xc=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.zc;this.ca=Aa();var c=this.Wb;this.Ba&&(c=Math.round(c*this.Ba/this.mb));var c=c-(this.ca-this.lb),d=this.ca-this.S;d&&(this.$=Math.round(this.W/(10*d))/100,864E5<=d&&(this.la=0,rd(this)));if(0>c||this.$c&&(this.S-=c),c=0;this.Gb+=this.Ba;this.ca+=c;a(b,c)}}}; +k.ib=function(a){if(tb(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.tb(!0),this.B.start(this.S,qd(this)));setTimeout(this.zc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){td(this);ac(this,this.W);this.W=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; +function vd(a){this.pb=+a.model||1170;this.Qb=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.pb?wd.bind(this):xd.bind(this);yd(this);this.N=0;this.O=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; +function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.Y=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Qb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.w=0;a.Za=0;a.Uc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ya=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.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];a.Ec=[0,0,0,0,0,0,0,0];a.Dc=0;a.I=0;a.H=a.J=0;a.g=a.f=a.vb=0;a.xa=-1;Zb(a)}function Zb(a){a.fb=255;a.fa=0;a.lc=0;a.D=0;a.eb=0;a.Mb=0;a.rb=0;a.Ua=0;a.Na=0;a.Ub=262143;a.O=null;a.v&&Qc(a)}function Qc(a){a.Ua?(a.R=65536,a.ba=a.Tc,a.sa=a.Xd,a.Pb=a.Pe,rc(a.v,a.rb&16?22:18)):(a.R=0,a.ba=a.Sc,a.sa=a.Cc,a.Pb=a.Jc,rc(a.v,16))}function zd(a,b,c){a.Qb=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.uc=function(){return 0}; +k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.la,this.cb]);a.set(2,Ac(this.v));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];rd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.w!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.w]);a.M=b;a.I|=2}function Q(a,b){a.I&128||(a.Y=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.Y=a.aa=a.T=b,a.U=c||0)}function Gd(a,b,c,d){a.I&128||(a.Y=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Yd(a,b){a.I&128||(a.Y=a.aa=a.T=b,a.U=a.Y^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.Y=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.na=function(a,b){if(!this.N){var c=!1;0>this.xa?this.xa=Rc(this):this.w||(a=4,c=!0);this.D&57344||(this.eb=63222,this.Mb=a);this.w=0;var d=this.sa(a|this.R),e=this.sa(a+2&65535|this.R);Sc(this,e&-12289|this.xa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.xa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.xa=-1;this.I|=8;this.Yc=a;this.Xc=b;if(26!=b)throw a;}}; +function ae(a){var b=be(a),c=be(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);N(a,b);Sc(a,c);a.I&=-17}function zc(a,b){var c=b>>13&31;31>c&&a.rb&32&&(b=a.Nb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.rb&a.Uc[a.w]||(d&=7);e=a.V[a.w][d];f=(a.ya[a.w][d]<<6)+(b&8191)&a.Ub;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.w][d]=e;if(4194170!==f||a.w)a.Na=a.w,a.Za=d;b=!1;g&&(g&57344&&(0<=a.xa&&(g|=128),a.D&57344||(a.D=a.D|g|a.Na<<5|a.Za<<1), +b=!0),a.D&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.R)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.na(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.v.Vb(a);this.N++;a=de(this,ce(this,a,3));this.N--;return a}; +k.bb=function(a){if(!this.Ua)return this.v.bb(a);this.N++;a=this.Cc(ce(this,a,2));this.N--;return a};k.sb=function(a,b){this.Ua?(this.N++,ee(this,ce(this,a,5),b),this.N--):this.v.sb(a,b)};k.Db=function(a,b){this.Ua?(this.N++,this.Jc(ce(this,a,4),b),this.N--):this.v.Db(a,b)};k.Sc=function(a,b,c){return fe(this,a,b,c)};k.Tc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Cc=function(a){return this.v.pa(a)};k.Xd=function(a){return this.v.pa(ce(this,a,2))};k.Jc=function(a,b){this.v.hb(a,b&65535)}; +k.Pe=function(a,b){this.v.hb(ce(this,a,4),b)};function ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=fe(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.w=a.M>>12&3,c=a.sa(d|c&a.R),a.w=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function he(a,b,c,d){a.D&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=fe(a,b,e,4),c&65536||(e&=65535),a.w=a.M>>12&3,e=ce(a,e|c&65536,4),a.w=a.M>>14&3,a.v.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} +function ie(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?a.v.pa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.pa(a.ba(b,c,2)):a.u[c]} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.vb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):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.ba(b,e,6),a.v.hb(e,d.call(a,c,a.v.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.v.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.ma(168,28):this.I&64?this.ma(4,30):this.I&16&&this.ma(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.zb>e?this.M:null;f&&(d=f.$d,e=f.zb);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.ma(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Dd(this))}while(0>5,f=this.O&&this.O.Ab>e?this.O:null;f&&(d=f.be,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.na(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.O,f==a)this.O=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(Dd(this))}while(0>1|b<<16;Yd(this,a);return a&65535}function we(a,b){a=b&2048|b>>1|b<<8;Yd(this,a<<8);return a&255}function xe(a,b){a=b&~a;Q(this,a);return a}function ye(a,b){a=b&~a;Q(this,a<<8);return a}function ze(a,b){a|=b;Q(this,a);return a}function Ae(a,b){a|=b;Q(this,a<<8);return a} -function Be(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ce(a,b){a=~b|256;Fd(this,a<<8);return a&255}function De(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ee(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Fe(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ge(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Be(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ce(a,b){a=~b|256;Fd(this,a<<8);return a&255}function De(a,b){a=b-a;this.I&128||(this.Y=this.aa=a,this.U=b&(b^a));return a&65535}function Ee(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.Y=this.aa=c,this.U=b&(b^c));return a&255}function Fe(a,b){a=b+a;this.I&128||(this.Y=this.aa=a,this.U=a&(b^a));return a&65535}function Ge(a,b){a=b+a;var c=a<<8;this.I&128||(this.Y=this.aa=c,this.U=c&(b<<8^c));return a&255} function He(a,b){a=-b;Fd(this,a,a&b&32768);return a&65535}function Ie(a,b){a=-b;Fd(this,a<<8,(a&b&128)<<8);return a&255}function Je(a,b){a=b<<1|this.T>>16&1;Yd(this,a);return a&65535}function Ke(a,b){a=b<<1|this.T>>16&1;Yd(this,a<<8);return a&255}function Le(a,b){a=(this.T&65536|b)>>1|b<<16;Yd(this,a);return a&65535}function Me(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Yd(this,a<<8);return a&255}function Ne(a,b){var c=b-a;Zd(this,c,a,b);return c&65535} -function Oe(a,b){var c=b-a;Zd(this,c<<8,a<<8,b<<8);return c&255}function Pe(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Qe(a,b){a^=b;Q(this,a);return a&65535}function Re(a){S(this,a,je(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Se(a){var b=me(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Te(a){var b=me(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ue(a){T(this,a,!Ad(this))}function Ve(a){T(this,a,Ad(this))} -function We(a){S(this,a,je(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){R(this,a,ie(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ye(a){S(this,a,je(this,a),ze);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ze(a){R(this,a,ie(this,a),Ae);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function $e(a){Q(this,je(this,a)&me(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function af(a){Q(this,(ie(this,a)&le(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function bf(a){T(this,a,Cd(this))}function cf(a){T(this,a,!this.Ta()==!Bd(this))}function df(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function ef(a){T(this,a,!Ad(this)&&!Cd(this))}function ff(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} -function gf(a){T(this,a,Ad(this)||Cd(this))}function hf(a){T(this,a,!this.Ta()!=!Bd(this))}function jf(a){T(this,a,this.Ta())}function kf(a){T(this,a,!Cd(this))}function lf(a){T(this,a,!this.Ta())}function mf(){this.ma(12,1);this.b-=5}function nf(a){T(this,a,!0)}function of(a){T(this,a,!Bd(this))}function pf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function qf(a){var b=je(this,a);a=me(this,a);Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function rf(a){var b=ie(this,a)<<8;a=le(this,a)<<8;Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function sf(a){var b=me(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=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.U=32768,this.T=65536,this.b-=7}function tf(){this.ma(24,2);this.b-=25} -function uf(){this.N&49152?(this.fa|=128,this.ma(4,3)):this.i?vf(this.i):this.ga();this.b-=7}function wf(){this.ma(16,4);this.b-=25}var xf=[0,7,7,10,7,11,9,13];function yf(a){this.J=this.b;N(this,ke(this,a));this.b=this.J-xf[this.g]}var zf=[0,14,14,17,14,18,16,20];function Af(a){this.J=this.b;var b=ke(this,a);a=a>>6&7;$d(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-zf[this.g]}var Bf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Cf(a){var b=je(this,a);this.J=this.b;Q(this,oe(this,a,b));this.b=this.J-Bf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Df(a){var b=ie(this,a);Q(this,ne(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Ef=[7,13,13,17,14,18,17,21]; -function Ff(a){var b=me(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Lf(a){S(this,a,je(this,a),Ne);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Mf(a){S(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}function Nf(){this.ma(28,5);this.b-=5}function Of(){this.I|=4;Ed(this,-2);this.b-=3}function Pf(a){S(this,a,je(this,a),Qe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=vf(b);b||this.ma(8,6)}function wd(a){Qf[a>>12].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} -function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a&15].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)}function eg(a){fg[a>>6&3].call(this,a)} +function Oe(a,b){var c=b-a;Zd(this,c<<8,a<<8,b<<8);return c&255}function Pe(a,b){this.I&128||(this.Y=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Qe(a,b){a^=b;Q(this,a);return a&65535}function Re(a){S(this,a,je(this,a),re);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Se(a){var b=me(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.Y=this.aa=c;this.b-=(this.g?6:7)+b} +function Te(a){var b=me(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ue(a){T(this,a,!Ad(this))}function Ve(a){T(this,a,Ad(this))} +function We(a){S(this,a,je(this,a),xe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Xe(a){R(this,a,ie(this,a),ye);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ye(a){S(this,a,je(this,a),ze);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ze(a){R(this,a,ie(this,a),Ae);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function $e(a){Q(this,je(this,a)&me(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function af(a){Q(this,(ie(this,a)&le(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 bf(a){T(this,a,Cd(this))}function cf(a){T(this,a,!this.Ta()==!Bd(this))}function df(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function ef(a){T(this,a,!Ad(this)&&!Cd(this))}function ff(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} +function gf(a){T(this,a,Ad(this)||Cd(this))}function hf(a){T(this,a,!this.Ta()!=!Bd(this))}function jf(a){T(this,a,this.Ta())}function kf(a){T(this,a,!Cd(this))}function lf(a){T(this,a,!this.Ta())}function mf(){this.na(12,1);this.b-=5}function nf(a){T(this,a,!0)}function of(a){T(this,a,!Bd(this))}function pf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.Y=0);this.b-=5} +function qf(a){var b=je(this,a);a=me(this,a);Zd(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 rf(a){var b=ie(this,a)<<8;a=le(this,a)<<8;Zd(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 sf(a){var b=me(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.Y=d>>16):(this.U=32768,this.aa=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.aa=this.Y=0,this.U=32768,this.T=65536,this.b-=7}function tf(){this.na(24,2);this.b-=25} +function uf(){this.M&49152?(this.fa|=128,this.na(4,3)):this.i?vf(this.i):this.ga();this.b-=7}function wf(){this.na(16,4);this.b-=25}var xf=[0,7,7,10,7,11,9,13];function yf(a){this.K=this.b;N(this,ke(this,a));this.b=this.K-xf[this.g]}var zf=[0,14,14,17,14,18,16,20];function Af(a){this.K=this.b;var b=ke(this,a);a=a>>6&7;$d(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.K-zf[this.g]}var Bf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Cf(a){var b=je(this,a);this.K=this.b;Q(this,oe(this,a,b));this.b=this.K-Bf[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Df(a){var b=ie(this,a);Q(this,ne(this,a,b,65535)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var Ef=[7,13,13,17,14,18,17,21]; +function Ff(a){var b=me(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.Y=b>>16,this.aa=this.Y|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Lf(a){S(this,a,je(this,a),Ne);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Mf(a){S(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}function Nf(){this.na(28,5);this.b-=5}function Of(){this.C&&(this.C.qb=this.u[0]);this.I|=4;Ed(this,-2);this.b-=3}function Pf(a){S(this,a,je(this,a),Qe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=vf(b);b||this.na(8,6)}function wd(a){Qf[a>>12].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)} +function Vf(a){Wf[a>>6&3].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a&15].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)}function eg(a){fg[a>>6&3].call(this,a)} var Qf=[function(a){gg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,V,function(a){hg[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],gg=[function(a){ig[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,V,V,V],Sf=[function(a){Fd(this,oe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)}],Uf=[function(a){S(this,a,0, He);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=me(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){S(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)}], -ig=[function(a){jg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,V,Xf,Zf,Mf,Mf,Mf,Mf],jg=[uf,Of,If,mf,wf,Hf,V,V,V,V,V,V,V,V,V,V],Yf=[Gf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],$f=[Gf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],hg=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,V,V,V],bg=[function(a){Fd(this, +ig=[function(a){jg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,V,Xf,Zf,Mf,Mf,Mf,Mf],jg=[uf,Of,If,mf,wf,Hf,V,V,V,V,V,V,V,V,V,V],Yf=[Gf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.Y=0;this.b-=5},U,U,U,U,U,U,U],$f=[Gf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.Y=32768;this.b-=5},W,W,W,W,W,W,W],hg=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,V,V,V],bg=[function(a){Fd(this, ne(this,a,0,255));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,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)}],dg=[function(a){R(this,a,0,Ie);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=le(this,a);Fd(this,a<<8);this.b-=this.g?4:3+ -(7==this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} -var kg=[function(a){lg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],lg=[function(a){og[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ge(this,a,0);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J= -this.b;he(this,a,0,b);Q(this,b);this.b=this.J-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},function(){this.ma(8,6)},V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag, -cg,eg,function(a){rg[a>>6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J=this.b;he(this,a,65536,b);Q(this,b);this.b=this.J-Ef[this.g]},V]; -function sg(a){t.call(this,"ROM",a,sg);this.ha=this.g=null;this.C=a.addr;this.f=a.size;this.D=!1;this.v=a.alias;this.B=a.file;this.H=ra(this.B);if(this.B){a=this.B;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(mb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);tg(c)})}}z(sg);k=sg.prototype; -k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)};k.Ga=function(){this.ha&&(this.i&&ug(this.i,this.id,this.C,this.f,this.ha),delete this.ha);return!0};k.Fa=function(){return!0}; -function tg(a){if(!sb(a)){if(a.B){if(!a.g||!a.w)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)ub(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.C;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+kc){var c={};b=(c[b]=[sg.prototype.Jd,sg.prototype.Be,null,null,null,a.f>>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.w,b,a.f,Zc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.qb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Mc(e.b,e.ja))});this.na=Oc(52,4);this.$=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(e.b,e.na)});Cb(b,this,Tg);H(this)}; -k.xc=function(){if(!this.J){var a=ld(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Fa=function(a){return a?this.save():!0};k.reset=function(){Ug(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Ug(this)};function Ug(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=wa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Nc(this.b,this.$,1E3/Math.round(this.R/10))}};var Vg={},Tg=(Vg[65392]=[null,null,X.prototype.Dd,X.prototype.ve,"RCSR"],Vg[65394]=[null,null,X.prototype.Cd,X.prototype.ue,"RBUF"],Vg[65396]=[null,null,X.prototype.Xd,X.prototype.Pe,"XCSR"],Vg[65398]=[null,null,X.prototype.Wd,X.prototype.Oe,"XBUF"],Vg);Wa(function(){for(var a=D(document,"pdp11","serial"),b=0;b>12].call(this,a)} +var kg=[function(a){lg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],lg=[function(a){og[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.R);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ge(this,a,0);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.K= +this.b;he(this,a,0,b);Q(this,b);this.b=this.K-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},function(){this.na(8,6)},V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag, +cg,eg,function(a){rg[a>>6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.K=this.b;he(this,a,65536,b);Q(this,b);this.b=this.K-Ef[this.g]},V]; +function sg(a){t.call(this,"ROM",a,sg);this.ha=this.g=null;this.w=a.addr;this.f=a.size;this.D=!1;this.C=a.alias;this.B=a.file;this.H=ra(this.B);if(this.B){a=this.B;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.P("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(mb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);tg(c)})}}z(sg);k=sg.prototype; +k.Fa=function(a,b,c,d){this.v=b;this.b=c;this.i=d;tg(this)};k.Ha=function(){this.ha&&(this.i&&ug(this.i,this.id,this.w,this.f,this.ha),delete this.ha);return!0};k.Ga=function(){return!0}; +function tg(a){if(!sb(a)){if(a.B){if(!a.g||!a.v)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)ub(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.w;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+kc){var c={};b=(c[b]=[sg.prototype.Ld,sg.prototype.De,null,null,null,a.f>>1],c);if(Cb(a.v,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.v,b,a.f,Zc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.sb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Mc(e.b,e.ja))});this.la=Oc(52,4);this.$=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(e.b,e.la)});Cb(b,this,Tg);H(this)}; +k.yc=function(){if(!this.J){var a=ld(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.yc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Ug(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Ug(this)};function Ug(a){a.K=0;a.f=0;a.g=128;a.w=[];return!0}k.kc=function(a){if("number"==typeof a)this.w.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=wa("",c)));this.O&&!this.H&&c&&(b=String.fromCharCode(this.O)+b);this.C.value+=b;this.C.scrollTop=this.C.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Nc(this.b,this.$,1E3/Math.round(this.R/10))}};var Vg={},Tg=(Vg[65392]=[null,null,X.prototype.Fd,X.prototype.xe,"RCSR"],Vg[65394]=[null,null,X.prototype.Ed,X.prototype.we,"RBUF"],Vg[65396]=[null,null,X.prototype.Zd,X.prototype.Re,"XCSR"],Vg[65398]=[null,null,X.prototype.Yd,X.prototype.Qe,"XBUF"],Vg);Wa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Yg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yg(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Zg(a);var e=this;if((this.g=ld(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Z=Oc(56,4);this.ca=Lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.Qa,e,f),(e=Ea(e,f))&&hh(a,b,c,d,e.da,e.Ka, +function(){var a=d.G.listTapes;a&&Yg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yg(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Fa=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.i=d;this.S=Zg(a);var e=this;if((this.g=ld(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.W=Oc(56,4);this.ca=Lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.P('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.Qa,e,f),(e=Ea(e,f))&&hh(a,b,c,d,e.da,e.Ka, e.Ja));a.A.ab=!1;a.D&&(a.D--,a.D||H(a));eh(a)})}function bh(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Da(f, +function eh(a){var b=a.G.listTapes;if(b&&b.options){a=a.H||a.w;for(var c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.gc?"":e)+"&format=json"));return!!Da(f, null,!0,function(b,c,d){oh(a,b,c,d)})} -function oh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{mb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.La=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.B&&!a.B.A.ia;if(d)a.controller.P('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{mb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.Aa=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.La=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ca?f=a.Pa+a.Ca&&(a.Ca+=f-(a.Pa+a.Ca)+1):(a.Pa=f,a.Ca=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.P("Unable to restore disk '"+this.Xa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=qh(this,a++);)sh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function sh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function M(a){t.call(this,"RL11",a,M,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Oa("Mobi")&&window&&"FileReader"in window}z(M);k=M.prototype; +function sh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function M(a){t.call(this,"RL11",a,M,2097152);this.C=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Oa("Mobi")&&window&&"FileReader"in window}z(M);k=M.prototype; k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=pa(c.value,10);null!=a&&th(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&uh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[pa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=qh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";th(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){vh(this)};k.save=function(){return(new O(this)).data()}; -k.restore=function(a){return vh(this,a[0])};function yh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ah(a,e,b,c,!1,d)}else zh(a,e)} -function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.rb()):a.Pb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; +k.Fa=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.i=d;if((this.C=ld(this.B,"autoMount")||this.C)&&"string"==typeof this.C)try{this.C=eval("("+this.C+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.C+")"),this.C=null}vh(this);this.O=Oc(112,5);Cb(b,this,wh,2097152);xh(this,"None","",!0);this.L&&xh(this,"Local Disk","?");xh(this,"Remote Disk","??");yh(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.sc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";th(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){vh(this)};k.save=function(){return(new O(this)).data()}; +k.restore=function(a){return vh(this,a[0])};function yh(a,b){b||(a.H=0);if(a.C)for(var c in a.C){var d=a.C[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.P("Unable to load the selected drive");else if(c)if("?"==c)a.P('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ah(a,e,b,c,!1,d)}else zh(a,e)} +function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.fc?a.P("RL11 busy"):(h.fc=!0,e&&(h.ec=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Rb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Pc)&&g++));return g} +k.Pc=function(a,b,c,d,e){var f;a.fc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.Aa)&&(this.P('Disk "'+c+'" too large for drive '+("RL"+a.hc)),b=null);b?(a.Da=b,a.Xa=c,a.gb=d,this.P('Mounted disk "'+c+'" in drive '+("RL"+a.hc),a.ec||e),this.B&&this.B.tb()):a.Rb=!1;a.ec&&(a.ec=!1,--this.H||H(this));th(this,a.hc)}; function xh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.jd=function(a,b,c,d,e,f,g){var h=0,l=a.Ca,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,v|r<<8);if(Kc(this.w)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.de=function(a,b,c,d,e,f,g){var h=0,l=a.Ca,m=null,n;l||(h=5120,e=0);for(;e--;){var v=this.w.pa(f);if(Kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; -k.ye=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Mc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; -var Bh={},wh=(Bh[63744]=[null,null,M.prototype.Gd,M.prototype.ye,"RLCS"],Bh[63746]=[null,null,M.prototype.Ed,M.prototype.we,"RLBA"],Bh[63748]=[null,null,M.prototype.Hd,M.prototype.ze,"RLDA"],Bh[63750]=[null,null,M.prototype.Id,M.prototype.Ae,"RLMP"],Bh[63752]=[null,null,M.prototype.Fd,M.prototype.xe,"RLBE"],Bh);function Ch(a){t.call(this,"Debugger",a,Ch);this.ca=a.base||16;this.Ia=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Z={}}z(Ch); -var Dh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ch.prototype.uc=function(){return-1};Ch.prototype.vc=function(){}; -function Eh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} +function th(a,b){if(0<=b&&b>12&48;this.K=f>>16&63;this.w=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.ld=function(a,b,c,d,e,f,g){var h=0,l=a.Da,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Da.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Da.read(m,n++))||0>(r=a.Da.read(m,n++))){h=5120;break}this.v.hb(f,v|r<<8);if(Kc(this.v)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.Aa&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.fe=function(a,b,c,d,e,f,g){var h=0,l=a.Da,m=null,n;l||(h=5120,e=0);for(;e--;){var v=this.v.pa(f);if(Kc(this.v)){h=8192;break}f+=2;if(!m){m=a.Da.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Da.write(m,n++,v&255)||!a.Da.write(m,n++,v>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.Aa&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Id=function(){return this.ea&65535}; +k.Ae=function(a){this.ea=this.ea&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.w&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.w=this.g&4?this.w+b:this.w-b,this.g=this.w=this.w&65408|c);break;case 8:this.D=this.w;break;case 12:b=this.ld;case 10:b||(b=this.fe),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Qc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Mc(this.b,this.O))}};k.Gd=function(){return this.J};k.ye=function(a){this.J=a&65534};k.Jd=function(){return this.g};k.Be=function(a){this.g=a};k.Kd=function(){return this.D};k.Ce=function(a){this.D=a};k.Hd=function(){return this.K};k.ze=function(a){this.K=a&63}; +var Bh={},wh=(Bh[63744]=[null,null,M.prototype.Id,M.prototype.Ae,"RLCS"],Bh[63746]=[null,null,M.prototype.Gd,M.prototype.ye,"RLBA"],Bh[63748]=[null,null,M.prototype.Jd,M.prototype.Be,"RLDA"],Bh[63750]=[null,null,M.prototype.Kd,M.prototype.Ce,"RLMP"],Bh[63752]=[null,null,M.prototype.Hd,M.prototype.ze,"RLBE"],Bh);function Ch(a){t.call(this,"Debugger",a,Ch);this.ca=a.base||16;this.Ba=!1;this.K=0;this.R=!1;this.w=-1;this.g=[];this.W={}}z(Ch); +var Dh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ch.prototype.vc=function(){return-1};Ch.prototype.wc=function(){}; +function Eh(a,b,c,d){if(c)if(b){0>a.w&&a.g.length&&(a.w=0);if(0>a.w||b!=a.g[a.w])a.g.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.g[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} function Fh(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 Gh(a,b,c){var d;if(b){b=Hh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Kh(a,b){if(b)return Jh(a,b,a.Z[b]);var c=0;for(b in a.Z)Jh(a,b,a.Z[b]),c++;return 0>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Kh(a,b){if(b)return Jh(a,b,a.W[b]);var c=0;for(b in a.W)Jh(a,b,a.W[b]),c++;return 0this.b.ob?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=Rc(this.b):21==a&&this.f&&hc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.oa&-2147483648&&this.b&&this.b.A.Y&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,td(a),a.ua=0,a.qa()))};function Nh(a){var b;if(!pe(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?bi(a):ci(a)}}function ai(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Y?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Nh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.Y=!1;di(this);a||od(this)};k.save=function(){var a=new O(this);a.set(0,Xh(this.L));a.set(1,Xh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Yh(a[b++]),this.P=Yh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Y=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.Y){this.A.Y=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function vf(a){var b=a.b;if(b.A.Y)throw N(b,a.b.Kb),a.ga(),-1;return!1} -function Mh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.sb=0}k.mb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; -function ei(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Nh(a);break}}return f}function gi(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +k.Fa=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.C=a.C;(a=ld(a,"messages"))&&Oh(this,a);this.wb=Rh;this.Gb=1145>this.b.pb?Th:[];Uh(this,function(a){a:{var b=d.v.X,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.v.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.wc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Rc(this.b):21==a&&this.C&&hc(this.C)&&(b=this.C.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Mb).F));this.oa&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.oa&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,td(a),a.wa=0,a.qa()))};function Nh(a){var b;if(!pe(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?bi(a):ci(a)}}function ai(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Nh(this);this.xa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.Z=!1;di(this);a||od(this)};k.save=function(){var a=new O(this);a.set(0,Xh(this.L));a.set(1,Xh(this.O));a.set(2,[this.g,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Yh(a[b++]),this.O=Yh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Qb=a;this.Ub=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function vf(a){var b=a.b;if(b.A.Z)throw N(b,a.b.Mb),a.ga(),-1;return!1} +function Mh(a){var b,c;a.f=["bp"];if(a.N)for(b=1;b>>d.ka],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.mb=0}k.nb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.v;f.X[e>>>f.ka].nb(e&f.v,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; +function ei(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Nh(a);break}}return f}function gi(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), y&63)switch(y=A&7,A&56){case 0:x=$h(y);break;case 8:x="@"+$h(y);break;case 16:7>y?x="("+$h(y)+")+":(A=w.pa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+$h(y)+")+":(A=w.pa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+$h(y)+")";break;case 40:x="@-("+$h(y)+")";break;case 48:A=w.pa(r,2);x=J(w,A,0,!0)+"("+$h(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.pa(r,2),x="@"+J(w,A)+"("+$h(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=$h(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,Rc(d)):21==b&&a.f&&hc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function li(a){var b,c="";for(b=0;6>b;b++)c+=ki(a,b);c=c+"\n"+(ki(a,6)+ki(a,7));c+=ki(a,20)+ki(a,21);return c+=ji(a,"T")+ji(a,"N")+ji(a,"Z")+ji(a,"V")+ji(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function mi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb?(c=$h(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Rc(d)):21==b&&a.C&&hc(a.C)&&(c="SW="+J(a,a.C.Va,3));c&&(c+=" ");return c}function li(a){var b,c="";for(b=0;6>b;b++)c+=ki(a,b);c=c+"\n"+(ki(a,6)+ki(a,7));c+=ki(a,20)+ki(a,21);return c+=ji(a,"T")+ji(a,"N")+ji(a,"Z")+ji(a,"V")+ji(a,"C")}k.qc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.qc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Xe:b,F:c,Wc:d,ha:e,oc:f})}function mi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Wc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(li(a));c&&(a.L=Y(d.u[7]),ci(a,J(a,a.L.F)))}}function qi(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(li(a));c&&(a.L=Y(d.u[7]),ci(a,J(a,a.L.F)))}}function qi(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ii(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function hi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(sb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Jd=[];"call"==Bg&&(Jb=1E5,Jd=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.ub=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.ub=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Kd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.lb=Lb}}}}break;case "e":if("else"==g[0])break;var jb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(jb=1,Ld=255,Md=a.Fb,Nd=a.Xb):"e"==Od||"ew"==Od?(jb=2,Ld=65535,Md=a.pa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Pd);if(Fc)for(var Gc=2;Gc> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.O.F)),a.L=a.O,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(sb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Jd=[];"call"==Bg&&(Jb=1E5,Jd=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.vb=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.vb=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Kd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.lb=Lb}}}}break;case "e":if("else"==g[0])break;var jb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(jb=1,Ld=255,Md=a.Hb,Nd=a.Yb):"e"==Od||"ew"==Od?(jb=2,Ld=65535,Md=a.pa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Pd);if(Fc)for(var Gc=2;GcSd;){for(var Ma=null,Pi=256;65536>Sb.F>>>0;){Td.F=a.pa(Sb,2);if(null==Sb.F||!Pi--)break;if(!(Td.F&1)){for(var Qi=a,Hc=Td,Ig=null,Tb=Hc.F,Jg=Tb,Ud=1;6>=Ud&&Tb;Ud++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvi){if(xi(d,this.J)){this.C=new O(this,"1.30.3","failsafe");xi(this.C)&&(Ci(this,d),a=2,Di(this.C));this.C.set("timestamp",Ba());Ei(this.C);var e=this.g&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xi(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.B=null)):this.j(f+": "+g),Di(d),xi(d)?(c=Bi(d),e=!0):c=!1))}e&&Ai(this,c?d:null)}else 2==a&&d.clear()}else Ai(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Fi(this,this.b,b,c,a),this.qa(),this.b.tb());this.P&&(Ci(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function Ci(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.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function si(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ga(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;lvi){if(xi(d,this.J)){this.w=new O(this,"1.30.3","failsafe");xi(this.w)&&(Ci(this,d),a=2,Di(this.w));this.w.set("timestamp",Ba());Ei(this.w);var e=this.f&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xi(d,g):("error"== +f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.g=null)):this.j(f+": "+g),Di(d),xi(d)?(c=Bi(d),e=!0):c=!1))}e&&Ai(this,c?d:null)}else 2==a&&d.clear()}else Ai(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Fi(this,this.b,b,c,a),this.qa(),this.b.ub());this.O&&(Ci(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.B=0}; +function Ci(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function si(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;l(b.J+=a))){for(var d=0;d(b.H+=a))){for(var d=0;d>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function t(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 ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Aa(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 Ba={init:[],show:[],exit:[]},Ca=!1,Da=!1,Ea=!0; function Fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ga(a){Ba.init.push(a)}function Ha(a){if(Ea)try{for(var b=0;bb?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; +Fa(Aa("Opera")||Aa("iOS")?"onunload":"onbeforeunload",function(){Ha(Ba.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ob=b.comment;this.mc=b;b=this.id.indexOf(".");0>b?this.xa=this.id:(this.na=this.id.substr(0,b),this.xa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,rb:!1,P:!1,error:!1};this.lb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,0,!1,!1,this.tc,a]}z(Ya);var Za=7;function $a(a,b){return a.c[b]&&a.c[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; -h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, +function Ya(a){x.call(this,"Panel",a,Ya);this.b=this.Fa=this.f=this.v=this.m=0;this.w=this.A=this.s=!1;this.C=Za;this.i={};this.c={START:[1,1,!0,!1,this.tc],STEP:[1,1,!1,!1,this.uc],ENABLE:[1,1,!1,!1,this.pc],CONT:[1,1,!0,!1,this.nc],DEP:[0,0,!0,!1,this.oc],EXAM:[1,1,!0,!1,this.qc],LOAD:[1,1,!0,!1,this.sc],TEST:[0,0,!0,!1,this.rc]};for(a=0;22>a;a++)this.c["S"+a]=[0,0,!1,!1,this.vc,a]}z(Ya);var Za=7;function $a(a,b){return a.c[b]&&a.c[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.i[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ja=function(a,b){b||(hb(),this.reset());return!0};h.ia=function(){return!0}; -function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)jb(a,b,a.c[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -function ab(a,b){var c=a.c[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}function bb(a,b){var c=a.c[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.rc=function(a){a||this.a.j.S||(this.h.reset(),lb(this.a),$a(this,"ENABLE")&&mb(this.a))};h.sc=function(){};h.nc=function(a){a||G(this.a)}; -h.lc=function(a){if(!a&&!this.a.j.S)if($a(this,"ENABLE"))mb(this.a);else{a=this.D;var b;if(b=a)a.j.Ea&&(a.j.pb=!0),b=!a.j.Ea;if(b)Ua(a,!0),a.mb(0),Ua(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][1]=0&1<c;c++)tb(a,"A"+c,b&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.la;$a(a,"STEP")||(b=-b);sb(a,a.b&~c|a.b+b&c)}function rb(a,b){a.i=b&65535;b=a.i;for(var c=0;16>c;c++)tb(a,"D"+c,b&1<a;a++)this.c["S"+a][1]=0&1<c;c++)tb(a,"A"+c,b&1<a.a.Ya?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.la;$a(a,"STEP")||(b=-b);sb(a,a.b&~c|a.b+b&c)}function rb(a,b){a.Fa=b&65535;b=a.Fa;for(var c=0;16>c;c++)tb(a,"D"+c,b&1<>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.qb=0;this.w=[];this.bc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.h=Array(this.A);for(b=0;b>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.sb=0;this.w=[];this.dc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.ya[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} function zb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.qb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} -function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.la)>>>a.c].W(b&a.l,b)}h.kb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.la)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a}; -h.Ya=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.h[(a&this.la)>>>this.c].Fb(a&this.l,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.la)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.la)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; -function Ob(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Aa!=c&&(b.Aa=c,Xb(b))}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Fa}; -h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Fa!=a&&(b.Fa=a,b.Nb=a&16?4194303:262143,Xb(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.$c=function(a){return this.a.Y[1][a>>1&7]};h.Td=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Yc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Rd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.wd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; -h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ga[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ga[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Id=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ga[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ga[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.qb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; -h.bd=function(a){return a?this.a.Ca&65280:0};h.Vd=function(a){this.a.Ca=a|255};h.Lc=function(){return Yb(this.a)};h.Ed=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; -var M={},Wb=(M[61568]=[null,null,L.prototype.hd,L.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.ad,L.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.Zc,L.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.$c,L.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.Yc,L.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Bc,L.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.zc,L.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Ac, -L.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.yc,L.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Hc,L.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Cc,L.prototype.xd,"LKS"],M[65402]=[null,null,L.prototype.Ec,L.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,L.prototype.gd,L.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.ed, -L.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.fd,L.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.dd,L.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],M[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],M[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],M[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],M[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],M[65477]=[null,null,L.prototype.La,L.prototype.Na, -"R5SET0"],M[65478]=[null,null,L.prototype.Mc,L.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,L.prototype.Pc,L.prototype.Id,"R7KERNEL"],M[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Ma, -L.prototype.Oa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Nc,L.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.wc,L.prototype.rd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.cd,L.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.vc,L.prototype.qd,"CPUERR",1,1170],M[65528]= -[null,null,L.prototype.Dc,L.prototype.yd,"MB",1,1170],M[65530]=[null,null,L.prototype.Ic,L.prototype.Bd,"PIR"],M[65532]=[null,null,L.prototype.bd,L.prototype.Vd,"SL"],M[65534]=[null,null,L.prototype.Lc,L.prototype.Ed,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.La)return l.pb+=l.La-f,l.La=f,!0;if(f>=l.La+l.pb){p=l.size-(f-n);p>g&&(p=g);l.pb=f-l.La+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.sb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Ab(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.la)>>>a.c].W(b&a.l,b)}h.mb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.la)>>>this.c;this.m=!1;this.f++;a=this.h[c].Vb(b,a);this.f--;return a}; +h.$a=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.h[(a&this.la)>>>this.c].Hb(a&this.l,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.la)>>>a.c].qb(b&a.l,c&65535,b)}h.nb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.la)>>>this.c;this.m=!1;this.f++;this.h[d].bc(c,b&65535,a);this.f--}; +function Ob(a){for(var b=0,c=[],d=0;da.a.Ya)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Aa!=c&&(b.Aa=c,Xb(b))}};h.Hc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ic=function(){return this.a.Cb};h.Jc=function(){return this.a.Ga}; +h.Cd=function(a){var b=this.a;1170>b.Ya&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Pb=a&16?4194303:262143,Xb(b))};h.kd=function(a){a=a>>1&63;var b=this.a.ab[a>>1];return a&1?b>>16:b&65535};h.ce=function(a,b){b=b>>1&63;var c=b>>1;this.a.ab[c]=b&1?this.a.ab[c]&65535|(a&63)<<16:this.a.ab[c]&-65536|a&65534};h.cd=function(a){return this.a.H[1][a>>1&7]};h.Wd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.ad=function(a){return this.a.H[1][(a>>1&7)+8]};h.Ud=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.bd=function(a){return this.a.Y[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.$c=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Dc=function(a){return this.a.H[0][a>>1&7]};h.yd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Bc=function(a){return this.a.H[0][(a>>1&7)+8]};h.wd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Cc=function(a){return this.a.Y[0][a>>1&7]}; +h.xd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.Ac=function(a){return this.a.Y[0][(a>>1&7)+8]};h.vd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.jd=function(a){return this.a.H[3][a>>1&7]};h.be=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.gd=function(a){return this.a.H[3][(a>>1&7)+8]};h.$d=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.hd=function(a){return this.a.Y[3][a>>1&7]};h.ae=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.fd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Zd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Na=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Oc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Hd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Rc=function(){return this.a.g[7]};h.Kd=function(a){this.a.g[7]=a}; +h.Oa=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Qa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Pc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Id=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Qc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Jd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.yc=function(a){return this.a.Yb[a-65504>>1]}; +h.td=function(a,b){this.a.Yb[b-65504>>1]=a};h.Ub=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.sb}a=(a>>6)-1}else a=0;return a};h.ac=function(){};h.ed=function(){return 1};h.Yd=function(){};h.xc=function(){return this.a.M};h.sd=function(){this.a.M=0};h.Fc=function(){return this.a.Xb};h.Ad=function(a,b){b&1||(a&=255);this.a.Xb=a};h.Kc=function(a){return a?this.a.Db:0};h.Dd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.u|=2}; +h.dd=function(a){return a?this.a.Ca&65280:0};h.Xd=function(a){this.a.Ca=a|255};h.Nc=function(){return Yb(this.a)};h.Gd=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.$b=function(){}; +var M={},Wb=(M[61568]=[null,null,L.prototype.kd,L.prototype.ce,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.cd,L.prototype.Wd,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.ad,L.prototype.Ud,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.bd,L.prototype.Vd,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.$c,L.prototype.Td,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Dc,L.prototype.yd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.Bc,L.prototype.wd,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Cc, +L.prototype.xd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.Ac,L.prototype.vd,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Jc,L.prototype.Cd,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Ec,L.prototype.zd,"LKS"],M[65402]=[null,null,L.prototype.Gc,L.prototype.Bd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Hc,L.prototype.$b,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Ic,L.prototype.$b,"MMR2",1,1145],M[65408]=[null,null,L.prototype.jd,L.prototype.be,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.gd, +L.prototype.$d,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.hd,L.prototype.ae,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.fd,L.prototype.Zd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET0"],M[65473]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET0"],M[65474]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET0"],M[65475]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET0"],M[65476]=[null,null,L.prototype.Na,L.prototype.Pa,"R4SET0"],M[65477]=[null,null,L.prototype.Na,L.prototype.Pa, +"R5SET0"],M[65478]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6KERNEL"],M[65479]=[null,null,L.prototype.Rc,L.prototype.Kd,"R7KERNEL"],M[65480]=[null,null,L.prototype.Oa,L.prototype.Qa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Oa,L.prototype.Qa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Oa,L.prototype.Qa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Oa,L.prototype.Qa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Oa,L.prototype.Qa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Oa, +L.prototype.Qa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Pc,L.prototype.Id,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Qc,L.prototype.Jd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.yc,L.prototype.td,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Ub,L.prototype.ac,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Ub,L.prototype.ac,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.ed,L.prototype.Yd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.xc,L.prototype.sd,"CPUERR",1,1170],M[65528]= +[null,null,L.prototype.Fc,L.prototype.Ad,"MB",1,1170],M[65530]=[null,null,L.prototype.Kc,L.prototype.Dd,"PIR"],M[65532]=[null,null,L.prototype.dd,L.prototype.Xd,"SL"],M[65534]=[null,null,L.prototype.Nc,L.prototype.Gd,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> +function I(a,b,c,d,e,f){this.h=a;this.id=dc+=2;this.a=null;this.La=b;this.pb=c;this.size=d||0;this.type=e||ec;this.l=e==fc;this.controller=null;Ab(this);this.ua=this.ic=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],gc(this,f.dc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Eb=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} -var oc=[],kc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],mc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Xa)var ic=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],hc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.j.S=!1;this.j.Cb=!1;this.j.Ta=a.autoStart;this.j.gb=!1;this.cb=this.Ha=0;this.eb=a.csStart;this.Pa=a.csInterval;this.Qa=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; -h.ha=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.Ha&&(a.Ha+=a.Pa,c=!0);0<=a.Qa&&a.Qa<=uc(a)&&(a.Pa=a.Qa=-1,tc(a),G(a),c=!0);c&&a.U(uc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.l&&xc(a.l)}ob(a,a.aa);a.aa=0;a.R=ra();a.oa=0;wc(a)}function Rb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Tb(a,b,c,d){0<=b&&ba.I[b][0])&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+yc(a))} -function nb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function yc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.md=function(){if(this.j.S){this.wb>=this.fb&&wc(this,!0);this.Sa=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.j.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Sa+=b;this.aa+=b;pb(this,b);nb(this,b);this.Ra-=b;if(0>=this.Ra){this.Ra+=this.hb;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.j.S)}catch(f){G(this); -this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.S){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Sa&&(c=Math.round(c*this.Sa/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Sa;this.oa+=c;a(b,c)}}}; -function mb(a){var b;a.j.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.S)a.U(a.toString()+" busy");else{vc(a);a.j.S=!0;a.j.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,uc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.S){yc(a);ob(a,a.aa);a.aa=0;a.j.S=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),uc(a));b=!0}a.j.complete=void 0;return b} -function zc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Wa?Ac.bind(this):Bc.bind(this);Cc(this);this.ra=0;this.N=null;this.j.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Wa);this.j.S&&G(this);Cc(this);sc(this);this.j.error=!1;this.parent.reset.call(this)}; -function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ga=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;lb(a)}function lb(a){a.Ca=255;a.M=0;a.Bb=0;a.w=0;a.Ba=0;a.Ab=0;a.Fa=0;a.Aa=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Xb(a)}function Xb(a){a.Aa?(a.P=65536,a.J=a.ic,a.W=a.jd,a.ob=a.be,Cb(a.h,a.Fa&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.ob=a.ac,Cb(a.h,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; -h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Ob(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];vc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Zb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Kc(a,a.Ia);Kc(a,a.g[7]);O(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} -function Lb(a,b){var c=b>>13&31;31>c&&a.Fa&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Nc(a,b,c){var d,e,f;if(!(c&a.Aa))return b;d=b>>13;a.Fa&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.l,c&255,b)}function Mc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Kc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Aa)return this.h.kb(a);this.ra++;a=this.Ub(Nc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Aa?(this.ra++,Oc(this,Nc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.lb=function(a,b){this.Aa?(this.ra++,this.ac(Nc(this,a,4),b),this.ra--):this.h.lb(a,b)};h.hc=function(a,b,c){return Pc(this,a,b,c)};h.ic=function(a,b,c){return Nc(this,Pc(this,a,b,c),c)};h.Ub=function(a){return Mb(this.h,a)};h.jd=function(a){return Mb(this.h,Nc(this,a,2))};h.ac=function(a,b){Nb(this.h,a,b&65535)};h.be=function(a,b){Nb(this.h,Nc(this,a,4),b)}; -function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Rc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Pc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Nc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Sc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.h,a.J(b,c,2)):a.g[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)}function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,c,2)):a.g[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Oc(a,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[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),Nb(a.h,e,d.call(a,c,Mb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.J(b,e,5),c):a.g[e]=c?a.g[e]&~d|c<<24>>24&d:a.g[e]&~d;return c}function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c} +I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Xa)for(a=Array(this.size>>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Vb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Hb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.bc(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},na:function(a,b){this.o[a]=b;this.ua=!0},pa:function(a,b){this.o[a]=b;this.ua=!0},ra:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ua=!0},ta:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Gb=!a.l&&b[1]||a.f,a.qb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Hb=b[1]||a.f,a.bc=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.Ab=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Vb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} +var oc=[],kc=[I.prototype.N,I.prototype.qa,I.prototype.ba,I.prototype.xa],mc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Xa)var ic=[I.prototype.C,I.prototype.na,I.prototype.O,I.prototype.ra],hc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.ta]; +function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.ib=a.cycles||b;this.ra=c;this.xb=Math.round(this.ib/1E4)/100;this.Ia=this.xb*this.ra;this.j.S=!1;this.j.Eb=!1;this.j.Va=a.autoStart;this.j.hb=!1;this.fb=this.Ja=0;this.gb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Tb=this.od.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; +h.ha=function(a,b,c,d){this.l=a;this.h=b;this.D=d;this.I=a.I;for(b=0;b=a.Ja&&(a.Ja+=a.Ra,c=!0);0<=a.Sa&&a.Sa<=uc(a)&&(a.Ra=a.Sa=-1,tc(a),G(a),c=!0);c&&a.U(uc(a)+" cycles: checksum="+m(a.fb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.P)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.oa/a.Ia&&(b=1);a.ra=b;b=a.xb*a.ra;if(a.Ia!=b){a.Ia=b;b=a.Ia.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.l&&xc(a.l)}ob(a,a.ba);a.ba=0;a.aa=ra();a.pa=0;wc(a)}function Rb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Tb(a,b,c,d){0<=b&&ba.J[b][0])&&(c=a.ib*a.ra/1E3*c|0,a.J[b][0]=c+yc(a))} +function nb(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function yc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.od=function(){if(this.j.S){this.yb>=this.ib&&wc(this,!0);this.Ua=0;this.eb=ra();if(this.pa){var a=this.eb-this.pa;a>this.Qb&&(this.aa+=a,this.aa>this.eb&&(this.aa=this.eb))}try{do{for(var b,c=this.j.hb?1:this.jb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ob(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ua+=b;this.ba+=b;pb(this,b);nb(this,b);this.Ta-=b;if(0>=this.Ta){this.Ta+=this.jb;15<=++this.Rb&&(this.wa(),this.Rb=0);break}}while(this.j.S)}catch(f){G(this); +this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.S){a=setTimeout;b=this.Tb;this.pa=ra();c=this.Qb;this.Ua&&(c=Math.round(c*this.Ua/this.jb));c-=this.pa-this.eb;if(d=this.pa-this.aa)this.oa=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.ta=0,vc(this));if(0>c||this.oac&&(this.aa-=c),c=0;this.yb+=this.Ua;this.pa+=c;a(b,c)}}}; +function mb(a){var b;a.j.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.S)a.U(a.toString()+" busy");else{vc(a);a.j.S=!0;a.j.Eb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.aa,uc(a));setTimeout(a.Tb,0)}}h.ob=function(){return 0};function G(a){var b=!1;if(a.j.S){yc(a);ob(a,a.ba);a.ba=0;a.j.S=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),uc(a));b=!0}a.j.complete=void 0;return b} +function zc(a){this.Ya=+a.model||1170;this.Mb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Ya?Ac.bind(this):Bc.bind(this);Cc(this);this.sa=0;this.O=null;this.j.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Ya);this.j.S&&G(this);Cc(this);sc(this);this.j.error=!1;this.parent.reset.call(this)}; +function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Mb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.lc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ab=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Yb=[0,0,0,0,0,0,0,0];a.Xb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.wb=0;a.Ka=-1;lb(a)}function lb(a){a.Ca=255;a.M=0;a.Db=0;a.w=0;a.Ba=0;a.Cb=0;a.Ga=0;a.Aa=0;a.cb=0;a.Pb=262143;a.O=null;a.h&&Xb(a)}function Xb(a){a.Aa?(a.R=65536,a.N=a.kc,a.W=a.ld,a.qb=a.de,Cb(a.h,a.Ga&16?22:18)):(a.R=0,a.N=a.jc,a.W=a.Wb,a.qb=a.cc,Cb(a.h,16))}function Dc(a,b,c){a.Mb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Lb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Ob(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];vc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.sa){var d=!1;0>a.Ka?a.Ka=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.Cb=b);a.v=0;var e=a.W(b|a.R),f=a.W(b+2&65535|a.R);Zb(a,f&-12289|a.Ka>>2&12288);d&&(a.M|=4,a.g[6]=4);Kc(a,a.Ka);Kc(a,a.g[7]);O(a,e);a.u&=-113;a.Ka=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} +function Lb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.ab[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Nc(a,b,c){var d,e,f;if(!(c&a.Aa))return b;d=b>>13;a.Ga&a.lc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Pb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.cb=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ka&&(g|=128),a.w&57344||(a.w=a.w|g|a.cb<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Gb(b&a.l,c&255,b)}function Mc(a){var b=a.W(a.g[6]|a.R);a.g[6]=a.g[6]+2&65535;return b}function Kc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.R)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.mb=function(a){if(!this.Aa)return this.h.mb(a);this.sa++;a=this.Wb(Nc(this,a,2));this.sa--;return a}; +h.$a=function(a,b){this.Aa?(this.sa++,Oc(this,Nc(this,a,5),b),this.sa--):this.h.$a(a,b)};h.nb=function(a,b){this.Aa?(this.sa++,this.cc(Nc(this,a,4),b),this.sa--):this.h.nb(a,b)};h.jc=function(a,b,c){return Pc(this,a,b,c)};h.kc=function(a,b,c){return Nc(this,Pc(this,a,b,c),c)};h.Wb=function(a){return Mb(this.h,a)};h.ld=function(a){return Mb(this.h,Nc(this,a,2))};h.cc=function(a,b){Nb(this.h,a,b&65535)};h.de=function(a,b){Nb(this.h,Nc(this,a,4),b)}; +function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Rc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Pc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Nc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Sc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.N(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.h,a.N(b,c,2)):a.g[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)}function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.N(b,c,2)):a.g[c]} +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.wb=a.N(b,e,7),Oc(a,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),Nb(a.h,e,d.call(a,c,Mb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.N(b,e,5),c):a.g[e]=c?a.g[e]&~d|c<<24>>24&d:a.g[e]&~d;return c}function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.h,a.N(b,d,4),c):a.g[d]=c&65535;return c} function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.od,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ec(this))}while(0>5,e=this.O&&this.O.Ma>d?this.O:null;e&&(c=e.qd,d=e.Ma);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ec(this))}while(0>1|b<<16;Ic(this,a);return a&65535}function dd(a,b){a=b&2048|b>>1|b<<8;Ic(this,a<<8);return a&255}function ed(a,b){a=b&~a;R(this,a);return a}function fd(a,b){a=b&~a;R(this,a<<8);return a}function gd(a,b){a|=b;R(this,a);return a}function hd(a,b){a|=b;R(this,a<<8);return a}function id(a,b){a=~b|65536;Gc(this,a);return a&65535}function jd(a,b){a=~b|256;Gc(this,a<<8);return a&255} function kd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function ld(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function md(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function nd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function od(a,b){a=-b;Gc(this,a,a&b&32768);return a&65535}function pd(a,b){a=-b;Gc(this,a<<8,(a&b&128)<<8);return a&255} function qd(a,b){a=b<<1|this.m>>16&1;Ic(this,a);return a&65535}function rd(a,b){a=b<<1|this.m>>16&1;Ic(this,a<<8);return a&255}function sd(a,b){a=(this.m&65536|b)>>1|b<<16;Ic(this,a);return a&65535}function td(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ic(this,a<<8);return a&255}function ud(a,b){var c=b-a;Jc(this,c,a,b);return c&65535}function vd(a,b){var c=b-a;Jc(this,c<<8,a<<8,b<<8);return c&255}function wd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} @@ -135,102 +135,102 @@ function Hd(a){R(this,Tc(this,a)&Wc(this,a));this.a-=this.c?4+(this.C&&6<=this.b function Nd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Od(a){V(this,a,Q(this)||(this.i&65535?0:4))}function Pd(a){V(this,a,!this.za()!=!(this.f&32768))}function Qd(a){V(this,a,this.za())}function Rd(a){V(this,a,!!(this.i&65535))}function Sd(a){V(this,a,!this.za())}function Td(){K(this,12,1);this.a-=5}function Ud(a){V(this,a,!0)}function Vd(a){V(this,a,!(this.f&32768))}function Wd(a){V(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Xd(a){var b=Tc(this,a);a=Wc(this,a);Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Yd(a){var b=Sc(this,a)<<8;a=Vc(this,a)<<8;Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} function Zd(a){var b=Wc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function $d(){K(this,24,2);this.a-=25} -function ae(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function be(){K(this,16,4);this.a-=25}var ce=[0,7,7,10,7,11,9,13];function de(a){this.F=this.a;O(this,Uc(this,a));this.a=this.F-ce[this.c]}var ee=[0,14,14,17,14,18,16,20];function fe(a){this.F=this.a;var b=Uc(this,a);a=a>>6&7;Kc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.F-ee[this.c]}var ge=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function he(a){var b=Tc(this,a);this.F=this.a;R(this,Yc(this,a,b));this.a=this.F-ge[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,65535)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; +function ae(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function be(){K(this,16,4);this.a-=25}var ce=[0,7,7,10,7,11,9,13];function de(a){this.G=this.a;O(this,Uc(this,a));this.a=this.G-ce[this.c]}var ee=[0,14,14,17,14,18,16,20];function fe(a){this.G=this.a;var b=Uc(this,a);a=a>>6&7;Kc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.G-ee[this.c]}var ge=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function he(a){var b=Tc(this,a);this.G=this.a;R(this,Yc(this,a,b));this.a=this.G-ge[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,65535)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; function ke(a){var b=Wc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function qe(a){T(this,a,Tc(this,a),ud);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function re(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)}function se(){K(this,28,5);this.a-=5}function te(){this.u|=4;Fc(this,-2);this.a-=3}function ue(a){T(this,a,Tc(this,a),xd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function Ac(a){ve[a>>12].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a&15].call(this,a)}function Ee(a){Fe[a&15].call(this,a)} -function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)} +function re(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)}function se(){K(this,28,5);this.a-=5}function te(){this.I&&(this.I.Fa=this.g[0]);this.u|=4;Fc(this,-2);this.a-=3}function ue(a){T(this,a,Tc(this,a),xd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function Ac(a){ve[a>>12].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a&15].call(this,a)} +function Ee(a){Fe[a&15].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)} var ve=[function(a){Me[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,Y,function(a){Ne[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,Y,Y,Y],xe=[function(a){Gc(this,Yc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0, od);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Wc(this,a);Gc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Be=[function(a){T(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)}], Pe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,Y,Ce,Ee,re,re,re,re],Qe=[ae,te,ne,Td,be,me,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],De=[le,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Fe=[le,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ne=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,Y,Y,Y],He=[function(a){Gc(this, Xc(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)}],Je=[function(a){S(this,a,0,pd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Gc(this,a<<8);this.a-=this.c?4:3+(7== -this.b?2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} -var Re=[function(a){Se[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Se=[function(a){Ve[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,function(a){We[a>>6&3].call(this,a)},Y,Y],We=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Qc(this,a,0);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F= -this.a;Rc(this,a,0,b);R(this,b);this.a=this.F-je[this.c]},function(a){R(this,Yc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Lc(this);this.a-=13},function(){K(this,8,6)},Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie, -Ke,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.F-je[this.c]},Y]; -function Ze(a){x.call(this,"ROM",a,Ze);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.l=null);$e(c)})}}z(Ze);h=Ze.prototype; +this.b?2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} +var Re=[function(a){Se[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Se=[function(a){Ve[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,function(a){We[a>>6&3].call(this,a)},Y,Y],We=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.R);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Qc(this,a,0);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.G= +this.a;Rc(this,a,0,b);R(this,b);this.a=this.G-je[this.c]},function(a){R(this,Yc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Lc(this);this.a-=13},function(){K(this,8,6)},Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie, +Ke,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.G=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.G-je[this.c]},Y]; +function Ze(a){x.call(this,"ROM",a,Ze);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.l=null);$e(c)})}}z(Ze);h=Ze.prototype; h.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;$e(this)};h.ja=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ia=function(){return!0}; -function $e(a){if(!Va(a)){if(a.l){if(!a.c||!a.h)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[Ze.prototype.Xc,Ze.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.h,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Fb(a.h,b,a.b,fc)){for(c=0;c>1],c);if(cb(a.h,a,b,256,a.xa)){b=a.m=!0;break a}}else if(Fb(a.h,b,a.b,fc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[u++]&255);else p&1?G(a.a):Dc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.$a(p++,b[u++]&255);else p&1?G(a.a):Dc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Sb(e.a,e.aa))});this.da=Ub(52,4);this.P=Rb(this.a,function(){e.c|=128;e.c&64&&Sb(e.a,e.da)});cb(b,this,ff);F(this)}; -h.Mb=function(){if(!this.v){var a=rc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.wa)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ia=function(a){return a?this.save():!0};h.reset=function(){gf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return gf(this)};function gf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Tb(this.a,this.P,1E3/Math.round(this.I/10))}};var hf={},ff=(hf[65392]=[null,null,Z.prototype.Rc,Z.prototype.Kd,"RCSR"],hf[65394]=[null,null,Z.prototype.Qc,Z.prototype.Jd,"RBUF"],hf[65396]=[null,null,Z.prototype.ld,Z.prototype.de,"XCSR"],hf[65398]=[null,null,Z.prototype.kd,Z.prototype.ce,"XBUF"],hf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Sb(e.a,e.aa))});this.ba=Ub(52,4);this.O=Rb(this.a,function(){e.c|=128;e.c&64&&Sb(e.a,e.ba)});cb(b,this,ff);F(this)}; +h.Nb=function(){if(!this.v){var a=rc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.xa)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Nb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ia=function(a){return a?this.save():!0};h.reset=function(){gf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return gf(this)};function gf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.Bb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Tb(this.a,this.O,1E3/Math.round(this.I/10))}};var hf={},ff=(hf[65392]=[null,null,Z.prototype.Tc,Z.prototype.Md,"RCSR"],hf[65394]=[null,null,Z.prototype.Sc,Z.prototype.Ld,"RBUF"],hf[65396]=[null,null,Z.prototype.nd,Z.prototype.fe,"XCSR"],hf[65398]=[null,null,Z.prototype.md,Z.prototype.ee,"XBUF"],hf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&lf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;lf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=mf(a);var e=this;if((this.c=rc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Ub(56,4);this.R=Rb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.na,e,f),(e=ta(e,f))&&vf(a,b,c,d,e.K,e.fa,e.ea)); +function lf(a,b,c,d,e){if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;rf(a,b,c,d,!1,e)}else tf(a,!1)}function rf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.f!=d)g++,tf(a,!0),a.j.Ea?a.F("PC11 busy"):(e&&a.m++,uf(a,b,c,d,f)?g++:a.j.Ea=!0);g&&vf(a,a.C,a.i,a.f,a.K,a.fa,a.ea)} +function uf(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),vf(a,b,c,d,e),a.s="?");sf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.P;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.na,e,f),(e=ta(e,f))&&vf(a,b,c,d,e.K,e.fa,e.ea)); a.j.Ea=!1;a.m&&(a.m--,a.m||F(a));sf(a)})}function pf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +function Bf(a,b,c,d,e){var f=c;if(a.h)return!0;a.va=b;a.Da=c;a.Zb=q(c);a.h=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.V=e[0];a.Z=e[1];a.T=e[2];a.ga=e[3]||512;c=a.ga>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){Cf(a,b,c,d)})} -function Cf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Ra(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function Cf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.P;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Ra(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(k.length)if(1==k.length)t(k[0]);else{a.V=k.length;a.Z=k[0].length;a.T=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var D=n<<2,U=w.length;U>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ka+a.ba&&(a.ba+=f-(a.ka+a.ba)+1):(a.ka=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ca?f=a.ka+a.ca&&(a.ca+=f-(a.ka+a.ca)+1):(a.ka=f,a.ca=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.ua+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Ef(this,a++);)Gf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function Gf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Aa("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){t("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Hf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&If(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Ef(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Hf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Jf(this)};h.save=function(){return(new P(this)).data()}; -h.restore=function(a){return Jf(this,a[0])};function Mf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Of(a,e,b,c,!1,d)}else Nf(a,e)} -function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.ib=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Da=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.l&&xc(this.l)):a.ib=!1;a.sb&&(a.sb=!1,--this.s||F(this));Hf(this,a.xb)}; +h.ha=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;if((this.f=rc(this.l,"autoMount")||this.f)&&"string"==typeof this.f)try{this.f=eval("("+this.f+")")}catch(e){t("RL11 auto-mount error: "+e.message+" ("+this.f+")"),this.f=null}Jf(this);this.G=Ub(112,5);cb(b,this,Kf,2097152);Lf(this,"None","",!0);this.A&&Lf(this,"Local Disk","?");Lf(this,"Remote Disk","??");Mf(this)||F(this)}; +h.ja=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Kb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Hf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Jf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return Jf(this,a[0])};function Mf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Of(a,e,b,c,!1,d)}else Nf(a,e)} +function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.ub?a.F("RL11 busy"):(k.ub=!0,e&&(k.tb=!0,a.s++),k.kb=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.gc)&&g++));return g} +h.gc=function(a,b,c,d,e){var f;a.ub=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.da=b,a.va=c,a.Da=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.tb||e),this.l&&xc(this.l)):a.kb=!1;a.tb&&(a.tb=!1,--this.s||F(this));Hf(this,a.zb)}; function Lf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.xc=function(a,b,c,d,e,f,g){var k=0,l=a.ca,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Nb(this.h,f,u|w<<8);if(Qb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.sd=function(a,b,c,d,e,f,g){var k=0,l=a.ca,n=null,p;l||(k=5120,e=0);for(;e--;){var u=Mb(this.h,f);if(Qb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; -h.Nd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.V||f>=c.T?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; -var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Pf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Pf[63748]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Pf[63750]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Pf[63752]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Pf); -function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.j.O=!1;Rf(this,b);this.A=rc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Sf;this.v=null;this.m=this.I=!1;this.P=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.h=new vb({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Ua)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.zc=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.da.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.da.read(n,p++))||0>(w=a.da.read(n,p++))){k=5120;break}Nb(this.h,f,u|w<<8);if(Qb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.ud=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){var u=Mb(this.h,f);if(Qb(this.h)){k=8192;break}f+=2;if(!n){n=a.da.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.da.write(n,p++,u&255)||!a.da.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Wc=function(){return this.L&65535}; +h.Pd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.zc;case 10:b||(b=this.ud),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.V||f>=c.T?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.hc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.G))}};h.Uc=function(){return this.v};h.Nd=function(a){this.v=a&65534};h.Xc=function(){return this.c};h.Qd=function(a){this.c=a};h.Yc=function(){return this.m};h.Rd=function(a){this.m=a};h.Vc=function(){return this.w};h.Od=function(a){this.w=a&63}; +var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLCS"],Pf[63746]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLBA"],Pf[63748]=[null,null,N.prototype.Xc,N.prototype.Qd,"RLDA"],Pf[63750]=[null,null,N.prototype.Yc,N.prototype.Rd,"RLMP"],Pf[63752]=[null,null,N.prototype.Vc,N.prototype.Od,"RLBE"],Pf); +function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.j.P=!1;Rf(this,b);this.w=rc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Sf;this.s=null;this.i=this.G=!1;this.O=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.h=new vb({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.I=Ta("Panel",this.id))&&this.I.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bSf){if(Uf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Uf(this.i)&&(Zf(this,d),a=2,$f(this.i));this.i.set("timestamp",sa());ag(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Yf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.U(f+": "+g),$f(d),Uf(d)?(c=Yf(d),e=!0):c=!1))}e&&Xf(this,c?d:null)}else 2==a&&d.clear()}else Xf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.va(),this.a.Ta());this.F&&(Zf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; -function Zf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function dg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(var d=0;dSf){if(Uf(d,this.s)){this.f=new P(this,"1.30.3","failsafe");Uf(this.f)&&(Zf(this,d),a=2,$f(this.f));this.f.set("timestamp",sa());ag(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Yf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.U(f+": "+g),$f(d),Uf(d)?(c=Yf(d),e=!0):c=!1))}e&&Xf(this,c?d:null)}else 2==a&&d.clear()}else Xf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.wa(),this.a.Va());this.C&&(Zf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; +function Zf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function dg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.P=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.v+=a))){for(var d=0;d