From 08b81a8739cec366779bdfa9e55ec3183d1698d3 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 26 Nov 2016 13:51:29 -0800 Subject: [PATCH] All attempted diagnostic tests pass now (including EKBBF0) --- apps/pdp11/boot/monitor/BOOTMON.json | 202 ++-- apps/pdp11/boot/monitor/BOOTMON.mac | 1 + apps/pdp11/boot/monitor/BOOTMON.txt | 1415 +++++++++++++------------ apps/pdp11/boot/monitor/README.md | 25 +- disks/dec/rl02k/xxdp/ekbbf0/README.md | 3 + modules/pdp11/lib/device.js | 1 + versions/pdpjs/1.30.4/pdp11-dbg.js | 481 ++++----- versions/pdpjs/1.30.4/pdp11.js | 144 +-- 8 files changed, 1144 insertions(+), 1128 deletions(-) diff --git a/apps/pdp11/boot/monitor/BOOTMON.json b/apps/pdp11/boot/monitor/BOOTMON.json index a25e4ff03..6f8bba6aa 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.json +++ b/apps/pdp11/boot/monitor/BOOTMON.json @@ -2,8 +2,8 @@ "exec":0xC000/*140000*/, "words":[ 0x0005/*000005*/,0x0A1F/*005037*/,0xFFFE/*177776*/,0x15C6/*012706*/,0xC000/*140000*/,0x0A1F/*005037*/,0xFF74/*177564*/,0x15C0/*012700*/, -0xC25E/*141136*/,0x09F7/*004767*/,0x0052/*000122*/,0x15DF/*012737*/,0xC054/*140124*/,0x0040/*000100*/,0x15DF/*012737*/,0x00E0/*000340*/, -0x0042/*000102*/,0x55DF/*052737*/,0x0040/*000100*/,0xFF66/*177546*/,0x15C0/*012700*/,0xC276/*141166*/,0x09F7/*004767*/,0x0038/*000070*/, +0xC264/*141144*/,0x09F7/*004767*/,0x0052/*000122*/,0x15DF/*012737*/,0xC054/*140124*/,0x0040/*000100*/,0x15DF/*012737*/,0x00E0/*000340*/, +0x0042/*000102*/,0x55DF/*052737*/,0x0040/*000100*/,0xFF66/*177546*/,0x15C0/*012700*/,0xC27C/*141174*/,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*/, @@ -13,103 +13,103 @@ 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*/,0xC227/*141047*/,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*/,0xC224/*141044*/,0x09F7/*004767*/,0xFF0C/*177414*/,0xB5DF/*132737*/,0x0040/*000100*/, -0xFF74/*177564*/,0x02FC/*001374*/,0x0A04/*005004*/,0x15C3/*012703*/,0xC22B/*141053*/,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*/,0xC24C/*141114*/,0x09F7/*004767*/,0xFEC0/*177300*/,0x0A37/*005067*/,0xFEF6/*177366*/,0x15C0/*012700*/,0xC276/*141166*/, -0x09F7/*004767*/,0xFEB4/*177264*/,0x1584/*012604*/,0x1583/*012603*/,0x1582/*012602*/,0x1581/*012601*/,0x1580/*012600*/,0x0002/*000002*/, -0xC5AE/*142656*/,0xC2C4/*141304*/,0xC2D0/*141320*/,0xC316/*141426*/,0xC47A/*142172*/,0xC2BA/*141272*/,0x4F43/*047503*/,0x4D4D/*046515*/, -0x4E41/*047101*/,0x5344/*051504*/,0x4120/*040440*/,0x4552/*042522*/,0x4220/*041040*/,0x4F4F/*047517*/,0x2C54/*026124*/,0x4820/*044040*/, -0x4C41/*046101*/,0x2C54/*026124*/,0x5420/*052040*/,0x5345/*051505*/,0x2C54/*026124*/,0x4420/*042040*/,0x4149/*040511*/,0x2C47/*026107*/, -0x4C20/*046040*/,0x4749/*043511*/,0x5448/*052110*/,0x2053/*020123*/,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*/,0x4944/*044504*/,0x4741/*043501*/,0x4C00/*046000*/, -0x4749/*043511*/,0x5448/*052110*/,0x0053/*000123*/,0x4548/*042510*/,0x504C/*050114*/,0x0000/*000000*/,0x4E55/*047125*/,0x4E4B/*047113*/, -0x574F/*053517*/,0x204E/*020116*/,0x4F43/*047503*/,0x4D4D/*046515*/,0x4E41/*047101*/,0x0A44/*005104*/,0x000D/*000015*/,0x4450/*042120*/, -0x2D50/*026520*/,0x3131/*030461*/,0x4D20/*046440*/,0x4E4F/*047117*/,0x5449/*052111*/,0x524F/*051117*/,0x5620/*053040*/,0x2E31/*027061*/, -0x0A30/*005060*/,0x0A0D/*005015*/,0x000D/*000015*/,0x4F42/*047502*/,0x544F/*052117*/,0x203E/*020076*/,0x5500/*052400*/,0x4B4E/*045516*/, -0x4F4E/*047516*/,0x4E57/*047127*/,0x4220/*041040*/,0x4F4F/*047517*/,0x2054/*020124*/,0x4544/*042504*/,0x4956/*044526*/,0x4543/*042503*/, -0x0D0A/*006412*/,0x2000/*020000*/,0x2020/*020040*/,0x2020/*020040*/,0x4320/*041440*/,0x4F4C/*047514*/,0x4B43/*045503*/,0x5420/*052040*/, -0x4349/*041511*/,0x534B/*051513*/,0x0D0A/*006412*/,0x2000/*020000*/,0x2020/*020040*/,0x2020/*020040*/,0x4920/*044440*/,0x4554/*042524*/, -0x4152/*040522*/,0x4954/*044524*/,0x4E4F/*047117*/,0x0A53/*005123*/,0x000D/*000015*/,0x15C0/*012700*/,0xC1CC/*140714*/,0x09F7/*004767*/, -0xFDA6/*176646*/,0x0087/*000207*/,0x0000/*000000*/,0x15C0/*012700*/,0xC224/*141044*/,0x09F7/*004767*/,0xFD9A/*176632*/,0x0087/*000207*/, -0x0A37/*005067*/,0xFD7E/*176576*/,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*/,0xC298/*141230*/,0x1DC3/*016703*/,0xFD54/*176524*/,0x0A02/*005002*/, -0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/,0x1083/*010203*/,0x02F8/*001370*/,0x09F7/*004767*/, -0xFD56/*176526*/,0x0087/*000207*/,0x0000/*000000*/,0x0A37/*005067*/,0xFFFA/*177772*/,0x0A37/*005067*/,0xFD34/*176464*/,0x0A05/*005005*/, -0x8104/*100404*/,0x8503/*102403*/,0x8202/*101002*/,0x0501/*002401*/,0x8301/*101401*/,0x0000/*000000*/,0x0AC5/*005305*/,0x8003/*100003*/, -0x0302/*001402*/,0x0401/*002001*/,0x0701/*003401*/,0x0000/*000000*/,0x0C05/*006005*/,0x8402/*102002*/,0x8601/*103001*/,0x0201/*001001*/, -0x0000/*000000*/,0x95DF/*112737*/,0x000F/*000017*/,0xFFFE/*177776*/,0x8004/*100004*/,0x8403/*102003*/,0x0502/*002402*/,0x8201/*101001*/, -0x8101/*100401*/,0x0000/*000000*/,0x15C3/*012703*/,0x7FFF/*077777*/,0x65C3/*062703*/,0x7FFF/*077777*/,0xA7D7/*123727*/,0xFFFE/*177776*/, -0x0005/*000005*/,0x0201/*001001*/,0x0000/*000000*/,0x95C4/*112704*/,0x03C0/*001700*/,0x8003/*100003*/,0x2117/*020427*/,0xFFC0/*177700*/, -0x0301/*001401*/,0x0000/*000000*/,0x8A04/*105004*/,0x2117/*020427*/,0xFF00/*177400*/,0x0301/*001401*/,0x0000/*000000*/,0x15C5/*012705*/, -0xAAAA/*125252*/,0x1140/*010500*/,0x1001/*010001*/,0x1042/*010102*/,0x1083/*010203*/,0x10C4/*010304*/,0x1105/*010405*/,0xE141/*160501*/, -0x0501/*002401*/,0x0301/*001401*/,0x0000/*000000*/,0x0C42/*006102*/,0x8601/*103001*/,0x0501/*002401*/,0x0000/*000000*/,0x6083/*060203*/, -0x0A83/*005203*/,0x0A43/*005103*/,0x60C1/*060301*/,0x8701/*103401*/,0x0701/*003401*/,0x0000/*000000*/,0x0C04/*006004*/,0x5103/*050403*/, -0x6143/*060503*/,0x0A83/*005203*/,0x8702/*103402*/,0x0AC1/*005301*/,0x0501/*002401*/,0x0000/*000000*/,0x0A40/*005100*/,0x8301/*101401*/, -0x0000/*000000*/,0x4001/*040001*/,0x6041/*060101*/,0x0601/*003001*/,0x0701/*003401*/,0x0000/*000000*/,0x00C1/*000301*/,0x2057/*020127*/, -0x5455/*052125*/,0x0204/*001004*/,0x3105/*030405*/,0x0602/*003002*/,0x0A45/*005105*/,0x0201/*001001*/,0x0000/*000000*/,0x95C0/*112700*/, -0xFF01/*177401*/,0x8001/*100001*/,0x0000/*000000*/,0x7E02/*077002*/,0x0A01/*005001*/,0x0A81/*005201*/,0x7E02/*077002*/,0x0BC0/*005700*/, -0x0202/*001002*/,0x0BC1/*005701*/,0x0301/*001401*/,0x0000/*000000*/,0x15C7/*012707*/,0xC3FE/*141776*/,0x0000/*000000*/,0x0BD7/*005727*/, -0x0000/*000000*/,0x15E6/*012746*/,0xC40A/*142012*/,0x0087/*000207*/,0x0000/*000000*/,0x0A26/*005046*/,0x15E6/*012746*/,0xC414/*142024*/, -0x0002/*000002*/,0x0000/*000000*/,0x005F/*000137*/,0xC41A/*142032*/,0x0000/*000000*/,0x15C5/*012705*/,0x0003/*000003*/,0x0A1F/*005037*/, -0x0006/*000006*/,0x15DF/*012737*/,0xC42C/*142054*/,0x0004/*000004*/,0x0BE5/*005745*/,0x0000/*000000*/,0x65C6/*062706*/,0x0004/*000004*/, -0x0A00/*005000*/,0x15C1/*012701*/,0x0FFF/*007777*/,0x1002/*010002*/,0x65C2/*062702*/,0x0005/*000005*/,0x2432/*022062*/,0xFFFB/*177773*/, -0x0302/*001402*/,0x0000/*000000*/,0x0000/*000000*/,0x7E49/*077111*/,0x0AB7/*005267*/,0xFEC8/*177310*/,0x8601/*103001*/,0x0000/*000000*/, -0x2DD7/*026727*/,0xFBFE/*175776*/,0x0480/*002200*/,0x8202/*101002*/,0x0077/*000167*/,0xFEC2/*177302*/,0x15C0/*012700*/,0xC2AC/*141254*/, -0x1DC3/*016703*/,0xFEB0/*177260*/,0x0A02/*005002*/,0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/, -0x1083/*010203*/,0x02F8/*001370*/,0x09F7/*004767*/,0xFBF0/*175760*/,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*/,0xC50A/*142412*/,0x14A6/*012246*/,0x0D93/*006623*/,0x2097/*020227*/,0xC5AE/*142656*/, -0x87FB/*103773*/,0x15F7/*012767*/,0x4080/*040200*/,0xFB48/*175510*/,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*/,0xC27D/*141175*/,0x09F7/*004767*/,0xFAA0/*175240*/,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*/, -0xC24C/*141114*/,0x09F7/*004767*/,0xFA52/*175122*/,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*/] +0x1026/*010046*/,0x97C0/*113700*/,0xFF72/*177562*/,0x45DF/*042737*/,0x00E0/*000340*/,0xFFFE/*177776*/,0xA017/*120027*/,0x000D/*000015*/, +0x032D/*001455*/,0xA017/*120027*/,0x007F/*000177*/,0x0303/*001403*/,0xA017/*120027*/,0x0008/*000010*/,0x020A/*001012*/,0x0BF7/*005767*/, +0xFFC0/*177700*/,0x0306/*001406*/,0x0AF7/*005367*/,0xFFBA/*177672*/,0x15C0/*012700*/,0xC22D/*141055*/,0x09F7/*004767*/,0xFF78/*177570*/, +0x012B/*000453*/,0xA017/*120027*/,0x0020/*000040*/,0x0528/*002450*/,0xA017/*120027*/,0x007F/*000177*/,0x0425/*002045*/,0x09F7/*004767*/, +0xFF58/*177530*/,0xA017/*120027*/,0x007A/*000172*/,0x0605/*003005*/,0xA017/*120027*/,0x0061/*000141*/,0x0502/*002402*/,0xC5C0/*142700*/, +0x0020/*000040*/,0x2DD7/*026727*/,0xFF8C/*177614*/,0x00AC/*000254*/,0x0417/*002027*/,0x9026/*110046*/,0x1DC0/*016700*/,0xFF80/*177600*/, +0x6DC0/*066700*/,0xFF7E/*177576*/,0x9588/*112610*/,0x0AB7/*005267*/,0xFF78/*177570*/,0x010E/*000416*/,0x1DC0/*016700*/,0xFF70/*177560*/, +0x6DC0/*066700*/,0xFF6E/*177556*/,0x8A08/*105010*/,0x15DF/*012737*/,0xC14C/*140514*/,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*/,0xC22A/*141052*/,0x09F7/*004767*/, +0xFF06/*177406*/,0xB5DF/*132737*/,0x0040/*000100*/,0xFF74/*177564*/,0x02FC/*001374*/,0x0A04/*005004*/,0x15C3/*012703*/,0xC231/*141061*/, +0x94C0/*112300*/,0x0319/*001431*/,0x1DC2/*016702*/,0xFF28/*177450*/,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*/,0xC1C6/*140706*/,0x0104/*000404*/,0x15C0/*012700*/,0xC252/*141122*/,0x09F7/*004767*/,0xFEBA/*177272*/,0x0A37/*005067*/, +0xFEF0/*177360*/,0x15C0/*012700*/,0xC27C/*141174*/,0x09F7/*004767*/,0xFEAE/*177256*/,0x1584/*012604*/,0x1583/*012603*/,0x1582/*012602*/, +0x1581/*012601*/,0x1580/*012600*/,0x0002/*000002*/,0xC5B4/*142664*/,0xC2CA/*141312*/,0xC2D6/*141326*/,0xC31C/*141434*/,0xC480/*142200*/, +0xC2C0/*141300*/,0x4F43/*047503*/,0x4D4D/*046515*/,0x4E41/*047101*/,0x5344/*051504*/,0x4120/*040440*/,0x4552/*042522*/,0x4220/*041040*/, +0x4F4F/*047517*/,0x2C54/*026124*/,0x4820/*044040*/,0x4C41/*046101*/,0x2C54/*026124*/,0x5420/*052040*/,0x5345/*051505*/,0x2C54/*026124*/, +0x4420/*042040*/,0x4149/*040511*/,0x2C47/*026107*/,0x4C20/*046040*/,0x4749/*043511*/,0x5448/*052110*/,0x2053/*020123*/,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*/, +0x4944/*044504*/,0x4741/*043501*/,0x4C00/*046000*/,0x4749/*043511*/,0x5448/*052110*/,0x0053/*000123*/,0x4548/*042510*/,0x504C/*050114*/, +0x0000/*000000*/,0x4E55/*047125*/,0x4E4B/*047113*/,0x574F/*053517*/,0x204E/*020116*/,0x4F43/*047503*/,0x4D4D/*046515*/,0x4E41/*047101*/, +0x0A44/*005104*/,0x000D/*000015*/,0x4450/*042120*/,0x2D50/*026520*/,0x3131/*030461*/,0x4D20/*046440*/,0x4E4F/*047117*/,0x5449/*052111*/, +0x524F/*051117*/,0x5620/*053040*/,0x2E31/*027061*/,0x0A30/*005060*/,0x0A0D/*005015*/,0x000D/*000015*/,0x4F42/*047502*/,0x544F/*052117*/, +0x203E/*020076*/,0x5500/*052400*/,0x4B4E/*045516*/,0x4F4E/*047516*/,0x4E57/*047127*/,0x4220/*041040*/,0x4F4F/*047517*/,0x2054/*020124*/, +0x4544/*042504*/,0x4956/*044526*/,0x4543/*042503*/,0x0D0A/*006412*/,0x2000/*020000*/,0x2020/*020040*/,0x2020/*020040*/,0x4320/*041440*/, +0x4F4C/*047514*/,0x4B43/*045503*/,0x5420/*052040*/,0x4349/*041511*/,0x534B/*051513*/,0x0D0A/*006412*/,0x2000/*020000*/,0x2020/*020040*/, +0x2020/*020040*/,0x4920/*044440*/,0x4554/*042524*/,0x4152/*040522*/,0x4954/*044524*/,0x4E4F/*047117*/,0x0A53/*005123*/,0x000D/*000015*/, +0x15C0/*012700*/,0xC1D2/*140722*/,0x09F7/*004767*/,0xFDA0/*176640*/,0x0087/*000207*/,0x0000/*000000*/,0x15C0/*012700*/,0xC22A/*141052*/, +0x09F7/*004767*/,0xFD94/*176624*/,0x0087/*000207*/,0x0A37/*005067*/,0xFD78/*176570*/,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*/,0xC29E/*141236*/, +0x1DC3/*016703*/,0xFD4E/*176516*/,0x0A02/*005002*/,0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/, +0x1083/*010203*/,0x02F8/*001370*/,0x09F7/*004767*/,0xFD50/*176520*/,0x0087/*000207*/,0x0000/*000000*/,0x0A37/*005067*/,0xFFFA/*177772*/, +0x0A37/*005067*/,0xFD2E/*176456*/,0x0A05/*005005*/,0x8104/*100404*/,0x8503/*102403*/,0x8202/*101002*/,0x0501/*002401*/,0x8301/*101401*/, +0x0000/*000000*/,0x0AC5/*005305*/,0x8003/*100003*/,0x0302/*001402*/,0x0401/*002001*/,0x0701/*003401*/,0x0000/*000000*/,0x0C05/*006005*/, +0x8402/*102002*/,0x8601/*103001*/,0x0201/*001001*/,0x0000/*000000*/,0x95DF/*112737*/,0x000F/*000017*/,0xFFFE/*177776*/,0x8004/*100004*/, +0x8403/*102003*/,0x0502/*002402*/,0x8201/*101001*/,0x8101/*100401*/,0x0000/*000000*/,0x15C3/*012703*/,0x7FFF/*077777*/,0x65C3/*062703*/, +0x7FFF/*077777*/,0xA7D7/*123727*/,0xFFFE/*177776*/,0x0005/*000005*/,0x0201/*001001*/,0x0000/*000000*/,0x95C4/*112704*/,0x03C0/*001700*/, +0x8003/*100003*/,0x2117/*020427*/,0xFFC0/*177700*/,0x0301/*001401*/,0x0000/*000000*/,0x8A04/*105004*/,0x2117/*020427*/,0xFF00/*177400*/, +0x0301/*001401*/,0x0000/*000000*/,0x15C5/*012705*/,0xAAAA/*125252*/,0x1140/*010500*/,0x1001/*010001*/,0x1042/*010102*/,0x1083/*010203*/, +0x10C4/*010304*/,0x1105/*010405*/,0xE141/*160501*/,0x0501/*002401*/,0x0301/*001401*/,0x0000/*000000*/,0x0C42/*006102*/,0x8601/*103001*/, +0x0501/*002401*/,0x0000/*000000*/,0x6083/*060203*/,0x0A83/*005203*/,0x0A43/*005103*/,0x60C1/*060301*/,0x8701/*103401*/,0x0701/*003401*/, +0x0000/*000000*/,0x0C04/*006004*/,0x5103/*050403*/,0x6143/*060503*/,0x0A83/*005203*/,0x8702/*103402*/,0x0AC1/*005301*/,0x0501/*002401*/, +0x0000/*000000*/,0x0A40/*005100*/,0x8301/*101401*/,0x0000/*000000*/,0x4001/*040001*/,0x6041/*060101*/,0x0601/*003001*/,0x0701/*003401*/, +0x0000/*000000*/,0x00C1/*000301*/,0x2057/*020127*/,0x5455/*052125*/,0x0204/*001004*/,0x3105/*030405*/,0x0602/*003002*/,0x0A45/*005105*/, +0x0201/*001001*/,0x0000/*000000*/,0x95C0/*112700*/,0xFF01/*177401*/,0x8001/*100001*/,0x0000/*000000*/,0x7E02/*077002*/,0x0A01/*005001*/, +0x0A81/*005201*/,0x7E02/*077002*/,0x0BC0/*005700*/,0x0202/*001002*/,0x0BC1/*005701*/,0x0301/*001401*/,0x0000/*000000*/,0x15C7/*012707*/, +0xC404/*142004*/,0x0000/*000000*/,0x0BD7/*005727*/,0x0000/*000000*/,0x15E6/*012746*/,0xC410/*142020*/,0x0087/*000207*/,0x0000/*000000*/, +0x0A26/*005046*/,0x15E6/*012746*/,0xC41A/*142032*/,0x0002/*000002*/,0x0000/*000000*/,0x005F/*000137*/,0xC420/*142040*/,0x0000/*000000*/, +0x15C5/*012705*/,0x0003/*000003*/,0x0A1F/*005037*/,0x0006/*000006*/,0x15DF/*012737*/,0xC432/*142062*/,0x0004/*000004*/,0x0BE5/*005745*/, +0x0000/*000000*/,0x65C6/*062706*/,0x0004/*000004*/,0x0A00/*005000*/,0x15C1/*012701*/,0x0FFF/*007777*/,0x1002/*010002*/,0x65C2/*062702*/, +0x0005/*000005*/,0x2432/*022062*/,0xFFFB/*177773*/,0x0302/*001402*/,0x0000/*000000*/,0x0000/*000000*/,0x7E49/*077111*/,0x0AB7/*005267*/, +0xFEC8/*177310*/,0x8601/*103001*/,0x0000/*000000*/,0x2DD7/*026727*/,0xFBF8/*175770*/,0x0480/*002200*/,0x8202/*101002*/,0x0077/*000167*/, +0xFEC2/*177302*/,0x15C0/*012700*/,0xC2B2/*141262*/,0x1DC3/*016703*/,0xFEB0/*177260*/,0x0A02/*005002*/,0x7297/*071227*/,0x0008/*000010*/, +0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/,0x1083/*010203*/,0x02F8/*001370*/,0x09F7/*004767*/,0xFBEA/*175752*/,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*/,0xC510/*142420*/,0x14A6/*012246*/, +0x0D93/*006623*/,0x2097/*020227*/,0xC5B4/*142664*/,0x87FB/*103773*/,0x15F7/*012767*/,0x4080/*040200*/,0xFB42/*175502*/,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*/,0xC283/*141203*/,0x09F7/*004767*/,0xFA9A/*175232*/,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*/,0xC252/*141122*/,0x09F7/*004767*/,0xFA4C/*175114*/,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 983dbad02..3143d42c8 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.mac +++ b/apps/pdp11/boot/monitor/BOOTMON.mac @@ -87,6 +87,7 @@ INPUT: INPAST: MOV R0,-(SP) MOVB @#DL11RBUF,R0 + BIC #340,@#PSW ; HACK TO PERMIT XBUF INTERRUPTS WHILE RBUF INTERRUPT HANDLER STILL RUNNING CMPB R0,#15 BEQ 7$ ; CARRIAGE RETURN CMPB R0,#127. diff --git a/apps/pdp11/boot/monitor/BOOTMON.txt b/apps/pdp11/boot/monitor/BOOTMON.txt index beee4dfe3..417ed63b7 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.txt +++ b/apps/pdp11/boot/monitor/BOOTMON.txt @@ -3,715 +3,720 @@ 3 ; REBASE HIGHER LINK/BOT:140000 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? 5 - 6 177776 PSW = 177776 - 7 177564 DL11XCSR = 177564 - 8 000064 DL11VEC = 64 - 9 - 10 177546 KW11LKS = 177546 - 11 000100 KW11VEC = 100 - 12 - 13 .ASECT - 14 140000 .=140000 - 15 140000 000005 START: RESET - 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 141136 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 141166 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 + 6 177546 KW11LKS = 177546 + 7 000100 KW11VEC = 100 + 8 + 9 177560 DL11RCSR = 177560 + 10 177562 DL11RBUF = 177562 + 11 177564 DL11XCSR = 177564 + 12 177566 DL11XBUF = 177566 + 13 000064 DL11VEC = 64 + 14 + 15 177776 PSW = 177776 + 16 + 17 .ASECT + 18 140000 .=140000 + 19 140000 000005 START: RESET + 20 140002 005037 177776 CLR @#PSW + 21 140006 012706 140000 MOV #START,SP + 22 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR + 23 140016 012700 141144 MOV #BANNER,R0 + 24 140022 004767 140150' JSR PC,PRINT + 25 140026 012737 140124 000100 MOV #CLKAST,@#KW11VEC + 26 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 + 27 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING + 28 + 29 140050 012700 141174 MOV #PROMPT,R0 + 30 140054 004767 140150' JSR PC,PRINT + 31 140060 162706 000256 SUB #256,SP + 32 140064 010600 MOV SP,R0 + 33 140066 004767 140244' JSR PC,INPUT + 34 140072 005000 CLR R0 + 35 140074 000001 1$: WAIT + 36 140076 005200 INC R0 + 37 140100 005767 140120' TST LGHTON + 38 140104 001773 BEQ 1$ + 39 140106 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG + 40 140112 016746 140120' MOV LGHTON,-(SP) ; CALL SUPER LOOP START + 41 140116 000002 RTI + 42 + 43 140120 000000 LGHTON: .WORD 0 + 44 140122 000000 CLKTIC: .WORD 0 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 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 141047 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 141044 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 141053 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 141114 13$: MOV #UNKMSG,R0 - 164 140644 004767 140150' JSR PC,PRINT - 165 - 166 140650 005067 140242' 15$: CLR LENGTH - 167 140654 012700 141166 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 142656 141304 141320 CMDTBL: .WORD BOOT,HALT,TEST,DIAG,LIGHTS,HELP - 140706 141426 142172 141272 - 178 140714 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, TEST, DIAG, LIGHTS AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> - 140717 115 101 116 - 140722 104 123 040 - 140725 101 122 105 - 140730 040 102 117 - 140733 117 124 054 - 140736 040 110 101 - 140741 114 124 054 - 140744 040 124 105 - 140747 123 124 054 - 140752 040 104 111 - 140755 101 107 054 - 140760 040 114 111 - 140763 107 110 124 - 140766 123 040 101 - 140771 116 104 040 - 140774 110 105 114 - 140777 120 015 012 - 141002 102 117 117 - 141005 124 040 104 - 141010 105 126 111 - 141013 103 105 123 - 141016 040 101 122 - 141021 105 040 122 - 141024 113 077 040 - 141027 122 114 077 - 141032 040 117 122 - 141035 040 122 120 - 141040 077 015 012 - 141043 000 - 179 141044 015 012 000 EOL: .BYTE 15,12,0 - 180 141047 010 040 010 DEL: .BYTE 10,40,10,0 - 141052 000 - 181 141053 102 117 117 CMDLST: .ASCIZ 'BOOT' - 141056 124 000 - 182 141060 110 101 114 .ASCIZ 'HALT' - 141063 124 000 - 183 141065 124 105 123 .ASCIZ 'TEST' - 141070 124 000 - 184 141072 104 111 101 .ASCIZ 'DIAG' - 141075 107 000 - 185 141077 114 111 107 .ASCIZ 'LIGHTS' - 141102 110 124 123 - 141105 000 - 186 141106 110 105 114 .ASCIZ 'HELP' - 141111 120 000 - 187 141113 000 .BYTE 0 - 188 141114 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> - 141117 116 117 127 - 141122 116 040 103 - 141125 117 115 115 - 141130 101 116 104 - 141133 012 015 000 - 189 141136 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> - 141141 055 061 061 - 141144 040 115 117 - 141147 116 111 124 - 141152 117 122 040 - 141155 126 061 056 - 141160 060 012 015 - 141163 012 015 000 - 190 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> - 191 141166 102 117 117 PROMPT: .ASCIZ 'BOOT> ' - 141171 124 076 040 - 141174 000 - 192 141175 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> - 141200 116 117 127 - 141203 116 040 102 - 141206 117 117 124 - 141211 040 104 105 - 141214 126 111 103 - 141217 105 012 015 - 141222 000 - 193 141223 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> - 141226 040 040 040 - 141231 103 114 117 - 141234 103 113 040 - 141237 124 111 103 - 141242 113 123 012 - 141245 015 000 - 194 141247 040 040 040 LOOMSG: .ASCIZ ' ITERATIONS'<12><15> - 141252 040 040 040 - 141255 111 124 105 - 141260 122 101 124 - 141263 111 117 116 - 141266 123 012 015 - 141271 000 - 195 - 196 .EVEN - 197 - 198 HELP: - 199 141272 012700 140714 MOV #HLPMSG,R0 - 200 141276 004767 140150' JSR PC,PRINT - 201 141302 000207 RTS PC + 46 CLKAST: + 47 140124 005267 140122' INC CLKTIC + 48 140130 000002 RTI + 49 + 50 ONECHR: + 51 140132 105737 177564 TSTB @#DL11XCSR + 52 140136 100375 BPL ONECHR + 53 140140 110037 177566 MOVB R0,@#DL11XBUF + 54 140144 000207 RTS PC + 55 + 56 140146 000000 PRTPTR: .WORD 0 + 57 + 58 PRINT: + 59 140150 132737 000100 177564 BITB #100,@#DL11XCSR + 60 140156 001374 BNE PRINT + 61 140160 010067 140146' MOV R0,PRTPTR + 62 140164 012737 140210 000064 MOV #PRTAST,@#DL11VEC + 63 140172 012737 000200 000066 MOV #200,@#DL11VEC+2 + 64 140200 152737 000100 177564 BISB #100,@#DL11XCSR + 65 140206 000207 RTS PC + 66 + 67 PRTAST: + 68 140210 105777 140146' TSTB @PRTPTR + 69 140214 001406 BEQ 2$ + 70 140216 117737 140146' 177566 MOVB @PRTPTR,@#DL11XBUF + 71 140224 005267 140146' INC PRTPTR + 72 140230 000002 RTI + 73 140232 105037 177564 2$: CLRB @#DL11XCSR + 74 140236 000002 RTI + 75 + 76 140240 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER + 77 140242 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH + 78 + 79 INPUT: + 80 140244 010067 140240' MOV R0,BUFFER + 81 140250 005067 140242' CLR LENGTH + 82 140254 012737 140300 000060 MOV #INPAST,@#60 + 83 140262 012737 000200 000062 MOV #200,@#62 + 84 140270 152737 000100 177560 BISB #100,@#DL11RCSR + 85 140276 000207 RTS PC + 86 + 87 INPAST: + 88 140300 010046 MOV R0,-(SP) + 89 140302 113700 177562 MOVB @#DL11RBUF,R0 + 90 140306 042737 000340 177776 BIC #340,@#PSW ; HACK TO PERMIT XBUF INTERRUPTS WHILE RBUF INTERRUPT HANDLER STILL RUNNING + 91 140314 120027 000015 CMPB R0,#15 + 92 140320 001455 BEQ 7$ ; CARRIAGE RETURN + 93 140322 120027 000177 CMPB R0,#127. + 94 140326 001403 BEQ 2$ ; + 95 140330 120027 000010 CMPB R0,#10 + 96 140334 001012 BNE 4$ ; BACK SPACE + 97 140336 005767 140242' 2$: TST LENGTH ; DATA IN BUFFER? + 98 140342 001406 BEQ 3$ + 99 140344 005367 140242' DEC LENGTH ; LENGTH + 100 140350 012700 141055 MOV #DEL,R0 + 101 140354 004767 140150' JSR PC,PRINT + 102 140360 000453 3$: BR 9$ + 103 140362 120027 000040 4$: CMPB R0,#40 + 104 140366 002450 BLT 9$ ; BELOW SPACE + 105 140370 120027 000177 CMPB R0,#177 + 106 140374 002045 BGE 9$ ; SKIP STUFF TOO BIG + 107 140376 004767 140132' JSR PC,ONECHR ; ECHO CHAR + 108 140402 120027 000172 CMPB R0,#172 + 109 140406 003005 BGT 5$ ; ABOVE Z + 110 140410 120027 000141 CMPB R0,#141 + 111 140414 002402 BLT 5$ ; BELOW A + 112 140416 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE + 113 140422 026727 140242' 000254 5$: CMP LENGTH,#254 + 114 140430 002027 BGE 9$ + 115 140432 110046 MOVB R0,-(SP) + 116 140434 016700 140240' MOV BUFFER,R0 + 117 140440 066700 140242' ADD LENGTH,R0 + 118 140444 112610 MOVB (SP)+,(R0) + 119 140446 005267 140242' INC LENGTH + 120 140452 000416 BR 9$ + 121 + 122 140454 016700 140240' 7$: MOV BUFFER,R0 + 123 140460 066700 140242' ADD LENGTH,R0 + 124 140464 105010 CLRB (R0) + 125 140466 012737 140514 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 + 126 140474 012737 000100 000242 MOV #100,@#242 + 127 140502 012737 002000 177772 MOV #2000,@#177772 + 128 140510 012600 9$: MOV (SP)+,R0 + 129 140512 000002 RTI + 130 + 131 CMD: + 132 140514 005037 177772 CLR @#177772 ; NO MORE PIR CALLS + 133 140520 010046 MOV R0,-(SP) + 134 140522 010146 MOV R1,-(SP) + 135 140524 010246 MOV R2,-(SP) + 136 140526 010346 MOV R3,-(SP) + 137 140530 010446 MOV R4,-(SP) + 138 140532 012700 141052 MOV #EOL,R0 + 139 140536 004767 140150' JSR PC,PRINT + 140 140542 132737 000100 177564 1$: BITB #100,@#DL11XCSR + 141 140550 001374 BNE 1$ + 142 140552 005004 CLR R4 + 143 140554 012703 141061 MOV #CMDLST,R3 ; CMD LIST + 144 140560 112300 3$: MOVB (R3)+,R0 + 145 140562 001431 BEQ 13$ + 146 140564 016702 140240' MOV BUFFER,R2 ; USER CMD + 147 140570 112201 4$: MOVB (R2)+,R1 + 148 140572 001431 BEQ 15$ ; NULL COMMAND? + 149 140574 120127 000040 CMPB R1,#40 + 150 140600 001773 BEQ 4$ ; SKIP SPACE + 151 140602 120001 5$: CMPB R0,R1 + 152 140604 001010 BNE 7$ + 153 140606 112300 MOVB (R3)+,R0 + 154 140610 001412 BEQ 9$ + 155 140612 112201 MOVB (R2)+,R1 + 156 140614 001410 BEQ 9$ + 157 140616 120127 000040 CMPB R1,#40 + 158 140622 001367 BNE 5$ + 159 140624 000404 BR 9$ + 160 140626 112300 7$: MOVB (R3)+,R0 + 161 140630 001376 BNE 7$ + 162 140632 005204 INC R4 + 163 140634 000751 BR 3$ + 164 140636 006304 9$: ASL R4 + 165 140640 004774 140706 JSR PC,@CMDTBL(R4) ; EXECUTE + 166 140644 000404 BR 15$ + 167 + 168 140646 012700 141122 13$: MOV #UNKMSG,R0 + 169 140652 004767 140150' JSR PC,PRINT + 170 + 171 140656 005067 140242' 15$: CLR LENGTH + 172 140662 012700 141174 MOV #PROMPT,R0 + 173 140666 004767 140150' JSR PC,PRINT + 174 140672 012604 MOV (SP)+,R4 + 175 140674 012603 MOV (SP)+,R3 + 176 140676 012602 MOV (SP)+,R2 + 177 140700 012601 MOV (SP)+,R1 + 178 140702 012600 MOV (SP)+,R0 + 179 140704 000002 RTI + 180 + 181 + 182 140706 142664 141312 141326 CMDTBL: .WORD BOOT,HALT,TEST,DIAG,LIGHTS,HELP + 140714 141434 142200 141300 + 183 140722 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, TEST, DIAG, LIGHTS AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> + 140725 115 101 116 + 140730 104 123 040 + 140733 101 122 105 + 140736 040 102 117 + 140741 117 124 054 + 140744 040 110 101 + 140747 114 124 054 + 140752 040 124 105 + 140755 123 124 054 + 140760 040 104 111 + 140763 101 107 054 + 140766 040 114 111 + 140771 107 110 124 + 140774 123 040 101 + 140777 116 104 040 + 141002 110 105 114 + 141005 120 015 012 + 141010 102 117 117 + 141013 124 040 104 + 141016 105 126 111 + 141021 103 105 123 + 141024 040 101 122 + 141027 105 040 122 + 141032 113 077 040 + 141035 122 114 077 + 141040 040 117 122 + 141043 040 122 120 + 141046 077 015 012 + 141051 000 + 184 141052 015 012 000 EOL: .BYTE 15,12,0 + 185 141055 010 040 010 DEL: .BYTE 10,40,10,0 + 141060 000 + 186 141061 102 117 117 CMDLST: .ASCIZ 'BOOT' + 141064 124 000 + 187 141066 110 101 114 .ASCIZ 'HALT' + 141071 124 000 + 188 141073 124 105 123 .ASCIZ 'TEST' + 141076 124 000 + 189 141100 104 111 101 .ASCIZ 'DIAG' + 141103 107 000 + 190 141105 114 111 107 .ASCIZ 'LIGHTS' + 141110 110 124 123 + 141113 000 + 191 141114 110 105 114 .ASCIZ 'HELP' + 141117 120 000 + 192 141121 000 .BYTE 0 + 193 141122 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> + 141125 116 117 127 + 141130 116 040 103 + 141133 117 115 115 + 141136 101 116 104 + 141141 012 015 000 + 194 141144 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> + 141147 055 061 061 + 141152 040 115 117 + 141155 116 111 124 + 141160 117 122 040 + 141163 126 061 056 + 141166 060 012 015 + 141171 012 015 000 + 195 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> + 196 141174 102 117 117 PROMPT: .ASCIZ 'BOOT> ' + 141177 124 076 040 + 141202 000 + 197 141203 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> + 141206 116 117 127 + 141211 116 040 102 + 141214 117 117 124 + 141217 040 104 105 + 141222 126 111 103 + 141225 105 012 015 + 141230 000 + 198 141231 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> + 141234 040 040 040 + 141237 103 114 117 + 141242 103 113 040 + 141245 124 111 103 + 141250 113 123 012 + 141253 015 000 + 199 141255 040 040 040 LOOMSG: .ASCIZ ' ITERATIONS'<12><15> + 141260 040 040 040 + 141263 111 124 105 + 141266 122 101 124 + 141271 111 117 116 + 141274 123 012 015 + 141277 000 + 200 + 201 .EVEN 202 - 203 HALT: - 204 141304 000000 HALT - 205 141306 012700 141044 MOV #EOL,R0 - 206 141312 004767 140150' JSR PC,PRINT - 207 141316 000207 RTS PC - 208 - 209 TEST: - 210 141320 005067 140122' CLR CLKTIC - 211 - 212 141324 012705 015000 MOV #15000,R5 - 213 141330 010537 177570 10$: MOV R5,@#177570 ; DISPLAY - 214 141334 010504 MOV R5,R4 - 215 141336 006204 ASR R4 - 216 141340 005000 15$: CLR R0 - 217 141342 010501 MOV R5,R1 - 218 141344 071004 DIV R4,R0 - 219 141346 010002 MOV R0,R2 - 220 141350 070204 MUL R4,R2 - 221 141352 060301 ADD R3,R1 - 222 141354 020105 CMP R1,R5 - 223 141356 001401 BEQ 20$ - 224 141360 000000 HALT - 225 141362 077412 20$: SOB R4,15$ - 226 141364 077517 SOB R5,10$ - 227 - 228 141366 012700 141230 MOV #PERMSG+5,R0 - 229 141372 016703 140122' MOV CLKTIC,R3 - 230 - 231 141376 005002 25$: CLR R2 - 232 141400 071227 000010 DIV #10,R2 - 233 141404 062703 000060 ADD #'0,R3 - 234 141410 110340 MOVB R3,-(R0) - 235 141412 010203 MOV R2,R3 - 236 141414 001370 BNE 25$ - 237 - 238 141416 004767 140150' JSR PC,PRINT - 239 141422 000207 RTS PC - 240 - 241 141424 000000 LOOCNT: .WORD 0 + 203 HELP: + 204 141300 012700 140722 MOV #HLPMSG,R0 + 205 141304 004767 140150' JSR PC,PRINT + 206 141310 000207 RTS PC + 207 + 208 HALT: + 209 141312 000000 HALT + 210 141314 012700 141052 MOV #EOL,R0 + 211 141320 004767 140150' JSR PC,PRINT + 212 141324 000207 RTS PC + 213 + 214 TEST: + 215 141326 005067 140122' CLR CLKTIC + 216 + 217 141332 012705 015000 MOV #15000,R5 + 218 141336 010537 177570 10$: MOV R5,@#177570 ; DISPLAY + 219 141342 010504 MOV R5,R4 + 220 141344 006204 ASR R4 + 221 141346 005000 15$: CLR R0 + 222 141350 010501 MOV R5,R1 + 223 141352 071004 DIV R4,R0 + 224 141354 010002 MOV R0,R2 + 225 141356 070204 MUL R4,R2 + 226 141360 060301 ADD R3,R1 + 227 141362 020105 CMP R1,R5 + 228 141364 001401 BEQ 20$ + 229 141366 000000 HALT + 230 141370 077412 20$: SOB R4,15$ + 231 141372 077517 SOB R5,10$ + 232 + 233 141374 012700 141236 MOV #PERMSG+5,R0 + 234 141400 016703 140122' MOV CLKTIC,R3 + 235 + 236 141404 005002 25$: CLR R2 + 237 141406 071227 000010 DIV #10,R2 + 238 141412 062703 000060 ADD #'0,R3 + 239 141416 110340 MOVB R3,-(R0) + 240 141420 010203 MOV R2,R3 + 241 141422 001370 BNE 25$ 242 - 243 DIAG: - 244 141426 005067 141424' CLR LOOCNT - 245 141432 005067 140122' CLR CLKTIC - 246 DIAGLP: - 247 141436 005005 CLR R5 - 248 141440 100404 BMI L1 - 249 141442 102403 BVS L1 - 250 141444 101002 BHI L1 - 251 141446 002401 BLT L1 - 252 141450 101401 BLOS L2 - 253 141452 000000 L1: HALT - 254 - 255 141454 005305 L2: DEC R5 - 256 141456 100003 BPL L3 - 257 141460 001402 BEQ L3 - 258 141462 002001 BGE L3 - 259 141464 003401 BLE L4 - 260 141466 000000 L3: HALT - 261 - 262 141470 006005 L4: ROR R5 - 263 141472 102002 BVC L5 - 264 141474 103001 BCC L5 - 265 141476 001001 BNE L6 - 266 141500 000000 L5: HALT - 267 - 268 141502 112737 000017 177776 L6: MOVB #17,@#177776 - 269 141510 100004 BPL L7 - 270 141512 102003 BVC L7 - 271 141514 002402 BLT L7 - 272 141516 101001 BHI L7 - 273 141520 100401 BMI L8 - 274 141522 000000 L7: HALT - 275 - 276 141524 012703 077777 L8: MOV #77777,R3 - 277 141530 062703 077777 ADD #77777,R3 - 278 141534 123727 177776 000005 CMPB @#177776,#5 - 279 141542 001001 BNE L9 - 280 141544 000000 HALT - 281 - 282 141546 112704 001700 L9: MOVB #1700,R4 - 283 141552 100003 BPL L10 - 284 141554 020427 177700 CMP R4,#177700 - 285 141560 001401 BEQ L11 - 286 141562 000000 L10: HALT - 287 - 288 141564 105004 L11: CLRB R4 - 289 141566 020427 177400 CMP R4,#177400 - 290 141572 001401 BEQ L12 - 291 141574 000000 HALT + 243 141424 004767 140150' JSR PC,PRINT + 244 141430 000207 RTS PC + 245 + 246 141432 000000 LOOCNT: .WORD 0 + 247 + 248 DIAG: + 249 141434 005067 141432' CLR LOOCNT + 250 141440 005067 140122' CLR CLKTIC + 251 DIAGLP: + 252 141444 005005 CLR R5 + 253 141446 100404 BMI L1 + 254 141450 102403 BVS L1 + 255 141452 101002 BHI L1 + 256 141454 002401 BLT L1 + 257 141456 101401 BLOS L2 + 258 141460 000000 L1: HALT + 259 + 260 141462 005305 L2: DEC R5 + 261 141464 100003 BPL L3 + 262 141466 001402 BEQ L3 + 263 141470 002001 BGE L3 + 264 141472 003401 BLE L4 + 265 141474 000000 L3: HALT + 266 + 267 141476 006005 L4: ROR R5 + 268 141500 102002 BVC L5 + 269 141502 103001 BCC L5 + 270 141504 001001 BNE L6 + 271 141506 000000 L5: HALT + 272 + 273 141510 112737 000017 177776 L6: MOVB #17,@#177776 + 274 141516 100004 BPL L7 + 275 141520 102003 BVC L7 + 276 141522 002402 BLT L7 + 277 141524 101001 BHI L7 + 278 141526 100401 BMI L8 + 279 141530 000000 L7: HALT + 280 + 281 141532 012703 077777 L8: MOV #77777,R3 + 282 141536 062703 077777 ADD #77777,R3 + 283 141542 123727 177776 000005 CMPB @#177776,#5 + 284 141550 001001 BNE L9 + 285 141552 000000 HALT + 286 + 287 141554 112704 001700 L9: MOVB #1700,R4 + 288 141560 100003 BPL L10 + 289 141562 020427 177700 CMP R4,#177700 + 290 141566 001401 BEQ L11 + 291 141570 000000 L10: HALT 292 - 293 141576 012705 125252 L12: MOV #125252,R5 - 294 141602 010500 MOV R5,R0 - 295 141604 010001 MOV R0,R1 - 296 141606 010102 MOV R1,R2 - 297 141610 010203 MOV R2,R3 - 298 141612 010304 MOV R3,R4 - 299 141614 010405 MOV R4,R5 - 300 141616 160501 SUB R5,R1 - 301 141620 002401 BLT NODIAG - 302 141622 001401 BEQ L13 - 303 141624 000000 NODIAG: HALT - 304 - 305 141626 006102 L13: ROL R2 - 306 141630 103001 BCC L14 - 307 141632 002401 BLT L15 - 308 141634 000000 L14: HALT + 293 141572 105004 L11: CLRB R4 + 294 141574 020427 177400 CMP R4,#177400 + 295 141600 001401 BEQ L12 + 296 141602 000000 HALT + 297 + 298 141604 012705 125252 L12: MOV #125252,R5 + 299 141610 010500 MOV R5,R0 + 300 141612 010001 MOV R0,R1 + 301 141614 010102 MOV R1,R2 + 302 141616 010203 MOV R2,R3 + 303 141620 010304 MOV R3,R4 + 304 141622 010405 MOV R4,R5 + 305 141624 160501 SUB R5,R1 + 306 141626 002401 BLT NODIAG + 307 141630 001401 BEQ L13 + 308 141632 000000 NODIAG: HALT 309 - 310 141636 060203 L15: ADD R2,R3 - 311 141640 005203 INC R3 - 312 141642 005103 COM R3 - 313 141644 060301 ADD R3,R1 - 314 141646 103401 BCS L16 - 315 141650 003401 BLE L17 - 316 141652 000000 L16: HALT - 317 - 318 141654 006004 L17: ROR R4 - 319 141656 050403 BIS R4,R3 - 320 141660 060503 ADD R5,R3 - 321 141662 005203 INC R3 - 322 141664 103402 BCS L18 - 323 141666 005301 DEC R1 - 324 141670 002401 BLT L19 - 325 141672 000000 L18: HALT - 326 - 327 141674 005100 L19: COM R0 - 328 141676 101401 BLOS L20 - 329 141700 000000 HALT - 330 - 331 141702 040001 L20: BIC R0,R1 - 332 141704 060101 ADD R1,R1 - 333 141706 003001 BGT L21 - 334 141710 003401 BLE L22 - 335 141712 000000 L21: HALT - 336 - 337 141714 000301 L22: SWAB R1 - 338 141716 020127 052125 CMP R1,#052125 - 339 141722 001004 BNE L23 - 340 141724 030405 BIT R4,R5 - 341 141726 003002 BGT L23 - 342 141730 005105 COM R5 - 343 141732 001001 BNE L24 - 344 141734 000000 L23: HALT - 345 - 346 141736 112700 177401 L24: MOVB #177401,R0 - 347 141742 100001 BPL L26 - 348 141744 000000 L25: HALT - 349 - 350 141746 077002 L26: SOB R0,L25 - 351 141750 005001 CLR R1 - 352 141752 005201 L27: INC R1 - 353 141754 077002 SOB R0,L27 - 354 141756 005700 TST R0 - 355 141760 001002 BNE L28 - 356 141762 005701 TST R1 - 357 141764 001401 BEQ L29 - 358 141766 000000 L28: HALT - 359 - 360 141770 012707 141776 L29: MOV #N1,PC - 361 141774 000000 HALT - 362 - 363 141776 005727 N1: TST (PC)+ - 364 142000 000000 HALT - 365 - 366 142002 012746 142012 N2: MOV #N3,-(SP) - 367 142006 000207 RTS PC - 368 142010 000000 HALT - 369 - 370 142012 005046 N3: CLR -(SP) - 371 142014 012746 142024 MOV #N4,-(SP) - 372 142020 000002 RTI - 373 142022 000000 HALT + 310 141634 006102 L13: ROL R2 + 311 141636 103001 BCC L14 + 312 141640 002401 BLT L15 + 313 141642 000000 L14: HALT + 314 + 315 141644 060203 L15: ADD R2,R3 + 316 141646 005203 INC R3 + 317 141650 005103 COM R3 + 318 141652 060301 ADD R3,R1 + 319 141654 103401 BCS L16 + 320 141656 003401 BLE L17 + 321 141660 000000 L16: HALT + 322 + 323 141662 006004 L17: ROR R4 + 324 141664 050403 BIS R4,R3 + 325 141666 060503 ADD R5,R3 + 326 141670 005203 INC R3 + 327 141672 103402 BCS L18 + 328 141674 005301 DEC R1 + 329 141676 002401 BLT L19 + 330 141700 000000 L18: HALT + 331 + 332 141702 005100 L19: COM R0 + 333 141704 101401 BLOS L20 + 334 141706 000000 HALT + 335 + 336 141710 040001 L20: BIC R0,R1 + 337 141712 060101 ADD R1,R1 + 338 141714 003001 BGT L21 + 339 141716 003401 BLE L22 + 340 141720 000000 L21: HALT + 341 + 342 141722 000301 L22: SWAB R1 + 343 141724 020127 052125 CMP R1,#052125 + 344 141730 001004 BNE L23 + 345 141732 030405 BIT R4,R5 + 346 141734 003002 BGT L23 + 347 141736 005105 COM R5 + 348 141740 001001 BNE L24 + 349 141742 000000 L23: HALT + 350 + 351 141744 112700 177401 L24: MOVB #177401,R0 + 352 141750 100001 BPL L26 + 353 141752 000000 L25: HALT + 354 + 355 141754 077002 L26: SOB R0,L25 + 356 141756 005001 CLR R1 + 357 141760 005201 L27: INC R1 + 358 141762 077002 SOB R0,L27 + 359 141764 005700 TST R0 + 360 141766 001002 BNE L28 + 361 141770 005701 TST R1 + 362 141772 001401 BEQ L29 + 363 141774 000000 L28: HALT + 364 + 365 141776 012707 142004 L29: MOV #N1,PC + 366 142002 000000 HALT + 367 + 368 142004 005727 N1: TST (PC)+ + 369 142006 000000 HALT + 370 + 371 142010 012746 142020 N2: MOV #N3,-(SP) + 372 142014 000207 RTS PC + 373 142016 000000 HALT 374 - 375 142024 000137 142032 N4: JMP @#N5 - 376 142030 000000 HALT - 377 - 378 142032 012705 000003 N5: MOV #3,R5 - 379 142036 005037 000006 CLR @#6 - 380 142042 012737 142054 000004 MOV #N6,@#4 - 381 142050 005745 TST -(R5) - 382 142052 000000 HALT - 383 142054 062706 000004 N6: ADD #4,SP - 384 - 385 142060 005000 CLR R0 - 386 142062 012701 007777 MOV #7777,R1 - 387 142066 010002 N7: MOV R0,R2 - 388 142070 062702 000005 ADD #5,R2 - 389 142074 022062 177773 CMP (R0)+,-5(R2) - 390 142100 001402 BEQ N8 - 391 142102 000000 HALT - 392 142104 000000 D1: .WORD 0 - 393 - 394 142106 077111 N8: SOB R1,N7 - 395 - 396 142110 005267 141424' INC LOOCNT - 397 142114 103001 BCC 10$ - 398 142116 000000 HALT - 399 142120 026727 140122' 002200 10$: CMP CLKTIC,#2200 - 400 142126 101002 BHI 20$ - 401 142130 000167 141436' JMP DIAGLP - 402 142134 012700 141254 20$: MOV #LOOMSG+5,R0 - 403 142140 016703 141424' MOV LOOCNT,R3 - 404 - 405 142144 005002 25$: CLR R2 - 406 142146 071227 000010 DIV #10,R2 - 407 142152 062703 000060 ADD #'0,R3 - 408 142156 110340 MOVB R3,-(R0) - 409 142160 010203 MOV R2,R3 - 410 142162 001370 BNE 25$ - 411 - 412 142164 004767 140150' JSR PC,PRINT - 413 142170 000207 RTS PC - 414 - 415 177572 MMR0=177572 - 416 177574 MMR1=177574 - 417 177576 MMR2=177576 - 418 172516 MMR3=172516 + 375 142020 005046 N3: CLR -(SP) + 376 142022 012746 142032 MOV #N4,-(SP) + 377 142026 000002 RTI + 378 142030 000000 HALT + 379 + 380 142032 000137 142040 N4: JMP @#N5 + 381 142036 000000 HALT + 382 + 383 142040 012705 000003 N5: MOV #3,R5 + 384 142044 005037 000006 CLR @#6 + 385 142050 012737 142062 000004 MOV #N6,@#4 + 386 142056 005745 TST -(R5) + 387 142060 000000 HALT + 388 142062 062706 000004 N6: ADD #4,SP + 389 + 390 142066 005000 CLR R0 + 391 142070 012701 007777 MOV #7777,R1 + 392 142074 010002 N7: MOV R0,R2 + 393 142076 062702 000005 ADD #5,R2 + 394 142102 022062 177773 CMP (R0)+,-5(R2) + 395 142106 001402 BEQ N8 + 396 142110 000000 HALT + 397 142112 000000 D1: .WORD 0 + 398 + 399 142114 077111 N8: SOB R1,N7 + 400 + 401 142116 005267 141432' INC LOOCNT + 402 142122 103001 BCC 10$ + 403 142124 000000 HALT + 404 142126 026727 140122' 002200 10$: CMP CLKTIC,#2200 + 405 142134 101002 BHI 20$ + 406 142136 000167 141444' JMP DIAGLP + 407 142142 012700 141262 20$: MOV #LOOMSG+5,R0 + 408 142146 016703 141432' MOV LOOCNT,R3 + 409 + 410 142152 005002 25$: CLR R2 + 411 142154 071227 000010 DIV #10,R2 + 412 142160 062703 000060 ADD #'0,R3 + 413 142164 110340 MOVB R3,-(R0) + 414 142166 010203 MOV R2,R3 + 415 142170 001370 BNE 25$ + 416 + 417 142172 004767 140150' JSR PC,PRINT + 418 142176 000207 RTS PC 419 - 420 LIGHTS: - 421 142172 012703 077406 MOV #77406,R3 ; DEFAULT PDR - 422 142176 005002 CLR R2 - 423 142200 005001 CLR R1 - 424 142202 012700 000010 MOV #8.,R0 - 425 142206 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR - 426 142212 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR - 427 142216 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR - 428 142222 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR - 429 142226 010361 172200 MOV R3,172200(R1) ; SUPER I PDR - 430 142232 010261 172240 MOV R2,172240(R1) ; SUPER I PAR - 431 142236 010361 172220 MOV R3,172220(R1) ; SUPER D PDR - 432 142242 010261 172260 MOV R2,172260(R1) ; SUPER D PAR - 433 142246 010361 177600 MOV R3,177600(R1) ; USER I PDR - 434 142252 010261 177640 MOV R2,177640(R1) ; USER I PAR - 435 142256 010361 177620 MOV R3,177620(R1) ; USER D PDR - 436 142262 010361 177660 MOV R3,177660(R1) ; USER D PAR - 437 142266 062702 000200 ADD #200,R2 - 438 142272 062701 000002 ADD #2,R1 - 439 142276 077035 SOB R0,1$ - 440 142300 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE - 441 142306 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE - 442 142314 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE - 443 142322 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT - 444 142330 012737 000001 177572 MOV #1,@#MMR0 - 445 - 446 142336 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 - 447 142344 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 - 448 142352 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER - 449 - 450 142360 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS - 451 142364 012702 142412 MOV #SUPERS,R2 ; ADDRESS SUPER CODE - 452 142370 012246 10$: MOV (R2)+,-(SP) - 453 142372 006623 MTPI (R3)+ - 454 142374 020227 142656 CMP R2,#SUPERE - 455 142400 103773 BLO 10$ - 456 - 457 142402 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK - 458 142410 000207 RTS PC - 459 - 460 ; - 461 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 - 462 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS - 463 ; - 464 SUPERS: - 465 142412 012700 000037 MOV #37,R0 ; LOAD PATTERN - 466 142416 012701 174000 MOV #174000,R1 - 467 142422 032737 000001 177570 BIT #1,@#177570 - 468 142430 001414 BEQ 10$ - 469 142432 012700 007417 MOV #7417,R0 - 470 142436 010001 MOV R0,R1 - 471 142440 005101 COM R1 - 472 142442 032737 000002 177570 BIT #2,@#177570 - 473 142450 001404 BEQ 10$ - 474 142452 012700 036163 MOV #36163,R0 - 475 142456 012701 037000 MOV #37000,R1 - 476 142462 010102 10$: MOV R1,R2 - 477 142464 162702 000002 SUB #2,R2 - 478 142470 042702 000001 BIC #1,R2 ; WAIT ADDRESS - 479 142474 010203 MOV R2,R3 - 480 142476 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET - 481 142502 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT - 482 142510 062703 000002 ADD #2,R3 - 483 142514 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) - 484 - 485 142522 010204 MOV R2,R4 - 486 142524 072427 177772 ASH #-6,R4 - 487 142530 042704 177600 BIC #177600,R4 - 488 142534 012705 001700 MOV #1700,R5 - 489 142540 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT - 490 142542 010204 MOV R2,R4 - 491 142544 072427 177764 ASH #-12.,R4 - 492 142550 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET - 493 142554 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE - 494 - 495 142560 010103 MOV R1,R3 - 496 142562 072327 177764 ASH #-12.,R3 - 497 142566 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET - 498 142572 020304 CMP R3,R4 ; SAME PAR - 499 142574 001412 BEQ 30$ - 500 142576 010104 MOV R1,R4 - 501 142600 072427 177772 ASH #-6,R4 - 502 142604 042704 177600 BIC #177600,R4 - 503 142610 012705 001700 MOV #1700,R5 - 504 142614 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP - 505 142616 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE - 506 30$: - 507 142622 012704 000003 MOV #3,R4 - 508 142626 063704 177570 ADD @#177570,R4 - 509 142632 012703 000002 MOV #2,R3 - 510 142636 060703 ADD PC,R3 - 511 142640 000112 40$: JMP (R2) - 512 142642 077402 SOB R4,40$ - 513 142644 010002 MOV R0,R2 - 514 142646 006002 ROR R2 ; ROTATE PATTERN - 515 142650 006101 ROL R1 - 516 142652 006000 ROR R0 - 517 142654 000702 BR 10$ - 518 SUPERE: - 519 - 520 BOOT: - 521 142656 005003 CLR R3 ; UNIT - 522 142660 112201 1$: MOVB (R2)+,R1 - 523 142662 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 - 524 142664 120127 000040 CMPB R1,#40 - 525 142670 001773 BEQ 1$ - 526 142672 120127 000122 CMPB R1,#'R - 527 142676 001405 BEQ 5$ - 528 - 529 142700 012700 141175 MOV #BADBOO,R0 - 530 142704 004767 140150' JSR PC,PRINT - 531 142710 000207 RTS PC - 532 - 533 142712 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P - 534 142714 112200 7$: MOVB (R2)+,R0 ; DIGIT - 535 142716 001416 BEQ 9$ - 536 142720 120027 000040 CMPB R0,#40 - 537 142724 001413 BEQ 9$ - 538 142726 120027 000067 CMPB R0,#'7 - 539 142732 003031 BGT 11$ - 540 142734 162700 000060 SUB #'0,R0 - 541 142740 002426 BLT 11$ - 542 142742 006303 ASL R3 - 543 142744 006303 ASL R3 - 544 142746 006303 ASL R3 - 545 142750 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT - 546 142752 000760 BR 7$ - 547 142754 005002 9$: CLR R2 - 548 142756 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 - 549 142762 012722 140000 MOV #START,(R2)+ - 550 142766 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 - 551 142772 005022 CLR (R2)+ - 552 142774 120127 000113 CMPB R1,#'K - 553 143000 001476 BEQ BOOTRK - 554 143002 120127 000114 CMPB R1,#'L - 555 143006 001410 BEQ BOOTRL - 556 143010 120127 000120 CMPB R1,#'P - 557 143014 001517 BEQ BOOTRP - 558 - 559 143016 012700 141114 11$: MOV #UNKMSG,R0 - 560 143022 004767 140150' JSR PC,PRINT - 561 143026 000207 RTS PC - 562 - 563 174400 RLCS=174400 - 564 BOOTRL: - 565 143030 000005 RESET - 566 143032 000303 SWAB R3 ; UNIT NUMBER - 567 143034 012701 174400 MOV #RLCS,R1 ; CSR - 568 143040 012761 000013 000004 MOV #13,4(R1) ; CLR ERR - 569 143046 052703 000004 BIS #4,R3 ; UNIT+GSTAT - 570 143052 010311 MOV R3,(R1) ; ISSUE CMD - 571 143054 105711 TSTB (R1) ; WAIT - 572 143056 100376 BPL .-2 - 573 143060 105003 CLRB R3 - 574 143062 052703 000010 BIS #10,R3 ; UNIT+RDHDR - 575 143066 010311 MOV R3,(R1) ; ISSUE CMD - 576 143070 105711 TSTB (R1) ; WAIT - 577 143072 100376 BPL .-2 - 578 143074 016102 000006 MOV 6(R1),R2 ; GET HDR - 579 143100 042702 000077 BIC #77,R2 ; CLR SECTOR - 580 143104 005202 INC R2 ; MAGIC BIT - 581 143106 010261 000004 MOV R2,4(R1) ; SEEK TO 0 - 582 143112 105003 CLRB R3 - 583 143114 052703 000006 BIS #6,R3 ; UNIT+SEEK - 584 143120 010311 MOV R3,(R1) ; ISSUE CMD - 585 143122 105711 TSTB (R1) ; WAIT - 586 143124 100376 BPL .-2 - 587 143126 005061 000002 CLR 2(R1) ; CLR BA - 588 143132 005061 000004 CLR 4(R1) ; CLR DA - 589 143136 012761 177000 000006 MOV #-512.,6(R1) ; SET WC - 590 143144 105003 CLRB R3 - 591 143146 052703 000014 BIS #14,R3 ; UNIT+READ - 592 143152 010311 MOV R3,(R1) ; ISSUE CMD - 593 143154 105711 TSTB (R1) ; WAIT - 594 143156 100376 BPL .-2 - 595 143160 042711 000377 BIC #377,(R1) - 596 143164 005002 CLR R2 - 597 143166 005003 CLR R3 - 598 143170 005004 CLR R4 - 599 143172 005005 CLR R5 - 600 143174 005007 CLR PC - 601 - 602 177412 RKDA=177412 - 603 000005 READGO=5 - 604 BOOTRK: - 605 143176 000005 RESET - 606 143200 000303 SWAB R3 ; UNIT NUMBER - 607 143202 006303 ASL R3 - 608 143204 006303 ASL R3 - 609 143206 006303 ASL R3 - 610 143210 006303 ASL R3 - 611 143212 006303 ASL R3 - 612 143214 012701 177412 MOV #RKDA,R1 ; CSR - 613 143220 010311 MOV R3,(R1) ; LOAD DA - 614 143222 005041 CLR -(R1) ; CLEAR BA - 615 143224 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC - 616 143230 012741 000005 MOV #READGO,-(R1) ; READ & GO - 617 143234 005002 CLR R2 - 618 143236 005003 CLR R3 - 619 143240 005004 CLR R4 - 620 143242 005005 CLR R5 - 621 143244 105711 TSTB (R1) - 622 143246 100376 BPL .-2 - 623 143250 105011 CLRB (R1) - 624 143252 005007 CLR PC - 625 - 626 176700 RPCSR=0176700 - 627 BOOTRP: - 628 143254 000005 RESET - 629 143256 012701 176700 MOV #RPCSR, R1 - 630 143262 012761 000040 000010 MOV #0000040, 10(R1) ; RESET - 631 143270 010361 000010 MOV R3, 10(R1) ; SET UNIT - 632 143274 012711 000021 MOV #0000021, (R1) ; PACK ACK - 633 143300 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE - 634 143306 012761 177000 000002 MOV #-512., 2(R1) ; SET WC - 635 143314 005061 000004 CLR 4(R1) ; CLR BA - 636 143320 005061 000006 CLR 6(R1) ; CLR DA - 637 143324 005061 000034 CLR 34(R1) ; CLR CYL - 638 143330 012711 000071 MOV #0000071, (R1) ; READ - 639 143334 105711 TSTB (R1) ; WAIT - 640 143336 100376 BPL .-2 - 641 143340 105011 CLRB (R1) - 642 143342 010300 MOV R3,R0 - 643 143344 005007 CLR PC - 644 - 645 .END START - 645 + 420 177572 MMR0=177572 + 421 177574 MMR1=177574 + 422 177576 MMR2=177576 + 423 172516 MMR3=172516 + 424 + 425 LIGHTS: + 426 142200 012703 077406 MOV #77406,R3 ; DEFAULT PDR + 427 142204 005002 CLR R2 + 428 142206 005001 CLR R1 + 429 142210 012700 000010 MOV #8.,R0 + 430 142214 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR + 431 142220 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR + 432 142224 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR + 433 142230 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR + 434 142234 010361 172200 MOV R3,172200(R1) ; SUPER I PDR + 435 142240 010261 172240 MOV R2,172240(R1) ; SUPER I PAR + 436 142244 010361 172220 MOV R3,172220(R1) ; SUPER D PDR + 437 142250 010261 172260 MOV R2,172260(R1) ; SUPER D PAR + 438 142254 010361 177600 MOV R3,177600(R1) ; USER I PDR + 439 142260 010261 177640 MOV R2,177640(R1) ; USER I PAR + 440 142264 010361 177620 MOV R3,177620(R1) ; USER D PDR + 441 142270 010361 177660 MOV R3,177660(R1) ; USER D PAR + 442 142274 062702 000200 ADD #200,R2 + 443 142300 062701 000002 ADD #2,R1 + 444 142304 077035 SOB R0,1$ + 445 142306 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE + 446 142314 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE + 447 142322 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE + 448 142330 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT + 449 142336 012737 000001 177572 MOV #1,@#MMR0 + 450 + 451 142344 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 + 452 142352 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 + 453 142360 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER + 454 + 455 142366 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS + 456 142372 012702 142420 MOV #SUPERS,R2 ; ADDRESS SUPER CODE + 457 142376 012246 10$: MOV (R2)+,-(SP) + 458 142400 006623 MTPI (R3)+ + 459 142402 020227 142664 CMP R2,#SUPERE + 460 142406 103773 BLO 10$ + 461 + 462 142410 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK + 463 142416 000207 RTS PC + 464 + 465 ; + 466 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 + 467 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS + 468 ; + 469 SUPERS: + 470 142420 012700 000037 MOV #37,R0 ; LOAD PATTERN + 471 142424 012701 174000 MOV #174000,R1 + 472 142430 032737 000001 177570 BIT #1,@#177570 + 473 142436 001414 BEQ 10$ + 474 142440 012700 007417 MOV #7417,R0 + 475 142444 010001 MOV R0,R1 + 476 142446 005101 COM R1 + 477 142450 032737 000002 177570 BIT #2,@#177570 + 478 142456 001404 BEQ 10$ + 479 142460 012700 036163 MOV #36163,R0 + 480 142464 012701 037000 MOV #37000,R1 + 481 142470 010102 10$: MOV R1,R2 + 482 142472 162702 000002 SUB #2,R2 + 483 142476 042702 000001 BIC #1,R2 ; WAIT ADDRESS + 484 142502 010203 MOV R2,R3 + 485 142504 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET + 486 142510 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT + 487 142516 062703 000002 ADD #2,R3 + 488 142522 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) + 489 + 490 142530 010204 MOV R2,R4 + 491 142532 072427 177772 ASH #-6,R4 + 492 142536 042704 177600 BIC #177600,R4 + 493 142542 012705 001700 MOV #1700,R5 + 494 142546 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT + 495 142550 010204 MOV R2,R4 + 496 142552 072427 177764 ASH #-12.,R4 + 497 142556 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET + 498 142562 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE + 499 + 500 142566 010103 MOV R1,R3 + 501 142570 072327 177764 ASH #-12.,R3 + 502 142574 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET + 503 142600 020304 CMP R3,R4 ; SAME PAR + 504 142602 001412 BEQ 30$ + 505 142604 010104 MOV R1,R4 + 506 142606 072427 177772 ASH #-6,R4 + 507 142612 042704 177600 BIC #177600,R4 + 508 142616 012705 001700 MOV #1700,R5 + 509 142622 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP + 510 142624 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE + 511 30$: + 512 142630 012704 000003 MOV #3,R4 + 513 142634 063704 177570 ADD @#177570,R4 + 514 142640 012703 000002 MOV #2,R3 + 515 142644 060703 ADD PC,R3 + 516 142646 000112 40$: JMP (R2) + 517 142650 077402 SOB R4,40$ + 518 142652 010002 MOV R0,R2 + 519 142654 006002 ROR R2 ; ROTATE PATTERN + 520 142656 006101 ROL R1 + 521 142660 006000 ROR R0 + 522 142662 000702 BR 10$ + 523 SUPERE: + 524 + 525 BOOT: + 526 142664 005003 CLR R3 ; UNIT + 527 142666 112201 1$: MOVB (R2)+,R1 + 528 142670 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 + 529 142672 120127 000040 CMPB R1,#40 + 530 142676 001773 BEQ 1$ + 531 142700 120127 000122 CMPB R1,#'R + 532 142704 001405 BEQ 5$ + 533 + 534 142706 012700 141203 MOV #BADBOO,R0 + 535 142712 004767 140150' JSR PC,PRINT + 536 142716 000207 RTS PC + 537 + 538 142720 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P + 539 142722 112200 7$: MOVB (R2)+,R0 ; DIGIT + 540 142724 001416 BEQ 9$ + 541 142726 120027 000040 CMPB R0,#40 + 542 142732 001413 BEQ 9$ + 543 142734 120027 000067 CMPB R0,#'7 + 544 142740 003031 BGT 11$ + 545 142742 162700 000060 SUB #'0,R0 + 546 142746 002426 BLT 11$ + 547 142750 006303 ASL R3 + 548 142752 006303 ASL R3 + 549 142754 006303 ASL R3 + 550 142756 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT + 551 142760 000760 BR 7$ + 552 142762 005002 9$: CLR R2 + 553 142764 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 + 554 142770 012722 140000 MOV #START,(R2)+ + 555 142774 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 + 556 143000 005022 CLR (R2)+ + 557 143002 120127 000113 CMPB R1,#'K + 558 143006 001476 BEQ BOOTRK + 559 143010 120127 000114 CMPB R1,#'L + 560 143014 001410 BEQ BOOTRL + 561 143016 120127 000120 CMPB R1,#'P + 562 143022 001517 BEQ BOOTRP + 563 + 564 143024 012700 141122 11$: MOV #UNKMSG,R0 + 565 143030 004767 140150' JSR PC,PRINT + 566 143034 000207 RTS PC + 567 + 568 174400 RLCS=174400 + 569 BOOTRL: + 570 143036 000005 RESET + 571 143040 000303 SWAB R3 ; UNIT NUMBER + 572 143042 012701 174400 MOV #RLCS,R1 ; CSR + 573 143046 012761 000013 000004 MOV #13,4(R1) ; CLR ERR + 574 143054 052703 000004 BIS #4,R3 ; UNIT+GSTAT + 575 143060 010311 MOV R3,(R1) ; ISSUE CMD + 576 143062 105711 TSTB (R1) ; WAIT + 577 143064 100376 BPL .-2 + 578 143066 105003 CLRB R3 + 579 143070 052703 000010 BIS #10,R3 ; UNIT+RDHDR + 580 143074 010311 MOV R3,(R1) ; ISSUE CMD + 581 143076 105711 TSTB (R1) ; WAIT + 582 143100 100376 BPL .-2 + 583 143102 016102 000006 MOV 6(R1),R2 ; GET HDR + 584 143106 042702 000077 BIC #77,R2 ; CLR SECTOR + 585 143112 005202 INC R2 ; MAGIC BIT + 586 143114 010261 000004 MOV R2,4(R1) ; SEEK TO 0 + 587 143120 105003 CLRB R3 + 588 143122 052703 000006 BIS #6,R3 ; UNIT+SEEK + 589 143126 010311 MOV R3,(R1) ; ISSUE CMD + 590 143130 105711 TSTB (R1) ; WAIT + 591 143132 100376 BPL .-2 + 592 143134 005061 000002 CLR 2(R1) ; CLR BA + 593 143140 005061 000004 CLR 4(R1) ; CLR DA + 594 143144 012761 177000 000006 MOV #-512.,6(R1) ; SET WC + 595 143152 105003 CLRB R3 + 596 143154 052703 000014 BIS #14,R3 ; UNIT+READ + 597 143160 010311 MOV R3,(R1) ; ISSUE CMD + 598 143162 105711 TSTB (R1) ; WAIT + 599 143164 100376 BPL .-2 + 600 143166 042711 000377 BIC #377,(R1) + 601 143172 005002 CLR R2 + 602 143174 005003 CLR R3 + 603 143176 005004 CLR R4 + 604 143200 005005 CLR R5 + 605 143202 005007 CLR PC + 606 + 607 177412 RKDA=177412 + 608 000005 READGO=5 + 609 BOOTRK: + 610 143204 000005 RESET + 611 143206 000303 SWAB R3 ; UNIT NUMBER + 612 143210 006303 ASL R3 + 613 143212 006303 ASL R3 + 614 143214 006303 ASL R3 + 615 143216 006303 ASL R3 + 616 143220 006303 ASL R3 + 617 143222 012701 177412 MOV #RKDA,R1 ; CSR + 618 143226 010311 MOV R3,(R1) ; LOAD DA + 619 143230 005041 CLR -(R1) ; CLEAR BA + 620 143232 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC + 621 143236 012741 000005 MOV #READGO,-(R1) ; READ & GO + 622 143242 005002 CLR R2 + 623 143244 005003 CLR R3 + 624 143246 005004 CLR R4 + 625 143250 005005 CLR R5 + 626 143252 105711 TSTB (R1) + 627 143254 100376 BPL .-2 + 628 143256 105011 CLRB (R1) + 629 143260 005007 CLR PC + 630 + 631 176700 RPCSR=0176700 + 632 BOOTRP: + 633 143262 000005 RESET + 634 143264 012701 176700 MOV #RPCSR, R1 + 635 143270 012761 000040 000010 MOV #0000040, 10(R1) ; RESET + 636 143276 010361 000010 MOV R3, 10(R1) ; SET UNIT + 637 143302 012711 000021 MOV #0000021, (R1) ; PACK ACK + 638 143306 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE + 639 143314 012761 177000 000002 MOV #-512., 2(R1) ; SET WC + 640 143322 005061 000004 CLR 4(R1) ; CLR BA + 641 143326 005061 000006 CLR 6(R1) ; CLR DA + 642 143332 005061 000034 CLR 34(R1) ; CLR CYL + 643 143336 012711 000071 MOV #0000071, (R1) ; READ + 644 143342 105711 TSTB (R1) ; WAIT + 645 143344 100376 BPL .-2 + 646 143346 105011 CLRB (R1) + 647 143350 010300 MOV R3,R0 + 648 143352 005007 CLR PC + 649 + 650 .END START + 650 diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index b9a4b0d26..72663b51d 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -24,13 +24,17 @@ The **BOOTMON.mac** source code is shown below. ; REBASE HIGHER LINK/BOT:140000 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? - PSW = 177776 - DL11XCSR = 177564 - DL11VEC = 64 - KW11LKS = 177546 KW11VEC = 100 + DL11RCSR = 177560 + DL11RBUF = 177562 + DL11XCSR = 177564 + DL11XBUF = 177566 + DL11VEC = 64 + + PSW = 177776 + .ASECT .=140000 START: RESET @@ -67,7 +71,7 @@ The **BOOTMON.mac** source code is shown below. ONECHR: TSTB @#DL11XCSR BPL ONECHR - MOVB R0,@#177566 + MOVB R0,@#DL11XBUF RTS PC PRTPTR: .WORD 0 @@ -84,10 +88,10 @@ The **BOOTMON.mac** source code is shown below. PRTAST: TSTB @PRTPTR BEQ 2$ - MOVB @PRTPTR,@#177566 + MOVB @PRTPTR,@#DL11XBUF INC PRTPTR RTI - 2$: CLRB @#177564 + 2$: CLRB @#DL11XCSR RTI BUFFER: .WORD 0 ; INPUT BUFFER POINTER @@ -98,12 +102,13 @@ The **BOOTMON.mac** source code is shown below. CLR LENGTH MOV #INPAST,@#60 MOV #200,@#62 - BISB #100,@#177560 + BISB #100,@#DL11RCSR RTS PC INPAST: MOV R0,-(SP) - MOVB @#177562,R0 + MOVB @#DL11RBUF,R0 + BIC #340,@#PSW ; HACK TO PERMIT XBUF INTERRUPTS WHILE RBUF INTERRUPT HANDLER STILL RUNNING CMPB R0,#15 BEQ 7$ ; CARRIAGE RETURN CMPB R0,#127. @@ -153,7 +158,7 @@ The **BOOTMON.mac** source code is shown below. MOV R4,-(SP) MOV #EOL,R0 JSR PC,PRINT - 1$: BITB #100,@#177564 + 1$: BITB #100,@#DL11XCSR BNE 1$ CLR R4 MOV #CMDLST,R3 ; CMD LIST diff --git a/disks/dec/rl02k/xxdp/ekbbf0/README.md b/disks/dec/rl02k/xxdp/ekbbf0/README.md index 1d56e562b..802ffd407 100644 --- a/disks/dec/rl02k/xxdp/ekbbf0/README.md +++ b/disks/dec/rl02k/xxdp/ekbbf0/README.md @@ -259,3 +259,6 @@ After setting and hitting a breakpoint at 031532, we can step through the instru Vector 100 is for the KW11 Line Clock -- an interrupt that the test was apparently not expecting. It was instead looking for an interrupt from the DL11 "teleprinter" device. + +This failure was resolved by fixing the KW11 logic to clear any pending Line Clock interrupt whenever the +KW11 Interrupt Enable bit was cleared. diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index a16d20039..edd8592e4 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -214,6 +214,7 @@ DevicePDP11.prototype.writeLKS = function(data, addr) * I think that was wrong, and that all a write should do is mask off all the other (non-writable) bits. */ this.kw11.lks = data & PDP11.KW11.LKS.MASK; + if (!(this.kw11.lks & PDP11.KW11.LKS.IE)) this.cpu.clearIRQ(this.kw11.irq); }; /** diff --git a/versions/pdpjs/1.30.4/pdp11-dbg.js b/versions/pdpjs/1.30.4/pdp11-dbg.js index 94554776f..9da9f6faa 100644 --- a/versions/pdpjs/1.30.4/pdp11-dbg.js +++ b/versions/pdpjs/1.30.4/pdp11-dbg.js @@ -79,275 +79,276 @@ function uc(a,b,c){var d=!1,e=this.controller;a=e.gb[a];var f=c&65535;a&&(a[3]?( function xc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.na;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.G)return l.Zb+=l.G-f,l.G=f,!0;if(f>=l.G+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.G+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.Y[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.pc+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)} function zc(a,b,c){var d=[];for(b>>>=a.na;0>>=a.na;0>>this.na].fc(a&this.v,a)};k.ec=function(a){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;a=this.Y[(a&this.Sa)>>>this.na].sc(a&this.v,a);this.qa--;return a}; -k.ta=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].tc(b,a);this.qa--;return a};k.Lb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].jc(a&this.v,b&255,a);this.qa--}; +k.ta=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].tc(b,a);this.qa--;return a};k.Nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].jc(a&this.v,b&255,a);this.qa--}; k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].$b(a&this.v,b&65535,a)};k.nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));var c=a&this.v,d=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;this.Y[d].yc(c,b&65535,a);this.qa--}; function Gc(a){for(var b=0,c=[],d=0;da.b.ib)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;tb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Ub=128;Lc(this.b,this.f.wc,1E3/60,!0)};k.Pd=function(){return this.f.Ub};k.Oe=function(a){this.f.Ub=a&192};k.Rd=function(){return Pc(this.b)};k.Qe=function(a){Qc(this.b,a&-129|this.b.Da&128)};k.Sd=function(){return Zc(this.b)}; -k.Td=function(){return $c(this.b)};k.Ud=function(){return this.b.Xa};k.Re=function(a){ad(this.b,a)};k.Be=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.Af=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.ue=function(a){return this.b.R[1][a>>1&7]};k.tf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.se=function(a){return this.b.R[1][(a>>1&7)+8]};k.rf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295}; -k.te=function(a){return this.b.ka[1][a>>1&7]};k.sf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.re=function(a){return this.b.ka[1][(a>>1&7)+8]};k.qf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.Od=function(a){return this.b.R[0][a>>1&7]};k.Ne=function(a,b){b=b>>1&7;this.b.R[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Md=function(a){return this.b.R[0][(a>>1&7)+8]};k.Le=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295}; -k.Nd=function(a){return this.b.ka[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ld=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ae=function(a){return this.b.R[3][a>>1&7]};k.zf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.ye=function(a){return this.b.R[3][(a>>1&7)+8]};k.xf=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};k.ze=function(a){return this.b.ka[3][a>>1&7]}; -k.yf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.xe=function(a){return this.b.ka[3][(a>>1&7)+8]};k.wf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Ib=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Mb=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.Zd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.We=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};k.be=function(){return this.b.u[7]}; -k.Ze=function(a){this.b.u[7]=a};k.Jb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Nb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.$d=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.Xe=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.ae=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Ye=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};k.Kd=function(a){return this.b.Sc[a-65504>>1]}; -k.Je=function(a,b){this.b.Sc[b-65504>>1]=a};k.Pc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.pc}a=(a>>6)-1}else a=0;return a};k.Vc=function(){};k.we=function(){return 1};k.vf=function(){};k.Jd=function(){return this.b.Ba};k.Ie=function(){this.b.Ba=0};k.Qd=function(){return this.b.Rc};k.Pe=function(a,b){b&1||(a&=255);this.b.Rc=a};k.Vd=function(a,b){return b?0:this.b.Kb};k.Se=function(a){bd(this.b,a)};k.ve=function(a,b){return b?0:this.b.lb&65280};k.uf=function(a){this.b.lb=a|255}; -k.Yd=function(){return cd(this.b)};k.Ve=function(a){dd(this.b,a&-1793|cd(this.b)&1792);this.b.I|=256};k.Uc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; +k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.j=d;var e=this;this.f.wc=Jc(c,function(){e.f.Hb|=128;e.f.Hb&64&&Kc(e.b,e.f.Gb);e.B&&e.B.xa(1);Lc(e.b,e.f.wc,1E3/60)});this.f.Gb=Mc(64,6,524288);Jb(b,this,Nc);Lb(b,this.reset.bind(this));d&&Oc(d,64,function(a){var b=e.b;N(e,"KIPDR",b.R[0],0,a[0]);N(e,"KDPDR",b.R[0],8,a[0]);N(e,"KIPAR",b.ka[0],0,a[0]);N(e,"KDPAR",b.ka[0],8,a[0],!0);N(e,"SIPDR",b.R[1],0,a[0]);N(e,"SDPDR",b.R[1],8,a[0]);N(e,"SIPAR",b.ka[1],0,a[0]);N(e,"SDPAR",b.ka[1],8,a[0],!0);N(e, +"UIPDR",b.R[3],0,a[0]);N(e,"UDPDR",b.R[3],8,a[0]);N(e,"UIPAR",b.ka[3],0,a[0]);N(e,"UDPAR",b.ka[3],8,a[0],!0)});J(this)};function N(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Hb=128;Lc(this.b,this.f.wc,1E3/60,!0)};k.Pd=function(){return this.f.Hb};k.Oe=function(a){this.f.Hb=a&192;this.f.Hb&64||Pc(this.b,this.f.Gb)};k.Rd=function(){return Qc(this.b)};k.Qe=function(a){Zc(this.b,a&-129|this.b.Da&128)}; +k.Sd=function(){return $c(this.b)};k.Td=function(){return ad(this.b)};k.Ud=function(){return this.b.Xa};k.Re=function(a){bd(this.b,a)};k.Be=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.Af=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.ue=function(a){return this.b.R[1][a>>1&7]};k.tf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.se=function(a){return this.b.R[1][(a>>1&7)+8]}; +k.rf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};k.te=function(a){return this.b.ka[1][a>>1&7]};k.sf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.re=function(a){return this.b.ka[1][(a>>1&7)+8]};k.qf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.Od=function(a){return this.b.R[0][a>>1&7]};k.Ne=function(a,b){b=b>>1&7;this.b.R[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Md=function(a){return this.b.R[0][(a>>1&7)+8]}; +k.Le=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};k.Nd=function(a){return this.b.ka[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ld=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ae=function(a){return this.b.R[3][a>>1&7]};k.zf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.ye=function(a){return this.b.R[3][(a>>1&7)+8]};k.xf=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295}; +k.ze=function(a){return this.b.ka[3][a>>1&7]};k.yf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.xe=function(a){return this.b.ka[3][(a>>1&7)+8]};k.wf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Kb=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Ob=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.Zd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.We=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a}; +k.be=function(){return this.b.u[7]};k.Ze=function(a){this.b.u[7]=a};k.Lb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Pb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.$d=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.Xe=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.ae=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Ye=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a}; +k.Kd=function(a){return this.b.Sc[a-65504>>1]};k.Je=function(a,b){this.b.Sc[b-65504>>1]=a};k.Pc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.pc}a=(a>>6)-1}else a=0;return a};k.Vc=function(){};k.we=function(){return 1};k.vf=function(){};k.Jd=function(){return this.b.Ba};k.Ie=function(){this.b.Ba=0};k.Qd=function(){return this.b.Rc};k.Pe=function(a,b){b&1||(a&=255);this.b.Rc=a};k.Vd=function(a,b){return b?0:this.b.Mb};k.Se=function(a){cd(this.b,a)}; +k.ve=function(a,b){return b?0:this.b.lb&65280};k.uf=function(a){this.b.lb=a|255};k.Yd=function(){return dd(this.b)};k.Ve=function(a){ed(this.b,a&-1793|dd(this.b)&1792);this.b.I|=256};k.Uc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; var O={},Nc=(O[61568]=[null,null,M.prototype.Be,M.prototype.Af,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.ue,M.prototype.tf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.se,M.prototype.rf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.te,M.prototype.sf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.re,M.prototype.qf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Od,M.prototype.Ne,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Md,M.prototype.Le,"KDPDR",8,1145,64],O[62688]= [null,null,M.prototype.Nd,M.prototype.Me,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Ud,M.prototype.Re,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Pd,M.prototype.Oe,"LKS"],O[65402]=[null,null,M.prototype.Rd,M.prototype.Qe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Sd,M.prototype.Uc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Td,M.prototype.Uc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.Ae,M.prototype.zf, -"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.ye,M.prototype.xf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ze,M.prototype.yf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.xe,M.prototype.wf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Ib,M.prototype.Mb,"R0SET0"],O[65473]=[null,null,M.prototype.Ib,M.prototype.Mb,"R1SET0"],O[65474]=[null,null,M.prototype.Ib,M.prototype.Mb,"R2SET0"],O[65475]=[null,null,M.prototype.Ib,M.prototype.Mb,"R3SET0"],O[65476]=[null,null,M.prototype.Ib, -M.prototype.Mb,"R4SET0"],O[65477]=[null,null,M.prototype.Ib,M.prototype.Mb,"R5SET0"],O[65478]=[null,null,M.prototype.Zd,M.prototype.We,"R6KERNEL"],O[65479]=[null,null,M.prototype.be,M.prototype.Ze,"R7KERNEL"],O[65480]=[null,null,M.prototype.Jb,M.prototype.Nb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Jb,M.prototype.Nb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Jb,M.prototype.Nb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Jb,M.prototype.Nb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Jb, -M.prototype.Nb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Jb,M.prototype.Nb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.$d,M.prototype.Xe,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.ae,M.prototype.Ye,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Kd,M.prototype.Je,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Pc,M.prototype.Vc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Pc,M.prototype.Vc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.we,M.prototype.vf,"SYSID",1,1170],O[65526]= +"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.ye,M.prototype.xf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ze,M.prototype.yf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.xe,M.prototype.wf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Kb,M.prototype.Ob,"R0SET0"],O[65473]=[null,null,M.prototype.Kb,M.prototype.Ob,"R1SET0"],O[65474]=[null,null,M.prototype.Kb,M.prototype.Ob,"R2SET0"],O[65475]=[null,null,M.prototype.Kb,M.prototype.Ob,"R3SET0"],O[65476]=[null,null,M.prototype.Kb, +M.prototype.Ob,"R4SET0"],O[65477]=[null,null,M.prototype.Kb,M.prototype.Ob,"R5SET0"],O[65478]=[null,null,M.prototype.Zd,M.prototype.We,"R6KERNEL"],O[65479]=[null,null,M.prototype.be,M.prototype.Ze,"R7KERNEL"],O[65480]=[null,null,M.prototype.Lb,M.prototype.Pb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Lb,M.prototype.Pb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Lb,M.prototype.Pb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Lb,M.prototype.Pb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Lb, +M.prototype.Pb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Lb,M.prototype.Pb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.$d,M.prototype.Xe,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.ae,M.prototype.Ye,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Kd,M.prototype.Je,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Pc,M.prototype.Vc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Pc,M.prototype.Vc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.we,M.prototype.vf,"SYSID",1,1170],O[65526]= [null,null,M.prototype.Jd,M.prototype.Ie,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Qd,M.prototype.Pe,"MB",1,1170],O[65530]=[null,null,M.prototype.Vd,M.prototype.Se,"PIR"],O[65532]=[null,null,M.prototype.ve,M.prototype.uf,"SL"],O[65534]=[null,null,M.prototype.Yd,M.prototype.Ve,"PSW"],O); -ab(function(){for(var a=F(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.A,0,this.size>>2),ld(this,hd?md:nd);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>1),this.b=new Int32Array(this.A,0,this.size>>2),md(this,id?nd:od);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a,b){a&1&&this.v.Na(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},Ea: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.$a=!0},S:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,1,c.O)&&c.ea(!0)}return this.sc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,2,c.O)&&c.ea(!0)}return this.tc(a,b)},oa:function(a, -b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.jc(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.yc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2); +1]&255)<<8},Ea: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.$a=!0},S:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,1,c.O)&&c.ea(!0)}return this.sc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;td(c,this.G+a,2,c.O)&&c.ea(!0)}return this.tc(a,b)},oa:function(a, +b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.jc(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;td(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.yc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2); a=this.J[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){this.D[a]=b;this.$a=!0},sa:function(a,b,c){this.D[a]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ca:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.$a=!0},Ga:function(a,b,c){a&1&&this.v.Na(c,64,4);this.J[a>>1]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j, -b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&rd(a,qd,!1),(a.g=c.g)&&pd(a,qd,!1))}function td(a,b){b?--a.g||(a.ic=a.f?a.w:a.jc,a.$b=a.f?a.H:a.yc):--a.B||(a.fc=a.sc,a.za=a.tc)}function pd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.H);if(c||void 0===c)a.jc=b[1]||a.w,a.yc=b[3]||a.H}function rd(a,b,c){c&&a.B||(a.fc=b[0]||a.K,a.za=b[2]||a.L);if(c||void 0===c)a.sc=b[0]||a.K,a.tc=b[2]||a.L}function ld(a,b){b||(b=ud);rd(a,b,void 0);pd(a,b,void 0)} -var ud=[],od=[K.prototype.U,K.prototype.Ea,K.prototype.fa,K.prototype.Pa],qd=[K.prototype.S,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var nd=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ca],md=[K.prototype.T,K.prototype.sa,K.prototype.fb,K.prototype.Ga]; -function vd(a,b){x.call(this,"CPU",a,vd,1);b=a.cycles||b;var c=a.multiplier||1;this.Ob=0;this.tb=b;this.jb=c;this.Qb=Math.round(this.tb/1E4)/100;this.Ab=this.Qb*this.jb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Gb=a.csInterval;this.Hb=a.csStop;this.O=[];this.Gc=this.Fe.bind(this);J(this)}B(vd);var wd=["power","reset"];k=vd.prototype; -k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Ca&&(a.Ca+=a.Gb,c=!0);0<=a.Hb&&a.Hb<=Cd(a)&&(a.Gb=a.Hb=-1,zd(a),a.ea(),c=!0);c&&a.i(Cd(a)+" cycles: checksum="+p(a.Vb))}} +b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&sd(a,rd,!1),(a.g=c.g)&&qd(a,rd,!1))}function ud(a,b){b?--a.g||(a.ic=a.f?a.w:a.jc,a.$b=a.f?a.H:a.yc):--a.B||(a.fc=a.sc,a.za=a.tc)}function qd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.H);if(c||void 0===c)a.jc=b[1]||a.w,a.yc=b[3]||a.H}function sd(a,b,c){c&&a.B||(a.fc=b[0]||a.K,a.za=b[2]||a.L);if(c||void 0===c)a.sc=b[0]||a.K,a.tc=b[2]||a.L}function md(a,b){b||(b=vd);sd(a,b,void 0);qd(a,b,void 0)} +var vd=[],pd=[K.prototype.U,K.prototype.Ea,K.prototype.fa,K.prototype.Pa],rd=[K.prototype.S,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var od=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ca],nd=[K.prototype.T,K.prototype.sa,K.prototype.fb,K.prototype.Ga]; +function wd(a,b){x.call(this,"CPU",a,wd,1);b=a.cycles||b;var c=a.multiplier||1;this.Qb=0;this.tb=b;this.jb=c;this.Sb=Math.round(this.tb/1E4)/100;this.Ab=this.Sb*this.jb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Ib=a.csInterval;this.Jb=a.csStop;this.O=[];this.Gc=this.Fe.bind(this);J(this)}B(wd);var xd=["power","reset"];k=wd.prototype; +k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b=a.Ca&&(a.Ca+=a.Ib,c=!0);0<=a.Jb&&a.Jb<=Dd(a)&&(a.Ib=a.Jb=-1,Ad(a),a.ea(),c=!0);c&&a.i(Dd(a)+" cycles: checksum="+p(a.Vb))}} k.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;ca.Ea/a.Ab?b=1:d=!0;a.jb=b;b=a.Qb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Ed(a);return d}function Jc(a,b){var c=a.O.length;a.O.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&ba.O[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Fd(a)),a.O[b][0]=c)} -function Gd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fd(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c} -k.Fe=function(){if(this.C.X){this.Rb>=this.tb&&Ed(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Ec&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Gd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Fd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Fc&&(this.xa(),this.Fc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Cd(this));Ab(this,e.stack|| -e.message);return}if(this.C.X){a=setTimeout;b=this.Gc;this.fa=Ba();var c=this.Ec;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Ea=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Dd(this)));if(0>c||this.Eac&&(this.U-=c),c=0;this.Rb+=this.Ya;this.fa+=c;a(b,c)}}}; -k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Dd(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Cd(this)));setTimeout(this.Gc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Fd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Cd(this));b=!0}this.C.complete=a;return b}; -function Hd(a){this.ib=+a.model||1170;this.Bc=a.addrReset||0;vd.call(this,a,6666667);this.vb=0;this.Dc=255;1120==this.ib?(this.decode=Id.bind(this),this.sa=this.sd,this.vb=8,this.Dc=-1):(this.decode=Jd.bind(this),this.sa=this.td);Kd(this);this.L=0;this.J=null;this.C.complete=!1}B(Hd,vd);k=Hd.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Kd(this);yd(this);this.C.error=!1;this.parent.reset.call(this)}; -function Kd(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Bc,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.hd=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,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.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,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.Sc=[0,0,0,0,0,0,0,0];a.Rc=0;a.I=0;a.F=a.H=0;a.g=a.f=a.Pb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.Ba=0;a.Kb=0;a.lb=255;a.S=0;a.qb=0;a.Pa=262143;a.Tb=0;a.ua=0;a.J=null;a.v&&Ld(a)}function Ld(a){a.S?(a.T=65536,a.Ac=a.Xa&16?4186112:253952,a.da=a.wd,a.za=a.Ce,a.$b=a.Bf,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.Ac=57344,a.da=a.vd,a.za=a.Qc,a.$b=a.Wc,xc(a.v,16))} -function Pc(a){var b=a.Da;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Qc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.ua>>16&65535,a.lc=a.ua&65535);a.Da=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.S!=c&&(a.S=c,Ld(a))}}function Zc(a){a.Da&57344||(a.kc=a.ua>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function $c(a){a.Da&57344||(a.lc=a.ua&65535);return a.lc}function ad(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Ld(a))} -k.Lc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Dd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.I&=-3;a.I|=a.J?2:1}function bd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.I|=1}a.Kb=b}function U(a,b){a.I&256||(a.aa=a.ca=b,a.W=0)}function Ud(a,b,c){a.I&256||(a.aa=a.ca=a.V=b,a.W=c||0)}function Vd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))} -function Wd(a,b){a.I&256||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Xd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))}k.wa=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=cd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);dd(this,f&-12289|this.Ga>>2&12288);Yd(this,this.Ga,d);Yd(this,this.u[7],d);T(this,e);this.I&=~(b|19);this.I|=129;this.Ga=-1;this.md=a;this.Xc=c;if(-3<=c)throw a;}}; -function Zd(a){var b=te(a),c=te(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);dd(a,c);a.I&=-17}function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b} -function ue(a,b,c){var d,e,f;if(!(c&a.S))return f=b&65535,57344<=f&&(f|=a.Ac),f;d=b>>13;a.Xa&a.hd[a.A]||(d&=7);e=a.R[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.L)return f;f&1&&!(c&1)&&(a.Ba|=64,a.wa(4,0,f));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.R[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb= -a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.qb<<5|a.rb<<1,Qc(a,a.Da&-61695|g&61694)),a.wa(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.I|=64)));return f}function ve(a,b){return a.v.dc(b)}function te(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Yd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.sa(4,-2,d);a.$b(d,b)} -function we(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d, -0,e),a.b-=6,e|g;case 7:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.sd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.I|=32)};k.td=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.wa(4,0,-3):(this.Ba|=8,this.I|=32)))};k.ec=function(a){if(!this.S)return this.v.ec(a);this.L++;a=ve(this,ue(this,a,3));this.L--;return a}; -k.Va=function(a){if(!this.S)return this.v.Va(a);this.L++;a=this.Qc(ue(this,a,2));this.L--;return a};k.Cb=function(a,b){this.S?(this.L++,a=ue(this,a,5),a&1&&this.b--,this.v.Lb(a,b),this.L--):this.v.Cb(a,b)};k.nb=function(a,b){this.S?(this.L++,this.Wc(ue(this,a,4),b),this.L--):this.v.nb(a,b)};k.vd=function(a,b,c){return we(this,a,b,c)};k.wd=function(a,b,c){return ue(this,we(this,a,b,c),c)};k.Qc=function(a){return this.v.ta(this.Tb=a)};k.Ce=function(a){return this.v.ta(this.Tb=ue(this,a,2))}; -k.Wc=function(a,b){this.v.Db(this.Tb=a,b&65535)};k.Bf=function(a,b){this.v.Db(this.Tb=ue(this,a,4),b)};function xe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=we(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c} -function ye(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=we(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ue(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function ze(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?ve(a,a.da(b,c,3)):a.u[c+a.vb]&a.Dc}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c+a.vb]}function Be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return we(a,b,c,8)} -function Ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ve(a,a.da(b,c,3)):a.u[c]&255}function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c]}function Ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Pb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ve(a,e)),e&1&&a.b--,a.v.Lb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))} -function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Lb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c} +!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Ed(d,d.jb<<1,!0)},c.textContent=this.Ab.toFixed(2)+"Mhz",!0}return!1};k.xa=function(a){this.B&&this.B.xa(a)};function Ub(a,b,c){a.oa+=b;c&&(a.ga=a.b=a.K=0)}function Fd(a,b){var c=1;b&&1a.Ea/a.Ab?b=1:d=!0;a.jb=b;b=a.Sb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Fd(a);return d}function Jc(a,b){var c=a.O.length;a.O.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&ba.O[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Gd(a)),a.O[b][0]=c)} +function Hd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Gd(a,b){var c=a.ga-=a.b;a.b=a.K=0;b&&(a.ga=0);return c} +k.Fe=function(){if(this.C.X){this.Tb>=this.tb&&Fd(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Ec&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Hd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Gd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Fc&&(this.xa(),this.Fc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Dd(this));Ab(this,e.stack|| +e.message);return}if(this.C.X){a=setTimeout;b=this.Gc;this.fa=Ba();var c=this.Ec;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Ea=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Ed(this)));if(0>c||this.Eac&&(this.U-=c),c=0;this.Tb+=this.Ya;this.fa+=c;a(b,c)}}}; +k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Ed(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Dd(this)));setTimeout(this.Gc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Gd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Dd(this));b=!0}this.C.complete=a;return b}; +function Id(a){this.ib=+a.model||1170;this.Bc=a.addrReset||0;wd.call(this,a,6666667);this.vb=0;this.Dc=255;1120==this.ib?(this.decode=Jd.bind(this),this.sa=this.sd,this.vb=8,this.Dc=-1):(this.decode=Kd.bind(this),this.sa=this.td);Ld(this);this.L=0;this.J=null;this.C.complete=!1}B(Id,wd);k=Id.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Ld(this);zd(this);this.C.error=!1;this.parent.reset.call(this)}; +function Ld(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Bc,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.hd=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,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.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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,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.Sc=[0,0,0,0,0,0,0,0];a.Rc=0;a.I=0;a.F=a.H=0;a.g=a.f=a.Rb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.Ba=0;a.Mb=0;a.lb=255;a.S=0;a.qb=0;a.Pa=262143;a.Ub=0;a.ua=0;a.J=null;a.v&&Md(a)}function Md(a){a.S?(a.T=65536,a.Ac=a.Xa&16?4186112:253952,a.da=a.wd,a.za=a.Ce,a.$b=a.Bf,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.Ac=57344,a.da=a.vd,a.za=a.Qc,a.$b=a.Wc,xc(a.v,16))} +function Qc(a){var b=a.Da;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Zc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.ua>>16&65535,a.lc=a.ua&65535);a.Da=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.S!=c&&(a.S=c,Md(a))}}function $c(a){a.Da&57344||(a.kc=a.ua>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ad(a){a.Da&57344||(a.lc=a.ua&65535);return a.lc}function bd(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Md(a))} +k.Lc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Ed(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.I&=-3;a.I|=a.J?2:1}function cd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.I|=1}a.Mb=b}function U(a,b){a.I&256||(a.aa=a.ca=b,a.W=0)}function Vd(a,b,c){a.I&256||(a.aa=a.ca=a.V=b,a.W=c||0)} +function Wd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))}function Xd(a,b){a.I&256||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Yd(a,b,c,d){a.I&256||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))} +k.wa=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=dd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);ed(this,f&-12289|this.Ga>>2&12288);Zd(this,this.Ga,d);Zd(this,this.u[7],d);T(this,e);this.I&=~(b|19);this.I|=129;this.Ga=-1;this.md=a;this.Xc=c;if(-3<=c)throw a;}};function te(a){var b=ue(a),c=ue(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);ed(a,c);a.I&=-17} +function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b} +function ve(a,b,c){var d,e,f;if(!(c&a.S))return f=b&65535,57344<=f&&(f|=a.Ac),f;d=b>>13;a.Xa&a.hd[a.A]||(d&=7);e=a.R[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.L)return f;f&1&&!(c&1)&&(a.Ba|=64,a.wa(4,0,f));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.R[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb= +a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.qb<<5|a.rb<<1,Zc(a,a.Da&-61695|g&61694)),a.wa(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.I|=64)));return f}function we(a,b){return a.v.dc(b)}function ue(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Zd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.sa(4,-2,d);a.$b(d,b)} +function xe(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d, +0,e),a.b-=6,e|g;case 7:return e=a.za(Sd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.sd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.I|=32)};k.td=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.wa(4,0,-3):(this.Ba|=8,this.I|=32)))};k.ec=function(a){if(!this.S)return this.v.ec(a);this.L++;a=we(this,ve(this,a,3));this.L--;return a}; +k.Va=function(a){if(!this.S)return this.v.Va(a);this.L++;a=this.Qc(ve(this,a,2));this.L--;return a};k.Cb=function(a,b){this.S?(this.L++,a=ve(this,a,5),a&1&&this.b--,this.v.Nb(a,b),this.L--):this.v.Cb(a,b)};k.nb=function(a,b){this.S?(this.L++,this.Wc(ve(this,a,4),b),this.L--):this.v.nb(a,b)};k.vd=function(a,b,c){return xe(this,a,b,c)};k.wd=function(a,b,c){return ve(this,xe(this,a,b,c),c)};k.Qc=function(a){return this.v.ta(this.Ub=a)};k.Ce=function(a){return this.v.ta(this.Ub=ve(this,a,2))}; +k.Wc=function(a,b){this.v.Db(this.Ub=a,b&65535)};k.Bf=function(a,b){this.v.Db(this.Ub=ve(this,a,4),b)};function ye(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xe(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c} +function ze(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xe(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ve(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c+a.vb]&a.Dc}function Be(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c+a.vb]}function Ce(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xe(a,b,c,8)} +function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c]&255}function Ee(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c]}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Rb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,we(a,e)),e&1&&a.b--,a.v.Nb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))} +function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ge(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Nb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function He(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c} function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.pb=function(a){this.C.complete=!0;var b=this.j?He(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Ie(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.I){if(a=this.I&11)if(a=!1,this.I&2){var d=160,e=(this.Kb&224)>>5,f=this.J&&this.J.kb>e?this.J:null;f&&(d=f.xc,e=f.kb);e>(this.P&224)>>5?(this.I&8&&(Rd(this,2),this.I&=-9),this.wa(d,0,-9),e=!0):e=!1;e&&(f&&Sd(this,f),a=!0);this.J||this.Kb||(this.I&=-3)}else this.I&1&&this.I++;if(a){if(b&&Ie(this.j,this.u[7], -c)){this.ea();break}if(0>c)break}if(this.I&112&&Td(this)){if(b&&Ie(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.I=this.I&15|this.P&16;this.decode(Qd(this))}while(0>1|b<<16;Wd(this,a);return a&65535}function Oe(a,b){a=b&128|b>>1|b<<8;Wd(this,a<<8);return a&255}function Pe(a,b){a=b&~a;U(this,a);return a}function Qe(a,b){a=b&~a;U(this,a<<8);return a}function Re(a,b){a|=b;U(this,a);return a}function Se(a,b){a|=b;U(this,a<<8);return a}function Te(a,b){a=~b|65536;Ud(this,a);return a&65535} -function Ue(a,b){a=~b|256;Ud(this,a<<8);return a&255}function Ve(a,b){a=b-a;this.I&256||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function We(a,b){a=b-a;var c=a<<8;b<<=8;this.I&256||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Xe(a,b){a=b+a;this.I&256||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ye(a,b){a=b+a;var c=a<<8;this.I&256||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function Ze(a,b){a=-b;Ud(this,a,a&b&32768);return a&65535} -function $e(a,b){a=-b;Ud(this,a<<8,(a&b&128)<<8);return a&255}function af(a,b){a=b<<1|this.V>>16&1;Wd(this,a);return a&65535}function bf(a,b){a=b<<1|this.V>>16&1;Wd(this,a<<8);return a&255}function cf(a,b){a=(this.V&65536|b)>>1|b<<16;Wd(this,a);return a&65535}function df(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Wd(this,a<<8);return a&255}function ef(a,b){var c=b-a;Xd(this,c,a,b);return c&65535}function ff(a,b){var c=b-a;Xd(this,c<<8,a<<8,b<<8);return c&255} -function gf(a,b){this.I&256||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function hf(a,b){a^=b;U(this,a);return a&65535}function jf(a){V(this,a,Ae(this,a),Je);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function kf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.aa=this.ca=c;this.b-=(this.g?6:7)+b} -function lf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function mf(a){W(this,a,!Md(this))}function nf(a){W(this,a,Md(this))} -function of(a){V(this,a,Ae(this,a),Pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function pf(a){Ee(this,a,ze(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){V(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){Ee(this,a,ze(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function sf(a){var b=Ae(this,a);a=De(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function tf(a){var b=ze(this,a);a=Ce(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){W(this,a,Od(this))}function vf(a){W(this,a,!Pd(this)==!Nd(this))}function wf(a){W(this,a,!Od(this)&&!Pd(this)==!Nd(this))}function xf(a){W(this,a,!Md(this)&&!Od(this))} -function yf(a){W(this,a,Od(this)||!Pd(this)!=!Nd(this))}function zf(a){W(this,a,Md(this)||Od(this))}function Af(a){W(this,a,!Pd(this)!=!Nd(this))}function Bf(a){W(this,a,Pd(this))}function Cf(a){W(this,a,!Od(this))}function Df(a){W(this,a,!Pd(this))}function Ef(){this.wa(12,0,-8);this.b-=5}function Ff(a){W(this,a,!0)}function Gf(a){W(this,a,!Nd(this))}function Hf(a){W(this,a,Nd(this))}function If(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5} -function Jf(a){var b=Ae(this,a);a=De(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Kf(a){var b=ze(this,a);a=Ce(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} -function Lf(a){var b=De(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Mf(){this.wa(24,0,-8);this.b-=25} -function Nf(){this.P&49152?(this.Ba|=128,this.wa(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Of(this.j):this.ea());this.b-=7}function Pf(){this.wa(16,0,-8);this.b-=25}var Qf=[0,7,7,10,7,11,9,13];function Rf(a){this.K=this.b;T(this,Be(this,a));this.b=this.K-Qf[this.g]}var Sf=[0,14,14,17,14,18,16,20];function Tf(a){this.K=this.b;var b=Be(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Sf[this.g]} -var Uf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Vf(a){var b=Ae(this,a);this.K=this.b;U(this,Ge(this,a,b));this.b=this.K-Uf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Wf(a){var b=ze(this,a);U(this,Fe(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Xf=[7,13,13,17,14,18,17,21]; -function Yf(a){var b=De(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&256||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function eg(a){V(this,a,Ae(this,a),ef);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function fg(a){V(this,a,0,gf);this.b-=this.g?9:3+(7==this.f?2:0)}function gg(){this.wa(28,0,-8);this.b-=5} -function hg(){this.w&&(this.w.vc(this.u[7],!0),this.w.setData(this.u[0],!0));this.I|=8;Rd(this,-2);this.b-=3}function ig(a){V(this,a,this.u[(a>>6&7)+this.vb],hf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Of(b)):b=!1;b||this.wa(8,0,-8)}function Id(a){jg[a>>12].call(this,a)}function kg(a){lg[a>>6&3].call(this,a)}function mg(a){ng[a>>6&3].call(this,a)}function og(a){pg[a>>6&3].call(this,a)} -function qg(a){rg[a&15].call(this,a)}function sg(a){tg[a&15].call(this,a)}function ug(a){vg[a>>6&3].call(this,a)}function wg(a){xg[a>>6&3].call(this,a)}function yg(a){zg[a>>6&3].call(this,a)} -var jg=[function(a){Ag[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,jf,X,function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,eg,X],Ag=[function(a){Cg[a>>4&15].call(this,a)},Ff,Cf,uf,vf,Af,wf,yf,Tf,Tf,kg,mg,og,X,X,X],lg=[function(a){Ud(this,Ge(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ve);this.b-=this.g?9:3+(7==this.f?2:0)}],ng=[function(a){V(this,a,0, -Ze);this.b-=this.g?11:6},function(a){V(this,a,Md(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Md(this)?1:0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=De(this,a);Ud(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],pg=[function(a){V(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}], -Cg=[function(a){Dg[a&15].call(this,a)},X,X,X,Rf,Rf,Rf,Rf,ag,X,qg,sg,fg,fg,fg,fg],Dg=[Nf,hg,bg,Ef,Pf,$f,X,X,X,X,X,X,X,X,X,X],rg=[Zf,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},If,function(){this.ca=1;this.b-=5},If,If,If,function(){this.aa=0;this.b-=5},If,If,If,If,If,If,If],tg=[Zf,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},cg,function(){this.ca=0;this.b-=5},cg,cg,cg,function(){this.aa=32768;this.b-=5},cg,cg,cg,cg,cg,cg,cg],Bg=[Df,Bf,xf,zf,Gf,Hf,mf,nf,Mf, -gg,ug,wg,yg,X,X,X],vg=[function(a){Ud(this,Fe(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],xg=[function(a){Ee(this,a,0,$e);this.b-=this.g?11:6},function(a){Ee(this,a,Md(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,Md(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a= -Ce(this,a);Ud(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],zg=[function(a){Ee(this,a,0,df);this.b-=this.g?9+(this.Pb&1):3+(7==this.f?2:0)},function(a){Ee(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,0,Oe);this.b-=this.g?9+(this.Pb&1):3+(7==this.f?2:0)},function(a){Ee(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}];function Jd(a){Eg[a>>12].call(this,a)} -var Eg=[function(a){Fg[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,jf,function(a){Gg[a>>8&15].call(this,a)},function(a){Hg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,eg,X],Fg=[function(a){Ig[a>>4&15].call(this,a)},Ff,Cf,uf,vf,Af,wf,yf,Tf,Tf,kg,mg,og,function(a){Jg[a>>6&3].call(this,a)},X,X],Jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xe(this,a,0);Yd(this,a);U(this,a);this.b-=11},function(a){var b=te(this);this.K= -this.b;ye(this,a,0,b);U(this,b);this.b=this.K-Xf[this.g]},function(a){U(this,Ge(this,a,Pd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ig=[function(a){Kg[a&15].call(this,a)},X,X,X,Rf,Rf,Rf,Rf,ag,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.I|=1,this.I&=-3),this.b-=5):X.call(this,a)},qg,sg,fg,fg,fg,fg],Kg=[Nf,hg,function(){Zd(this);this.I|=this.P&16;this.b-=13},Ef,Pf,$f,bg,function(){this.wa(8,0,-8)},X,X,X,X,X,X,X,X],Gg=[Yf,Yf,Lf,Lf,kf,kf,lf,lf,ig,ig,X,X,X,X,dg,dg],Hg= -[Df,Bf,xf,zf,Gf,Hf,mf,nf,Mf,gg,ug,wg,yg,function(a){Lg[a>>6&3].call(this,a)},X,X],Lg=[X,function(a){a=xe(this,a,65536);Yd(this,a);U(this,a);this.b-=11},function(a){var b=te(this);this.K=this.b;ye(this,a,65536,b);U(this,b);this.b=this.K-Xf[this.g]},X]; -function Mg(a){x.call(this,"ROM",a,Mg,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Ng(c)})}}B(Mg);k=Mg.prototype; -k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Ng(this)};k.Ka=function(){this.ja&&(this.j&&Og(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0}; -function Ng(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Mg.prototype.qe,Mg.prototype.pf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,kd)){for(c=0;c>>a.na;0=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+= -b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=la.zc&&c<=la.jd&&(b=!0,c-=la.zc-la.Yc);b&&(a.preventDefault&&a.preventDefault(),d.gc(c));return!0},c.onkeypress=function(a){a=a||window.event;d.gc(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData|| +k.pb=function(a){this.C.complete=!0;var b=this.j?Ie(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Je(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.I){if(a=this.I&11)if(a=!1,this.I&2){var d=160,e=(this.Mb&224)>>5,f=this.J&&this.J.kb>e?this.J:null;f&&(d=f.xc,e=f.kb);e>(this.P&224)>>5?(this.I&8&&(Sd(this,2),this.I&=-9),this.wa(d,0,-9),e=!0):e=!1;e&&(f&&Td(this,f),a=!0);this.J||this.Mb||(this.I&=-3)}else this.I&1&&this.I++;if(a){if(b&&Je(this.j,this.u[7], +c)){this.ea();break}if(0>c)break}if(this.I&112&&Ud(this)){if(b&&Je(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.I=this.I&15|this.P&16;this.decode(Rd(this))}while(0>1|b<<16;Xd(this,a);return a&65535}function Pe(a,b){a=b&128|b>>1|b<<8;Xd(this,a<<8);return a&255}function Qe(a,b){a=b&~a;U(this,a);return a}function Re(a,b){a=b&~a;U(this,a<<8);return a}function Se(a,b){a|=b;U(this,a);return a}function Te(a,b){a|=b;U(this,a<<8);return a}function Ue(a,b){a=~b|65536;Vd(this,a);return a&65535} +function Ve(a,b){a=~b|256;Vd(this,a<<8);return a&255}function We(a,b){a=b-a;this.I&256||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function Xe(a,b){a=b-a;var c=a<<8;b<<=8;this.I&256||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Ye(a,b){a=b+a;this.I&256||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ze(a,b){a=b+a;var c=a<<8;this.I&256||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function $e(a,b){a=-b;Vd(this,a,a&b&32768);return a&65535} +function af(a,b){a=-b;Vd(this,a<<8,(a&b&128)<<8);return a&255}function bf(a,b){a=b<<1|this.V>>16&1;Xd(this,a);return a&65535}function cf(a,b){a=b<<1|this.V>>16&1;Xd(this,a<<8);return a&255}function df(a,b){a=(this.V&65536|b)>>1|b<<16;Xd(this,a);return a&65535}function ef(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Xd(this,a<<8);return a&255}function ff(a,b){var c=b-a;Yd(this,c,a,b);return c&65535}function gf(a,b){var c=b-a;Yd(this,c<<8,a<<8,b<<8);return c&255} +function hf(a,b){this.I&256||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function jf(a,b){a^=b;U(this,a);return a&65535}function kf(a){V(this,a,Be(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function lf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.aa=this.ca=c;this.b-=(this.g?6:7)+b} +function mf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function nf(a){W(this,a,!Nd(this))}function of(a){W(this,a,Nd(this))} +function pf(a){V(this,a,Be(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){Fe(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){V(this,a,Be(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){Fe(this,a,Ae(this,a),Te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function tf(a){var b=Be(this,a);a=Ee(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){var b=Ae(this,a);a=De(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function vf(a){W(this,a,Pd(this))}function wf(a){W(this,a,!Qd(this)==!Od(this))}function xf(a){W(this,a,!Pd(this)&&!Qd(this)==!Od(this))}function yf(a){W(this,a,!Nd(this)&&!Pd(this))} +function zf(a){W(this,a,Pd(this)||!Qd(this)!=!Od(this))}function Af(a){W(this,a,Nd(this)||Pd(this))}function Bf(a){W(this,a,!Qd(this)!=!Od(this))}function Cf(a){W(this,a,Qd(this))}function Df(a){W(this,a,!Pd(this))}function Ef(a){W(this,a,!Qd(this))}function Ff(){this.wa(12,0,-8);this.b-=5}function Gf(a){W(this,a,!0)}function Hf(a){W(this,a,!Od(this))}function If(a){W(this,a,Od(this))}function Jf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5} +function Kf(a){var b=Be(this,a);a=Ee(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Lf(a){var b=Ae(this,a);a=De(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Yd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} +function Mf(a){var b=Ee(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Nf(){this.wa(24,0,-8);this.b-=25} +function Of(){this.P&49152?(this.Ba|=128,this.wa(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Pf(this.j):this.ea());this.b-=7}function Qf(){this.wa(16,0,-8);this.b-=25}var Rf=[0,7,7,10,7,11,9,13];function Sf(a){this.K=this.b;T(this,Ce(this,a));this.b=this.K-Rf[this.g]}var Tf=[0,14,14,17,14,18,16,20];function Uf(a){this.K=this.b;var b=Ce(this,a);a=a>>6&7;Zd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.K-Tf[this.g]} +var Vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Wf(a){var b=Be(this,a);this.K=this.b;U(this,He(this,a,b));this.b=this.K-Vf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Xf(a){var b=Ae(this,a);U(this,Ge(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Yf=[7,13,13,17,14,18,17,21]; +function Zf(a){var b=Ee(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&256||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function fg(a){V(this,a,Be(this,a),ff);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function gg(a){V(this,a,0,hf);this.b-=this.g?9:3+(7==this.f?2:0)}function hg(){this.wa(28,0,-8);this.b-=5} +function ig(){this.w&&(this.w.vc(this.u[7],!0),this.w.setData(this.u[0],!0));this.I|=8;Sd(this,-2);this.b-=3}function jg(a){V(this,a,this.u[(a>>6&7)+this.vb],jf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Pf(b)):b=!1;b||this.wa(8,0,-8)}function Jd(a){kg[a>>12].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)} +function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)} +var kg=[function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,X,function(a){Cg[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Bg=[function(a){Dg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,X,X,X],mg=[function(a){Vd(this,He(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){V(this,a,0, +$e);this.b-=this.g?11:6},function(a){V(this,a,Nd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Nd(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ee(this,a);Vd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}], +Dg=[function(a){Eg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,X,rg,tg,gg,gg,gg,gg],Eg=[Of,ig,cg,Ff,Qf,ag,X,X,X,X,X,X,X,X,X,X],sg=[$f,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Jf,function(){this.ca=1;this.b-=5},Jf,Jf,Jf,function(){this.aa=0;this.b-=5},Jf,Jf,Jf,Jf,Jf,Jf,Jf],ug=[$f,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},dg,function(){this.ca=0;this.b-=5},dg,dg,dg,function(){this.aa=32768;this.b-=5},dg,dg,dg,dg,dg,dg,dg],Cg=[Ef,Cf,yf,Af,Hf,If,nf,of,Nf, +hg,vg,xg,zg,X,X,X],wg=[function(a){Vd(this,Ge(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)}],yg=[function(a){Fe(this,a,0,af);this.b-=this.g?11:6},function(a){Fe(this,a,Nd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,Nd(this)?1:0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a= +De(this,a);Vd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Ag=[function(a){Fe(this,a,0,ef);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Pe);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}];function Kd(a){Fg[a>>12].call(this,a)} +var Fg=[function(a){Gg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,function(a){Hg[a>>8&15].call(this,a)},function(a){Ig[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Gg=[function(a){Jg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,function(a){Kg[a>>6&3].call(this,a)},X,X],Kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ye(this,a,0);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K= +this.b;ze(this,a,0,b);U(this,b);this.b=this.K-Yf[this.g]},function(a){U(this,He(this,a,Qd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Jg=[function(a){Lg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.I|=1,this.I&=-3),this.b-=5):X.call(this,a)},rg,tg,gg,gg,gg,gg],Lg=[Of,ig,function(){te(this);this.I|=this.P&16;this.b-=13},Ff,Qf,ag,cg,function(){this.wa(8,0,-8)},X,X,X,X,X,X,X,X],Hg=[Zf,Zf,Mf,Mf,lf,lf,mf,mf,jg,jg,X,X,X,X,eg,eg],Ig= +[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,hg,vg,xg,zg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[X,function(a){a=ye(this,a,65536);Zd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.K=this.b;ze(this,a,65536,b);U(this,b);this.b=this.K-Yf[this.g]},X]; +function Ng(a){x.call(this,"ROM",a,Ng,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Og(c)})}}B(Ng);k=Ng.prototype; +k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Og(this)};k.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0}; +function Og(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Ng.prototype.qe,Ng.prototype.pf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,ld)){for(c=0;c>>a.na;0=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+= +b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=la.zc&&c<=la.jd&&(b=!0,c-=la.zc-la.Yc);b&&(a.preventDefault&&a.preventDefault(),d.gc(c));return!0},c.onkeypress=function(a){a=a||window.event;d.gc(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData|| window.clipboardData)&&d.gc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; -k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;var e=this;this.ga=Mc(48,4,262144);this.ba=Jc(this.b,function(){var a;a=-1;e.H.length&&(a=e.H.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.fa&&97<=a&&122>a&&(a-=32),Lc(e.b,e.ba,1E3/Math.round(e.S/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.ga))});this.O=Mc(52,4,262144);this.sa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.O)});Jb(b,this,Vg);Lb(b,this.reset.bind(this));J(this)}; -k.Oc=function(){if(!this.J){var a=xd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.J=nb(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.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Oc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ja=function(a){return a?this.save():!0};k.reset=function(){Wg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Wg(this)};function Wg(a){a.K=0;a.f=0;a.g=128;a.H=[];return!0}k.gc=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da&&(a-=32),Lc(e.b,e.ba,1E3/Math.round(e.S/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.ga))});this.O=Mc(52,4,262144);this.sa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.O)});Jb(b,this,Wg);Lb(b,this.reset.bind(this));J(this)}; +k.Oc=function(){if(!this.J){var a=yd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.J=nb(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.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Oc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ja=function(a){return a?this.save():!0};k.reset=function(){Xg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.K=0;a.f=0;a.g=128;a.H=[];return!0}k.gc=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=xa("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.A){if(10==a||1024<= -this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Lc(this.b,this.sa,1E3/Math.round(this.oa/10));this.g&=-129};var Xg={},Vg=(Xg[65392]=[null,null,Tg.prototype.de,Tg.prototype.af,"RCSR"],Xg[65394]=[null,null,Tg.prototype.ce,Tg.prototype.$e,"RBUF"],Xg[65396]=[null,null,Tg.prototype.Ee,Tg.prototype.Df,"XCSR"],Xg[65398]=[null,null,Tg.prototype.De,Tg.prototype.Cf,"XBUF"],Xg); -ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick= -function(){var a=d.D.listTapes;a&&th(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.S){c.parentNode.removeChild(c);break}this.D[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;th(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1}; -k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.ba=uh(a);var e=this;if((this.g=xd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=oa(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.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Dh(a,b,c,d,e.ha,e.Ra, -e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Ah(a)})}function xh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;d'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick= +function(){var a=d.D.listTapes;a&&uh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.S){c.parentNode.removeChild(c);break}this.D[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;uh(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1}; +k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.ba=vh(a);var e=this;if((this.g=yd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=oa(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.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Eh(a,b,c,d,e.ha,e.Ra, +e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Bh(a)})}function yh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;dc.indexOf("/api/v1/dump")&&(b=oa(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"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f, -null,!0,function(b,c,d){Kh(a,b,c,d)})} -function Kh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A>2,e=Array(d),f=0;fd&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A>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.Ma?f=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<g)break;e|=g<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 ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=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.N("Unable to restore disk '"+this.Ta+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=Nh(this,a++);)Qh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.J=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype; -k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 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.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Rh(d,a)},!0;case "loadDrive":return this.D[b]= -c,c.onclick=function(){var a=d.D.listDisks;a&&Sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[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;Sh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);Th(this);this.Sb=Mc(144,5,65536);Jb(b,this,Uh);Lb(b,this.reset.bind(this));Vh(this,"None","",!0);this.K&&Vh(this,"Local Disk","?");Vh(this,"Remote Disk","??");Wh(this)||J(this)}; -k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Rh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Th(this)};k.save=function(){return(new S(this)).data()}; -k.restore=function(a){return Th(this,a[0])};function Wh(a,b){b||(a.F=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('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=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Yh(a,e,b,c,!1,d)}else Xh(a,e)} -function Yh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Xh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.ad)&&g++));return g} -k.ad=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Rh(this,a.zb)}; -function Vh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Sh(d,a)},!0;case "loadDrive":return this.D[b]= +c,c.onclick=function(){var a=d.D.listDisks;a&&Th(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[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;Th(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);Uh(this);this.Gb=Mc(144,5,65536);Jb(b,this,Vh);Lb(b,this.reset.bind(this));Wh(this,"None","",!0);this.K&&Wh(this,"Local Disk","?");Wh(this,"Remote Disk","??");Xh(this)||J(this)}; +k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Sh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Uh(this)};k.save=function(){return(new S(this)).data()}; +k.restore=function(a){return Uh(this,a[0])};function Xh(a,b){b||(a.F=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('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=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Zh(a,e,b,c,!1,d)}else Yh(a,e)} +function Zh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Yh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.ad)&&g++));return g} +k.ad=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Sh(this,a.zb)}; +function Wh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.H=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.bd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=32;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)}; k.cd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=32;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.ie=function(){return this.L};k.ff=function(){};k.je=function(){return this.A};k.gf=function(){};k.fe=function(){return this.M&61438}; k.cf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.bd;case 2:b||(b=this.cd),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.H&65535,c=b.call(this,d,e,f,g,c,h,this.$c.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&= --2,this.M|=128,this.M&64&&Kc(this.b,this.Sb))}};k.ke=function(){return this.H};k.hf=function(a){this.H=a};k.ee=function(){return this.w};k.bf=function(a){this.w=a};k.ge=function(){return this.f};k.df=function(a){this.f=a};k.he=function(){return this.O};k.ef=function(a){this.O=a}; -var Zh={},Uh=(Zh[65280]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKDS"],Zh[65282]=[null,null,Q.prototype.je,Q.prototype.gf,"RKER"],Zh[65284]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKCS"],Zh[65286]=[null,null,Q.prototype.ke,Q.prototype.hf,"RKWC"],Zh[65288]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKBA"],Zh[65290]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDA"],Zh[65294]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDB"],Zh); +-2,this.M|=128,this.M&64&&Kc(this.b,this.Gb))}};k.ke=function(){return this.H};k.hf=function(a){this.H=a};k.ee=function(){return this.w};k.bf=function(a){this.w=a};k.ge=function(){return this.f};k.df=function(a){this.f=a};k.he=function(){return this.O};k.ef=function(a){this.O=a}; +var $h={},Vh=($h[65280]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKDS"],$h[65282]=[null,null,Q.prototype.je,Q.prototype.gf,"RKER"],$h[65284]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKCS"],$h[65286]=[null,null,Q.prototype.ke,Q.prototype.hf,"RKWC"],$h[65288]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKBA"],$h[65290]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDA"],$h[65294]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDB"],$h); function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.H=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype; -k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("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.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&$h(d,a)},!0;case "loadDrive":return this.D[b]= -c,c.onclick=function(){var a=d.D.listDisks;a&&ai(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[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;ai(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);bi(this);this.Sb=Mc(112,5,131072);Jb(b,this,ci);Lb(b,this.reset.bind(this));di(this,"None","",!0);this.L&&di(this,"Local Disk","?");di(this,"Remote Disk","??");ei(this)||J(this)}; -k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";$h(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){bi(this)};k.save=function(){return(new S(this)).data()}; -k.restore=function(a){return bi(this,a[0])};function ei(a,b){b||(a.H=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('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=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}gi(a,e,b,c,!1,d)}else fi(a,e)} -function gi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,fi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.ed)&&g++));return g} -k.ed=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));$h(this,a.zb)}; -function di(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ai(d,a)},!0;case "loadDrive":return this.D[b]= +c,c.onclick=function(){var a=d.D.listDisks;a&&bi(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Qh(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[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;bi(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=yd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);ci(this);this.Gb=Mc(112,5,131072);Jb(b,this,di);Lb(b,this.reset.bind(this));ei(this,"None","",!0);this.L&&ei(this,"Local Disk","?");ei(this,"Remote Disk","??");fi(this)||J(this)}; +k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ai(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){ci(this)};k.save=function(){return(new S(this)).data()}; +k.restore=function(a){return ci(this,a[0])};function fi(a,b){b||(a.H=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('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=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}hi(a,e,b,c,!1,d)}else gi(a,e)} +function hi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,gi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Kh(new Gh(a,h,"preload"),c,d,f,a.ed)&&g++));return g} +k.ed=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Nh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));ai(this,a.zb)}; +function ei(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.J=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.M=this.M|a|32768);return!0}; k.fd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=5120;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)}; k.gd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=5120;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.ne=function(){return this.M&65535}; k.lf=function(a){this.M=this.M&-1023|a&1022;this.O=this.O&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.F=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.F=this.A;break;case 12:b=this.fd;case 10:b||(b=this.gd),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.J& -63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.dd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Sb))}};k.le=function(){return this.w};k.jf=function(a){this.w=a&65534};k.oe=function(){return this.f};k.mf=function(a){this.f=a};k.pe=function(){return this.F};k.nf=function(a){this.F=a};k.me=function(){return this.J};k.kf=function(a){this.J=a&63}; -var hi={},ci=(hi[63744]=[null,null,P.prototype.ne,P.prototype.lf,"RLCS"],hi[63746]=[null,null,P.prototype.le,P.prototype.jf,"RLBA"],hi[63748]=[null,null,P.prototype.oe,P.prototype.mf,"RLDA"],hi[63750]=[null,null,P.prototype.pe,P.prototype.nf,"RLMP"],hi[63752]=[null,null,P.prototype.me,P.prototype.kf,"RLBE"],hi);function ii(a){x.call(this,"Debugger",a,ii);this.oa=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(ii); -var ji={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ii.prototype.Mc=function(){return-1};ii.prototype.Nc=function(){}; -function ki(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function li(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; +63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.dd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Gb))}};k.le=function(){return this.w};k.jf=function(a){this.w=a&65534};k.oe=function(){return this.f};k.mf=function(a){this.f=a};k.pe=function(){return this.F};k.nf=function(a){this.F=a};k.me=function(){return this.J};k.kf=function(a){this.J=a&63}; +var ii={},di=(ii[63744]=[null,null,P.prototype.ne,P.prototype.lf,"RLCS"],ii[63746]=[null,null,P.prototype.le,P.prototype.jf,"RLBA"],ii[63748]=[null,null,P.prototype.oe,P.prototype.mf,"RLDA"],ii[63750]=[null,null,P.prototype.pe,P.prototype.nf,"RLMP"],ii[63752]=[null,null,P.prototype.me,P.prototype.kf,"RLBE"],ii);function ji(a){x.call(this,"Debugger",a,ji);this.oa=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(ji); +var ki={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ji.prototype.Mc=function(){return-1};ji.prototype.Nc=function(){}; +function li(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function mi(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 mi(a,b,c){var d;if(b){b=ni(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+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function qi(a,b){if(b)return pi(a,b,a.fa[b]);var c=0;for(b in a.fa)pi(a,b,a.fa[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ri(a,b){if(b)return qi(a,b,a.fa[b]);var c=0;for(b in a.fa)qi(a,b,a.fa[b]),c++;return 0this.b.ib?Ai:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Bi(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(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.Nc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=cd(this.b);break;case 21:b=c.Kb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Pc(c);break;case 25:b=Zc(c);break;case 26:b=$c(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b}; -k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).G));if(!this.sa||a!=this.sa)if(this.sa=a,this.pa&1073741824)this.ba.push(a);else{var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||xb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Fd(a),a.Fa=0,a.xa())}}; -function ti(a){var b;if(!He(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ga=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.S?Ii(a):Ji(a)}}function Hi(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ti(this);this.Fa=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ki(this);a||Ad(this)};k.save=function(){var a=new S(this);a.set(0,Di(this.L));a.set(1,Di(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Ei(a[b++]),this.T=Ei(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.i("running");this.C.X=!0;this.Pb=a;this.Qb=b}; -k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Qb;if(!this.S){b="stopped";if(this.K){a-=this.Pb;var c=0d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.vc(a.H[a.ga],b),++a.ga==a.H.length&&(a.ga=0)));return!1}function Of(a){var b=a.b;if(b.C.X)throw T(b,a.b.ua&65535),a.ea(),-1;return!1} -function si(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Li(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Mi(this,a,a.length-1,"set"),ti(this)));return d}; -function Li(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g>>d.na],b==a.F));h.Ua||ti(a);break}}return f}function Ni(a,b){for(var c=1;c>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6), -A&63)switch(A=C&7,C&56){case 0:y=Gi(A);break;case 8:y="@"+Gi(A);break;case 16:7>A?y="("+Gi(A)+")+":(C=v.ta(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Gi(A)+")+":(C=v.ta(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Gi(A)+")";break;case 40:y="@-("+Gi(A)+")";break;case 48:C=v.ta(t,2);y=L(v,C,0,!0)+"("+Gi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.ta(t,2),y="@"+L(v,C)+"("+Gi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]); -0b)c=Gi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,cd(d));break;case 21:c="IR="+L(a,d.Kb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Pc(d));break;case 25:c="MMR1="+L(a,Zc(d));break;case 26:c="MMR2="+L(a,$c(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&& -(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Ri(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Qi(a,"T")+Qi(a,"N")+Qi(a,"Z")+Qi(a,"V")+Qi(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Jc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({pg:b,G:c,yd:d,ja:e,Hc:f})}function Si(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b>>0,h=f.yd;if(e>=g&&eb)){e.u[b]= -g&65535;break}a.i("unknown register: "+f);return}a.B.xa();a.i("updated registers:")}}a.i(Ri(a,d));c&&(a.L=Y(e.u[7]),Ji(a,L(a,a.L.G)))}}function Wi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Pi(a,b,g,f);a.i(f);a.L=b;e-=b.G-l;c++}}} -function Oi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0n||"z"ua.length&&(a.i("note: only "+ua.length+" available"),ea=ua.length);ka-=ea;0>ka&&(null==ua[ua.length-1].G?(ea=ka+ea,ka=0):ka+=ua.length);var be=[];"call"==dh&&(ac=1E5,be=["CALL"]);for(void 0!==ch&&a.i(ea+" instructions earlier:");0=ua.length&&(ka=0);a.tb=ea;fh++;ac--}}fh||(a.i("no "+eh+"history available"),a.tb=void 0)}else{var tb=Bi(a,ta);if(tb){var cc=0,ce=!1,de="ds"==Ta;Ua&&(ce=!0,"l"==Ua.charAt(0)&&(ce=!1,Ua=Ua.substr(1)||pj),cc=oi(a,Ua)>>>0,65536ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Va&&(Va+="\n");Va=de?Va+(Wa+","):Va+(ta+" "+Wa+(0==Sc?" "+fe:""))}Va&&a.i(Va);a.qb=tb}}}}break;case "e":if("else"==g[0])break;var wb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(wb=1,he=255,ie=a.dc,je=a.Lb):"e"== -ke||"ew"==ke?(wb=2,he=65535,ie=a.ta,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Bi(a,le);if(Uc)for(var Vc=2;Vcoe;){for(var Xa=null,uj=256;65536>hc.G>>>0;){pe.G=a.ta(hc,2);if(null==hc.G||!uj--)break;if(!(pe.G&1)){for(var vj=a,Wc=pe,jh=null,ic=Wc.G,kh=ic,qe=1;6>=qe&⁣qe++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;baj){if(cj(d,this.J)){this.A=new S(this,"1.30.4","failsafe");cj(this.A)&&(hj(this,d),a=2,ij(this.A));this.A.set("timestamp",Ca());jj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=gj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?cj(d,g):("error"== -f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.B=null)):this.i(f+": "+g),ij(d),cj(d)?(c=gj(d),e=!0):c=!1))}e&&fj(this,c?d:null)}else 2==a&&d.clear()}else fj(this);delete this.J;delete this.K}e=mb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(kj(this,this.b,b,c,a),this.xa(),this.b.Eb());this.S&&(hj(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0}; -function hj(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.4"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function Yi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.4"),g=new S(a,"1.30.4","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;lthis.b.ib?Bi:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Ci(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(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.Nc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=dd(this.b);break;case 21:b=c.Mb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Qc(c);break;case 25:b=$c(c);break;case 26:b=ad(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b}; +k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).G));if(!this.sa||a!=this.sa)if(this.sa=a,this.pa&1073741824)this.ba.push(a);else{var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||xb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Gd(a),a.Fa=0,a.xa())}}; +function ui(a){var b;if(!Ie(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ga=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.S?Ji(a):Ki(a)}}function Ii(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ui(this);this.Fa=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Li(this);a||Bd(this)};k.save=function(){var a=new S(this);a.set(0,Ei(this.L));a.set(1,Ei(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Fi(a[b++]),this.T=Fi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.i("running");this.C.X=!0;this.Rb=a;this.Sb=b}; +k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.vc(a.H[a.ga],b),++a.ga==a.H.length&&(a.ga=0)));return!1}function Pf(a){var b=a.b;if(b.C.X)throw T(b,a.b.ua&65535),a.ea(),-1;return!1} +function ti(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Mi(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Ni(this,a,a.length-1,"set"),ui(this)));return d}; +function Mi(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g>>d.na],b==a.F));h.Ua||ui(a);break}}return f}function Oi(a,b){for(var c=1;c>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6), +A&63)switch(A=C&7,C&56){case 0:y=Hi(A);break;case 8:y="@"+Hi(A);break;case 16:7>A?y="("+Hi(A)+")+":(C=v.ta(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Hi(A)+")+":(C=v.ta(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Hi(A)+")";break;case 40:y="@-("+Hi(A)+")";break;case 48:C=v.ta(t,2);y=L(v,C,0,!0)+"("+Hi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.ta(t,2),y="@"+L(v,C)+"("+Hi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]); +0b)c=Hi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,dd(d));break;case 21:c="IR="+L(a,d.Mb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Qc(d));break;case 25:c="MMR1="+L(a,$c(d));break;case 26:c="MMR2="+L(a,ad(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&& +(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Si(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ri(a,"T")+Ri(a,"N")+Ri(a,"Z")+Ri(a,"V")+Ri(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Jc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({pg:b,G:c,yd:d,ja:e,Hc:f})}function Ti(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b>>0,h=f.yd;if(e>=g&&eb)){e.u[b]= +g&65535;break}a.i("unknown register: "+f);return}a.B.xa();a.i("updated registers:")}}a.i(Si(a,d));c&&(a.L=Y(e.u[7]),Ki(a,L(a,a.L.G)))}}function Xi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Qi(a,b,g,f);a.i(f);a.L=b;e-=b.G-l;c++}}} +function Pi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0n||"z"ua.length&&(a.i("note: only "+ua.length+" available"),ea=ua.length);ka-=ea;0>ka&&(null==ua[ua.length-1].G?(ea=ka+ea,ka=0):ka+=ua.length);var be=[];"call"==eh&&(ac=1E5,be=["CALL"]);for(void 0!==dh&&a.i(ea+" instructions earlier:");0=ua.length&&(ka=0);a.tb=ea;gh++;ac--}}gh||(a.i("no "+fh+"history available"),a.tb=void 0)}else{var tb=Ci(a,ta);if(tb){var cc=0,ce=!1,de="ds"==Ta;Ua&&(ce=!0,"l"==Ua.charAt(0)&&(ce=!1,Ua=Ua.substr(1)||qj),cc=pi(a,Ua)>>>0,65536ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Va&&(Va+="\n");Va=de?Va+(Wa+","):Va+(ta+" "+Wa+(0==Sc?" "+fe:""))}Va&&a.i(Va);a.qb=tb}}}}break;case "e":if("else"==g[0])break;var wb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(wb=1,he=255,ie=a.dc,je=a.Nb):"e"== +ke||"ew"==ke?(wb=2,he=65535,ie=a.ta,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Ci(a,le);if(Uc)for(var Vc=2;Vcoe;){for(var Xa=null,vj=256;65536>hc.G>>>0;){pe.G=a.ta(hc,2);if(null==hc.G||!vj--)break;if(!(pe.G&1)){for(var wj=a,Wc=pe,kh=null,ic=Wc.G,lh=ic,qe=1;6>=qe&⁣qe++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bbj){if(dj(d,this.J)){this.A=new S(this,"1.30.4","failsafe");dj(this.A)&&(ij(this,d),a=2,jj(this.A));this.A.set("timestamp",Ca());kj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=hj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?dj(d,g):("error"== +f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.B=null)):this.i(f+": "+g),jj(d),dj(d)?(c=hj(d),e=!0):c=!1))}e&&gj(this,c?d:null)}else 2==a&&d.clear()}else gj(this);delete this.J;delete this.K}e=mb(this.id);for(f=0;fa[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(lj(this,this.b,b,c,a),this.xa(),this.b.Eb());this.S&&(ij(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0}; +function ij(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.4"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function Zi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.4"),g=new S(a,"1.30.4","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l=c||30<=(b.Ob+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Ob=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.I&8);if(0>=a||60<=(b.A+=a)){for(var e=0;e=c||30<=(b.Qb+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Qb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.I&8);if(0>=a||60<=(b.A+=a)){for(var e=0;ef.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Bj(a,b,c)}})}else c(a,null)} -function Cj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--oj||cb(!0));l=!1}var g,h,l=!0;oj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.4/components.xsl");m=function(d,h){h?zj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--oj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--oj||cb(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?zj(b,a,d,!0,e,m):Aj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Cj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.4/pdp11-dbg.map +k.va=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?Zi(d,!1,!0):fj(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Zi(d,a,!0);!a&&d.O?window&&window.location.reload():(a||(d.qc=!0),d.Xb(bj),d.qc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]= +c,c.onclick=function(){var a=cj(d,!0);if(a){var b=!!(d.f&&!d.H||d.O),c=Zi(d,b);b?mj(d,a,c):d.N("Resume disabled, machine state not saved")}},!0}return!1}; +function cj(a,b){var c=a.B;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=nj(a,c))||a.N("The user ID is invalid.")):b&&a.N("Browser local storage is not available"));return c} +function nj(a,b){a.B=null;b=Da(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La("user",b.data),a.B=b.data)}catch(d){w(d.message+" ("+c+")")}return a.B}function ej(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+oj(a,"1.30.4"));return b} +function mj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=oj(a,"1.30.4");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Cj(a,b,c)}})}else c(a,null)} +function Dj(a,b,c,d){function e(a){if(void 0===h){var b=g&&F(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--pj||cb(!0));l=!1}var g,h,l=!0;pj++;kb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.4/components.xsl");m=function(d,h){h?Aj(c,null,null,!1,e,function(d,l){l?(lb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--pj||cb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--pj||cb(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Aj(b,a,d,!0,e,m):Bj(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){cb(!1);return Dj(a,b,c,d)};window.enableEvents=cb;window.sendEvent=db;})();//# sourceMappingURL=/tmp/pdpjs/1.30.4/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.4/pdp11.js b/versions/pdpjs/1.30.4/pdp11.js index 893840699..abb1873bb 100644 --- a/versions/pdpjs/1.30.4/pdp11.js +++ b/versions/pdpjs/1.30.4/pdp11.js @@ -55,7 +55,7 @@ function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a function Va(a){if(void 0!==a){var b;for(b=0;ba;a++)this.b["S"+a][1]=0&1<a.a.Ra?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<c;c++)wb(a,"D"+c,b&1<a.a.Ta?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<c;c++)wb(a,"D"+c,b&1<>2;this.l=this.b-1;this.w=this.C/this.b|0;this.Da=[];this.h=0;this.m=!1;this.Kb=0;this.A=[];this.yc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.w);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Da[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255} @@ -74,108 +74,108 @@ function Ab(a,b,c){var d=!1,e=this.controller,f=e.Da[a],g=c&65535;if(f)if(f[1])f function Cb(a,b,c){var d=!1,e=this.controller;a=e.Da[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(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.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.Kb+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ka(b)),!0):Kb(2,b,c)} function Hb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Nb(b&a.l,b)}function Pb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}h.Qa=function(a){3932160<=a&&(a=Ob(this.a,a));var b=a&this.l,c=(a&this.qa)>>>this.c;this.m=!1;this.h++;a=this.g[c].fc(b,a);this.h--;return a}; -function Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Sb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Va=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].lc(c,b&65535,a);this.h--}; +function Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Sb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Xa=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].lc(c,b&65535,a);this.h--}; function Sb(a){for(var b=0,c=[],d=0;da.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;va.a.Ta)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.Z&57344||(a.Ib=a.w&65535);return a.Ib};h.fd=function(){return this.a.Ea};h.ee=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.Ya=a&16?4194303:262143,ac(b))};h.Od=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535}; +h.fa=function(a,b,c,d){this.g=b;this.l=a;this.a=c;this.G=d;var e=this;this.b.Qb=Vb(c,function(){e.b.Sa|=128;e.b.Sa&64&&Wb(e.a,e.b.Ra);e.l&&e.l.Ba(1);Xb(e.a,e.b.Qb,1E3/60)});this.b.Ra=Yb(64,6,524288);fb(b,this,Zb);hb(b,this.reset.bind(this));E(this)};h.reset=function(){this.b.Sa=128;Xb(this.a,this.b.Qb,1E3/60,!0)};h.ad=function(){return this.b.Sa};h.be=function(a){this.b.Sa=a&192;this.b.Sa&64||$b(this.a,this.b.Ra)};h.cd=function(){var a=this.a,b=a.Z;b&57344||(b=b&-3199|a.mb<<5|a.nb<<1);return b}; +h.de=function(a){ac(this.a,a&-129|this.a.Z&128)};h.dd=function(){var a=this.a;a.Z&57344||(a.Gb=a.w>>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.Z&57344||(a.Ib=a.w&65535);return a.Ib};h.fd=function(){return this.a.Ea};h.ee=function(a){var b=this.a;1170>b.Ta&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.$a=a&16?4194303:262143,bc(b))};h.Od=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535}; h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Hd=function(a){return this.a.I[1][a>>1&7]};h.Fe=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Fd=function(a){return this.a.I[1][(a>>1&7)+8]};h.De=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Gd=function(a){return this.a.ca[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Ed=function(a){return this.a.ca[1][(a>>1&7)+8]}; h.Ce=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.$c=function(a){return this.a.I[0][a>>1&7]};h.ae=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.Yc=function(a){return this.a.I[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.Zc=function(a){return this.a.ca[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};h.Xc=function(a){return this.a.ca[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.I[0][b]&=65295}; -h.Nd=function(a){return this.a.I[3][a>>1&7]};h.Le=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.I[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.ca[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Kd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Ta=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]}; -h.Wa=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.ld=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.od=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Ua=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Xa=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.md=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]}; +h.Nd=function(a){return this.a.I[3][a>>1&7]};h.Le=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.I[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.ca[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Kd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Va=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]}; +h.Ya=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.ld=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.od=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Wa=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Za=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.md=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]}; h.ke=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.nd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.le=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Wc=function(a){return this.a.ic[a-65504>>1]};h.Xd=function(a,b){this.a.ic[b-65504>>1]=a};h.ec=function(a){if(65520==a){a=0;switch(Lb){case Lb:a=this.g.Kb}a=(a>>6)-1}else a=0;return a};h.kc=function(){};h.Jd=function(){return 1};h.He=function(){};h.Vc=function(){return this.a.ja}; -h.Wd=function(){this.a.ja=0};h.bd=function(){return this.a.hc};h.ce=function(a,b){b&1||(a&=255);this.a.hc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return bc(this.a)};h.ie=function(a){cc(this.a,a&-1793|bc(this.a)&1792);this.a.u|=256};h.jc=function(){}; +h.Wd=function(){this.a.ja=0};h.bd=function(){return this.a.hc};h.ce=function(a,b){b&1||(a&=255);this.a.hc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return cc(this.a)};h.ie=function(a){dc(this.a,a&-1793|cc(this.a)&1792);this.a.u|=256};h.jc=function(){}; var L={},Zb=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]= [null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.jc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.jc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le, -"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Ta,K.prototype.Wa,"R0SET0"],L[65473]=[null,null,K.prototype.Ta,K.prototype.Wa,"R1SET0"],L[65474]=[null,null,K.prototype.Ta,K.prototype.Wa,"R2SET0"],L[65475]=[null,null,K.prototype.Ta,K.prototype.Wa,"R3SET0"],L[65476]=[null,null,K.prototype.Ta, -K.prototype.Wa,"R4SET0"],L[65477]=[null,null,K.prototype.Ta,K.prototype.Wa,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ua,K.prototype.Xa,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ua,K.prototype.Xa,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ua,K.prototype.Xa,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ua,K.prototype.Xa,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ua, -K.prototype.Xa,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ua,K.prototype.Xa,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.ec,K.prototype.kc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.ec,K.prototype.kc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]= +"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Va,K.prototype.Ya,"R0SET0"],L[65473]=[null,null,K.prototype.Va,K.prototype.Ya,"R1SET0"],L[65474]=[null,null,K.prototype.Va,K.prototype.Ya,"R2SET0"],L[65475]=[null,null,K.prototype.Va,K.prototype.Ya,"R3SET0"],L[65476]=[null,null,K.prototype.Va, +K.prototype.Ya,"R4SET0"],L[65477]=[null,null,K.prototype.Va,K.prototype.Ya,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Wa,K.prototype.Za,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Wa,K.prototype.Za,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Wa,K.prototype.Za,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Wa,K.prototype.Za,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Wa, +K.prototype.Za,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Wa,K.prototype.Za,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.ec,K.prototype.kc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.ec,K.prototype.kc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]= [null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L); -Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),kc(this,gc?lc:mc);else{a=this.a=Array(this.size>> -2);for(f=0;f>1),this.a=new Int32Array(this.b,0,this.size>>2),lc(this,hc?mc:nc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},P:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ua: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.za=!0},H:function(a,b){return this.K(a,b)},V:function(a,b){return this.fc(a,b)},ta:function(a,b,c){this.l?this.h(a,b,c):this.Sb(a,b,c)},wa:function(a,b,c){this.l?this.h(a,b,c):this.lc(a,b,c)},C:function(a){return this.j[a]},L:function(a){return this.j[a]},U:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},sa:function(a,b){this.j[a]=b;this.za=!0},Ca:function(a,b){this.j[a]=b;this.za=!0},va:function(a,b,c){a&1&&I(this.g, -c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&oc(a,pc,!1),(a.m=c.m)&&sc(a,pc,!1))}function sc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.lc=b[3]||a.w}function oc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.A);if(c||void 0===c)a.K=b[0]||a.v,a.fc=b[2]||a.A}function kc(a,b){b||(b=tc);oc(a,b,void 0);sc(a,b,void 0)} -var tc=[],nc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],pc=[H.prototype.H,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var mc=[H.prototype.C,H.prototype.sa,H.prototype.U,H.prototype.va],lc=[H.prototype.L,H.prototype.Ca,H.prototype.ka,H.prototype.xa]; -function uc(a,b){x.call(this,"CPU",a,uc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Fb=Math.round(this.rb/1E4)/100;this.Ma=this.Fb*this.xa;this.o.T=!1;this.o.Pb=!1;this.o.cb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.P=[];this.dc=this.Sd.bind(this);E(this)}z(uc);var vc=["power","reset"];h=uc.prototype; -h.fa=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.A=a.A;for(b=0;b=a.Na&&(a.Na+=a.Za,c=!0);0<=a.$a&&a.$a<=zc(a)&&(a.Za=a.$a=-1,yc(a),F(a),c=!0);c&&a.X(zc(a)+" cycles: checksum="+q(a.pb))}} +c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&pc(a,qc,!1),(a.m=c.m)&&tc(a,qc,!1))}function tc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.lc=b[3]||a.w}function pc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.A);if(c||void 0===c)a.K=b[0]||a.v,a.fc=b[2]||a.A}function lc(a,b){b||(b=uc);pc(a,b,void 0);tc(a,b,void 0)} +var uc=[],oc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],qc=[H.prototype.H,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var nc=[H.prototype.C,H.prototype.sa,H.prototype.U,H.prototype.va],mc=[H.prototype.L,H.prototype.Ca,H.prototype.ka,H.prototype.xa]; +function vc(a,b){x.call(this,"CPU",a,vc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Fb=Math.round(this.rb/1E4)/100;this.Ma=this.Fb*this.xa;this.o.T=!1;this.o.Pb=!1;this.o.fb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.ab=a.csInterval;this.bb=a.csStop;this.P=[];this.dc=this.Sd.bind(this);E(this)}z(vc);var wc=["power","reset"];h=vc.prototype; +h.fa=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.A=a.A;for(b=0;b=a.Na&&(a.Na+=a.ab,c=!0);0<=a.bb&&a.bb<=Ac(a)&&(a.ab=a.bb=-1,zc(a),F(a),c=!0);c&&a.X(Ac(a)+" cycles: checksum="+q(a.pb))}} h.aa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.La/a.Ma&&(b=1);a.xa=b;b=a.Fb*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Cc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Bc(a)}function Vb(a,b){var c=a.P.length;a.P.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&ba.P[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.T&&(c+=Dc(a)),a.P[b][0]=c)} -function qb(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Dc(a,b){var c=a.wa-=a.a;a.a=a.L=0;b&&(a.wa=0);return c} -h.Sd=function(){if(this.o.T){this.Cb>=this.rb&&Bc(this,!0);this.bb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.ac&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.P.length-1;0<=d;d--){var e=this.P[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Dc(this,!0);this.bb+=b;this.ta+=b;sb(this,b);qb(this,b);this.ab-=b;if(0>=this.ab){this.ab+=this.sb;15<=++this.bc&&(this.Ba(),this.bc=0);break}}while(this.o.T)}catch(f){F(this); -this.l&&this.l.stop(ra(),zc(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.dc;this.va=ra();c=this.ac;this.bb&&(c=Math.round(c*this.bb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Ac(this));if(0>c||this.Lac&&(this.la-=c),c=0;this.Cb+=this.bb;this.va+=c;a(b,c)}}}; -function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Ac(a);a.o.T=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,zc(a));setTimeout(a.dc,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.T){Dc(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),zc(a));b=!0}a.o.complete=void 0;return b} -function Ec(a){this.Ra=+a.model||1170;this.Xb=a.addrReset||0;uc.call(this,a,6666667);this.tb=0;this.Zb=255;1120==this.Ra?(this.decode=Fc.bind(this),this.Ka=this.Cc,this.tb=8,this.Zb=-1):(this.decode=Gc.bind(this),this.Ka=this.Dc);Hc(this);this.sa=0;this.K=null;this.o.complete=!1}z(Ec,uc);h=Ec.prototype;h.reset=function(){this.status("model "+this.Ra);this.o.T&&F(this);Hc(this);xc(this);this.o.error=!1;this.parent.reset.call(this)}; -function Hc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Xb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,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,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.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.ic=[0,0,0,0,0,0,0,0];a.hc=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Eb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Gb=0;a.Ib=0;a.Ea=0;a.ja=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.Ya=262143;a.gb=0;a.w=0;a.K=null;a.g&&ac(a)}function ac(a){a.ka?(a.V=65536,a.Vb=a.Ea&16?4186112:253952,a.U=a.Gc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Vb=57344,a.U=a.Fc,a.Y=a.gc,a.Bb=a.mc,Fb(a.g,16))} -function $b(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Gb=a.w>>16&65535,a.Ib=a.w&65535);a.Z=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,ac(a))}}h.$b=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()}; -h.restore=function(a){var b=a[1];this.ya=b[1];Ac(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.K?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)} +c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Bc(d,d.xa<<1,!0)},c.textContent=this.Ma.toFixed(2)+"Mhz",!0}return!1};h.Ba=function(a){this.l&&this.l.Ba(a)};function rb(a,b,c){a.ya+=b;c&&(a.wa=a.a=a.L=0)}function Cc(a,b){var c=1;b&&1a.La/a.Ma&&(b=1);a.xa=b;b=a.Fb*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Dc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Cc(a)}function Vb(a,b){var c=a.P.length;a.P.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&ba.P[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.T&&(c+=Ec(a)),a.P[b][0]=c)} +function qb(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Ec(a,b){var c=a.wa-=a.a;a.a=a.L=0;b&&(a.wa=0);return c} +h.Sd=function(){if(this.o.T){this.Cb>=this.rb&&Cc(this,!0);this.eb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.ac&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.P.length-1;0<=d;d--){var e=this.P[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Ec(this,!0);this.eb+=b;this.ta+=b;sb(this,b);qb(this,b);this.cb-=b;if(0>=this.cb){this.cb+=this.sb;15<=++this.bc&&(this.Ba(),this.bc=0);break}}while(this.o.T)}catch(f){F(this); +this.l&&this.l.stop(ra(),Ac(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.dc;this.va=ra();c=this.ac;this.eb&&(c=Math.round(c*this.eb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Bc(this));if(0>c||this.Lac&&(this.la-=c),c=0;this.Cb+=this.eb;this.va+=c;a(b,c)}}}; +function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Bc(a);a.o.T=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,Ac(a));setTimeout(a.dc,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.T){Ec(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),Ac(a));b=!0}a.o.complete=void 0;return b} +function Fc(a){this.Ta=+a.model||1170;this.Xb=a.addrReset||0;vc.call(this,a,6666667);this.tb=0;this.Zb=255;1120==this.Ta?(this.decode=Gc.bind(this),this.Ka=this.Cc,this.tb=8,this.Zb=-1):(this.decode=Hc.bind(this),this.Ka=this.Dc);Ic(this);this.sa=0;this.K=null;this.o.complete=!1}z(Fc,vc);h=Fc.prototype;h.reset=function(){this.status("model "+this.Ta);this.o.T&&F(this);Ic(this);yc(this);this.o.error=!1;this.parent.reset.call(this)}; +function Ic(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Xb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,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,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.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.ic=[0,0,0,0,0,0,0,0];a.hc=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Eb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Gb=0;a.Ib=0;a.Ea=0;a.ja=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.$a=262143;a.hb=0;a.w=0;a.K=null;a.g&&bc(a)}function bc(a){a.ka?(a.V=65536,a.Vb=a.Ea&16?4186112:253952,a.U=a.Gc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Vb=57344,a.U=a.Fc,a.Y=a.gc,a.Bb=a.mc,Fb(a.g,16))} +function ac(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Gb=a.w>>16&65535,a.Ib=a.w&65535);a.Z=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,bc(a))}}h.$b=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()}; +h.restore=function(a){var b=a[1];this.ya=b[1];Bc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u&=-3;a.u|=a.K?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.h=0)} function Nc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.h=c||0)}function Oc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Pc(a,b){a.u&256||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Qc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))} -function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=bc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);cc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);cc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b} -function Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Vb),f;d=b>>13;a.Ea&a.Jc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.Ya;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));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.I[a.v][d]=e;if(f!=(4194170&a.Ya)||a.v)a.mb= -a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.mb<<5|a.nb<<1,$b(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.Ya)||f>(4194239&a.Ya))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)} -function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0, -e),a.a-=6,e|g;case 7:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Dc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.ja|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.gc(Uc(this,a,2));this.sa--;return a}; -h.kb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Va=function(a,b){this.ka?(this.sa++,this.mc(Uc(this,a,4),b),this.sa--):this.g.Va(a,b)};h.Fc=function(a,b,c){return Vc(this,a,b,c)};h.Gc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.gc=function(a){return Pb(this.g,this.gb=a)};h.Pd=function(a){return Pb(this.g,this.gb=Uc(this,a,2))};h.mc=function(a,b){Rb(this.g,this.gb=a,b&65535)};h.Ne=function(a,b){Rb(this.g,this.gb=Uc(this,a,4),b)}; +function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=cc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);dc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);dc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b} +function Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Vb),f;d=b>>13;a.Ea&a.Jc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.$a;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));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.I[a.v][d]=e;if(f!=(4194170&a.$a)||a.v)a.mb= +a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.mb<<5|a.nb<<1,ac(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.$a)||f>(4194239&a.$a))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)} +function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0, +e),a.a-=6,e|g;case 7:return e=a.Y(Lc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Dc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.ja|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.gc(Uc(this,a,2));this.sa--;return a}; +h.kb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Xa=function(a,b){this.ka?(this.sa++,this.mc(Uc(this,a,4),b),this.sa--):this.g.Xa(a,b)};h.Fc=function(a,b,c){return Vc(this,a,b,c)};h.Gc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.gc=function(a){return Pb(this.g,this.hb=a)};h.Pd=function(a){return Pb(this.g,this.hb=Uc(this,a,2))};h.mc=function(a,b){Rb(this.g,this.hb=a,b&65535)};h.Ne=function(a,b){Rb(this.g,this.hb=Uc(this,a,4),b)}; function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Vc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Xc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Vc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Uc(a,e|c&65536,4),a.v=a.F>>14&3,Rb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d} function Yc(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.Zb;return a}function Zc(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c+a.tb]}function $c(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Vc(a,b,c,8)}function ad(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function bd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c]} function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Eb=a.U(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Qb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.U(b,e,6),Rb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Pb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])} function cd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Qb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function dd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,d,4),Rb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.K&&this.K.Sa>d?this.K:null;e&&(c=e.Ud,d=e.Sa);d>(this.F&224)>>5?(this.u&8&&(Kc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&Lc(this,e),a=!0);this.K||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Mc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Jc(this))}while(0>1|b<<16;Pc(this,a);return a&65535} +h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.K&&this.K.Ua>d?this.K:null;e&&(c=e.Ud,d=e.Ua);d>(this.F&224)>>5?(this.u&8&&(Lc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&$b(this,e),a=!0);this.K||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Mc(this)&&0>b)break}this.u=this.u&15|this.F&16;this.decode(Kc(this))}while(0>1|b<<16;Pc(this,a);return a&65535} function jd(a,b){a=b&128|b>>1|b<<8;Pc(this,a<<8);return a&255}function kd(a,b){a=b&~a;R(this,a);return a}function ld(a,b){a=b&~a;R(this,a<<8);return a}function md(a,b){a|=b;R(this,a);return a}function nd(a,b){a|=b;R(this,a<<8);return a}function od(a,b){a=~b|65536;Nc(this,a);return a&65535}function pd(a,b){a=~b|256;Nc(this,a<<8);return a&255}function qd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.h=b&(b^a));return a&65535} function rd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.h=b&(b^c));return a&255}function sd(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function td(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function ud(a,b){a=-b;Nc(this,a,a&b&32768);return a&65535}function vd(a,b){a=-b;Nc(this,a<<8,(a&b&128)<<8);return a&255}function wd(a,b){a=b<<1|this.m>>16&1;Pc(this,a);return a&65535} function xd(a,b){a=b<<1|this.m>>16&1;Pc(this,a<<8);return a&255}function yd(a,b){a=(this.m&65536|b)>>1|b<<16;Pc(this,a);return a&65535}function zd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Pc(this,a<<8);return a&255}function Ad(a,b){var c=b-a;Qc(this,c,a,b);return c&65535}function Bd(a,b){var c=b-a;Qc(this,c<<8,a<<8,b<<8);return c&255}function Cd(a,b){this.u&256||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Dd(a,b){a^=b;R(this,a);return a&65535} function Ed(a){T(this,a,Zc(this,a),ed);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Fd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} function Gd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Hd(a){V(this,a,!P(this))}function Id(a){V(this,a,P(this))} function Jd(a){T(this,a,Zc(this,a),kd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Kd(a){S(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Ld(a){T(this,a,Zc(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,Yc(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)} -function Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Ic(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Ic(this)==!(this.h&32768))} -function Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Ic(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Ic(this)!=!(this.h&32768))}function Wd(a){V(this,a,Ic(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Ic(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)} +function Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Jc(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Jc(this)==!(this.h&32768))} +function Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Jc(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Jc(this)!=!(this.h&32768))}function Wd(a){V(this,a,Jc(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Jc(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ce(a){var b=Zc(this,a);a=bd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function de(a){var b=Yc(this,a);a=ad(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)} function ee(a){var b=bd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function fe(){J(this,24,0,-8);this.a-=25} -function ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.A&&1120==this.Ra&&this.A.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.L=this.a;Q(this,$c(this,a));this.a=this.L-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.L=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.L-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.A&&1120==this.Ta&&this.A.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.L=this.a;Q(this,$c(this,a));this.a=this.L-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.L=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.L-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function ne(a){var b=Zc(this,a);this.L=this.a;R(this,dd(this,a,b));this.a=this.L-me[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function oe(a){var b=Yc(this,a);R(this,cd(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var pe=[7,13,13,17,14,18,17,21]; function qe(a){var b=bd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&256||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function we(a){T(this,a,Zc(this,a),Ad);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function xe(a){T(this,a,0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function ye(){J(this,28,0,-8);this.a-=5} -function ze(){this.A&&(this.A.ia=this.f[7],this.A.setData(this.f[0],!0));this.u|=8;Kc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.tb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Fc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)} +function ze(){this.A&&(this.A.ia=this.f[7],this.A.setData(this.f[0],!0));this.u|=8;Lc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.tb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Gc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)} function Oe(a){Pe[a>>6&3].call(this,a)}function Qe(a){Re[a>>6&3].call(this,a)} var Be=[function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,Y,function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Se=[function(a){Ue[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Nc(this,dd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0, ud);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wd);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,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}], Ue=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,Y,Ie,Ke,xe,xe,xe,xe],Ve=[ge,ze,ue,Zd,he,se,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Je=[re,function(){this.m=0;this.a-=5},function(){this.h=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],Le=[re,function(){this.m=65536;this.a-=5},function(){this.h=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],Te=[Yd,Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,Y,Y,Y],Ne=[function(a){Nc(this, cd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){S(this,a,0,vd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Nc(this,a<<8);this.a-=this.c?4:3+(7== -this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Gc(a){We[a>>12].call(this,a)} +this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Hc(a){We[a>>12].call(this,a)} var We=[function(a){Xe[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,function(a){Ye[a>>8&15].call(this,a)},function(a){Ze[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Xe=[function(a){$e[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,function(a){af[a>>6&3].call(this,a)},Y,Y],af=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Wc(this,a,0);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L= -this.a;Xc(this,a,0,b);R(this,b);this.a=this.L-pe[this.c]},function(a){R(this,dd(this,a,Ic(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.u|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd, +this.a;Xc(this,a,0,b);R(this,b);this.a=this.L-pe[this.c]},function(a){R(this,dd(this,a,Jc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.u|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd, Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[Y,function(a){a=Wc(this,a,65536);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.L=this.a;Xc(this,a,65536,b);R(this,b);this.a=this.L-pe[this.c]},Y]; function df(a){x.call(this,"ROM",a,df,128);this.ba=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.M,c.ba=a.ba):c.l=null);ef(c)})}}z(df);h=df.prototype; h.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;ef(this)};h.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.i,this.b,this.ba),delete this.ba);return!0};h.ga=function(){return!0}; -function ef(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+q(a.c.length,8,!0)+") does not match specified size ("+q(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[df.prototype.Dd,df.prototype.Be,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,jc)){for(c=0;c>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,kc)){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,v=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=ja.Tb&&c<=ja.xc&&(b=!0,c-=ja.Tb-ja.nc);b&&(a.preventDefault&&a.preventDefault(),d.xb(c));return!0},c.onkeypress=function(a){a=a||window.event;d.xb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData|| window.clipboardData)&&d.xb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=Yb(48,4,262144);this.P=Vb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.U&&97<=a&&122>a&&(a-=32),Xb(e.a,e.P,1E3/Math.round(e.H/10)));0<=a&&(e.A=a,e.b&128?e.A|=49152:e.b|=128,e.b&64&&Wb(c,e.V))});this.C=Yb(52,4,262144);this.la=Vb(this.a,function(){e.c|=128;e.c&64&&Wb(c,e.C)});fb(b,this,lf);hb(b,this.reset.bind(this));E(this)}; -h.cc=function(){if(!this.v){var a=wc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.cc=function(){if(!this.v){var a=xc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; h.ga=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.A=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.L||8,c=a-this.m%a,this.L&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a|| 1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Xb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var nf={},lf=(nf[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],nf[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],nf[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],nf[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],nf); -Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick= function(){var a=d.j.listTapes;a&&qf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[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;qf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1}; -h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.P=rf(a);var e=this;if((this.c=wc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.K=Yb(56,4,4096);this.V=Vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.A>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.O);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f, +function Gf(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.da=c;a.Ob=r(c);a.g=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.O=e[0];a.S=e[1];a.N=e[2];a.W=e[3]||512;c=a.W>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.O);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f, null,!0,function(b,c,d){Hf(a,b,c,d)})} function Hf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,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)w(k[0]);else{a.O=k.length;a.S=k[0].length;a.N=k[0][0].length;var l=k[0][0][0];a.W=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 v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,za=v.length;za'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]= c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[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;Pf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.fb=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)}; +h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.Ra=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)}; h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()}; h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('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=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)} function Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.D("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.qc)&&g++));return g} -h.qc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)}; +h.qc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)}; function Sf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.B|=49152);return!0}; -h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)}; +h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)}; h.sc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=1024;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};h.vd=function(){return this.w};h.te=function(){};h.wd=function(){return this.i};h.ue=function(){};h.sd=function(){return this.B&61438}; h.qe=function(a){this.B=this.B&-3968|a&3967;if(this.B&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.B&=-129;switch(this.B&14){case 0:this.w=d.status;this.i=0;this.B=128;this.b=0;break;case 4:b=this.rc;case 2:b||(b=this.sc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.O?(this.i|=32832,this.B|=49152):g>=d.N?(this.i|=32800,this.B|=49152):(k=(this.B&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.pc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.B&= --2,this.B|=128,this.B&64&&Wb(this.a,this.fb))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a}; +-2,this.B|=128,this.B&64&&Wb(this.a,this.Ra))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a}; var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Wf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Wf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Wf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Wf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Wf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Wf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Wf); function M(a){x.call(this,"RL11",a,M,131072);this.A=a.autoMount||{};this.s=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype; h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("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.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]= c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[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;Yf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.fb=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.w&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)}; +h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=xc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.Ra=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.w&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)}; h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()}; h.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.s=0);for(var c in a.A){var d=a.A[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('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=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)} function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.D("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.s++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.uc)&&g++));return g} -h.uc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)}; +h.uc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Dc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)}; function ag(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.v=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.B=this.B|a|32768);return!0}; -h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Xa(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)}; h.wc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=8192;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Ad=function(){return this.B&65535}; h.ye=function(a){this.B=this.B&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.B&128)){var b;a=!0;var c=this.c[(this.B&768)>>8],d,e,f,g;this.B&=-2;switch(this.B&14){case 4:this.b&8&&(this.B&=63);this.m=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.vc;case 10:b||(b=this.wc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.O||f>=c.N?this.B|=37888:(g=(this.v& -63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.tc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.fb))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.m};h.Ae=function(a){this.m=a};h.zd=function(){return this.v};h.xe=function(a){this.v=a&63}; +63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.tc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.Ra))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.m};h.Ae=function(a){this.m=a};h.zd=function(){return this.v};h.xe=function(a){this.v=a&63}; var eg={},$f=(eg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],eg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],eg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],eg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],eg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],eg); -function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.w=wc(this,"autoPower",a);this.l=0;this.P=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.K=!1;this.U=wc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.P},this.a,this.G);var d,e=A(this.id);if((this.A=Wa("Panel",this.id))&&this.A.eb)for(b=0;b\nLicense: GPL version 3 or later ");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.s)){this.h=new O(this,"1.30.4","failsafe");jg(this.h)&&(og(this,d),a=2,pg(this.h));this.h.set("timestamp",sa());qg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(Ba("user",""),this.c=null)):this.X(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.cb());this.H&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0}; +h.Wb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.fb());this.H&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0}; function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.4"};d.url=a.U;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}} function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.4"),g=new O(a,"1.30.4","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&F(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l=c||30<=(b.Db+=c))&&(d.textContent=b.o.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.A&&(b=this.A,a=a||0,b.v)){c=b.a.o.T;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e=c||30<=(b.Db+=c))&&(d.textContent=b.o.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.A&&(b=this.A,a=a||0,b.v)){c=b.a.o.T;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e