From 0dc6b7276b3cc6648a918a931f72cefbdd27b486 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 9 Mar 2017 12:30:51 -0800 Subject: [PATCH] Added lots of PDP-10 compare/increment/decrement/skip/jump instructions --- modules/pdp10/lib/cpuops.js | 962 ++++++++++++++++++++------- modules/pdp10/lib/cpustate.js | 7 +- modules/pdp10/lib/debugger.js | 8 +- modules/pdp10/lib/defines.js | 10 +- modules/pdp10/lib/memory.js | 2 +- modules/shared/lib/int36.js | 77 ++- versions/c1pjs/1.34.2/c1p-dbg.js | 5 +- versions/c1pjs/1.34.2/c1p.js | 5 +- versions/pc8080/1.34.2/pc8080-dbg.js | 8 +- versions/pc8080/1.34.2/pc8080.js | 6 +- versions/pcx86/1.34.2/pcx86-dbg.js | 6 +- versions/pcx86/1.34.2/pcx86.js | 4 +- versions/pdpjs/1.34.2/pdp10-dbg.js | 427 ++++++------ versions/pdpjs/1.34.2/pdp10.js | 274 ++++---- versions/pdpjs/1.34.2/pdp11-dbg.js | 12 +- versions/pdpjs/1.34.2/pdp11.js | 8 +- 16 files changed, 1171 insertions(+), 650 deletions(-) diff --git a/modules/pdp10/lib/cpuops.js b/modules/pdp10/lib/cpuops.js index 2de63e195..a9a88e4b8 100644 --- a/modules/pdp10/lib/cpuops.js +++ b/modules/pdp10/lib/cpuops.js @@ -241,7 +241,7 @@ PDP10.opDFN = function(op, acc) * FSC AC,233 * * inserts the correct exponent to move the binary point from the right end to the left of bit 9 and then normalizes - * (233(base 8) = 155(base 10) = 128 + 27). + * (233 [base 8] = 155 [base 10] = 128 + 27). * * @this {CPUStatePDP10} * @param {number} op @@ -278,7 +278,7 @@ PDP10.opFSC = function(op, acc) * in position P. * * NOTE: Until I can conduct real-world testing, I'm assuming when they say "100 - S", DEC really meant "64 - S", - * which is 100 (base 8), which makes much more sense, since P is limited to a range of 00-77 (base 8). + * which is 100 [base 8], which makes much more sense, since P is limited to a range of 00-77 [base 8]. * * @this {CPUStatePDP10} * @param {number} op @@ -1503,7 +1503,7 @@ PDP10.opIDIVB = function(op, acc) { var dst = PDP10.doDIV.call(this, this.readWord(acc), 0, this.readWord(this.regEA)); if (dst < 0) return; - this.writeWord(acc, this.writeWord(this.regEA, dst)); + this.writeWord(this.regEA, dst); }; /** @@ -1668,7 +1668,7 @@ PDP10.opASH = function(op, acc) /* * Convert the unsigned word (w) to a signed value (i), for convenience. */ - var i = w > PDP10.MAX_POS36? -(PDP10.WORD_LIMIT - w) : w; + var i = w > PDP10.INT_MASK? -(PDP10.WORD_LIMIT - w) : w; if (s > 0) { if (s >= 35) { i = (i < 0? PDP10.INT_LIMIT : 0); @@ -1690,20 +1690,20 @@ PDP10.opASH = function(op, acc) */ bits = PDP10.INT_LIMIT - Math.pow(2, 35 - s); } - if (w <= PDP10.MAX_POS36) { + if (w <= PDP10.INT_MASK) { /* * Since w was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value (w) were 0s, then adding bits to it could NOT - * produce a value > MAX_POS36. + * produce a value > INT_MASK. */ - if (w + bits > PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (w + bits > PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; } else { /* * Since w was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value (w) were 1s, subtracting bits from it could NOT - * produce a value <= MAX_POS36. + * produce a value <= INT_MASK. */ - if (w - bits <= PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (w - bits <= PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; } } else { if (s <= -35) { @@ -1890,20 +1890,20 @@ PDP10.opASHC = function(op, acc) */ wLeft = (wRight * Math.pow(2, s - 35)) % PDP10.INT_LIMIT; bits = PDP10.INT_LIMIT - Math.pow(2, 70 - s); - if (wLeftOrig <= PDP10.MAX_POS36) { + if (wLeftOrig <= PDP10.INT_MASK) { /* * Since wLeft was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value were 0s, then adding bits to it could NOT produce - * a value > MAX_POS36. + * a value > INT_MASK. */ - if (wRight + bits > PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (wRight + bits > PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; } else { /* * Since wLeft was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value were 1s, subtracting bits from it could NOT produce - * a value <= MAX_POS36. + * a value <= INT_MASK. */ - if (wRight - bits <= PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (wRight - bits <= PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; } } wRight = 0; @@ -1921,20 +1921,20 @@ PDP10.opASHC = function(op, acc) * Determine overflow and update the sign bits. */ bits = PDP10.INT_LIMIT - Math.pow(2, 35 - s); - if (wLeftOrig <= PDP10.MAX_POS36) { + if (wLeftOrig <= PDP10.INT_MASK) { /* * Since wLeft was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value were 0s, then adding bits to it could NOT produce - * a value > MAX_POS36. + * a value > INT_MASK. */ - if (wLeftOrig + bits > PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (wLeftOrig + bits > PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; } else { /* * Since wLeft was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value were 1s, subtracting bits from it could NOT produce - * a value <= MAX_POS36. + * a value <= INT_MASK. */ - if (wLeftOrig - bits <= PDP10.MAX_POS36) this.regPS |= PDP10.PSFLAG.OVFL; + if (wLeftOrig - bits <= PDP10.INT_MASK) this.regPS |= PDP10.PSFLAG.OVFL; /* * Last but not least, update the sign bits of wLeft and wRight to indicate negative values. */ @@ -2142,7 +2142,17 @@ PDP10.opBLT = function(op, acc) }; /** - * opAOBJP(0o252000) + * opAOBJP(0o252000): Add One to Both Halves of AC and Jump if Positive + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-41: + * + * Add 1000001 [base 8] to AC and place the result back in AC. If the result is greater than or equal + * to zero (ie if bit 0 is 0, and hence a negative count in the left half has reached zero or a positive + * count has not yet reached 2^17), take the next instruction from location E and continue sequential + * operation from there. + * + * The incrementing of both halves of AC simultaneously is effected by adding 1000001 [base 8]. A count + * of -2 in AC left is therefore increased to zero if 2^18 - 1 is incremented in AC right. * * @this {CPUStatePDP10} * @param {number} op @@ -2150,11 +2160,23 @@ PDP10.opBLT = function(op, acc) */ PDP10.opAOBJP = function(op, acc) { - this.opUndefined(op); + var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_MASK; + this.writeWord(acc, dst); + if (dst < PDP10.INT_LIMIT) this.setPC(this.regEA); }; /** - * opAOBJN(0o253000) + * opAOBJN(0o253000): Add One to Both Halves of AC and Jump if Negative + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-41: + * + * Add 1000001 [base 8] to AC and place the result back in AC. If the result is less than zero + * (ie if bit 0 is 1, and hence a negative count in the left half has not yet reached zero or a positive + * count has reached 2^17), take the next instruction from location E and continue sequential operation + * from there. + * + * The incrementing of both halves of AC simultaneously is effected by adding 1000001 [base 8]. A count + * of -2 in AC left is therefore increased to zero if 2^18 - 1 is incremented in AC right. * * @this {CPUStatePDP10} * @param {number} op @@ -2162,7 +2184,9 @@ PDP10.opAOBJP = function(op, acc) */ PDP10.opAOBJN = function(op, acc) { - this.opUndefined(op); + var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_MASK; + this.writeWord(acc, dst); + if (dst >= PDP10.INT_LIMIT) this.setPC(this.regEA); }; /** @@ -2625,19 +2649,12 @@ PDP10.opSUBB = function(op, acc) }; /** - * opCAI(0o300000) + * opCAIL(0o301000): Compare AC Immediate and Skip if AC Less than E * - * @this {CPUStatePDP10} - * @param {number} op - * @param {number} acc - */ -PDP10.opCAI = function(op, acc) -{ - this.opUndefined(op); -}; - -/** - * opCAIL(0o301000) + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2645,11 +2662,16 @@ PDP10.opCAI = function(op, acc) */ PDP10.opCAIL = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) < 0) this.setPC(this.regPC + 1); }; /** - * opCAIE(0o302000) + * opCAIE(0o302000): Compare AC Immediate and Skip if Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2657,11 +2679,16 @@ PDP10.opCAIL = function(op, acc) */ PDP10.opCAIE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) == 0) this.setPC(this.regPC + 1); }; /** - * opCAILE(0o303000) + * opCAILE(0o303000): Compare AC Immediate and Skip if AC Less than or Equal to E + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2669,11 +2696,16 @@ PDP10.opCAIE = function(op, acc) */ PDP10.opCAILE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) <= 0) this.setPC(this.regPC + 1); }; /** - * opCAIA(0o304000) + * opCAIA(0o304000): Compare AC Immediate but Always Skip + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2681,11 +2713,17 @@ PDP10.opCAILE = function(op, acc) */ PDP10.opCAIA = function(op, acc) { - this.opUndefined(op); + // TODO: Determine if there's any need to actually perform the comparison. + this.setPC(this.regPC + 1); }; /** - * opCAIGE(0o305000) + * opCAIGE(0o305000): Compare AC Immediate and Skip if AC Greater than or Equal to E + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2693,11 +2731,16 @@ PDP10.opCAIA = function(op, acc) */ PDP10.opCAIGE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) >= 0) this.setPC(this.regPC + 1); }; /** - * opCAIN(0o306000) + * opCAIN(0o306000): Compare AC Immediate and Skip if Not Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2705,11 +2748,16 @@ PDP10.opCAIGE = function(op, acc) */ PDP10.opCAIN = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) != 0) this.setPC(this.regPC + 1); }; /** - * opCAIG(0o307000) + * opCAIG(0o307000): Compare AC Immediate and Skip if AC Greater than E + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-42: + * + * Compare AC with E (ie with the word 0,E) and skip the next instruction in sequence if the condition + * specified by M is satisfied. * * @this {CPUStatePDP10} * @param {number} op @@ -2717,119 +2765,143 @@ PDP10.opCAIN = function(op, acc) */ PDP10.opCAIG = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.regEA) > 0) this.setPC(this.regPC + 1); }; /** - * opCA(0o310000) + * opCAML(0o311000): Compare AC with Memory and Skip if AC Less + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCA = function(op, acc) +PDP10.opCAML = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) < 0) this.setPC(this.regPC + 1); }; /** - * opCAL(0o311000) + * opCAME(0o312000): Compare AC with Memory and Skip if Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCAL = function(op, acc) +PDP10.opCAME = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) == 0) this.setPC(this.regPC + 1); }; /** - * opCAE(0o312000) + * opCAMLE(0o313000): Compare AC with Memory and Skip if AC Less or Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCAE = function(op, acc) +PDP10.opCAMLE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) <= 0) this.setPC(this.regPC + 1); }; /** - * opCALE(0o313000) + * opCAMA(0o314000): Compare AC with Memory but Always Skip + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCALE = function(op, acc) +PDP10.opCAMA = function(op, acc) { - this.opUndefined(op); + // TODO: Determine if there's any need to actually perform the comparison. + this.setPC(this.regPC + 1); }; /** - * opCAA(0o314000) + * opCAMGE(0o315000): Compare AC with Memory and Skip if AC Greater or Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCAA = function(op, acc) +PDP10.opCAMGE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) >= 0) this.setPC(this.regPC + 1); }; /** - * opCAGE(0o315000) + * opCAMN(0o316000): Compare AC with Memory and Skip if Not Equal + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCAGE = function(op, acc) +PDP10.opCAMN = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) != 0) this.setPC(this.regPC + 1); }; /** - * opCAN(0o316000) + * opCAMG(0o317000): Compare AC with Memory and Skip if AC Greater + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC with the contents of location E and skip the next instruction in sequence if the condition + * specified by M is satisfied. The pair of numbers compared may be either both fixed or both normalized + * floating point. * * @this {CPUStatePDP10} * @param {number} op * @param {number} acc */ -PDP10.opCAN = function(op, acc) +PDP10.opCAMG = function(op, acc) { - this.opUndefined(op); + if (PDP10.doCMP.call(this, this.readWord(acc), this.readWord(this.regEA)) > 0) this.setPC(this.regPC + 1); }; /** - * opCAG(0o317000) + * opJUMPL(0o321000): Jump if AC Less than Zero * - * @this {CPUStatePDP10} - * @param {number} op - * @param {number} acc - */ -PDP10.opCAG = function(op, acc) -{ - this.opUndefined(op); -}; - -/** - * opJUMP(0o320000) + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: * - * @this {CPUStatePDP10} - * @param {number} op - * @param {number} acc - */ -PDP10.opJUMP = function(op, acc) -{ - this.opUndefined(op); -}; - -/** - * opJUMPL(0o321000) + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2837,11 +2909,16 @@ PDP10.opJUMP = function(op, acc) */ PDP10.opJUMPL = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) < 0) this.setPC(this.regEA); }; /** - * opJUMPE(0o322000) + * opJUMPE(0o322000): Jump if AC Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2849,11 +2926,16 @@ PDP10.opJUMPL = function(op, acc) */ PDP10.opJUMPE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) == 0) this.setPC(this.regEA); }; /** - * opJUMPLE(0o323000) + * opJUMPLE(0o323000): Jump if AC Less than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2861,11 +2943,16 @@ PDP10.opJUMPE = function(op, acc) */ PDP10.opJUMPLE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) <= 0) this.setPC(this.regEA); }; /** - * opJUMPA(0o324000) + * opJUMPA(0o324000): Jump Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2873,11 +2960,16 @@ PDP10.opJUMPLE = function(op, acc) */ PDP10.opJUMPA = function(op, acc) { - this.opUndefined(op); + this.setPC(this.regEA); }; /** - * opJUMPGE(0o325000) + * opJUMPGE(0o325000): Jump if AC Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2885,11 +2977,16 @@ PDP10.opJUMPA = function(op, acc) */ PDP10.opJUMPGE = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) >= 0) this.setPC(this.regEA); }; /** - * opJUMPN(0o326000) + * opJUMPN(0o326000): Jump if AC Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2897,11 +2994,16 @@ PDP10.opJUMPGE = function(op, acc) */ PDP10.opJUMPN = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) != 0) this.setPC(this.regEA); }; /** - * opJUMPG(0o327000) + * opJUMPG(0o327000): Jump if AC Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-43: + * + * Compare AC (fixed or floating) with zero, and if the condition specified by M is satisfied, + * take the next instruction from location E and continue sequential operation from there. * * @this {CPUStatePDP10} * @param {number} op @@ -2909,11 +3011,17 @@ PDP10.opJUMPN = function(op, acc) */ PDP10.opJUMPG = function(op, acc) { - this.opUndefined(op); + if (PDP10.doSGN.call(this, this.readWord(acc)) > 0) this.setPC(this.regEA); }; /** - * opSKIP(0o330000) + * opSKIP(0o330000): Do Not Skip + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2921,11 +3029,17 @@ PDP10.opJUMPG = function(op, acc) */ PDP10.opSKIP = function(op, acc) { - this.opUndefined(op); + if (acc) this.writeWord(acc, this.readWord(this.regEA)); }; /** - * opSKIPL(0o331000) + * opSKIPL(0o331000): Skip if Memory Less than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2933,11 +3047,19 @@ PDP10.opSKIP = function(op, acc) */ PDP10.opSKIPL = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) < 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSKIPE(0o332000) + * opSKIPE(0o332000): Skip if Memory Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2945,11 +3067,19 @@ PDP10.opSKIPL = function(op, acc) */ PDP10.opSKIPE = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) == 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSKIPLE(0o333000) + * opSKIPLE(0o333000): Skip if Memory Less than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2957,11 +3087,19 @@ PDP10.opSKIPE = function(op, acc) */ PDP10.opSKIPLE = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) <= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSKIPA(0o334000) + * opSKIPA(0o334000): Skip Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2969,11 +3107,18 @@ PDP10.opSKIPLE = function(op, acc) */ PDP10.opSKIPA = function(op, acc) { - this.opUndefined(op); + this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, this.readWord(this.regEA)); }; /** - * opSKIPGE(0o335000) + * opSKIPGE(0o335000): Skip if Memory Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2981,11 +3126,19 @@ PDP10.opSKIPA = function(op, acc) */ PDP10.opSKIPGE = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) >= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSKIPN(0o336000) + * opSKIPN(0o336000): Skip if Memory Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -2993,11 +3146,19 @@ PDP10.opSKIPGE = function(op, acc) */ PDP10.opSKIPN = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) != 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSKIPG(0o337000) + * opSKIPG(0o337000): Skip if Memory Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Compare the contents (fixed or floating) of location E with zero, and skip the next instruction + * in sequence if the condition specified by M is satisfied. If A is nonzero also place the contents + * of location E in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3005,11 +3166,20 @@ PDP10.opSKIPN = function(op, acc) */ PDP10.opSKIPG = function(op, acc) { - this.opUndefined(op); + var dst = this.readWord(this.regEA); + if (PDP10.doSGN.call(this, dst) > 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOJ(0o340000) + * opAOJ(0o340000): Add One to AC but Do Not Jump + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3017,11 +3187,18 @@ PDP10.opSKIPG = function(op, acc) */ PDP10.opAOJ = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); }; /** - * opAOJL(0o341000) + * opAOJL(0o341000): Add One to AC and Jump if Less than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3029,11 +3206,19 @@ PDP10.opAOJ = function(op, acc) */ PDP10.opAOJL = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) < 0) this.setPC(this.regEA); }; /** - * opAOJE(0o342000) + * opAOJE(0o342000): Add One to AC and Jump if Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3041,11 +3226,19 @@ PDP10.opAOJL = function(op, acc) */ PDP10.opAOJE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) == 0) this.setPC(this.regEA); }; /** - * opAOJLE(0o343000) + * opAOJLE(0o343000): Add One to AC and Jump if Less than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3053,11 +3246,19 @@ PDP10.opAOJE = function(op, acc) */ PDP10.opAOJLE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) <= 0) this.setPC(this.regEA); }; /** - * opAOJA(0o344000) + * opAOJA(0o344000): Add One to AC and Jump Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3065,11 +3266,19 @@ PDP10.opAOJLE = function(op, acc) */ PDP10.opAOJA = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + this.setPC(this.regEA); }; /** - * opAOJGE(0o345000) + * opAOJGE(0o345000): Add One to AC and Jump if Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3077,11 +3286,19 @@ PDP10.opAOJA = function(op, acc) */ PDP10.opAOJGE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) >= 0) this.setPC(this.regEA); }; /** - * opAOJN(0o346000) + * opAOJN(0o346000): Add One to AC and Jump if Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3089,11 +3306,19 @@ PDP10.opAOJGE = function(op, acc) */ PDP10.opAOJN = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) != 0) this.setPC(this.regEA); }; /** - * opAOJG(0o347000) + * opAOJG(0o347000): Add One to AC and Jump if Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-44: + * + * Increment AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue + * sequential operation from there. If AC originally contained 2^35 - 1, set the Overflow and Carry 1 + * flags; if -1, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3101,11 +3326,19 @@ PDP10.opAOJN = function(op, acc) */ PDP10.opAOJG = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doADD.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) > 0) this.setPC(this.regEA); }; /** - * opAOS(0o350000) + * opAOS(0o350000): Add One to Memory but Do Not Skip + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3113,11 +3346,19 @@ PDP10.opAOJG = function(op, acc) */ PDP10.opAOS = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSL(0o351000) + * opAOSL(0o351000): Add One to Memory and Skip if Less than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3125,11 +3366,20 @@ PDP10.opAOS = function(op, acc) */ PDP10.opAOSL = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) < 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSE(0o352000) + * opAOSE(0o352000): Add One to Memory and Skip if Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3137,11 +3387,20 @@ PDP10.opAOSL = function(op, acc) */ PDP10.opAOSE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) == 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSLE(0o353000) + * opAOSLE(0o353000): Add One to Memory and Skip if Less than to Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3149,11 +3408,20 @@ PDP10.opAOSE = function(op, acc) */ PDP10.opAOSLE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) <= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSA(0o354000) + * opAOSA(0o354000): Add One to Memory and Skip Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3161,11 +3429,20 @@ PDP10.opAOSLE = function(op, acc) */ PDP10.opAOSA = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSGE(0o355000) + * opAOSGE(0o355000): Add One to Memory and Skip if Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3173,11 +3450,20 @@ PDP10.opAOSA = function(op, acc) */ PDP10.opAOSGE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) >= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSN(0o356000) + * opAOSN(0o356000): Add One to Memory and Skip if Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3185,11 +3471,20 @@ PDP10.opAOSGE = function(op, acc) */ PDP10.opAOSN = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) != 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opAOSG(0o357000) + * opAOSG(0o357000): Add One to Memory and Skip if Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Increment the contents of location E by one and place the result back in E. Compare the result + * with zero, and skip the next instruction in sequence if the condition specified by M is satisfied. + * If location E originally contained 2^35 - 1, set the Overflow and Carry 1 flags; if -1, set Carry 0 + * and Carry 1. If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3197,11 +3492,20 @@ PDP10.opAOSN = function(op, acc) */ PDP10.opAOSG = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doADD.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) > 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOJ(0o360000) + * opSOJ(0o360000): Subtract One from AC but Do Not Jump + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3209,11 +3513,18 @@ PDP10.opAOSG = function(op, acc) */ PDP10.opSOJ = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); }; /** - * opSOJL(0o361000) + * opSOJL(0o361000): Subtract One from AC and Jump if Less than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3221,11 +3532,19 @@ PDP10.opSOJ = function(op, acc) */ PDP10.opSOJL = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) < 0) this.setPC(this.regEA); }; /** - * opSOJE(0o362000) + * opSOJE(0o362000): Subtract One from AC and Jump if Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3233,11 +3552,19 @@ PDP10.opSOJL = function(op, acc) */ PDP10.opSOJE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) == 0) this.setPC(this.regEA); }; /** - * opSOJLE(0o363000) + * opSOJLE(0o363000): Subtract One from AC and Jump if Less than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3245,11 +3572,19 @@ PDP10.opSOJE = function(op, acc) */ PDP10.opSOJLE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) <= 0) this.setPC(this.regEA); }; /** - * opSOJA(0o364000) + * opSOJA(0o364000): Subtract One from AC and Jump Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3257,11 +3592,19 @@ PDP10.opSOJLE = function(op, acc) */ PDP10.opSOJA = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + this.setPC(this.regEA); }; /** - * opSOJGE(0o365000) + * opSOJGE(0o365000): Subtract One from AC and Jump if Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3269,11 +3612,19 @@ PDP10.opSOJA = function(op, acc) */ PDP10.opSOJGE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) >= 0) this.setPC(this.regEA); }; /** - * opSOJN(0o366000) + * opSOJN(0o366000): Subtract One from AC and Jump if Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3281,11 +3632,19 @@ PDP10.opSOJGE = function(op, acc) */ PDP10.opSOJN = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) != 0) this.setPC(this.regEA); }; /** - * opSOJG(0o367000) + * opSOJG(0o367000): Subtract One from AC and Jump if Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-45: + * + * Decrement AC by one and place the result back in AC. Compare the result with zero, and if the + * condition specified by M is satisfied, take the next instruction from location E and continue sequential + * operation from there. If AC originally contained - 2^35 , set the Overflow and Carry 0 flags; if any + * other nonzero number, set Carry 0 and Carry 1. * * @this {CPUStatePDP10} * @param {number} op @@ -3293,11 +3652,19 @@ PDP10.opSOJN = function(op, acc) */ PDP10.opSOJG = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(acc, PDP10.doSUB.call(this, this.readWord(acc), 1)); + if (PDP10.doSGN.call(this, dst) > 0) this.setPC(this.regEA); }; /** - * opSOS(0o370000) + * opSOS(0o370000): Subtract One from Memory but Do Not Skip + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3305,11 +3672,19 @@ PDP10.opSOJG = function(op, acc) */ PDP10.opSOS = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSL(0o371000) + * opSOSL(0o371000): Subtract One from Memory and Skip if Less than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3317,11 +3692,20 @@ PDP10.opSOS = function(op, acc) */ PDP10.opSOSL = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) < 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSE(0o372000) + * opSOSE(0o372000): Subtract One from Memory and Skip if Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3329,11 +3713,20 @@ PDP10.opSOSL = function(op, acc) */ PDP10.opSOSE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) == 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSLE(0o373000) + * opSOSLE(0o373000): Subtract One from Memory and Skip if Less than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3341,11 +3734,20 @@ PDP10.opSOSE = function(op, acc) */ PDP10.opSOSLE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) <= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSA(0o374000) + * opSOSA(0o374000): Subtract One from Memory and Skip Always + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3353,11 +3755,20 @@ PDP10.opSOSLE = function(op, acc) */ PDP10.opSOSA = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSGE(0o375000) + * opSOSGE(0o375000): Subtract One from Memory and Skip if Greater than or Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3365,11 +3776,20 @@ PDP10.opSOSA = function(op, acc) */ PDP10.opSOSGE = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) >= 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSN(0o376000) + * opSOSN(0o376000): Subtract One from Memory and Skip if Not Equal to Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3377,11 +3797,20 @@ PDP10.opSOSGE = function(op, acc) */ PDP10.opSOSN = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) != 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** - * opSOSG(0o377000) + * opSOSG(0o377000): Subtract One from Memory and Skip if Greater than Zero + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-46: + * + * Decrement the contents of location E by one and place the result back in E. Compare the result with zero, + * and skip the next instruction in sequence if the condition specified by M is satisfied. If location E originally + * contained -2^35 , set the Overflow and Carry 0 flags; if any other nonzero number, set Carry 0 and Carry 1. + * If A is nonzero also place the result in AC. * * @this {CPUStatePDP10} * @param {number} op @@ -3389,7 +3818,9 @@ PDP10.opSOSN = function(op, acc) */ PDP10.opSOSG = function(op, acc) { - this.opUndefined(op); + var dst = this.writeWord(this.regEA, PDP10.doSUB.call(this, this.readWord(this.regEA), 1)); + if (PDP10.doSGN.call(this, dst) > 0) this.setPC(this.regPC + 1); + if (acc) this.writeWord(acc, dst); }; /** @@ -5545,7 +5976,7 @@ PDP10.opIO = function(op) /** * opNOP(op, acc) * - * Used for all "defined" operations that, in fact, do nothing (eg, SETA and SETAI). + * Used for all "defined" operations that, in fact, do nothing (eg, SETA, SETAI, CAI, JUMP). * * @this {CPUStatePDP10} * @param {number} op @@ -5555,6 +5986,19 @@ PDP10.opNOP = function(op, acc) { }; +/** + * opNOPM(op, acc) + * + * Used for all "defined" operations that, in fact, do nothing (eg, SETMM, CAM) EXCEPT reference memory. + * + * @this {CPUStatePDP10} + * @param {number} op + * @param {number} acc + */ +PDP10.opNOPM = function(op, acc) +{ +}; + /** * opUndefined(op, acc) * @@ -5572,7 +6016,7 @@ PDP10.opUndefined = function(op, acc) /** * doABS(src) * - * Used by the MOVM* (Move Magnitude) instructions. + * Returns the absolute value (ABS) of the 36-bit operand; used by the MOVM* (Move Magnitude) instructions. * * @this {CPUStatePDP10} * @param {number} src (36-bit) @@ -5580,8 +6024,8 @@ PDP10.opUndefined = function(op, acc) */ PDP10.doABS = function(src) { - if (src > PDP10.MAX_POS36) { - if (src != PDP10.MIN_NEG36) { + if (src > PDP10.INT_MASK) { + if (src != PDP10.INT_LIMIT) { src = PDP10.TWO_POW36 - src; } else { this.regPS |= (PDP10.PSFLAG.OVFL | PDP10.PSFLAG.CARRY1); @@ -5593,7 +6037,7 @@ PDP10.doABS = function(src) /** * doADD(dst, src) * - * Used by callers to perform the addition (ADD) of two signed 36-bit operands. + * Performs the addition (ADD) of two signed 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5614,7 +6058,7 @@ PDP10.doADD = function(dst, src) /** * doAND(dst, src) * - * Used by callers to perform the logical "and" (AND) of two 36-bit operands. + * Performs the logical "and" (AND) of two 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5635,10 +6079,25 @@ PDP10.doAND = function(dst, src) return ((((dst / PDP10.TWO_POW32)|0) & ((src / PDP10.TWO_POW32)|0)) * PDP10.TWO_POW32) + ((dst & src) >>> 0); }; +/** + * doCMP(dst, src) + * + * Performs the SIGNED comparison (CMP) of two 36-bit operands. + * + * @this {CPUStatePDP10} + * @param {number} dst (36-bit value) + * @param {number} src (36-bit value) + * @return {number} (dst - src) + */ +PDP10.doCMP = function(dst, src) +{ + return (dst < PDP10.INT_LIMIT? dst : dst - PDP10.WORD_LIMIT) - (src < PDP10.INT_LIMIT? src : src - PDP10.INT_LIMIT); +}; + /** * doDIV(dst, ext, src) * - * Used by callers to perform the division (DIV) of a 72-bit operand by a 36-bit operand. + * Performs the division (DIV) of a 72-bit operand by a 36-bit operand. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5653,12 +6112,12 @@ PDP10.doDIV = function(dst, ext, src) dst = PDP10.merge72.call(this, dst, ext); ext = this.regExt; - if (src > PDP10.MAX_POS36) { + if (src > PDP10.INT_MASK) { src = PDP10.WORD_LIMIT - src; fNegQ = !fNegQ; } - if (ext > PDP10.MAX_POS36) { + if (ext > PDP10.INT_MASK) { if (dst) { ext = PDP10.WORD_MASK - ext; dst = PDP10.WORD_LIMIT - dst; @@ -5726,7 +6185,7 @@ PDP10.doDIV = function(dst, ext, src) /** * doEOR(dst, src) * - * Used by callers to perform the logical "exclusive-or" (XOR) of two 36-bit operands. + * Performs the logical "exclusive-or" (XOR) of two 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5750,7 +6209,7 @@ PDP10.doEOR = function(dst, src) /** * doEQV(dst, src) * - * Used by callers to perform the logical "equivalence" (EQV) of two 36-bit operands. + * Performs the logical "equivalence" (EQV) of two 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5774,7 +6233,7 @@ PDP10.doEQV = function(dst, src) /** * doIOR(dst, src) * - * Used by callers to perform the logical "inclusive-or" (OR) of two 36-bit operands. + * Performs the logical "inclusive-or" (OR) of two 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5798,7 +6257,7 @@ PDP10.doIOR = function(dst, src) /** * doMUL(dst, src, fTruncate) * - * Used by callers to perform the multiplication (MUL) of two signed 36-bit operands. + * Performs the multiplication (MUL) of two signed 36-bit operands. * * To support 72-bit results, we perform the multiplication process as you would "by hand", * treating the operands to be multiplied as two 2-digit numbers, where each "digit" is an 18-bit @@ -5820,12 +6279,12 @@ PDP10.doMUL = function(dst, src, fTruncate) * If either input is in the negative range, record the sign and make it positive; * we'll negate the result afterward if necessary. */ - if (n1 > PDP10.MAX_POS36) { + if (n1 > PDP10.INT_MASK) { n1 = PDP10.WORD_LIMIT - n1; fNeg = !fNeg; } - if (n2 > PDP10.MAX_POS36) { + if (n2 > PDP10.INT_MASK) { n2 = PDP10.WORD_LIMIT - n2; fNeg = !fNeg; } @@ -5864,7 +6323,7 @@ PDP10.doMUL = function(dst, src, fTruncate) /* * If ext is something OTHER than an extension of the res sign bit, then we have overflow. */ - if ((ext || res > PDP10.MAX_POS36) && (ext != PDP10.WORD_MASK || res <= PDP10.MAX_POS36)) { + if ((ext || res > PDP10.INT_MASK) && (ext != PDP10.WORD_MASK || res <= PDP10.INT_MASK)) { this.regPS |= PDP10.PSFLAG.OVFL; } /* @@ -5880,7 +6339,7 @@ PDP10.doMUL = function(dst, src, fTruncate) /** * doNEG(src) * - * Used by the MOVN* (Move Negative) instructions. + * Returns the negation (NEG) of the 36-bit operand; used by the MOVN* (Move Negative) instructions. * * @this {CPUStatePDP10} * @param {number} src (36-bit) @@ -5894,9 +6353,9 @@ PDP10.doNEG = function(src) else { /* * In the non-zero case, it's always safe to subtract src from TWO_POW36, but since we have to check for - * the MIN_NEG36 case anyway, and since subtraction in that case doesn't alter src, we skip the subtraction. + * the INT_LIMIT case anyway, and since subtraction in that case doesn't alter src, we skip the subtraction. */ - if (src == PDP10.MIN_NEG36) { + if (src == PDP10.INT_LIMIT) { this.regPS |= (PDP10.PSFLAG.OVFL | PDP10.PSFLAG.CARRY1); } else { src = PDP10.TWO_POW36 - src; @@ -5905,10 +6364,24 @@ PDP10.doNEG = function(src) return src; }; +/** + * doSGN(dst) + * + * Returns the signed form of the 36-bit operand; more efficient than doCMP(dst, 0). + * + * @this {CPUStatePDP10} + * @param {number} dst (36-bit value) + * @return {number} + */ +PDP10.doSGN = function(dst) +{ + return (dst < PDP10.INT_LIMIT? dst : dst - PDP10.WORD_LIMIT); +}; + /** * doSUB(dst, src) * - * Used by callers to perform the subtraction (SUB) of two signed 36-bit operands. + * Performs the subtraction (SUB) of two signed 36-bit operands. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5934,7 +6407,7 @@ PDP10.doSUB = function(dst, src) /** * merge72(dst, ext) * - * Returns a unified 72-bit result from dst and ext. + * Returns a unified 72-bit result from two independently-signed 36-bit values. * * @this {CPUStatePDP10} * @param {number} dst (36-bit value) @@ -5961,7 +6434,7 @@ PDP10.merge72 = function(dst, ext) /** * split72(res, ext) * - * Returns two split 36-bit values from a 72-bit result. + * Returns two 36-bit values with matching sign bits from a unified 72-bit result. * * @this {CPUStatePDP10} * @param {number} res (36-bit value) @@ -6000,12 +6473,46 @@ PDP10.split72 = function(res, ext) */ PDP10.setAddFlags = function(dst, src, res) { + /* + * Isolate the top two bits of dst, src, and res by "shifting" them into bits 0 and 1 of the following variables. + */ var dst01 = Math.trunc(dst / PDP10.TWO_POW34); var src01 = Math.trunc(src / PDP10.TWO_POW34); var res01 = Math.trunc(res / PDP10.TWO_POW34); + + /* + * Transform bits 0 and 1 into carry flags, based on the following truth table: + * + * D S R C Carry? + * - - - - ------ + * 0 0 0 0 no + * 0 0 1 0 no (there must have been a carry out of the preceding bit, but it was "absorbed") + * 0 1 0 1 yes (there must have been a carry out of the preceding bit, but it was NOT "absorbed") + * 0 1 1 0 no + * 1 0 0 1 yes (same as the preceding "yes" case) + * 1 0 1 0 no + * 1 1 0 1 yes (since the addition of two ones must always produce a carry) + * 1 1 1 1 yes (since the addition of two ones must always produce a carry) + */ var bitsCarry = (dst01 ^ ((dst01 ^ src01) & (src01 ^ res01))); var fCarry0 = bitsCarry & 0b10; var fCarry1 = bitsCarry & 0b01; + + /* + * Similarly, we transform bit 1 into an overflow flag, based on the following truth table; + * note that X is (D ^ R) and Y is (S ^ R): + * + * D S R X Y O Overflow? + * - - - - - - --------- + * 0 0 0 0 0 0 no + * 0 0 1 1 1 1 yes (adding two positive values yielded a negative value) + * 0 1 0 0 1 0 no + * 0 1 1 1 0 0 no + * 1 0 0 1 0 0 no + * 1 0 1 0 1 0 no + * 1 1 0 1 1 1 yes (adding two negative values yielded a positive value) + * 1 1 1 0 0 0 no + */ var fOverflow = ((dst01 ^ res01) & (src01 ^ res01)) & 0b10; this.regPS |= (fCarry0? PDP10.PSFLAG.CARRY0 : 0) | (fCarry1? PDP10.PSFLAG.CARRY1 : 0) | (fOverflow? PDP10.PSFLAG.OVFL : 0); }; @@ -6033,7 +6540,7 @@ PDP10.getHL = function(op, dst, src) dst = (PDP10.HALF_MASK * PDP10.HALF_SHIFT); break; case 0o600: - dst = (src > PDP10.MAX_POS18? (PDP10.HALF_MASK * PDP10.HALF_SHIFT) : 0); + dst = (src > PDP10.HINT_MASK? (PDP10.HALF_MASK * PDP10.HALF_SHIFT) : 0); break; } return dst; @@ -6058,7 +6565,7 @@ PDP10.setHL = function(op, dst, src) dst += (PDP10.HALF_MASK * PDP10.HALF_SHIFT); break; case 0o600: - dst += (src > PDP10.MAX_POS18? (PDP10.HALF_MASK * PDP10.HALF_SHIFT) : 0); + dst += (src > PDP10.HINT_MASK? (PDP10.HALF_MASK * PDP10.HALF_SHIFT) : 0); break; } } @@ -6088,7 +6595,7 @@ PDP10.getHR = function(op, dst, src) dst = PDP10.HALF_MASK; break; case 0o600: - dst = (src > PDP10.MAX_POS36? PDP10.HALF_MASK : 0); + dst = (src > PDP10.INT_MASK? PDP10.HALF_MASK : 0); break; } return dst; @@ -6113,7 +6620,7 @@ PDP10.setHR = function(op, dst, src) dst += PDP10.HALF_MASK; break; case 0o600: - dst += (src > PDP10.MAX_POS36? PDP10.HALF_MASK : 0); + dst += (src > PDP10.INT_MASK? PDP10.HALF_MASK : 0); break; } } @@ -6123,7 +6630,7 @@ PDP10.setHR = function(op, dst, src) /** * addD(dDst, dSrc) * - * Adds dSrc to dDst. + * Adds a double-length value (dSrc) to another (dDst). * * @param {Array.} dDst * @param {Array.} dSrc @@ -6141,7 +6648,7 @@ PDP10.addD = function(dDst, dSrc) /** * cmpD(dDst, dSrc) * - * Compares dDst to dSrc, by computing dDst - dSrc. + * Compares double-length values (dDst and dSrc) by computing dDst - dSrc. * * @param {Array.} dDst * @param {Array.} dSrc @@ -6157,6 +6664,8 @@ PDP10.cmpD = function(dDst, dSrc) /** * initD(dDst, lo, hi) * + * Initializes a double-length value (dDst). + * * @param {Array.} dDst * @param {number} lo * @param {number} hi @@ -6170,7 +6679,7 @@ PDP10.initD = function(dDst, lo, hi) /** * shrD(dDst) * - * Shifts dDst right one bit. + * Shifts a double-length value (dDst) right one bit. * * @param {Array.} dDst */ @@ -6186,7 +6695,7 @@ PDP10.shrD = function(dDst) /** * subD(dDst, dSrc) * - * Subtracts dSrc from dDst. + * Subtracts a double-length value (dSrc) from another (dDst). * * @param {Array.} dDst * @param {Array.} dSrc @@ -6204,7 +6713,7 @@ PDP10.subD = function(dDst, dSrc) /** * zeroD(d) * - * True if bits are all zero, false otherwise. + * True if all bits in the double-length value (d) are zero, false otherwise. * * @param {Array.} d */ @@ -6281,8 +6790,11 @@ PDP10.opSETAM = PDP10.opMOVEM; PDP10.opSETAB = PDP10.opMOVEM; PDP10.opSETM = PDP10.opMOVE; PDP10.opSETMI = PDP10.opMOVEI; -PDP10.opSETMM = PDP10.opNOP; +PDP10.opSETMM = PDP10.opNOPM; PDP10.opSETMB = PDP10.opMOVE; +PDP10.opCAI = PDP10.opNOP; +PDP10.opCAM = PDP10.opNOPM; +PDP10.opJUMP = PDP10.opNOP; PDP10.aOpXXX_KA10 = [ PDP10.opUUO, // 0o000xxx @@ -6485,14 +6997,14 @@ PDP10.aOpXXX_KA10 = [ PDP10.opCAIGE, // 0o305xxx PDP10.opCAIN, // 0o306xxx PDP10.opCAIG, // 0o307xxx - PDP10.opCA, // 0o310xxx - PDP10.opCAL, // 0o311xxx - PDP10.opCAE, // 0o312xxx - PDP10.opCALE, // 0o313xxx - PDP10.opCAA, // 0o314xxx - PDP10.opCAGE, // 0o315xxx - PDP10.opCAN, // 0o316xxx - PDP10.opCAG, // 0o317xxx + PDP10.opCAM, // 0o310xxx + PDP10.opCAML, // 0o311xxx + PDP10.opCAME, // 0o312xxx + PDP10.opCAMLE, // 0o313xxx + PDP10.opCAMA, // 0o314xxx + PDP10.opCAMGE, // 0o315xxx + PDP10.opCAMN, // 0o316xxx + PDP10.opCAMG, // 0o317xxx PDP10.opJUMP, // 0o320xxx PDP10.opJUMPL, // 0o321xxx PDP10.opJUMPE, // 0o322xxx diff --git a/modules/pdp10/lib/cpustate.js b/modules/pdp10/lib/cpustate.js index 3c254d38c..421b877da 100644 --- a/modules/pdp10/lib/cpustate.js +++ b/modules/pdp10/lib/cpustate.js @@ -486,11 +486,10 @@ class CPUStatePDP10 extends CPUPDP10 { } /** - * setPC() + * setPC(addr) * - * NOTE: Unlike other PCjs emulators, such as PCx86, where all PC updates MUST go through the setPC() - * function, this function is nothing more than a convenience, because in the PDP-11, the PC can be loaded - * like any other general register. We fully expect this function to be inlined at runtime. + * Updates the PC register with the new address after masking it with ADDR_LIMIT (in case the + * new address was the result of an unchecked calculation). * * @this {CPUStatePDP10} * @param {number} addr diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index 6d656e559..1181a30cc 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -567,7 +567,7 @@ class DebuggerPDP10 extends Debugger { * converting any signed values to their unsigned (two's complement) counterpart, provided they are * within the acceptable range. Any values outside that range will be dealt with afterward. */ - if (w < 0 && w >= -PDP10.MIN_NEG36) { + if (w < 0 && w >= -PDP10.INT_LIMIT) { w += PDP10.WORD_LIMIT; } var value = Math.trunc(Math.abs(w)) % Math.pow(2, bits); @@ -3869,7 +3869,7 @@ if (DEBUGGER) { ASHC: 57, FSC: 58, FADR: 59, FSBR: 60, FMPR: 61, FDVR: 62, DFN: 63, UFA: 64, FAD: 65, FSB: 66, FMP: 67, FDV: 68, - AOBJP: 69, AOBJN: 70, CAI: 71, CA: 72, + AOBJP: 69, AOBJN: 70, CAI: 71, CAM: 72, JUMP: 73, SKIP: 74, AOJ: 75, AOS: 76, SOJ: 77, SOS: 78, TR: 79, TL: 80, TD: 81, TS: 82, XCT: 83, JFFO: 84, @@ -3903,7 +3903,7 @@ if (DEBUGGER) { "ASHC", "FSC", "FADR", "FSBR", "FMPR", "FDVR", "DFN", "UFA", "FAD", "FSB", "FMP", "FDV", - "AOBJP", "AOBJN", "CAI", "CA", + "AOBJP", "AOBJN", "CAI", "CAM", "JUMP", "SKIP", "AOJ", "AOS", "SOJ", "SOS", "TR", "TL", "TD", "TS", "XCT", "JFFO", @@ -4026,7 +4026,7 @@ if (DEBUGGER) { }, [PDP10.OPCODE.OPCOMP]: { // 0o77000 0o30000: DebuggerPDP10.OPS.CAI, - 0o31000: DebuggerPDP10.OPS.CA, + 0o31000: DebuggerPDP10.OPS.CAM, 0o32000: DebuggerPDP10.OPS.JUMP, 0o33000: DebuggerPDP10.OPS.SKIP, 0o34000: DebuggerPDP10.OPS.AOJ, diff --git a/modules/pdp10/lib/defines.js b/modules/pdp10/lib/defines.js index c8fea8487..276fb86fc 100644 --- a/modules/pdp10/lib/defines.js +++ b/modules/pdp10/lib/defines.js @@ -109,6 +109,7 @@ var PDP10 = { * values as unsigned quantities, these are the unsigned equivalents. */ WORD_INVALID: -1, + HINT_MASK: Math.pow(2, 17) - 1, // 131,071 (377777) signed half-word (half-int) mask HALF_MASK: Math.pow(2, 18) - 1, // 262,143 (000000 777777): unsigned half-word mask HALF_SHIFT: Math.pow(2, 18), // 262,144 (000001 000000): unsigned half-word shift INT_MASK: Math.pow(2, 35) - 1, // 34,359,738,367 (377777 777777): signed word (magnitude) mask @@ -116,14 +117,9 @@ var PDP10 = { WORD_MASK: Math.pow(2, 36) - 1, // 68,719,476,735 (777777 777777): unsigned word mask WORD_LIMIT: Math.pow(2, 36), // 68,719,476,736 (1 000000 000000): unsigned word limit - MAX_POS18: Math.pow(2, 17) - 1, // 131,071 (377777) - MIN_NEG18: Math.pow(2, 17), // -131,072 (400000) - MAX_POS36: Math.pow(2, 35) - 1, // 34,359,738,367 (377777 777777) - MIN_NEG36: Math.pow(2, 35), // -34,359,738,368 (400000 000000) - - TWO_POW36: Math.pow(2, 36), // the two's complement of a 36-bit value is (value? TWO_POW36 - value : 0) - TWO_POW34: Math.pow(2, 34), TWO_POW32: Math.pow(2, 32), + TWO_POW34: Math.pow(2, 34), + TWO_POW36: Math.pow(2, 36), // the two's complement of a 36-bit value is (value? TWO_POW36 - value : 0) /* * PDP-10 opcodes are 36-bit values, most of which use the following layout: diff --git a/modules/pdp10/lib/memory.js b/modules/pdp10/lib/memory.js index 583bedc10..5e7a044d7 100644 --- a/modules/pdp10/lib/memory.js +++ b/modules/pdp10/lib/memory.js @@ -217,7 +217,7 @@ class MemoryPDP10 { * converting any signed values to their unsigned (two's complement) counterpart, provided they are * within the acceptable range. Any values outside that range will be dealt with afterward. */ - if (pattern < 0 && pattern >= -PDP10.MIN_NEG36) { + if (pattern < 0 && pattern >= -PDP10.INT_LIMIT) { pattern += PDP10.WORD_LIMIT; } pattern = Math.trunc(Math.abs(pattern)) % PDP10.WORD_LIMIT; diff --git a/modules/shared/lib/int36.js b/modules/shared/lib/int36.js index 5e351db44..b87c41c03 100644 --- a/modules/shared/lib/int36.js +++ b/modules/shared/lib/int36.js @@ -123,7 +123,7 @@ * @unrestricted * * The 'value' property stores the 36-bit value as an unsigned integer. When the value should be - * interpreted as a signed quantity, subtract BIT36 whenever value > MAX_POS36. + * interpreted as a signed quantity, subtract BIT36 whenever value > INT_MASK. * * The 'extended' property stores an additional 36 bits of data from a multiplication, and can also * provide an additional 36 bits of data to a division. Internally, it should be null whenever the @@ -153,7 +153,7 @@ class Int36 { * 0 <= i <= Math.pow(2, 36) - 1 * * The lower bound is ZERO and the upper bound is Int36.WORD_MASK. Whenever an Int36 value should be - * interpreted as a signed value, values above Int36.MAX_POS36 (ie, values with bit 35 set) should be + * interpreted as a signed value, values above Int36.INT_MASK (ie, values with bit 35 set) should be * converted to their signed counterpart by subtracting the value from Int36.WORD_LIMIT (aka WORD_MASK + 1); * the easiest way to do that is call isNeg() to check the sign bit and then call negate() as * appropriate. @@ -330,12 +330,12 @@ class Int36 { /** * truncate(result, operand, fSub) * - * The range of valid results (0 - WORD_MASK) is divided into two equal sub-ranges: 0 to MAX_POS36, - * where the sign bit is zero (the bottom range), and MAX_POS36+1 to WORD_MASK (the top range), where + * The range of valid results (0 - WORD_MASK) is divided into two equal sub-ranges: 0 to INT_MASK, + * where the sign bit is zero (the bottom range), and INT_MASK+1 to WORD_MASK (the top range), where * the sign bit is one. During a single arithmetic operation, the result can "wrap around" from * the bottom range to the top, or from the top range to the bottom, but it's an overflow/underflow * error ONLY if the result "wraps across" the midpoint between the two ranges, producing an - * unnaturally small delta (<= MAX_POS36). + * unnaturally small delta (<= INT_MASK). * * This can be confirmed independently by examining the sign bits (BIT35) of the original value * (V), the operand (O), the result (R), as well as two intermediate calculations, VR = (V ^ R) @@ -413,9 +413,9 @@ class Int36 { var v = this.value / Int36.INT_LIMIT, r = result / Int36.INT_LIMIT, o = operand / Int36.INT_LIMIT; e = ((v ^ r) & (o ^ (fSub? v : r))) & 1; } - if ((result > Int36.MAX_POS36) != (this.value > Int36.MAX_POS36)) { + if ((result > Int36.INT_MASK) != (this.value > Int36.INT_MASK)) { var delta = result - this.value; - if (Math.abs(delta) <= Int36.MAX_POS36) { + if (Math.abs(delta) <= Int36.INT_MASK) { this.error |= (delta > 0? Int36.ERROR.OVERFLOW : Int36.ERROR.UNDERFLOW); if (DEBUG && (delta > 0) != !(e & v)) e = 0; } @@ -514,12 +514,12 @@ class Int36 { this.error = Int36.ERROR.NONE; - if (n1 > Int36.MAX_POS36) { + if (n1 > Int36.INT_MASK) { n1 = Int36.WORD_LIMIT - n1; fNeg = !fNeg; } - if (n2 > Int36.MAX_POS36) { + if (n2 > Int36.INT_MASK) { n2 = Int36.WORD_LIMIT - n2; fNeg = !fNeg; } @@ -599,7 +599,7 @@ class Int36 { var fNegQ = false, fNegR = false; - if (divisor > Int36.MAX_POS36) { + if (divisor > Int36.INT_MASK) { divisor = Int36.WORD_LIMIT - divisor; fNegQ = !fNegQ; } @@ -704,11 +704,11 @@ class Int36 { /* * Convert the unsigned word (w) to a signed value (i), for convenience. */ - var i = w > Int36.MAX_POS36? -(Int36.WORD_LIMIT - w) : w; + var i = w > Int36.INT_MASK? -(Int36.WORD_LIMIT - w) : w; if (s > 0) { if (s >= 35) { i = (i < 0? Int36.INT_LIMIT : 0); - bitsShifted = Int36.MAX_POS36; + bitsShifted = Int36.INT_MASK; } else { i = (i * Math.pow(2, s)) % Int36.INT_LIMIT; /* @@ -726,20 +726,20 @@ class Int36 { */ bitsShifted = Int36.INT_LIMIT - Math.pow(2, 35 - s); } - if (w <= Int36.MAX_POS36) { + if (w <= Int36.INT_MASK) { /* * Since w was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value (w) were 0s, then adding bitsShifted to it could NOT - * produce a value > MAX_POS36. + * produce a value > INT_MASK. */ - if (w + bitsShifted > Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (w + bitsShifted > Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; } else { /* * Since w was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value (w) were 1s, subtracting bitsShifted from it could NOT - * produce a value <= MAX_POS36. + * produce a value <= INT_MASK. */ - if (w - bitsShifted <= Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (w - bitsShifted <= Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; } } else { if (s <= -35) { @@ -793,20 +793,20 @@ class Int36 { */ wLeft = (wRight * Math.pow(2, s - 35)) % Int36.INT_LIMIT; bits = Int36.INT_LIMIT - Math.pow(2, 70 - s); - if (wLeftOrig <= Int36.MAX_POS36) { + if (wLeftOrig <= Int36.INT_MASK) { /* * Since wLeft was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value were 0s, then adding bits to it could NOT produce - * a value > MAX_POS36. + * a value > INT_MASK. */ - if (wRight + bits > Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (wRight + bits > Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; } else { /* * Since wLeft was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value were 1s, subtracting bits from it could NOT produce - * a value <= MAX_POS36. + * a value <= INT_MASK. */ - if (wRight - bits <= Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (wRight - bits <= Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; } } wRight = 0; @@ -824,20 +824,20 @@ class Int36 { * Determine overflow and update the sign bits. */ bits = Int36.INT_LIMIT - Math.pow(2, 35 - s); - if (wLeftOrig <= Int36.MAX_POS36) { + if (wLeftOrig <= Int36.INT_MASK) { /* * Since wLeft was positive, overflow occurs ONLY if any of the bits we shifted out were 1s. * If all those bits in the original value were 0s, then adding bits to it could NOT produce - * a value > MAX_POS36. + * a value > INT_MASK. */ - if (wLeftOrig + bits > Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (wLeftOrig + bits > Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; } else { /* * Since wLeft was negative, overflow occurs ONLY if any of the bits we shifted out were 0s. * If all those bits in the original value were 1s, subtracting bits from it could NOT produce - * a value <= MAX_POS36. + * a value <= INT_MASK. */ - if (wLeftOrig - bits <= Int36.MAX_POS36) this.error |= Int36.ERROR.OVERFLOW; + if (wLeftOrig - bits <= Int36.INT_MASK) this.error |= Int36.ERROR.OVERFLOW; /* * Last but not least, update the sign bits of wLeft and wRight to indicate negative values. */ @@ -1058,7 +1058,7 @@ class Int36 { extend() { if (this.extended == null) { - this.extended = (this.value > Int36.MAX_POS36? Int36.WORD_MASK : 0); + this.extended = (this.value > Int36.INT_MASK? Int36.WORD_MASK : 0); } } @@ -1071,7 +1071,7 @@ class Int36 { */ reduce() { - if (this.extended == 0 && this.value <= Int36.MAX_POS36 || this.extended == Int36.WORD_MASK && this.value > Int36.MAX_POS36) { + if (this.extended == 0 && this.value <= Int36.INT_MASK || this.extended == Int36.WORD_MASK && this.value > Int36.INT_MASK) { this.extended = null; this.magnitude = 35; } @@ -1085,18 +1085,18 @@ class Int36 { */ isNeg() { - return (this.extended > Int36.MAX_POS36 || this.extended == null && this.value > Int36.MAX_POS36); + return (this.extended > Int36.INT_MASK || this.extended == null && this.value > Int36.INT_MASK); } /** * negate() * * negate() MUST automatically extend the value, because the two's complement of the most negative - * number (MIN_NEG36) still has its sign bit set, so we must rely on the sign of the extended value to + * number (INT_LIMIT) still has its sign bit set, so we must rely on the sign of the extended value to * compensate. * * This is handled below by setting extended first, based on the opposite of the value's current sign; - * we could negate extended AFTER negating value, but then we'd need a special test for the MIN_NEG36 value. + * we could negate extended AFTER negating value, but then we'd need a special test for the INT_LIMIT value. * * A side-effect of this call is that the magnitude is forced to 71, on the presumption that we're about * to perform an arithmetic operation that is more easily performed on a unified 71-bit value than two @@ -1111,7 +1111,7 @@ class Int36 { * Set extended to the OPPOSITE of the current value. */ this.assert(this.magnitude == 35); - this.extended = (this.value > Int36.MAX_POS36? 0 : Int36.WORD_MASK); + this.extended = (this.value > Int36.INT_MASK? 0 : Int36.WORD_MASK); this.magnitude = 71; } else { @@ -1352,7 +1352,7 @@ class Int36 { * converting any signed values to their unsigned (two's complement) counterpart, provided they are * within the acceptable range. Any values outside that range will be dealt with afterward. */ - if (num < 0 && num >= -Int36.MIN_NEG36) { + if (num < 0 && num >= -Int36.INT_LIMIT) { num += Int36.WORD_LIMIT; } var value = Math.trunc(Math.abs(num)) % Math.pow(2, bits); @@ -1370,16 +1370,13 @@ Int36.ERROR = { DIVZERO: 0x4 }; +Int36.HINT_MASK = Math.pow(2, 17) - 1; // 131,071 (377777): signed half-word (half-int) mask +Int36.HINT_LIMIT = Math.pow(2, 17); // 131,072 (400000): signed half-word (half-int) limit Int36.HALF_MASK = Math.pow(2, 18) - 1; // 262,143 (000000 777777): unsigned half-word mask Int36.HALF_SHIFT = Math.pow(2, 18); // 262,144 (000001 000000): unsigned half-word shift Int36.INT_MASK = Math.pow(2, 35) - 1; // 34,359,738,367 (377777 777777): signed word (magnitude) mask Int36.INT_LIMIT = Math.pow(2, 35); // 34,359,738,368 (400000 000000): signed word (magnitude) limit -Int36.WORD_MASK = Math.pow(2, 36) - 1; // 68,719,476,735 +Int36.WORD_MASK = Math.pow(2, 36) - 1; // 68,719,476,735 (777777 777777): unsigned word mask Int36.WORD_LIMIT = Math.pow(2, 36); // 68,719,476,736 (1 000000 000000): unsigned word limit -Int36.MAX_POS18 = Math.pow(2, 17) - 1; // 131,071 (377777) -Int36.MIN_NEG18 = Math.pow(2, 17); // -131,072 (400000) -Int36.MAX_POS36 = Math.pow(2, 35) - 1; // 34,359,738,367 (377777 777777) -Int36.MIN_NEG36 = Math.pow(2, 35); // -34,359,738,368 (400000 000000) - if (NODE) module.exports = Int36; diff --git a/versions/c1pjs/1.34.2/c1p-dbg.js b/versions/c1pjs/1.34.2/c1p-dbg.js index a2abc2b27..3cab6b316 100644 --- a/versions/c1pjs/1.34.2/c1p-dbg.js +++ b/versions/c1pjs/1.34.2/c1p-dbg.js @@ -21,8 +21,9 @@ */ var f;function p(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]} for(var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},q="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ba=["Math","trunc"],ca=0;caa?-b:b};ga!=fa&&null!=ga&&aa(q,ea,{configurable:!0,writable:!0,value:ga});function t(a,b,c){b?9a&&-1=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d} -function u(a){return t(a,2,!0)}function v(a){return t(a,4,!0)}function ha(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return ka[a]})}var ka={"&":"&","<":"<",">":">",'"':""","'":"'"},la=Date.now||function(){return+new Date}; +var ea=ba[ba.length-1],fa=q[ea],ga=fa?fa:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b};ga!=fa&&null!=ga&&aa(q,ea,{configurable:!0,writable:!0,value:ga}); +function t(a,b,c){b?9a&&-1a&&(a+=Math.pow(16,b)),0>a||a>=Math.pow(16,b))&&(a=null);if(null==a)for(;0=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d}function u(a){return t(a,2,!0)}function v(a){return t(a,4,!0)} +function ha(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return ka[a]})}var ka={"&":"&","<":"<",">":">",'"':""","'":"'"},la=Date.now||function(){return+new Date}; function w(a,b){var c=!0,c=void 0===c?!1:c,d=0,e=null;if("object"==typeof resources&&(e=resources[a]))b&&b(a,e,d);else if(c&&"function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var g=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(g.onreadystatechange=function(){4===g.readyState&&(e=g.responseText,200==g.status||!g.status&&e.length&&"file:"==(window?window.location.protocol:"file:")||(d=g.status||-1),b&&b(a,e,d))});g.open("GET", a,c);g.send();c||(e=g.responseText,200!=g.status&&(d=g.status||-1),b&&b(a,e,d))}}function x(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function ma(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0a?-b:b};fa!=ea&&null!=fa&&aa(r,da,{configurable:!0,writable:!0,value:fa});function u(a,b,c){b?9a&&-1=f?48:55),d=String.fromCharCode(f)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d} -function ga(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return ja[a]})}var ja={"&":"&","<":"<",">":">",'"':""","'":"'"},ka=Date.now||function(){return+new Date}; +var da=t[t.length-1],ea=r[da],fa=ea?ea:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||!a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b};fa!=ea&&null!=fa&&aa(r,da,{configurable:!0,writable:!0,value:fa}); +function u(a,b,c){b?9a&&-1a&&(a+=Math.pow(16,b)),0>a||a>=Math.pow(16,b))&&(a=null);if(null==a)for(;0=f?48:55),d=String.fromCharCode(f)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d}function ga(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return ja[a]})}var ja={"&":"&","<":"<",">":">",'"':""","'":"'"},ka=Date.now||function(){return+new Date}; function v(a,b){var c=!0,c=void 0===c?!1:c,d=0,f=null;if("object"==typeof resources&&(f=resources[a]))b&&b(a,f,d);else if(c&&"function"==typeof resources)resources(a,function(c,d){b&&b(a,c,d)});else{var g=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(g.onreadystatechange=function(){4===g.readyState&&(f=g.responseText,200==g.status||!g.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(d=g.status||-1),b&&b(a,f,d))});g.open("GET", a,c);g.send();c||(f=g.responseText,200!=g.status&&(d=g.status||-1),b&&b(a,f,d))}}function w(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function la(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function x(a){y.init.push(a)} function z(a){if(A)try{for(var b=0;ba?-b:b};ka!=ia&&null!=ka&&ca(da,ha,{configurable:!0,writable:!0,value:ka}); var m={Be:0,Ee:1,Fe:2,Ge:3,He:4,Ie:5,Je:6,Ke:7,Le:8,Me:9,Ne:10,Oe:11,Pe:12,Qe:13,Re:14,Se:15,Te:16,Ue:17,Ve:18,We:19,Xe:20,Ye:21,Ze:22,$e:23,af:24,bf:25,cf:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ab:65,Ub:66,Vb:67,Fb:68,E:69,Yb:70,Zb:71,$b:72,ac:73,bc:74,cc:75,Hb:76,gc:77,hc:78,lc:79,mc:80,Q:81,nc:82,pc:83,qc:84,rc:85,tc:86,uc:87, wc:88,xc:89,wb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,yc:97,ud:98,xd:99,d:100,e:101,Bd:102,Dd:103,Ed:104,Fd:105,Od:106,k:107,Pd:108,Rd:109,n:110,Sd:111,p:112,q:113,r:114,oe:115,t:116,pe:117,qe:118,re:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,df:127},la={59:186,61:187,173:189,224:91}; -function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b,c){b?12"']/g,function(a){return xa[a]})}function ya(a,b){return(a+" ").slice(0,b)} -function Aa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var xa={"&":"&","<":"<",">":">",'"':""","'":"'"},Ca={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b,c){b?12"']/g,function(a){return xa[a]})} +function ya(a,b){return(a+" ").slice(0,b)}function Aa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var xa={"&":"&","<":"<",">":">",'"':""","'":"'"},Ca={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function Da(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Fa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;ca?-b:b};ia!=ha&&null!=ia&&aa(ba,ga,{configurable:!0,writable:!0,value:ia}); var n={Yd:0,ae:1,be:2,ce:3,de:4,ee:5,fe:6,ge:7,he:8,ie:9,je:10,ke:11,le:12,me:13,ne:14,oe:15,pe:16,qe:17,re:18,se:19,te:20,ue:21,ve:22,we:23,xe:24,ye:25,ze:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Ia:65,sb:66,tb:67,kb:68,E:69,wb:70,xb:71,yb:72,zb:73,Ab:74,Bb:75,lb:76,Fb:77,Gb:78,Jb:79,Kb:80,Q:81,Lb:82,Nb:83,Ob:84,Pb:85,Rb:86,Sb:87, Ub:88,Vb:89,$a:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Wb:97,Rc:98,Tc:99,d:100,e:101,Xc:102,Yc:103,Zc:104,$c:105,jd:106,k:107,kd:108,ld:109,n:110,md:111,p:112,q:113,r:114,Kd:115,t:116,Ld:117,Md:118,Nd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Ae:127},ja={59:186,61:187,173:189,224:91}; -function ka(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d}function la(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return qa[a]})}function ra(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +function ka(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(16,b)),0>a||a>=Math.pow(16,b))&&(a=null);if(null==a)for(;0=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d} +function la(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return qa[a]})}function ra(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var qa={"&":"&","<":"<",">":">",'"':""","'":"'"},sa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function ua(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, diff --git a/versions/pcx86/1.34.2/pcx86-dbg.js b/versions/pcx86/1.34.2/pcx86-dbg.js index 106ecf05b..fa9d87a28 100644 --- a/versions/pcx86/1.34.2/pcx86-dbg.js +++ b/versions/pcx86/1.34.2/pcx86-dbg.js @@ -50,9 +50,9 @@ var la={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[4 "(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ce:65,ti:66,ui:67,vi:68,E:69,wi:70,xi:71,yi:72,zi:73,Ai:74,Bi:75,Ci:76,Di:77,Ei:78,Fi:79,Gi:80,Q:81,Hi:82,Ii:83,Ji:84,Ki:85,Li:86,Mi:87,Ni:88,Oi:89,eg:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,de:97,vl:98,xl:99,d:100,e:101,Hl:102,Il:103,Jl:104,Kl:105,an:106,k:107,dn:108,hn:109,n:110,qn:111,p:112,q:113,r:114,No:115,t:116,Qo:117,Ro:118,So:119,x:120, y:121,z:122,"{":123,"|":124,"}":125,"~":126,Mp:127},ma={};ma[173]=n["-"];ma[186]=n[";"];ma[187]=n["="];ma[189]=n["-"];ma[188]=n[","];ma[190]=n["."];ma[191]=n["/"];ma[192]=n["`"];ma[219]=n["["];ma[220]=n["\\"];ma[221]=n["]"];ma[222]=n["'"];var na={};na[n["1"]]=n["!"];na[n["2"]]=n["@"];na[n["3"]]=n["#"];na[n["4"]]=n.$;na[n["5"]]=n["%"];na[n["6"]]=n["^"];na[n["7"]]=n["&"];na[n["8"]]=n["*"];na[n["9"]]=n["("];na[n["0"]]=n[")"];na[186]=n[":"];na[187]=n["+"];na[188]=n["<"];na[189]=n._;na[190]=n[">"]; na[191]=n["?"];na[192]=n["~"];na[219]=n["{"];na[220]=n["|"];na[221]=n["}"];na[222]=n['"'];na[173]=n._;na[61]=n["+"];na[59]=n[":"]; -function oa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function qa(a,b){var c,d="";b?32>=1,f--;return d} -function ra(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d}function sa(a,b,c){b?12a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e} +function qa(a,b){var c,d="";b?32>=1,f--;return d}function ra(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d}function sa(a,b,c){b?12"']/g,function(a){return Aa[a]})} function Ba(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"},Da={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function Ea(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0":62,"?":63,"@":64,Bd:65,wh:66,xh:67,zh:68,E:69,Ah:70,Bh:71,Ch:72,Dh:73,Eh:74,Fh:75,Gh:76,Hh:77,Ih:78,Jh:79,Kh:80,Q:81,Lh:82,Mh:83,Nh:84,Oh:85,Ph:86,Qh:87,Rh:88,Sh:89,sf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Cd:97,jk:98,kk:99,d:100,e:101,vk:102,wk:103,xk:104,yk:105,Jl:106,k:107,Ll:108,Pl:109,n:110,Vl:111,p:112,q:113,r:114,pn:115,t:116,sn:117,tn:118,un:119,x:120, y:121,z:122,"{":123,"|":124,"}":125,"~":126,po:127},ma={};ma[173]=n["-"];ma[186]=n[";"];ma[187]=n["="];ma[189]=n["-"];ma[188]=n[","];ma[190]=n["."];ma[191]=n["/"];ma[192]=n["`"];ma[219]=n["["];ma[220]=n["\\"];ma[221]=n["]"];ma[222]=n["'"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"]; p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; -function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d} +function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(16,b)),0>a||a>=Math.pow(16,b))&&(a=null);if(null==a)for(;0=e?48:55),d=String.fromCharCode(e)+d;a=Math.trunc(a/16)}return(void 0===c?"":c)+d} function pa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0"']/g,function(a){return ta[a]})}function ua(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var ta={"&":"&","<":"<",">":">",'"':""","'":"'"},va={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function wa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}function xa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.qg|g<>a.shift}var za=[31,28,31,30,31,30,31,31,30,31,30,31],Aa=Date.now||function(){return+new Date}; diff --git a/versions/pdpjs/1.34.2/pdp10-dbg.js b/versions/pdpjs/1.34.2/pdp10-dbg.js index 4cf63b3c2..290be37f5 100644 --- a/versions/pdpjs/1.34.2/pdp10-dbg.js +++ b/versions/pdpjs/1.34.2/pdp10-dbg.js @@ -26,222 +26,229 @@ http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2017 http://pcjs.org/modules/pdp10/lib/debugger.js (C) Jeff Parsons 2012-2017 */ -var l,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function da(){da=function(){};ba.Symbol||(ba.Symbol=ea)}var ka=0;function ea(a){return"jscomp_symbol_"+(a||"")+ka++} -function la(){da();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ma(this)}});la=function(){}}function ma(a){var b=0;return na(function(){return ba?-b:b}});oa("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var pa={ec:0,xb:1,gc:2,hc:3,ic:4,jc:5,kc:6,lc:7,lb:8,mc:9,yb:10,nc:11,oc:12,zb:13,pc:14,qc:15,rc:16,sc:17,tc:18,uc:19,vc:20,wc:21,xc:22,yc:23,zc:24,Ac:25,Bc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,kb:65,dc:66,fc:67,Cc:68,E:69,Dc:70,Ec:71,Fc:72,Gc:73,Hc:74,Ic:75,Jc:76,Kc:77,Lc:78,Mc:79,Nc:80,Q:81,Oc:82,Pc:83,Qc:84,Rc:85,Sc:86,Tc:87, +var l,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function da(){da=function(){};ba.Symbol||(ba.Symbol=ea)}var fa=0;function ea(a){return"jscomp_symbol_"+(a||"")+fa++} +function ha(){da();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(this)}});ha=function(){}}function ia(a){var b=0;return oa(function(){return ba?-b:b}});pa("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var qa={ec:0,xb:1,gc:2,hc:3,ic:4,jc:5,kc:6,lc:7,lb:8,mc:9,yb:10,nc:11,oc:12,zb:13,pc:14,qc:15,rc:16,sc:17,tc:18,uc:19,vc:20,wc:21,xc:22,yc:23,zc:24,Ac:25,Bc:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,kb:65,dc:66,fc:67,Cc:68,E:69,Dc:70,Ec:71,Fc:72,Gc:73,Hc:74,Ic:75,Jc:76,Kc:77,Lc:78,Mc:79,Nc:80,Q:81,Oc:82,Pc:83,Qc:84,Rc:85,Sc:86,Tc:87, Uc:88,Vc:89,Bb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Wc:97,Xc:98,Yc:99,d:100,e:101,Zc:102,$c:103,ad:104,bd:105,cd:106,k:107,dd:108,ed:109,n:110,fd:111,p:112,q:113,r:114,gd:115,t:116,jd:117,kd:118,ld:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Ab:127}; -function qa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function sa(a,b,c){b?12"']/g,function(a){return Aa[a]})} -function Ba(a,b){return(a+" ").slice(0,b)}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Aa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Da(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function Ka(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +function ra(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ta(a,b,c){b?12"']/g,function(a){return Ba[a]})} +function Ca(a,b){return(a+" ").slice(0,b)}function Da(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ea(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Ga(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function La(a,b){var c,d={Y:null,U:null,sa:null,ra:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.sa=g.load;d.ra=g.exec;if(e=g.bytes)d.Y=e;else if(e=g.words)for(d.Y=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Y=Array(4*e.length),f=c=0;cb.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.sa=g.load;d.ra=g.exec;if(e=g.bytes)d.Y=e;else if(e=g.words)for(d.Y=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Y=Array(4*e.length),f=c=0;c>8&255,d.Y[f++]=e[c]>>16&255,d.Y[f++]=e[c]>>24&255;else(e=g.data)?d.Da=e:d.Y=g;d.Y&&(d.Y.length?1==d.Y.length&&(r(d.Y[0]),d=null):(r("Empty resource: "+a),d=null));d.U=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Pa=this.id:(this.Qa=this.id.substr(0,a),this.Pa=this.id.substr(a+1));this.w={ready:!1,Ia:!1,cb:!1,V:!1,error:!1};this.Ta=null;this.w.error=!1;this.X=c||0;this.D=this.v=this.H=this.G=this.ta=null;v.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} -function r(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba?this.Pa=this.id:(this.Qa=this.id.substr(0,a),this.Pa=this.id.substr(a+1));this.A={ready:!1,Ia:!1,cb:!1,V:!1,error:!1};this.Ta=null;this.A.error=!1;this.X=c||0;this.D=this.v=this.H=this.G=this.ta=null;nb.push(this)}function ob(a,b,c){pb[a]&&b&&(pb[a][b]=c)}function qb(){return Date.now()||+new Date} +function r(a){window&&window.alert(a)}function rb(a){var b=!1;window&&(b=window.confirm(a));return b}function sb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.Ob,a];this.D=this.v=this.H=this.G=null;this.exports={hold:this.Gb,toggle:this.Zb,reset:this.Vb, -set:this.Yb};z(this)}p(ac,u);l=ac.prototype;l.reset=function(a){this.stop();a&&cc(this,this.A=0)}; -l.ja=function(a,b,c,d){if(this.G&&this.G.ja(a,b,c,d)||this.v&&this.v.ja(a,b,c,d)||this.D&&this.D.ja(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.M++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.B[b]=d?1:0,this.M++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){dc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ec(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){dc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ec(a,b)}}(this,b),!0):u.prototype.ja.call(this,a,b,c,d)}};l.Ba=function(a,b,c,d){this.G=a;this.H=b;this.v=c;this.D=d;fc(this);gc(this)};l.ua=function(a,b){if(!b)if(this.T&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.ia=function(a){return a?this.save():!0};l.save=function(){var a=new O(this);a.set(0,[this.f,this.A,this.u]);return a.data()}; -l.restore=function(a){if(a=a[0])ic(this,this.f=a[0]),cc(this,this.A=a[1]),jc(this,a[2]);return!0};l.Vb=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}gc(this);return!0};function kc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fc(a,b){for(var c in a.B)kc(a,c,null!=b?b:a.B[c])}function lc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gc(a){for(var b in a.b)lc(a,b,a.b[b][1])} -l.Gb=function(a,b,c){if(dc(this,b)){if(c){var d=this;setTimeout(function(){ec(d,b);a&&a()},+c);return!1}ec(this,b)}return!0};l.Yb=function(a,b){if("SR"==a)return jc(this,qa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,lc(this,a,c[1]),!0):!1};l.Zb=function(a){return dc(this,a)?(ec(this,a),!0):!1};function dc(a,b){var c=a.b[b];return c?(lc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=mc&&(a.P=b==nc,a.R=b==oc),!0):!1} -function ec(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(lc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Pb=function(a){a||this.v.w.L||(this.v.A=this.f%A,this.b[pc]&&this.b[pc][1]&&qc(this.v))};l.Qb=function(){};l.Kb=function(a){a||this.v.W()}; -l.Ib=function(a){if(!a&&!this.v.w.L)if(this.b[pc]&&this.b[pc][1])qc(this.v);else{if((a=this.D)&&!Mb(a,!0))Nb(a,!0),rc(a,0,null),Nb(a,!1);else try{var b=this.v.Ma(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.u&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.f;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.C)return h.Ka+=h.C-e,h.C=e,!0;if(e>=h.C+h.Ka){m=h.size-(e-k);m>f&&(m=f);h.Ka=e-h.C+m;e=k+16384;f-=m;g++;continue}}return Kc(Lc,e,f)}e=new Gc(a,e,m,16384,d);Hc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Mc[d]+" at "+sa(b)),!0):Kc(Nc,b,c)} -function xc(a,b){var c=a.b[(b&a.u)>>>a.f];a.A++;b=c.G(b&16383,b);a.A--;return b}function wc(a,b,c){var d=a.b[(b&a.u)>>>a.f];a.A++;d.D(c,b&16383,b);a.A--}function Ic(a){for(var b=0,c=[],d=0;d=a.la&&(a.la+=a.ka,c=!0);0<=a.ma&&a.ma<=hd(a)&&(a.ka=a.ma=-1,dd(a),a.W(),c=!0);c&&a.j(hd(a)+" cycles: checksum="+q(a.za))}} -l.ja=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.G)if(a=d.G,a.w.V)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.aa/a.ba?b=1:d=!0;a.ea=b;b=a.Ya*a.ea;if(a.ba!=b){a.ba=b;b=a.ba.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.G&&ld(a.G)}tc(a,a.N);a.N=0;a.M=ob();a.P=0;jd(a);return d}function md(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 nd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} -l.Wb=function(){if(this.w.L){this.Ra>=this.$a&&jd(this,!0);this.na=0;this.ya=ob();if(this.P){var a=this.ya-this.P;a>this.Za&&(this.M+=a,this.M>this.ya&&(this.M=this.ya))}try{do{var b=md(this,this.w.Fa?1:this.Ga);try{this.Ma(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.na+=b;this.N+=b;uc(this,b);sc(this,b);this.fa-=b;if(0>=this.fa){this.fa+=this.Ga;++this.ab>=pd&&(this.G&&P(this.G,void 0),this.ab=0);break}}while(this.w.L)}catch(e){this.W();this.G&&this.G.stop(ob(),hd(this));Jb(this, -e.stack||e.message);return}if(this.w.L){a=setTimeout;b=this.rb;this.P=ob();var c=this.Za;this.na&&(c=Math.round(c*this.na/this.Ga));var c=c-(this.P-this.ya),d=this.P-this.M;d&&(this.aa=Math.round(this.N/(10*d))/100,864E5<=d&&(this.T=0,id(this)));if(0>c||this.aac&&(this.M-=c),c=0;this.Ra+=this.na;this.P+=c;a(b,c)}}}; -function qc(a,b){if(!Kb(a))if(a.w.L)a.j(a.toString()+" busy");else{id(a);a.w.L=!0;a.w.Wa=!0;var c=a.J.run;c&&(c.textContent="Halt");a.G&&(b&&ld(a.G,!0),a.G.start(a.M,hd(a)));a.D||a.status("Started");setTimeout(a.rb,0)}}l.Ma=function(){return 0};l.W=function(a){var b=!1;if(this.w.L){od(this);tc(this,this.N);this.N=0;this.w.L=!1;if(b=this.J.run)b.textContent="Run";this.G&&this.G.stop(ob(),hd(this));b=!0;this.D||this.status("Stopped")}this.w.complete=a;return b};var kd=30,pd=15,ad=["power","reset"]; -function qd(a){var b=+a.model||1001;$c.call(this,a,1E6);this.qb=b;this.Oa=+a.addrReset||0;this.Cb=rd.bind(this);this.f=R.bind(this);this.wa=null;this.nb=[];this.w.complete=!1}p(qd,$c);l=qd.prototype;l.reset=function(){this.status("Model "+this.qb);this.w.L&&this.W();this.b=this.K=this.Ha=0;this.A=this.xa=this.Oa;this.I=this.qa=-1;this.F=this.u=0;this.bb=[0,0];this.oa=[0,0];this.ga=[0,0];this.pa=[0,0];this.va=this.A;this.B=0;this.g=this.Sb;this.i=this.cc;this.wa=null;cd(this);this.w.error=!1;$c.prototype.reset.call(this)}; -l.vb=function(){return 0};l.save=function(){var a=new O(this);a.set(0,[this.b,this.K,this.Ha,this.A,this.qa,this.I,this.u,this.B,this.xa,this.va,this.Oa]);a.set(1,[]);a.set(2,[this.T,this.ea,this.w.Z]);a.set(3,sd(this));a.set(4,nd(this));return a.data()}; -l.restore=function(a){var b;b=a[0];la();da();la();var c=b[Symbol.iterator];b=c?c.call(b):ma(b);this.b=b.next().value;this.K=b.next().value;this.Ha=b.next().value;this.A=b.next().value;this.qa=b.next().value;this.I=b.next().value;this.u=b.next().value;this.B=b.next().value;this.xa=b.next().value;this.va=b.next().value;this.Oa=b.next().value;b=a[2];this.T=b[0];id(this,b[1]);this.w.Z=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.f].g(a&16383,a)};l.cc=function(a,b){var c=this.H;a=this.va=a;c.b[(a&c.u)>>>c.f].i(b,a&16383,a);return b}; -l.Ma=function(a){this.w.complete=!0;var b=this.D?ud(this.D)?1:this.w.Wa?-1:0:0,c=a?this.w.Wa?0:1:-1;this.w.Wa=!1;this.R=this.S=a;this.B=this.B&-5|(b?4:0);do{if(this.B){if(this.B&4){if(vd(this.D,this.A,c)){this.W();break}++b||(this.B&=-5);c||c++}if(a=this.B&11)this.B&2?this.wa||(this.B&=-3):this.B&1&&this.B++,a=!1;if(a){if(this.B&4&&vd(this.D,this.A,c)){this.W();break}if(0>c)break}}this.B&=15;this.K&4194304?this.K=this.g(this.b):0<=this.qa?(this.K=this.Ha=this.g(this.qa),this.qa=-1):(this.K=this.Ha= -this.g(this.xa=this.A),this.A=(this.A+1)%A);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+this.g(a)&Rb;a=this.K&4194304?-1:this.Ha/Zb|0;0<=a&&this.Cb(a)}while(0>4].call(this,a,a&15)}function S(a){this.f(a)} -function xd(){var a=0,b=this.g(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%I);this.i(this.b,b)}function yd(a,b){a=this.g(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.i(b,a);this.I=-1}} -function zd(a,b){a=this.g(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.g(b)%Math.pow(2,d)*Math.pow(2,c)%I;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.i(this.b,a);this.I=-1}}function Ad(a,b){this.i(b,this.g(this.b))}function Bd(a,b){this.i(b,this.b)}function Cd(a,b){this.i(this.b,this.g(b))}function Dd(a,b){this.i(b,0)}function Zd(a,b){this.i(b,H-this.g(b))}function $d(a,b){this.i(b,H)} -function ae(a,b){var c=this.g(this.b),d=this.g(b);this.i(b,be(a,d,c)+(c-(c&B)))}function ce(a,b){var c=this.g(b);this.i(b,be(a,c,0))}function de(a,b){b=this.g(b);var c=this.g(this.b);this.i(this.b,be(a,c,b)+(b-(b&B)))}function ee(a,b){var c=this.g(this.b),d=c;if(a&=384)switch(d-=d&B,a){case 256:d+=B;break;case 384:d+=c>J?B:0}c=d;this.i(this.b,c);b&&this.i(b,c)}function fe(a,b){var c=(this.g(this.b)&B)*F,d=this.g(b);this.i(b,be(a,d,c)+c)} -function ge(a,b){var c=this.b*F,d=this.g(b);this.i(b,be(a,d,c)+c)}function he(a,b){b=(this.g(b)&B)*F;var c=this.g(this.b);this.i(this.b,be(a,c,b)+b)}function ie(a,b){var c=this.g(this.b),d=(c&B)*F,c=be(a,c,d)+d;this.i(this.b,c);b&&this.i(b,c)}function je(a,b){var c=this.g(this.b)&B,d=this.g(b);this.i(b,ke(a,d,c)+c)}function le(a,b){var c=this.g(b);this.i(b,ke(a,c,this.b)+this.b)}function me(a,b){b=this.g(b)&B;var c=this.g(this.b);this.i(this.b,ke(a,c,b)+b)} -function ne(a,b){var c=this.g(this.b),d=c;if(a&=384)switch(d&=B,a){case 256:d+=B*F;break;case 384:d+=c>Tb?B*F:0}c=d;this.i(this.b,c);b&&this.i(b,c)}function oe(a,b){var c=this.g(this.b)/F|0,d=this.g(b);this.i(b,ke(a,d,c)+c)}function pe(a,b){var c=this.g(b);this.i(b,ke(a,c,0))}function qe(a,b){b=this.g(b)/F|0;var c=this.g(this.b);this.i(this.b,ke(a,c,b)+b)}function re(a,b){var c=this.g(this.b),d=c/F|0,c=ke(a,c,d)+d;this.i(this.b,c);b&&this.i(b,c)}function U(a){se[a&7].call(this,a,a>>3&127)} -function te(){}function R(a){this.j("undefined opcode: "+sa(a));td(this,-1);this.W()}function ue(a){a>J&&(a!=Ub?a=Vb-a:this.u|=163840);return a}function ve(a,b){var c=(a+b)%I;we.call(this,a,b,c);return c}function V(a,b){return((a/K|0)&(b/K|0))*K+((a&b)>>>0)} -function xe(a,b,c){var d=!1,e=!1,f=b-b%G;a=a%G+b*G%I;b=this.F=f+Math.trunc(b/2);c>J&&(c=I-c,d=!d);b>J&&(a?(b=H-b,a=I-a):b&&(b=I-b),e=!0,d=!d);if(b>=c)return this.u|=131104,-1;f=this.bb;f[0]=0;f[1]=0;f=this.oa;f[0]=1;f[1]=0;f=this.ga;f[0]=c;f[1]=0;c=this.pa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=I,b[1]--),ze(this.bb,this.oa),Ae(this.pa)))break;Be(this.ga);Be(this.oa)}while(!Ae(this.oa)); -a=this.bb[0];this.F=this.pa[0];d&&a&&(a=I-a);e&&this.F&&(this.F=I-this.F);return a}function Ce(a,b){return((a/K|0)^(b/K|0))*K+((a^b)>>>0)}function De(a,b){return(~((a/K|0)^(b/K|0))&15)*K+(~(a^b)>>>0)}function W(a,b){return(a/K|0|b/K|0)*K+((a|b)>>>0)} -function Ee(a,b,c){var d=a,e=b;b=!1;var f;d>J&&(d=I-d,b=!b);e>J&&(e=I-e,b=!b);if(dJ)&&(f!=H||a<=J)&&(this.u|=131072),a;c=a;b=f;a=b-b%G;b=2*b%I+Math.trunc(c/G);c=a+c%G;d=b-b%G;a!=d&&(b=a+(b-d),this.u|=131072);this.F=c;return b} -function Fe(a){a?a==Ub?this.u|=163840:a=Vb-a:this.u|=98304;return a}function Ge(a,b){var c=a-b;0>c&&(c+=I);we.call(this,c,b,a);return c}function we(a,b,c){a=Math.trunc(a/Wb);b=Math.trunc(b/Wb);c=Math.trunc(c/Wb);var d=a^(a^b)&(b^c);this.u=this.u|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function ke(a,b,c){switch(a&384){case 0:b-=b&B;break;case 128:b=0;break;case 256:b=B*F;break;case 384:b=c>Tb?B*F:0}return b} -function be(a,b,c){switch(a&384){case 0:b&=B;break;case 128:b=0;break;case 256:b=B;break;case 384:b=c>J?B:0}return b}function ze(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=I&&(a[0]%=I,a[1]++)}function ye(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Be(a){a[1]%2&&(a[0]+=I);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function Ae(a){return!a[0]&&!a[1]} -var wd=[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},xd,function(a,b){0>this.I&&xd.call(this);yd.call(this,0,b)},yd,function(a,b){0>this.I&&xd.call(this);zd.call(this,0,b)},zd,function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},Ad,Bd,Cd,function(a,b){b&&this.i(b,this.g(this.b))},function(a,b){a=this.g(this.b);a=(a/F|0)+a%F*F;this.i(b,a)},function(a,b){this.i(b,this.b*F)},function(a,b){a=this.g(b);a=(a/F|0)+a%F*F;this.i(this.b,a)},function(a,b){a=this.g(this.b);a=(a/F|0)+a%F*F;this.i(this.b,a);b&&this.i(b,a)},function(a,b){this.i(b,Fe.call(this,this.g(this.b)))},function(a,b){this.i(b,Fe.call(this,this.b))},function(a,b){this.i(this.b, -Fe.call(this,this.g(b)))},function(a,b){a=Fe.call(this,this.g(this.b));this.i(this.b,a);b&&this.i(b,a)},function(a,b){this.i(b,ue.call(this,this.g(this.b)))},function(a,b){this.i(b,this.b)},function(a,b){this.i(this.b,ue.call(this,this.g(b)))},function(a,b){a=ue.call(this,this.g(this.b));this.i(this.b,a);b&&this.i(b,a)},function(a,b){this.i(b,Ee.call(this,this.g(b),this.g(this.b),!0))},function(a,b){this.i(b,Ee.call(this,this.g(b),this.b,!0))},function(a,b){this.i(this.b,Ee.call(this,this.g(b),this.g(this.b), -!0))},function(a,b){this.i(this.b,this.i(b,Ee.call(this,this.g(b),this.g(this.b),!0)))},function(a,b){this.i(b,Ee.call(this,this.g(b),this.g(this.b)));this.i(b+1&15,this.F)},function(a,b){this.i(b,Ee.call(this,this.g(b),this.b));this.i(b+1&15,this.F)},function(a,b){this.i(this.b,Ee.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,Ee.call(this,this.g(b),this.g(this.b))));this.i(b+1&15,this.F)},function(a,b){a=xe.call(this,this.g(b),0,this.g(this.b));0>a||(this.i(b,a),this.i(b+ -1&15,this.F))},function(a,b){a=xe.call(this,this.g(b),0,this.b);0>a||(this.i(b,a),this.i(b+1&15,this.F))},function(a,b){a=xe.call(this,this.g(b),0,this.g(this.b));0>a||this.i(this.b,a)},function(a,b){a=xe.call(this,this.g(b),0,this.g(this.b));0>a||this.i(b,this.i(this.b,a))},function(a,b){a=this.g(b);var c=this.g(b+1&15),c=xe.call(this,c,a,this.g(this.b));0>c||(this.i(b,c),this.i(b+1&15,this.F))},function(a,b){a=this.g(b);var c=this.g(b+1&15),c=xe.call(this,c,a,this.b);0>c||(this.i(b,c),this.i(b+ -1&15,this.F))},function(a,b){a=this.g(b);b=this.g(b+1&15);b=xe.call(this,b,a,this.g(this.b));0>b||this.i(this.b,b)},function(a,b){a=this.g(b);var c=this.g(b+1&15),c=xe.call(this,c,a,this.g(this.b));0>c||(this.i(b,this.i(this.b,c)),this.i(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.g(b);var d=a>J?-(I-a):a;0d?G:0,c=Sb):(d=d*Math.pow(2,c)%G,c=G-Math.pow(2,35-c)),a<=J?a+c>J&&(this.u|=131072):a-c<=J&&(this.u|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2, --c));a=0>d?d+I:d;this.i(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.g(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%I+Math.trunc(c/Math.pow(2,36-a));this.i(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.g(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.i(b,c)}},function(a,b){a=0;var c=this.g(b);if(c){for(;c>14)%256){var c,d=this.g(b),e=this.g(b+1&15);if(0Sb&&dSb&&eJ&&(this.u|=131072):e-c<=J&&(this.u|=131072);e=0;f>Sb&&(d+=G,e+=G)}else d=d*Math.pow(2,a)%G+Math.trunc(e%G/Math.pow(2,35-a)),e=e*Math.pow(2,a)%G,c=G-Math.pow(2,35-a),f<=J?f+c>J&&(this.u|=131072):(f-c<=J&&(this.u|=131072),d+=G,e+=G)}else-36>=a?(e=-72>=a?d>Sb?H:0:Math.trunc(d%G/Math.pow(2,-a-35)),d<=Sb?d=0:(d=H,e+=G)):(c=d>Sb?I-Math.pow(2,36+a):0,e=Math.trunc(e% -G/Math.pow(2,-a))+d%G*Math.pow(2,35+a)%G,d=Math.trunc(d/Math.pow(2,-a))+c,d>Sb&&(e+=G));this.i(b,d);this.i(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.g(b),d=this.g(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%I+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%I+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%I+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%I+Math.trunc(d/Math.pow(2,72-a)));this.i(b,c);this.i(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c= -this.g(b),d=this.g(b+1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%I,c=Math.trunc(c/Math.pow(2,-a)));this.i(b,c);this.i(b+1&15,d)}},R,function(a,b){a=this.g(b);this.i(b,this.g(this.b));this.i(this.b,a)},function(a,b){a=!1;for(var c=this.g(b),d=c/F|0,c=c&B;!a;)this.i(c,this.g(d)),c==this.b&&(a=!0),d=d+1&B,c=c+1&B, -this.w.L||(this.i(b,d*F+c),a||td(this,-1),a=!0)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a,b){a=b<<14;this.u&a&&(this.u&=~a,this.A=this.b%A)},function(){this.qa=this.b},R,function(a){this.f(a)},function(a,b){a=this.g(b);a+=262145;this.i(a&B,this.g(this.b));a>=I&&(a-=I);a/F|0||(this.u|=262144);this.i(b,a)},function(a,b){a=this.g(b);var c=this.g(a&B);this.i(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=I);(a/F|0)==B&&(this.u|=262144);this.i(b,a)},function(a){this.f(a)}, -function(){this.i(this.b,(this.u&B)*F+this.A);this.A=(this.b+1)%A},function(a,b){this.i(b,(this.u&B)*F+this.A);this.A=this.b%A},function(a){this.f(a)},function(a){this.f(a)},function(a,b){this.i(b,ve.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(b,ve.call(this,this.g(b),this.b))},function(a,b){this.i(this.b,ve.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,ve.call(this,this.g(b),this.g(this.b))))},function(a,b){this.i(b,Ge.call(this,this.g(b),this.g(this.b)))}, -function(a,b){this.i(b,Ge.call(this,this.g(b),this.b))},function(a,b){this.i(this.b,Ge.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,Ge.call(this,this.g(b),this.g(this.b))))},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},Dd,Dd,function(){this.i(this.b,0)},function(a,b){this.i(this.b,this.i(b,0))},function(a,b){this.i(b,V.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(b,V.call(this,this.g(b),this.b))},function(a,b){this.i(this.b,V.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,V.call(this,this.g(b),this.g(this.b))))}, -function(a,b){this.i(b,V.call(this,H-this.g(b),this.g(this.b)))},function(a,b){this.i(b,V.call(this,H-this.g(b),this.b))},function(a,b){this.i(this.b,V.call(this,H-this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,V.call(this,H-this.g(b),this.g(this.b))))},Ad,Bd,te,Ad,function(a,b){this.i(b,V.call(this,this.g(b),H-this.g(this.b)))},function(a,b){this.i(b,V.call(this,this.g(b),H-this.b))},function(a,b){this.i(this.b,V.call(this,this.g(b),H-this.g(this.b)))},function(a,b){this.i(this.b, -this.i(b,V.call(this,this.g(b),H-this.g(this.b))))},te,te,Cd,Cd,function(a,b){this.i(b,Ce.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(b,Ce.call(this,this.g(b),this.b))},function(a,b){this.i(this.b,Ce.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,Ce.call(this,this.g(b),this.g(this.b))))},function(a,b){this.i(b,W.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(b,W.call(this,this.g(b),this.b))},function(a,b){this.i(this.b,W.call(this,this.g(b),this.g(this.b)))}, -function(a,b){this.i(this.b,this.i(b,W.call(this,this.g(b),this.g(this.b))))},function(a,b){this.i(b,V.call(this,H-this.g(b),H-this.g(this.b)))},function(a,b){this.i(b,V.call(this,H-this.g(b),H-this.b))},function(a,b){this.i(this.b,V.call(this,H-this.g(b),H-this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,V.call(this,H-this.g(b),H-this.g(this.b))))},function(a,b){this.i(b,De.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(b,De.call(this,this.g(b),this.b))},function(a,b){this.i(this.b, -De.call(this,this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,De.call(this,this.g(b),this.g(this.b))))},Zd,Zd,function(a,b){this.i(this.b,H-this.g(b))},function(a,b){this.i(this.b,this.i(b,H-this.g(b)))},function(a,b){this.i(b,W.call(this,H-this.g(b),this.g(this.b)))},function(a,b){this.i(b,W.call(this,H-this.g(b),this.b))},function(a,b){this.i(this.b,W.call(this,H-this.g(b),this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,W.call(this,H-this.g(b),this.g(this.b))))},function(a, -b){this.i(b,H-this.g(this.b))},function(a,b){this.i(b,H-this.b)},function(){this.i(this.b,H-this.g(this.b))},function(a,b){this.i(this.b,this.i(b,H-this.g(this.b)))},function(a,b){this.i(b,W.call(this,this.g(b),H-this.g(this.b)))},function(a,b){this.i(b,W.call(this,this.g(b),H-this.b))},function(a,b){this.i(this.b,W.call(this,this.g(b),H-this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,W.call(this,this.g(b),H-this.g(this.b))))},function(a,b){this.i(b,W.call(this,H-this.g(b),H-this.g(this.b)))}, -function(a,b){this.i(b,W.call(this,H-this.g(b),H-this.b))},function(a,b){this.i(this.b,W.call(this,H-this.g(b),H-this.g(this.b)))},function(a,b){this.i(this.b,this.i(b,W.call(this,H-this.g(b),H-this.g(this.b))))},$d,$d,function(){this.i(this.b,H)},function(a,b){this.i(this.b,this.i(b,H))},ae,ce,de,ee,fe,ge,he,ie,ae,ce,de,ee,fe,ge,he,ie,ae,ce,de,ee,fe,ge,he,ie,ae,ce,de,ee,fe,ge,he,ie,je,le,me,ne,oe,pe,qe,re,je,le,me,ne,oe,pe,qe,re,je,le,me,ne,oe,pe,qe,re,je,le,me,ne,oe,pe,qe,re,function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, -function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U, -U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],se=[function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a,b){switch(b){case 0:a=this.g(this.b);a&8&&(this.u&=-131073);a&131072&&(this.u&=-262145);break;default:this.f(a)}},function(a,b){switch(b){case 0:a=0;this.u&131072&&(a|=8);this.u&262144&&(a|=65536);this.i(this.b,a);break;default:this.f(a)}},function(a){this.f(a)},function(a){this.f(a)}]; -function He(a){u.call(this,"ROM",a,128);this.U=this.b=null;this.B=+a.addr;this.u=+a.size;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.A=a.file;this.F=ta(this.A);if(this.A){a=this.A;var b=ua(this.F);"json"!=b&&"hex"!=b&&(a=ya()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ka(a,null,!0,function(a,b,f){f?(c.da("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(mb(c.Qa,a,b),(a=La(a,b))?(c.b=a.Y,c.U=a.U):c.A=null);Ie(c)})}}p(He,u); -He.prototype.Ba=function(a,b,c,d){this.H=b;this.v=c;this.D=d;Ie(this)};He.prototype.ua=function(){this.U&&(this.D&&Je(this.D,this.id,this.B,this.u,this.U),delete this.U);return!0};He.prototype.ia=function(){return!0}; -function Ie(a){if(!Lb(a)){if(a.A){if(!a.b||!a.H)return;a.u||(a.u=a.b.length);if(a.b.length!=a.u)Jb(a,"ROM size ("+q(a.b.length,8,!0)+") does not match specified size ("+q(a.u,8,!0)+")");else{var b;b=a.B;if(Jc(a.H,b,a.u,Rc)){var c;for(c=0;c>>f.f;0>>= -f.f;0>>a.f;0g&&g>=-Ub&&(g+=I);for(var g=Math.trunc(Math.abs(g))%I,h=d;f--&&h=pa.kb&&c<=pa.Bb&&(b=c-(pa.kb-pa.xb));b&&(a.preventDefault&&a.preventDefault(),d.Ua(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==pa.zb&&(b=pa.yb);d.Ua(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ua(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ba=function(a,b,c,d){this.G=a;this.H=b;this.v=c;this.D=d;z(this)}; -l.wb=function(a){if(!this.b){var b=bd(this.G,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ca(c[0]);if(d!=this.Pa)return;c=Ca(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.u);if(this.B=e.receiveData){this.u=a;this.status("Connected "+this.Qa+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.ua=function(a,b){if(!b)if(this.wb(this.u),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.ia=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new O(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ua=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.A&&a.u.length&&(a.A=0);if(0>a.A||b!=a.u[a.A])a.u.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.u[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(Ca(b.substring(c,f))),c=f+1}}return a} -function Re(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +var w="pdp10",Tb="PDPjs",Ub=Math.pow(2,18)-1,Vb=Math.pow(2,18),Wb=Math.pow(2,17)-1,y=Math.pow(2,18)-1,z=Math.pow(2,18),A=Math.pow(2,35)-1,B=Math.pow(2,35),C=Math.pow(2,36)-1,D=Math.pow(2,36),E=Math.pow(2,32),Xb=Math.pow(2,34),Yb=Math.pow(2,36),Zb=Math.pow(2,21),$b=Math.pow(2,26),ac=Math.pow(2,23),bc=Math.pow(2,30),w="pdp10",Tb="PDPjs",cc={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,paper:4096,read:16384,write:32768,serial:1048576,timer:2097152, +speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function dc(a,b){t.call(this,"Panel",a,512);this.K=this.M=0;this.T=b;this.i=this.I=this.u=this.w=0;this.N=this.O=-1;this.P=this.R=this.F=!1;this.S=ec;this.B={};this.b={START:[1,1,!0,!1,this.Pb],STEP:[1,1,!1,!1,this.Qb],ENABLE:[1,1,!1,!1,this.Kb],CONT:[1,1,!0,!1,this.Ib],DEP:[0,0,!0,!1,this.Jb],EXAM:[1,1,!0,!1,this.Lb],LOAD:[1,1,!0,!1,this.Nb],TEST:[0,0,!0,!1,this.Mb]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Ob,a];this.D=this.v=this.H=this.G=null;this.exports={hold:this.Gb,toggle:this.Zb,reset:this.Vb, +set:this.Yb};Ob(this)}p(dc,t);l=dc.prototype;l.reset=function(a){this.stop();a&&fc(this,this.w=0)}; +l.ja=function(a,b,c,d){if(this.G&&this.G.ja(a,b,c,d)||this.v&&this.v.ja(a,b,c,d)||this.D&&this.D.ja(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.M++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.B[b]=d?1:0,this.M++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){gc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){hc(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){gc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){hc(a,b)}}(this,b),!0):t.prototype.ja.call(this,a,b,c,d)}};l.Ba=function(a,b,c,d){this.G=a;this.H=b;this.v=c;this.D=d;ic(this);jc(this)};l.ua=function(a,b){if(!b)if(this.T&&kc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.ia=function(a){return a?this.save():!0};l.save=function(){var a=new F(this);a.set(0,[this.i,this.w,this.u]);return a.data()}; +l.restore=function(a){if(a=a[0])lc(this,this.i=a[0]),fc(this,this.w=a[1]),mc(this,a[2]);return!0};l.Vb=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}jc(this);return!0};function nc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ic(a,b){for(var c in a.B)nc(a,c,null!=b?b:a.B[c])}function oc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jc(a){for(var b in a.b)oc(a,b,a.b[b][1])} +l.Gb=function(a,b,c){if(gc(this,b)){if(c){var d=this;setTimeout(function(){hc(d,b);a&&a()},+c);return!1}hc(this,b)}return!0};l.Yb=function(a,b){if("SR"==a)return mc(this,ra(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,oc(this,a,c[1]),!0):!1};l.Zb=function(a){return gc(this,a)?(hc(this,a),!0):!1};function gc(a,b){var c=a.b[b];return c?(oc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=pc&&(a.P=b==qc,a.R=b==rc),!0):!1} +function hc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(oc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Pb=function(a){a||this.v.A.L||(J(this.v,this.i),this.b[sc]&&this.b[sc][1]&&tc(this.v))};l.Qb=function(){};l.Kb=function(a){a||this.v.W()}; +l.Ib=function(a){if(!a&&!this.v.A.L)if(this.b[sc]&&this.b[sc][1])tc(this.v);else{if((a=this.D)&&!Pb(a,!0))Qb(a,!0),uc(a,0,null),Qb(a,!1);else try{var b=this.v.Ma(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.u&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.C)return h.Ka+=h.C-e,h.C=e,!0;if(e>=h.C+h.Ka){m=h.size-(e-k);m>f&&(m=f);h.Ka=e-h.C+m;e=k+16384;f-=m;g++;continue}}return Nc(Oc,e,f)}e=new Jc(a,e,m,16384,d);Kc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Pc[d]+" at "+ta(b)),!0):Nc(Qc,b,c)} +function Hc(a,b){var c=a.b[(b&a.u)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function zc(a,b,c){var d=a.b[(b&a.u)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Lc(a){for(var b=0,c=[],d=0;d=a.la&&(a.la+=a.ka,c=!0);0<=a.ma&&a.ma<=kd(a)&&(a.ka=a.ma=-1,gd(a),a.W(),c=!0);c&&a.j(kd(a)+" cycles: checksum="+q(a.za))}} +l.ja=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.G)if(a=d.G,a.A.V)a=!0;else{var b=null,c,h=sb(a.id);for(c=0;ca.aa/a.ba?b=1:d=!0;a.ea=b;b=a.Ya*a.ea;if(a.ba!=b){a.ba=b;b=a.ba.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.G&&od(a.G)}wc(a,a.N);a.N=0;a.M=qb();a.P=0;md(a);return d}function pd(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 qd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} +l.Wb=function(){if(this.A.L){this.Ra>=this.$a&&md(this,!0);this.na=0;this.ya=qb();if(this.P){var a=this.ya-this.P;a>this.Za&&(this.M+=a,this.M>this.ya&&(this.M=this.ya))}try{do{var b=pd(this,this.A.Fa?1:this.Ga);try{this.Ma(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.na+=b;this.N+=b;xc(this,b);vc(this,b);this.fa-=b;if(0>=this.fa){this.fa+=this.Ga;++this.ab>=sd&&(this.G&&K(this.G,void 0),this.ab=0);break}}while(this.A.L)}catch(e){this.W();this.G&&this.G.stop(qb(),kd(this));Lb(this, +e.stack||e.message);return}if(this.A.L){a=setTimeout;b=this.rb;this.P=qb();var c=this.Za;this.na&&(c=Math.round(c*this.na/this.Ga));var c=c-(this.P-this.ya),d=this.P-this.M;d&&(this.aa=Math.round(this.N/(10*d))/100,864E5<=d&&(this.T=0,ld(this)));if(0>c||this.aac&&(this.M-=c),c=0;this.Ra+=this.na;this.P+=c;a(b,c)}}}; +function tc(a,b){if(!Mb(a))if(a.A.L)a.j(a.toString()+" busy");else{ld(a);a.A.L=!0;a.A.Wa=!0;var c=a.J.run;c&&(c.textContent="Halt");a.G&&(b&&od(a.G,!0),a.G.start(a.M,kd(a)));a.D||a.status("Started");setTimeout(a.rb,0)}}l.Ma=function(){return 0};l.W=function(a){var b=!1;if(this.A.L){rd(this);wc(this,this.N);this.N=0;this.A.L=!1;if(b=this.J.run)b.textContent="Run";this.G&&this.G.stop(qb(),kd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var nd=30,sd=15,dd=["power","reset"]; +function td(a){var b=+a.model||1001;cd.call(this,a,1E6);this.qb=b;this.Oa=+a.addrReset||0;this.Cb=ud.bind(this);this.i=M.bind(this);this.wa=null;this.nb=[];this.A.complete=!1}p(td,cd);l=td.prototype;l.reset=function(){this.status("Model "+this.qb);this.A.L&&this.W();this.b=this.K=this.Ha=0;this.u=this.xa=this.Oa;this.I=this.qa=-1;this.F=this.w=0;this.bb=[0,0];this.oa=[0,0];this.ga=[0,0];this.pa=[0,0];this.va=this.u;this.B=0;this.f=this.Sb;this.g=this.cc;this.wa=null;fd(this);this.A.error=!1;cd.prototype.reset.call(this)}; +l.vb=function(){return 0};l.save=function(){var a=new F(this);a.set(0,[this.b,this.K,this.Ha,this.u,this.qa,this.I,this.w,this.B,this.xa,this.va,this.Oa]);a.set(1,[]);a.set(2,[this.T,this.ea,this.A.Z]);a.set(3,vd(this));a.set(4,qd(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ha();da();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.b=b.next().value;this.K=b.next().value;this.Ha=b.next().value;this.u=b.next().value;this.qa=b.next().value;this.I=b.next().value;this.w=b.next().value;this.B=b.next().value;this.xa=b.next().value;this.va=b.next().value;this.Oa=b.next().value;b=a[2];this.T=b[0];ld(this,b[1]);this.A.Z=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.cc=function(a,b){var c=this.H;a=this.va=a;c.b[(a&c.u)>>>c.i].g(b,a&16383,a);return b}; +l.Ma=function(a){this.A.complete=!0;var b=this.D?xd(this.D)?1:this.A.Wa?-1:0:0,c=a?this.A.Wa?0:1:-1;this.A.Wa=!1;this.R=this.S=a;this.B=this.B&-5|(b?4:0);do{if(this.B){if(this.B&4){if(yd(this.D,this.u,c)){this.W();break}++b||(this.B&=-5);c||c++}if(a=this.B&11)this.B&2?this.wa||(this.B&=-3):this.B&1&&this.B++,a=!1;if(a){if(this.B&4&&yd(this.D,this.u,c)){this.W();break}if(0>c)break}}this.B&=15;this.K&4194304?this.K=this.f(this.b):0<=this.qa?(this.K=this.Ha=this.f(this.qa),this.qa=-1):(this.K=this.Ha= +this.f(this.xa=this.u),this.u=(this.u+1)%Vb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+this.f(a)&Ub;a=this.K&4194304?-1:this.Ha/ac|0;0<=a&&this.Cb(a)}while(0>4].call(this,a,a&15)}function N(a){this.i(a)} +function Ad(){var a=0,b=this.f(this.b),c=b/bc&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*bc+(d<<24)+(b&16777215);a&&(b=(b+a)%D);this.g(this.b,b)}function Bd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/bc&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} +function Cd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/bc&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%D;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function Dd(a,b){this.g(b,this.f(this.b))}function Ed(a,b){this.g(b,this.b)}function $d(a,b){this.g(this.b,this.f(b))}function ae(a,b){this.g(b,0)}function be(a,b){this.g(b,C-this.f(b))}function ce(a,b){this.g(b,C)} +function de(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,ee(a,d,c)+(c-(c&y)))}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ge(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,ee(a,c,b)+(b-(b&y)))}function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,ee(a,d,c)+c)} +function je(a,b){var c=this.b*z,d=this.f(b);this.g(b,ee(a,d,c)+c)}function ke(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=(c&y)*z,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function me(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,ne(a,d,c)+c)}function oe(a,b){var c=this.f(b);this.g(b,ne(a,c,this.b)+this.b)}function pe(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,ne(a,c,b)+b)} +function qe(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Wb?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function re(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,ne(a,d,c)+c)}function se(a,b){var c=this.f(b);this.g(b,ne(a,c,0))}function te(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,ne(a,c,b)+b)}function ue(a,b){var c=this.f(this.b),d=c/z|0,c=ne(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function O(a){ve[a&7].call(this,a,a>>3&127)} +function we(){}function xe(){}function M(a){this.j("undefined opcode: "+ta(a));wd(this,-1);this.W()}function ye(a){a>A&&(a!=B?a=Yb-a:this.w|=163840);return a}function Q(a,b){var c=(a+b)%D;ze.call(this,a,b,c);return c}function S(a,b){return((a/E|0)&(b/E|0))*E+((a&b)>>>0)}function T(a,b){return(aA&&(c=D-c,d=!d);b>A&&(a?(b=C-b,a=D-a):b&&(b=D-b),e=!0,d=!d);if(b>=c)return this.w|=131104,-1;f=this.bb;f[0]=0;f[1]=0;f=this.oa;f[0]=1;f[1]=0;f=this.ga;f[0]=c;f[1]=0;c=this.pa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=D,b[1]--),Ce(this.bb,this.oa),De(this.pa)))break;Ee(this.ga);Ee(this.oa)}while(!De(this.oa)); +a=this.bb[0];this.F=this.pa[0];d&&a&&(a=D-a);e&&this.F&&(this.F=D-this.F);return a}function Fe(a,b){return((a/E|0)^(b/E|0))*E+((a^b)>>>0)}function Ge(a,b){return(~((a/E|0)^(b/E|0))&15)*E+(~(a^b)>>>0)}function U(a,b){return(a/E|0|b/E|0)*E+((a|b)>>>0)} +function He(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=D-d,b=!b);e>A&&(e=D-e,b=!b);if(dA)&&(f!=C||a<=A)&&(this.w|=131072),a;c=a;b=f;a=b-b%B;b=2*b%D+Math.trunc(c/B);c=a+c%B;d=b-b%B;a!=d&&(b=a+(b-d),this.w|=131072);this.F=c;return b} +function Ie(a){a?a==B?this.w|=163840:a=Yb-a:this.w|=98304;return a}function V(a){return ac&&(c+=D);ze.call(this,c,b,a);return c}function ze(a,b,c){a=Math.trunc(a/Xb);b=Math.trunc(b/Xb);c=Math.trunc(c/Xb);var d=a^(a^b)&(b^c);this.w=this.w|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function ne(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Wb?y*z:0}return b} +function ee(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b}function Ce(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=D&&(a[0]%=D,a[1]++)}function Be(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Ee(a){a[1]%2&&(a[0]+=D);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function De(a){return!a[0]&&!a[1]} +var zd=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},Ad,function(a,b){0>this.I&&Ad.call(this);Bd.call(this,0,b)},Bd,function(a,b){0>this.I&&Ad.call(this);Cd.call(this,0,b)},Cd,function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)}, +function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)}, +function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},function(a){this.i(a)},Dd,Ed,$d,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+a%z*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+a%z*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+a%z*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,Ie.call(this,this.f(this.b)))},function(a,b){this.g(b,Ie.call(this,this.b))},function(a,b){this.g(this.b, +Ie.call(this,this.f(b)))},function(a,b){a=Ie.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ye.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,ye.call(this,this.f(b)))},function(a,b){a=ye.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,He.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,He.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,He.call(this,this.f(b),this.f(this.b), +!0))},function(a,b){this.g(this.b,this.g(b,He.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,He.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,He.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,He.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,He.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=Ae.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ +1&15,this.F))},function(a,b){a=Ae.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=Ae.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=Ae.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=Ae.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=Ae.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, +function(a,b){a=this.f(b);b=this.f(b+1&15);b=Ae.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=Ae.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(D-a):a;0d?B:0,c=A):(d=d*Math.pow(2,c)%B,c=B-Math.pow(2,35-c)),a<=A?a+c>A&&(this.w|=131072):a-c<=A&&(this.w|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+D:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%D+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& +dA&&eA&&(this.w|=131072):e-c<=A&&(this.w|=131072);e=0;f>A&&(d+=B,e+=B)}else d=d*Math.pow(2,a)%B+Math.trunc(e%B/Math.pow(2,35-a)),e=e*Math.pow(2,a)%B,c=B-Math.pow(2,35-a),f<=A?f+c>A&&(this.w|=131072):(f-c<=A&&(this.w|=131072),d+=B,e+=B)}else-36>=a?(e=-72>=a?d>A?C:0:Math.trunc(d%B/Math.pow(2,-a-35)),d<=A?d=0:(d=C,e+=B)):(c=d>A?D-Math.pow(2,36+a):0,e=Math.trunc(e%B/Math.pow(2,-a))+ +d%B*Math.pow(2,35+a)%B,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=B));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%D+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%D+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%D+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%D+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ +1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%D,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},M,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.L||(this.g(b,d* +z+c),a||wd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a=B&&J(this,this.b)},function(a){this.i(a)},function(a,b){a=b<<14;this.w&a&&(this.w&=~a,J(this,this.b))},function(){this.qa=this.b},M,function(a){this.i(a)},function(a,b){a=this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=D&&(a-=D);a/z|0||(this.w|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145; +0>a&&(a+=D);(a/z|0)==y&&(this.w|=262144);this.g(b,a)},function(a){this.i(a)},function(){this.g(this.b,(this.w&y)*z+this.u);J(this,this.b+1)},function(a,b){this.g(b,(this.w&y)*z+this.u);J(this,this.b)},function(a){this.i(a)},function(a){this.i(a)},function(a,b){this.g(b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,Q.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,Q.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,Q.call(this,this.f(b),this.f(this.b))))}, +function(a,b){this.g(b,W.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,W.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,W.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,W.call(this,this.f(b),this.f(this.b))))},we,function(a,b){0>T.call(this,this.f(b),this.b)&&J(this,this.u+1)},function(a,b){T.call(this,this.f(b),this.b)||J(this,this.u+1)},function(a,b){0>=T.call(this,this.f(b),this.b)&&J(this,this.u+1)},function(){J(this,this.u+1)},function(a, +b){0<=T.call(this,this.f(b),this.b)&&J(this,this.u+1)},function(a,b){T.call(this,this.f(b),this.b)&&J(this,this.u+1)},function(a,b){0T.call(this,this.f(b),this.f(this.b))&&J(this,this.u+1)},function(a,b){T.call(this,this.f(b),this.f(this.b))||J(this,this.u+1)},function(a,b){0>=T.call(this,this.f(b),this.f(this.b))&&J(this,this.u+1)},function(){J(this,this.u+1)},function(a,b){0<=T.call(this,this.f(b),this.f(this.b))&&J(this,this.u+ +1)},function(a,b){T.call(this,this.f(b),this.f(this.b))&&J(this,this.u+1)},function(a,b){0V.call(this,this.f(b))&&J(this,this.b)},function(a,b){V.call(this,this.f(b))||J(this,this.b)},function(a,b){0>=V.call(this,this.f(b))&&J(this,this.b)},function(){J(this,this.b)},function(a,b){0<=V.call(this,this.f(b))&&J(this,this.b)},function(a,b){V.call(this,this.f(b))&&J(this,this.b)},function(a,b){0V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V.call(this,a)||J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){J(this,this.u+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V.call(this,a)&&J(this,this.u+ +1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0V.call(this,a)&&J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V.call(this,a)||J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V.call(this,a)&&J(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));J(this,this.b)},function(a,b){a=this.g(b,Q.call(this, +this.f(b),1));0<=V.call(this,a)&&J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V.call(this,a)&&J(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V.call(this,a)||J(this,this.u+1);b&& +this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1)); +0V.call(this,a)&&J(this,this.b)},function(a,b){a=this.g(b,W.call(this,this.f(b),1));V.call(this,a)||J(this,this.b)},function(a,b){a=this.g(b,W.call(this,this.f(b),1));0>=V.call(this,a)&&J(this,this.b)},function(a,b){this.g(b,W.call(this,this.f(b),1));J(this,this.b)},function(a,b){a=this.g(b,W.call(this,this.f(b),1));0<=V.call(this,a)&&J(this,this.b)}, +function(a,b){a=this.g(b,W.call(this,this.f(b),1));V.call(this,a)&&J(this,this.b)},function(a,b){a=this.g(b,W.call(this,this.f(b),1));0V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this,this.f(this.b),1));V.call(this,a)||J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this, +this.f(this.b),1));0>=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this,this.f(this.b),1));J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this,this.f(this.b),1));0<=V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this,this.f(this.b),1));V.call(this,a)&&J(this,this.u+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,W.call(this,this.f(this.b),1));0>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-B&&(g+=D);for(var g=Math.trunc(Math.abs(g))%D,h=d;f--&&h=qa.kb&&c<=qa.Bb&&(b=c-(qa.kb-qa.xb));b&&(a.preventDefault&&a.preventDefault(),d.Ua(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==qa.zb&&(b=qa.yb);d.Ua(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ua(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ba=function(a,b,c,d){this.G=a;this.H=b;this.v=c;this.D=d;Ob(this)}; +l.wb=function(a){if(!this.b){var b=ed(this.G,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Da(c[0]);if(d!=this.Pa)return;c=Da(c[1]);if(this.b=tb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.u);if(this.B=e.receiveData){this.u=a;this.status("Connected "+this.Qa+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.ua=function(a,b){if(!b)if(this.wb(this.u),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.ia=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new F(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ua=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.u.length&&(a.w=0);if(0>a.w||b!=a.u[a.w])a.u.splice(0,0,b),a.w=0;a.w--}else a.P?b="end":b=a.u[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(Da(b.substring(c,f))),c=f+1}}return a} +function Te(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 Se(a,b,c){var d;if(b){b=Te(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,fa--;g=t+g;d>>=8}d=q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e} -function Xe(a,b){if(b)return We(a,b,a.T[b]);var c=0;for(b in a.T)We(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var Ve={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; -function Ye(a){Pe.call(this,a);this.xa=!1;this.la=!0;this.va=18;this.wa=X();this.K=X(0);this.ga=X(0);this.ba=X(0);this.F=[];this.b=this.M=this.I=[];Ze(this);this.R=this.ka=0;this.f=[];this.oa=void 0;$e(this);this.D=this;this.ma={};this.X=this.sb=0;this.S=null;this.O=[];af(this,a.messages);this.qa=a.commands;this.N=0;this.Aa=this.pa=null;this.B=this.za=this.ya=this.fa=this.na=0;this.ea=this.aa=null;var b=this;window?void 0===window[x]&&(window[x]=function(a){return gd(b,a)}):void 0===global[x]&&(global[x]= -function(a){return gd(b,a)})}p(Ye,Pe);function bf(a){a=a&&a.C;null==a&&(a=-1);return a}function X(a,b,c){return{C:void 0===a?null:a,Sa:void 0===b?!1:b,ha:!1,ca:c}}function cf(a,b,c,d){a.C=b;a.Sa=c||!1;a.ha=!1;a.ca=d}function df(a){return[a.C,a.Sa,a.ha,a.ca,a.Va]}function ef(a,b){var c=X(b[0],b[1],b[2]);c.ha=b[3];b[4]&&(c.ob=Qe(a,c.Va=b[4]));return c}l=Ye.prototype; -l.Ba=function(a,b,c,d){this.H=b;this.G=a;this.v=c;this.ea=a.u;this.va=b.F;(a=bd(a,"messages"))&&af(this,a);ff(this,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=bf(gf(d,c,d.ga));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.H.f;k=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=Mc[c],n&&d.j(q(n.id,8)+" %"+q(e<a&&a>=-Ub&&(a+=I);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function Z(a,b){return Q(a,b.C)}function kf(a){return sa(a/A,6)+" "+sa(a%A,6)} -function af(a,b){a.D=a;a.X=a.sb=536870916;a.S=null;a.O=[];b=Qe(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in M){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.xa==b&&(b=td(a.v,1)));if(0d&&(d=a.v.g(b)),0<=d&&(cf(a.f[a.R],b),++a.R==a.f.length&&(a.R=0)));return!1} -function Bf(a,b,c,d){var e=X(b.C),f=a.Ca(b,1),g,h,k,m=0,n=f/Xb|0,t;for(t in Cf)if(g=Cf[t][n&t]){h=+t;n>>=6;switch(h){case 32512:k=Df;m=n&3;break;case 32256:k=jg;m=n&7;break;case 29248:k=lg,m=(n&48)>>2|(n&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>mg&&(k="B");k=ng[g||0]+k;if(g){if(28700==h)m=f/Yb&127,h=Q(a,m,-1);else if(m=f>>23&15,h=Q(a,m,-1),g==og&&(g=pg[m]))k=ng[g],h="";k=Ba(k,8)+(h?h+",":"");f&4194304&&(k+="@");k+=Q(a,f&262143,-1);(f=f>>18&15)&&(k+="("+Q(a,f,-1)+")")}else k=Ba(k,8)+kf(f);f=k;g="";h=Z(a, -e)+":";if(-1!==e.C&&-1!==b.C){do if(k=a.Ca(e,1),g+=" "+kf(k),null==e.C)break;while(e.C!=b.C)}h+=Ba(g,16)+f;c&&(h=Ba(h,48)+";"+(c||""),h=a.v.w.Fa?h+("cycles="+hd(a.v).toString()+" cs="+q(a.v.za)):h+(null!=d?"="+d.toString():""));return h}function Ze(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.f],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.f],!0);a.I=["bw"];a.na=0;a.ka=0} -l.Ea=function(a,b,c){var d=!0;c||qg(this,a,b,!1,!0);if(a!=this.b){var e=bf(b);if(-1===e)this.j("invalid address: "+Z(this,b)),d=!1;else{var f=this.H;f.b[e>>>f.f].Ea(e&16383,a==this.I)}}d&&(a.push(b),c?b.ha=!0:(rg(this,a,a.length-1,"set"),$e(this)));return d};function qg(a,b,c,d,e){var f=!1;c=bf(c);for(var g=1;g>>d.f],b==a.I));h.ha||$e(a);break}}return f} -function sg(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=sa(d,2);cf(e.wa,d);f+="="+Q(e,e.Ca(e.wa),36)+" ";c+=f}if(b){b="";for(d=0;d=pf?1:d==nf?23:18)+" "),b+=e;c+="\n"+b}return c}l.tb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Da(n,k,a.tb);0>t&&n.splice(-(t+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({hd:b,C:c,Hb:d,U:e,pb:f})}function vg(a,b,c){var d=[],e=bf(b)>>>0;for(b=0;b>>0,h=f.Hb;if(e>=g&&eb){a.j("unknown register: "+f);return}var f=0,h=a.v;switch(b){case mf:h.A= -g%A;cf(a.K,h.A);break;case pf:f=65536;break;case qf:f=32768;break;case rf:f=131072;break;case sf:f=32;break;case tf:f=262144}f&&(h.u=g?h.u|f:h.u&~f);P(a.G);a.j("updated registers:")}}a.j(ug(a,e));c&&(cf(a.K,d.A),zf(a,Z(a,a.K)))}}function zg(a,b){b=Ca(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);h=a.ba;m=b;h.C=m.C;h.Sa=m.Sa;h.ha=m.ha;h.ca=m.ca;a.j(Bf(a,b,g,f));e-=b.C-k;c++}}} -function tg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(xf+b):(a.P&&(a.j("ended assemble at "+Z(a,a.ba)),a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(Lb(a)&&0n||"z"mg&&(Hd="B");if(Ed== -ng[tb]+Hd){Gf=29248!=zc?Wa:(Wa&3)<<1|(Wa&12)<<2;C=(Gd|Gf<<6)*Xb;break}}if(0<=C)break}if(0<=C)break}if(0<=C)if(yc)for(var Id=yc.split(","),Xa=0;XaL||127L||15L||262143L||15ha.length&&(a.j("note: only "+ha.length+" available"),Y=ha.length);ca-=Y;0>ca&&(null==ha[ha.length-1].C?(Y=ca+Y,ca=0):ca+=ha.length);var Nd=[];"call"==Mf&&(vb=1E5,Nd=["CALL"]);for(void 0!==Lf&& -a.j(Y+" instructions earlier:");0=ha.length&&(ca=0);a.oa=Y;Of++;vb--}}Of||(a.j("no "+Nf+"history available"),a.oa=void 0)}else{var cb=gf(a,ga,a.ga);if(cb){var Fa=0,Rf="ds"==$a;if(va){if("l"==va.charAt(0))va=va.substr(1)||dh,Fa=Ue(a,va);else{var Sf=gf(a,va);Sf&&(Fa=Sf.C-cb.C)}0>Fa&&(Fa=0);65536Wf;Wf++)Uf+=String.fromCharCode((Bc%64|0)+32),Bc/=64}Ga&&(Ga+="\n");Ga=Rf?Ga+(Ha+","):Ga+(ga+": "+Ha+(0>Vf?" "+Uf:""))}Ga&&a.j(Ga);a.ca=fh}}}}break;case "e":if("else"==g[0])break;var Xf,Yf,Zf=g[0],Qd=g[1];"e"==Zf||"ew"==Zf?(Xf=a.Ca,Yf=a.mb):Qd=null;if(null== -Qd)a.j("edit memory commands:"),a.j("\tew [a] [...] edit words at address a");else{var Cc=gf(a,Qd,a.ga);if(Cc)for(var Rd=2;RdUd;){for(var Ia=null,jh=256;65536>zb.C>>>0;){Vd.C=a.Ca(zb,2);if(null==zb.C||!jh--)break;if(!(Vd.C&1)){for(var kh=a,Dc=Vd,ag=null,Ab=Dc.C,bg=Ab,Wd=1;6>=Wd&&Ab;Wd++){if(2< -Wd){Dc.C=Ab;var Ec=Bf(kh,Dc);if(0<=Ec.indexOf("JSR")){var cg=Ec.indexOf(" ");if(Ab+(Ec.indexOf(" ",cg+1)-cg-1)/2==bg){ag=Ec;break}}}Ab-=2}Dc.C=bg;if(Ia=ag)break}}if(!Ia||null==Ia)break;var dg=null;if("ks"==ih){var eg=Ia.match(/[0-9A-F]+$/);eg&&(dg=yg(a,eg[0]))}Ia=Ba(Ia,50)+" ;"+(dg||"stack="+Z(a,zb));a.j(Ia);Ud++}Ud||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){yg(a,g[1],!0);break}f=!0;break;case "m":a:{var ia,ja=null,E=g[1];"?"==E&&(E=void 0);if(void 0!==E){var wa=0;if("all"== -E)wa=1879046143,E=null;else if("on"==E)ja=!0,E=null;else if("off"==E)ja=!1,E=null;else{"keys"==E&&(E="key");"kbd"==E&&(E="keyboard");for(ia in M)if(E==ia){wa=M[ia];ja=!!(a.X&wa);break}if(!wa){a.j("unknown message category: "+E);break a}}if(wa)if("on"==g[2])a.X|=wa,ja=!0;else if("off"==g[2]&&(a.X&=~wa,ja=!1,1073741824==wa)){for(var fg=1E3<=a.O.length?a.O.length-1E3:0;fghg)a.j("step commands:"),a.j("\tp\tstep over instruction"),a.j("\tpr\tstep over instruction with register update");else if(a.N)a.j("step in progress");else{var ig= -X(a.v.A);a.Ca(ig);a.N?(a.Ea(a.b,ig,!0),vf(a)||(a.G&&ld(a.G),a.N=0)):Ag(a,hg?"tr":"t")}break;case "r":if("reset"==b){a.G&&a.G.reset();break}yf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Cb=+g[2];if(8==Cb||10==Cb||16==Cb)a.ca=Cb;else{a.j("invalid base: "+Cb);break}}a.j("default base: "+a.ca);break;case "cs":var Db;void 0!==g[3]&&(Db=+g[3]);switch(g[2]){case "int":a.v.ka=Db;break;case "start":a.v.Aa=Db;break;case "stop":a.v.ma=Db;break;default:a.j("unknown cs option");break a}void 0!== -Db&&dd(a.v);a.j("checksums "+(a.v.w.Fa?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(id(a.v,+g[2])||a.j("warning: using 1x multiplier, previous target not reached"));a.j("target speed: "+(a.v.ba.toFixed(2)+"Mhz")+" ("+a.v.ea+"x)");break;default:if(g[1]){a.j("unknown option: "+g[1]);break}case "?":a.j("debugger options:"),a.j("\tbase #\t\tset default base to #"),a.j("\tcs int #\tset checksum cycle interval to #"),a.j("\tcs start #\tset checksum cycle start count to #"),a.j("\tcs stop #\tset checksum cycle stop count to #"), -a.j("\tsp #\t\tset speed multiplier to #")}break;case "t":Ag(a,g[0],g[1]);break;case "u":zf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){xg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.j((Qb||"PDP10")+" version 1.34.2 ("+a.v.qb+",RELEASE)");a.j(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){zg(a,b.substr(1));break}var Xd="commands:",Yd;for(Yd in Cg)Xd+="\n"+Ba(Yd,9)+Cg[Yd];ud(a)||(Xd+="\nnote: history disabled if no exec breakpoints");a.j(Xd);break;default:f=!0}f&&(a.j("unknown command: "+ -b),d=!1)}}catch(kg){a.j("Debugger "+(kg.stack||kg.message)),d=!1}return d}function gd(a,b,c){b=Qe(a,b,c);for(var d in b)if(!tg(a,b[+d]))return!1;return!0} -var Cg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},mg=20,og=85,ng=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CA JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV".split(" "), -mf=0,nf=1,of=2,pf=3,qf=4,rf=5,sf=6,tf=7,lf="PC RA EA C0 C1 OV ND PD".split(" "),Dg={},Cf=(Dg[28672]={0:101},Dg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:og,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},Dg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:mg,9216:53,9472:52, -9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},Dg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},Dg[29248]={24576:79,24640:80,25088:81,25152:82},Dg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},Dg),Df=["","I","M","S"],jg=" L E LE A GE N G".split(" "),lg="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),pg={8:102,4:103,2:104,6:105,1:106},uf=1E3,xf=">> ";eb(function(){for(var a=y(document,x,"debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bHg){if(Ig(d,this.M)){this.B=new O(this,"1.34.2",Rg);Ig(this.B)&&(Sg(this,d),a=Tg,Ug(this.B));this.B.set(Og,Ja());Vg(this.B);var e=this.b&&!this.K;if(a==Pg||pb("Click OK to restore the previous "+Qb+" machine state, or CANCEL to reset the machine.")){if(c=Ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Ig(d,g):("error"==f&&"no machine state"!= -g?(this.da("Error: "+g),"unable to verify user"==g&&(Pa(Wg,""),this.f=null)):this.j(f+": "+g),Ug(d),Ig(d)?(c=Ng(d),e=!0):c=!1))}e&&Lg(this,c?d:null)}else a==Tg&&d.clear()}else Lg(this);delete this.M;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.w.V=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Xg(this,this.v,b,c,a),P(this,-2),this.v.Z());this.P&&(Sg(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.A=0}; -function Sg(a,b){if(pb("There may be a problem with your "+Qb+" machine.\n\nTo help us diagnose it, click OK to send this "+Qb+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.f||"";b=b.toString();var d={};d.app=Qb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ka("http://www.pcjs.org/api/v1/report",d,!0)}} -function Bg(a,b,c){var d,e="none";if(a.A)return null;a.A--;var f=new O(a,"1.34.2"),g=new O(a,"1.34.2",Mg),h=Ja();g.set(Og,h);f.set(Og,h);f.set(Yg,"1.34.2");f.set(Zg,window?window.location.href:null);f.set($g,window?window.navigator.userAgent:"");a.v&&a.v.ia&&(c&&(b&&(a.v.w.Z=a.v.w.L),a.v.W()),d=a.v.ia(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.w.V=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.Xa+=d))&&(e.textContent=c.w.L?c.aa.toFixed(2)+"Mhz":"Stopped",c.Xa=0)}if(a.u&&(a=a.u,b=b||0,a.M)){c=a.v.w.L;d=!!(a.v.B&8);if(0>=b||60<=(a.K+=b)){e=a.v.A;if(a.J.PC){var f=a.D&&a.D.ca||8,e=e||0,e=8==f?sa(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.f=a.v.A:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ka(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);th(a,b,c)}})}else c(a,null)} -function uh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&y(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=za(a))}function g(a){f("Error: "+a);m&&(--qh||ib(!0));m=!1}var h,k,m=!0;qh++;nb[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=n:D.appendChild(document.createTextNode(n));t.appendChild(D)}d|| -(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.2/components.xsl");n=function(e,k){k?rh(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--qh||ib(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--qh|| -ib(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?rh(c,b,a,e,!0,f,n):sh(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(fa){g(fa.message)}return m}window.embedPDP10=function(a,b,c,d){ib(!1);return uh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ib(!1);return uh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Fb[a]){for(var c=!0,d=Fb,e=a,f=b.length,g=[],h=[],k="",m=null,n=0;n=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,ja--;g=u+g;d>>=8}d=q(c,0,!0)+" "+c+". "+ta(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e} +function Ze(a,b){if(b)return Ye(a,b,a.T[b]);var c=0;for(b in a.T)Ye(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var Xe={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function $e(a){Re.call(this,a);this.xa=!1;this.la=!0;this.va=18;this.wa=X();this.K=X(0);this.ga=X(0);this.ba=X(0);this.F=[];this.b=this.M=this.I=[];af(this);this.R=this.ka=0;this.i=[];this.oa=void 0;bf(this);this.D=this;this.ma={};this.X=this.sb=0;this.S=null;this.O=[];cf(this,a.messages);this.qa=a.commands;this.N=0;this.Aa=this.pa=null;this.B=this.za=this.ya=this.fa=this.na=0;this.ea=this.aa=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return jd(b,a)}):void 0===global[w]&&(global[w]= +function(a){return jd(b,a)})}p($e,Re);function df(a){a=a&&a.C;null==a&&(a=-1);return a}function X(a,b,c){return{C:void 0===a?null:a,Sa:void 0===b?!1:b,ha:!1,ca:c}}function ef(a,b,c,d){a.C=b;a.Sa=c||!1;a.ha=!1;a.ca=d}function ff(a){return[a.C,a.Sa,a.ha,a.ca,a.Va]}function gf(a,b){var c=X(b[0],b[1],b[2]);c.ha=b[3];b[4]&&(c.ob=Se(a,c.Va=b[4]));return c}l=$e.prototype; +l.Ba=function(a,b,c,d){this.H=b;this.G=a;this.v=c;this.ea=a.u;this.va=b.F;(a=ed(a,"messages"))&&cf(this,a);hf(this,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=df(jf(d,c,d.ga));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.H.i;k=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=Pc[c],n&&d.j(q(n.id,8)+" %"+q(e<a&&a>=-B&&(a+=D);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function Z(a,b){return L(a,b.C)}function mf(a){return ta(a/Vb,6)+" "+ta(a%Vb,6)} +function cf(a,b){a.D=a;a.X=a.sb=536870916;a.S=null;a.O=[];b=Se(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in cc){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.xa==b&&(b=wd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(ef(a.i[a.R],b),++a.R==a.i.length&&(a.R=0)));return!1} +function Df(a,b,c,d){var e=X(b.C),f=a.Ca(b,1),g,h,k,m=0,n=f/Zb|0,u;for(u in Ef)if(g=Ef[u][n&u]){h=+u;n>>=6;switch(h){case 32512:k=Ff;m=n&3;break;case 32256:k=lg;m=n&7;break;case 29248:k=ng,m=(n&48)>>2|(n&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>og&&(k="B");k=pg[g||0]+k;if(g){if(28700==h)m=f/$b&127,h=L(a,m,-1);else if(m=f>>23&15,h=L(a,m,-1),g==qg&&(g=rg[m]))k=pg[g],h="";k=Ca(k,8)+(h?h+",":"");f&4194304&&(k+="@");k+=L(a,f&262143,-1);(f=f>>18&15)&&(k+="("+L(a,f,-1)+")")}else k=Ca(k,8)+mf(f);f=k;g="";h=Z(a, +e)+":";if(-1!==e.C&&-1!==b.C){do if(k=a.Ca(e,1),g+=" "+mf(k),null==e.C)break;while(e.C!=b.C)}h+=Ca(g,16)+f;c&&(h=Ca(h,48)+";"+(c||""),h=a.v.A.Fa?h+("cycles="+kd(a.v).toString()+" cs="+q(a.v.za)):h+(null!=d?"="+d.toString():""));return h}function af(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.na=0;a.ka=0} +l.Ea=function(a,b,c){var d=!0;c||sg(this,a,b,!1,!0);if(a!=this.b){var e=df(b);if(-1===e)this.j("invalid address: "+Z(this,b)),d=!1;else{var f=this.H;f.b[e>>>f.i].Ea(e&16383,a==this.I)}}d&&(a.push(b),c?b.ha=!0:(tg(this,a,a.length-1,"set"),bf(this)));return d};function sg(a,b,c,d,e){var f=!1;c=df(c);for(var g=1;g>>d.i],b==a.I));h.ha||bf(a);break}}return f} +function ug(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=ta(d,2);ef(e.wa,d);f+="="+L(e,e.Ca(e.wa),36)+" ";c+=f}if(b){b="";for(d=0;d=rf?1:d==pf?23:18)+" "),b+=e;c+="\n"+b}return c}l.tb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],u=Ea(n,k,a.tb);0>u&&n.splice(-(u+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({hd:b,C:c,Hb:d,U:e,pb:f})}function xg(a,b,c){var d=[],e=df(b)>>>0;for(b=0;b>>0,h=f.Hb;if(e>=g&&eb){a.j("unknown register: "+f);return}var f=0,h=a.v;switch(b){case of:J(h, +g);ef(a.K,h.u);break;case rf:f=65536;break;case sf:f=32768;break;case tf:f=131072;break;case uf:f=32;break;case vf:f=262144}f&&(h.w=g?h.w|f:h.w&~f);K(a.G);a.j("updated registers:")}}a.j(wg(a,e));c&&(ef(a.K,d.u),Bf(a,Z(a,a.K)))}}function Bg(a,b){b=Da(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);h=a.ba;m=b;h.C=m.C;h.Sa=m.Sa;h.ha=m.ha;h.ca=m.ca;a.j(Df(a,b,g,f));e-=b.C-k;c++}}} +function vg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(zf+b):(a.P&&(a.j("ended assemble at "+Z(a,a.ba)),a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(Nb(a)&&0n||"z"og&&(Id="B");if(Fd== +pg[xb]+Id){If=29248!=Bc?Za:(Za&3)<<1|(Za&12)<<2;G=(Hd|If<<6)*Zb;break}}if(0<=G)break}if(0<=G)break}if(0<=G)if(Ac)for(var Jd=Ac.split(","),$a=0;$aP||127P||15P||262143P||15la.length&&(a.j("note: only "+la.length+" available"),ca=la.length);ga-=ca;0>ga&&(null==la[la.length-1].C?(ca=ga+ca,ga=0):ga+=la.length);var Od=[];"call"==Of&&(zb=1E5,Od=["CALL"]);for(void 0!== +Nf&&a.j(ca+" instructions earlier:");0=la.length&&(ga=0);a.oa=ca;Qf++;zb--}}Qf||(a.j("no "+Pf+"history available"),a.oa=void 0)}else{var fb=jf(a,ka,a.ga);if(fb){var Ia=0,Tf="ds"==cb;if(ya){if("l"==ya.charAt(0))ya=ya.substr(1)||fh,Ia=We(a,ya);else{var Uf=jf(a,ya);Uf&&(Ia=Uf.C-fb.C)}0>Ia&&(Ia=0);65536Yf;Yf++)Wf+=String.fromCharCode((Dc%64|0)+32),Dc/=64}Ja&&(Ja+="\n");Ja=Tf?Ja+(Ka+","):Ja+(ka+": "+Ka+(0>Xf?" "+Wf:""))}Ja&&a.j(Ja);a.ca=hh}}}}break;case "e":if("else"==g[0])break;var Zf,$f,ag=g[0],Rd=g[1];"e"==ag||"ew"==ag?(Zf=a.Ca,$f=a.mb):Rd=null; +if(null==Rd)a.j("edit memory commands:"),a.j("\tew [a] [...] edit words at address a");else{var Ec=jf(a,Rd,a.ga);if(Ec)for(var Sd=2;SdVd;){for(var La=null,lh=256;65536>Db.C>>>0;){Wd.C=a.Ca(Db,2);if(null==Db.C||!lh--)break;if(!(Wd.C&1)){for(var mh=a,Fc=Wd,cg=null,Eb=Fc.C,dg=Eb,Xd=1;6>=Xd&&Eb;Xd++){if(2< +Xd){Fc.C=Eb;var Gc=Df(mh,Fc);if(0<=Gc.indexOf("JSR")){var eg=Gc.indexOf(" ");if(Eb+(Gc.indexOf(" ",eg+1)-eg-1)/2==dg){cg=Gc;break}}}Eb-=2}Fc.C=dg;if(La=cg)break}}if(!La||null==La)break;var fg=null;if("ks"==kh){var gg=La.match(/[0-9A-F]+$/);gg&&(fg=Ag(a,gg[0]))}La=Ca(La,50)+" ;"+(fg||"stack="+Z(a,Db));a.j(La);Vd++}Vd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){Ag(a,g[1],!0);break}f=!0;break;case "m":a:{var ma,na=null,I=g[1];"?"==I&&(I=void 0);if(void 0!==I){var za=0;if("all"== +I)za=1879046143,I=null;else if("on"==I)na=!0,I=null;else if("off"==I)na=!1,I=null;else{"keys"==I&&(I="key");"kbd"==I&&(I="keyboard");for(ma in cc)if(I==ma){za=cc[ma];na=!!(a.X&za);break}if(!za){a.j("unknown message category: "+I);break a}}if(za)if("on"==g[2])a.X|=za,na=!0;else if("off"==g[2]&&(a.X&=~za,na=!1,1073741824==za)){for(var hg=1E3<=a.O.length?a.O.length-1E3:0;hgjg)a.j("step commands:"),a.j("\tp\tstep over instruction"),a.j("\tpr\tstep over instruction with register update");else if(a.N)a.j("step in progress"); +else{var kg=X(a.v.u);a.Ca(kg);a.N?(a.Ea(a.b,kg,!0),xf(a)||(a.G&&od(a.G),a.N=0)):Cg(a,jg?"tr":"t")}break;case "r":if("reset"==b){a.G&&a.G.reset();break}Af(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var Gb=+g[2];if(8==Gb||10==Gb||16==Gb)a.ca=Gb;else{a.j("invalid base: "+Gb);break}}a.j("default base: "+a.ca);break;case "cs":var Hb;void 0!==g[3]&&(Hb=+g[3]);switch(g[2]){case "int":a.v.ka=Hb;break;case "start":a.v.Aa=Hb;break;case "stop":a.v.ma=Hb;break;default:a.j("unknown cs option");break a}void 0!== +Hb&&gd(a.v);a.j("checksums "+(a.v.A.Fa?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(ld(a.v,+g[2])||a.j("warning: using 1x multiplier, previous target not reached"));a.j("target speed: "+(a.v.ba.toFixed(2)+"Mhz")+" ("+a.v.ea+"x)");break;default:if(g[1]){a.j("unknown option: "+g[1]);break}case "?":a.j("debugger options:"),a.j("\tbase #\t\tset default base to #"),a.j("\tcs int #\tset checksum cycle interval to #"),a.j("\tcs start #\tset checksum cycle start count to #"),a.j("\tcs stop #\tset checksum cycle stop count to #"), +a.j("\tsp #\t\tset speed multiplier to #")}break;case "t":Cg(a,g[0],g[1]);break;case "u":Bf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){zg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.j((Tb||"PDP10")+" version 1.34.2 ("+a.v.qb+",RELEASE)");a.j(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Bg(a,b.substr(1));break}var Yd="commands:",Zd;for(Zd in Eg)Yd+="\n"+Ca(Zd,9)+Eg[Zd];xd(a)||(Yd+="\nnote: history disabled if no exec breakpoints");a.j(Yd);break;default:f=!0}f&&(a.j("unknown command: "+ +b),d=!1)}}catch(mg){a.j("Debugger "+(mg.stack||mg.message)),d=!1}return d}function jd(a,b,c){b=Se(a,b,c);for(var d in b)if(!vg(a,b[+d]))return!1;return!0} +var Eg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},og=20,qg=85,pg=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV".split(" "), +of=0,pf=1,qf=2,rf=3,sf=4,tf=5,uf=6,vf=7,nf="PC RA EA C0 C1 OV ND PD".split(" "),Fg={},Ef=(Fg[28672]={0:101},Fg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:qg,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},Fg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:og,9216:53,9472:52, +9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},Fg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},Fg[29248]={24576:79,24640:80,25088:81,25152:82},Fg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, +28692:98,28696:99,28700:100},Fg),Ff=["","I","M","S"],lg=" L E LE A GE N G".split(" "),ng="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),rg={8:102,4:103,2:104,6:105,1:106},wf=1E3,zf=">> ";Xa(function(){for(var a=x(document,w,"debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bJg){if(Kg(d,this.M)){this.B=new F(this,"1.34.2",Tg);Kg(this.B)&&(Ug(this,d),a=Vg,Wg(this.B));this.B.set(Qg,Fa());Xg(this.B);var e=this.b&&!this.K;if(a==Rg||rb("Click OK to restore the previous "+Tb+" machine state, or CANCEL to reset the machine.")){if(c=Pg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Kg(d,g):("error"==f&&"no machine state"!= +g?(this.da("Error: "+g),"unable to verify user"==g&&(Qa(Yg,""),this.i=null)):this.j(f+": "+g),Wg(d),Kg(d)?(c=Pg(d),e=!0):c=!1))}e&&Ng(this,c?d:null)}else a==Vg&&d.clear()}else Ng(this);delete this.M;delete this.I}e=sb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.V=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Zg(this,this.v,b,c,a),K(this,-2),this.v.Z());this.P&&(Ug(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.w=0}; +function Ug(a,b){if(rb("There may be a problem with your "+Tb+" machine.\n\nTo help us diagnose it, click OK to send this "+Tb+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.i||"";b=b.toString();var d={};d.app=Tb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ga("http://www.pcjs.org/api/v1/report",d,!0)}} +function Dg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new F(a,"1.34.2"),g=new F(a,"1.34.2",Og),h=Fa();g.set(Qg,h);f.set(Qg,h);f.set($g,"1.34.2");f.set(ah,window?window.location.href:null);f.set(bh,window?window.navigator.userAgent:"");a.v&&a.v.ia&&(c&&(b&&(a.v.A.Z=a.v.A.L),a.v.W()),d=a.v.ia(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.V=!1,!1===d&&(e=null)));for(var h=sb(a.id),k=0;k=d||30<=(c.Xa+=d))&&(e.textContent=c.A.L?c.aa.toFixed(2)+"Mhz":"Stopped",c.Xa=0)}if(a.u&&(a=a.u,b=b||0,a.M)){c=a.v.A.L;d=!!(a.v.B&8);if(0>=b||60<=(a.K+=b)){e=a.v.u;if(a.J.PC){var f=a.D&&a.D.ca||8,e=e||0,e=8==f?ta(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.u:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){g=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ga(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);vh(a,b,c)}})}else c(a,null)} +function wh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--sh||jb(!0));m=!1}var h,k,m=!0;sh++;pb[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],H=document.createElement("style");H.type="text/css";H.styleSheet?H.styleSheet.cssText=n:H.appendChild(document.createTextNode(n));u.appendChild(H)}d|| +(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.2/components.xsl");n=function(e,k){k?th(d,null,a,null,!1,f,function(a,e){e?(ob(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--sh||jb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--sh|| +jb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?th(c,b,a,e,!0,f,n):uh(c,null,b,a,e,!1,f,n)}else g("missing machine element: "+b)}catch(ja){g(ja.message)}return m}window.embedPDP10=function(a,b,c,d){jb(!1);return wh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){jb(!1);return wh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return ub(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!yb[a]){for(var c=!0,d=yb,e=a,f=b.length,g=[],h=[],k="",m=null,n=0;na&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ja(a,b){b?12"']/g,function(a){return qa[a]})}function ra(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={"&":"&","<":"<",">":">",'"':""","'":"'"}; function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function r(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, -f,e))});if(b&&"object"==typeof b){var l="",q;for(q in b)b.hasOwnProperty(q)&&(l&&(l+="&"),l+=q+"="+encodeURIComponent(b[q]));l=l.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function q(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +f,e))});if(b&&"object"==typeof b){var l="",r;for(r in b)b.hasOwnProperty(r)&&(l&&(l+="&"),l+=r+"="+encodeURIComponent(b[r]));l=l.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={H:null,O:null,T:null,S:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.T=g.load;d.S=g.exec;if(e=g.bytes)d.H=e;else if(e=g.words)for(d.H=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.H=Array(4*e.length),f=c=0;c>8&255,d.H[f++]=e[c]>>16&255,d.H[f++]=e[c]>>24&255;else(e=g.data)?d.Y=e:d.H=g;d.H&&(d.H.length?1==d.H.length&&(t(d.H[0]),d=null):(t("Empty resource: "+a),d=null));d.O=g.symbols}catch(h){t("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.ua=this.id:(this.va=this.id.substr(0,a),this.ua=this.id.substr(a+1));this.h={ready:!1,za:!1,Ma:!1,F:!1,error:!1};this.Ba=null;this.h.error=!1;this.w=this.i=this.s=this.u=this.fa=null;y.push(this)}function Ja(a,b,c){Ka[a]&&b&&(Ka[a][b]=c)}function La(){return Date.now()||+new Date} -function t(a){window&&window.alert(a)}function Ma(a){var b=!1;window&&(b=window.confirm(a));return b}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba?this.ua=this.id:(this.va=this.id.substr(0,a),this.ua=this.id.substr(a+1));this.i={ready:!1,za:!1,Ma:!1,F:!1,error:!1};this.Ba=null;this.i.error=!1;this.w=this.j=this.s=this.v=this.fa=null;w.push(this)}function Ka(a,b,c){La[a]&&b&&(La[a][b]=c)}function Ma(){return Date.now()||+new Date} +function t(a){window&&window.alert(a)}function Na(a){var b=!1;window&&(b=window.confirm(a));return b}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.a["S"+a]=[0,0,!1,!1,this.pb,a];this.w=this.i=this.s=this.u=null;this.exports={hold:this.ib,toggle:this.Ab,reset:this.wb, -set:this.zb};G(this)}n(bb,w);k=bb.prototype;k.reset=function(a){this.stop();a&&db(this,this.j=0)}; -k.U=function(a,b,c,d){if(this.u&&this.u.U(a,b,c,d)||this.i&&this.i.U(a,b,c,d))return!0;switch(b){case "PC":return this.m[b]=c,this.C++,!0;default:return"led"==a||"rled"==a?(this.m[b]=c,this.l[b]=d?1:0,this.C++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[b]=[d?1:0,d?1:0]),this.m[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){eb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){eb(a, -b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fb(a,b)}}(this,b),!0):w.prototype.U.call(this,a,b,c,d)}};k.Z=function(a,b,c,d){this.u=a;this.s=b;this.i=c;this.w=d;gb(this);hb(this)};k.V=function(a,b){if(!b)if(this.P&&ib(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.R=function(a){return a?this.save():!0};k.save=function(){var a=new R(this);a.set(0,[this.b,this.j,this.g]);return a.data()}; -k.restore=function(a){if(a=a[0])jb(this,this.b=a[0]),db(this,this.j=a[1]),kb(this,a[2]);return!0};k.wb=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}hb(this);return!0};function lb(a,b,c){if(a=a.m[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gb(a,b){for(var c in a.l)lb(a,c,null!=b?b:a.l[c])}function mb(a,b,c){if(a=a.m[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a){for(var b in a.a)mb(a,b,a.a[b][1])} -k.ib=function(a,b,c){if(eb(this,b)){if(c){var d=this;setTimeout(function(){fb(d,b);a&&a()},+c);return!1}fb(this,b)}return!0}; +var B="pdp10",Xa="PDPjs",Ya=Math.pow(2,18)-1,Za=Math.pow(2,18),$a=Math.pow(2,17)-1,E=Math.pow(2,18)-1,G=Math.pow(2,18),H=Math.pow(2,35)-1,I=Math.pow(2,35),J=Math.pow(2,36)-1,K=Math.pow(2,36),L=Math.pow(2,32),ab=Math.pow(2,34),bb=Math.pow(2,36),cb=Math.pow(2,23),db=Math.pow(2,30),B="pdp10",Xa="PDPjs"; +function eb(a,b){v.call(this,"Panel",a);this.A=this.C=0;this.P=b;this.f=this.u=this.g=this.h=0;this.D=this.I=-1;this.K=this.L=this.o=!1;this.N=fb;this.l={};this.a={START:[1,1,!0,!1,this.qb],STEP:[1,1,!1,!1,this.rb],ENABLE:[1,1,!1,!1,this.lb],CONT:[1,1,!0,!1,this.jb],DEP:[0,0,!0,!1,this.kb],EXAM:[1,1,!0,!1,this.mb],LOAD:[1,1,!0,!1,this.ob],TEST:[0,0,!0,!1,this.nb]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.pb,a];this.w=this.j=this.s=this.v=null;this.exports={hold:this.ib,toggle:this.Ab,reset:this.wb, +set:this.zb};D(this)}n(eb,v);k=eb.prototype;k.reset=function(a){this.stop();a&&gb(this,this.h=0)}; +k.U=function(a,b,c,d){if(this.v&&this.v.U(a,b,c,d)||this.j&&this.j.U(a,b,c,d))return!0;switch(b){case "PC":return this.m[b]=c,this.C++,!0;default:return"led"==a||"rled"==a?(this.m[b]=c,this.l[b]=d?1:0,this.C++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[b]=[d?1:0,d?1:0]),this.m[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){hb(a, +b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ib(a,b)}}(this,b),!0):v.prototype.U.call(this,a,b,c,d)}};k.Z=function(a,b,c,d){this.v=a;this.s=b;this.j=c;this.w=d;jb(this);kb(this)};k.V=function(a,b){if(!b)if(this.P&&lb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.R=function(a){return a?this.save():!0};k.save=function(){var a=new M(this);a.set(0,[this.f,this.h,this.g]);return a.data()}; +k.restore=function(a){if(a=a[0])mb(this,this.f=a[0]),gb(this,this.h=a[1]),nb(this,a[2]);return!0};k.wb=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}kb(this);return!0};function ob(a,b,c){if(a=a.m[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function jb(a,b){for(var c in a.l)ob(a,c,null!=b?b:a.l[c])}function pb(a,b,c){if(a=a.m[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function kb(a){for(var b in a.a)pb(a,b,a.a[b][1])} +k.ib=function(a,b,c){if(hb(this,b)){if(c){var d=this;setTimeout(function(){ib(d,b);a&&a()},+c);return!1}ib(this,b)}return!0}; k.zb=function(a,b){if("SR"==a){a=b;b=8;var c;if(a){b||(b=10);var d=a.charAt(0),e=0>>a.b];a.j++;b=c.m(b&16383,b);a.j--;a=b}else a=this.i.c(this.b);db(this,this.j=a)}};k.ob=function(a){a||this.i.h.B||jb(this,this.g)};k.nb=function(a){a?(this.o=!0,gb(this,!0)):(this.o=!1,gb(this),kb(this,0))};k.pb=function(a,b){this.g=a?this.g|1<c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.a["S"+b][1]=a.g&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.b;0f&&(q=f);if(h&&h.size){if(h.type==d){if(e+f<=h.ea)return h.Da+=h.ea-e,h.ea=e,!0;if(e>=h.ea+h.Da){q=h.size-(e-l);q>f&&(q=f);h.Da=e-h.ea+q;e=l+16384;f-=q;g++;continue}}return Db(Eb,e,f)}e=new zb(a,e,q,16384,d);Ab(e,h);a.a[g++]=e;e=l+16384;f-=q}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Fb[d]+" at "+ja(b)),!0):Db(Gb,b,c)} -function xb(a,b,c){var d=a.a[(b&a.g)>>>a.b];a.j++;d.g(c,b&16383,b);a.j--}function Bb(a){for(var b=0,c=[],d=0;d=a.ha&&(a.ha+=a.na,c=!0);0<=a.oa&&a.oa<=Wb(a)&&(a.na=a.oa=-1,Vb(a),S(a),c=!0);c&&a.M(Wb(a)+" cycles: checksum="+ka(a.wa))}} -k.U=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.m[b]=c,!0;case "run":return this.m[b]=c,c.onclick=function(){var a;if(a=d.u)if(a=d.u,a.h.F)a=!0;else{var b=null,c,h=z(a.id);for(c=0;ca.W/a.ga&&(b=1);a.ia=b;b=a.Ha*a.ia;if(a.ga!=b){a.ga=b;b=a.ga.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.M("target speed: "+b)}c&&a.u&&(c=a.u,c.fa&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.fa.focus(),window&&window.scrollTo(b,d)))}tb(a,a.D);a.D=0;a.C=La();a.K=0;Yb(a)}function $b(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ac(a,b){var c=a.L-=a.N;a.N=0;b&&(a.L=0);return c} -k.xb=function(){if(this.h.B){this.ya>=this.Ja&&Yb(this,!0);this.aa=0;this.ma=La();if(this.K){var a=this.ma-this.K;a>this.Ia&&(this.C+=a,this.C>this.ma&&(this.C=this.ma))}try{do{for(var b,c=this.h.Aa?1:this.pa,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Ea(b)}catch(f){if("number"!=typeof f)throw f;}b=ac(this,!0);this.aa+=b;this.D+=b;ub(this,b);sb(this,b);this.ja-=b;if(0>=this.ja){this.ja+=this.pa;++this.Ka>=bc&&(this.u&&vb(this.u,void 0),this.Ka=0);break}}while(this.h.B)}catch(f){S(this); -this.u&&this.u.stop(La(),Wb(this));a=f.stack||f.message;this.h.error=!0;this.G(a);return}if(this.h.B){a=setTimeout;b=this.Va;this.K=La();c=this.Ia;this.aa&&(c=Math.round(c*this.aa/this.pa));c-=this.K-this.ma;if(d=this.K-this.C)this.W=Math.round(this.D/(10*d))/100,864E5<=d&&(this.P=0,Xb(this));if(0>c||this.Wc&&(this.C-=c),c=0;this.ya+=this.aa;this.K+=c;a(b,c)}}}; -function rb(a){var b;a.h.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.h.B)a.M(a.toString()+" busy");else{Xb(a);a.h.B=!0;a.h.Pa=!0;if(b=a.m.run)b.textContent="Halt";a.u&&a.u.start(a.C,Wb(a));a.w||a.status("Started");setTimeout(a.Va,0)}}k.Ea=function(){return 0};function S(a){var b=!1;if(a.h.B){ac(a);tb(a,a.D);a.D=0;a.h.B=!1;if(b=a.m.run)b.textContent="Run";a.u&&a.u.stop(La(),Wb(a));b=!0;a.w||a.status("Stopped")}a.h.complete=void 0;return b}var Zb=30,bc=15,Sb=["power","reset"]; -function cc(a){var b=+a.model||1001;Rb.call(this,a,1E6);this.eb=b;this.ta=+a.addrReset||0;this.fb=dc.bind(this);this.b=T.bind(this);this.la=null;this.Ua=[];this.h.complete=!1}n(cc,Rb);k=cc.prototype;k.reset=function(){this.status("Model "+this.eb);this.h.B&&S(this);this.a=this.A=this.qa=0;this.j=this.Ga=this.ta;this.v=this.da=-1;this.o=this.g=0;this.La=[0,0];this.ba=[0,0];this.X=[0,0];this.ca=[0,0];this.ka=this.j;this.l=0;this.c=this.tb;this.f=this.Eb;this.la=null;Ub(this);this.h.error=!1;Rb.prototype.reset.call(this)}; -k.Xa=function(){return 0};k.save=function(){var a=new R(this);a.set(0,[this.a,this.A,this.qa,this.j,this.da,this.v,this.g,this.l,this.Ga,this.ka,this.ta]);a.set(1,[]);a.set(2,[this.P,this.ia,this.h.J]);a.set(3,ec(this));a.set(4,$b(this));return a.data()}; -k.restore=function(a){var b;b=a[0];ea();ba();ea();var c=b[Symbol.iterator];b=c?c.call(b):fa(b);this.a=b.next().value;this.A=b.next().value;this.qa=b.next().value;this.j=b.next().value;this.da=b.next().value;this.v=b.next().value;this.g=b.next().value;this.l=b.next().value;this.Ga=b.next().value;this.ka=b.next().value;this.ta=b.next().value;b=a[2];this.P=b[0];Xb(this,b[1]);this.h.J=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.b].c(a&16383,a)};k.Eb=function(a,b){var c=this.s;a=this.ka=a;c.a[(a&c.g)>>>c.b].f(b,a&16383,a);return b}; -k.Ea=function(a){this.h.complete=!0;var b=a?this.h.Pa?0:1:-1;this.h.Pa=!1;this.L=this.N=a;this.l=this.l&-5|0;do{if(a=this.l)if(a=this.l&11)this.l&2?this.la||(this.l&=-3):this.l&1&&this.l++,a=!1;if(a){if(this.l&4&&this.w.j(this.j,b)){S(this);break}if(0>b)break}this.l&=15;this.A&4194304?this.A=this.c(this.a):0<=this.da?(this.A=this.qa=this.c(this.da),this.da=-1):(this.A=this.qa=this.c(this.Ga=this.j),this.j=(this.j+1)%I);this.A&=8388607;this.a=this.A&262143;if(a=this.A>>18&15)this.a=this.a+this.c(a)& -Va;a=this.A&4194304?-1:this.qa/$a|0;0<=a&&this.fb(a)}while(0>4].call(this,a,a&15)}function U(a){this.b(a)}function gc(){var a=0,b=this.c(this.a),c=b/ab&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*ab+(d<<24)+(b&16777215);a&&(b=(b+a)%O);this.f(this.a,b)} -function hc(a,b){a=this.c(this.a);if(0>this.v)this.v=a,this.A=this.a|4194304;else{var c=this.v/ab&63,d=this.v>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.f(b,a);this.v=-1}}function ic(a,b){a=this.c(this.a);if(0>this.v)this.v=a,this.A=this.a|4194304;else{var c=this.v/ab&63,d=this.v>>24&63;b=this.c(b)%Math.pow(2,d)*Math.pow(2,c)%O;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.f(this.a,a);this.v=-1}}function jc(a,b){this.f(b,this.c(this.a))} -function kc(a,b){this.f(b,this.a)}function lc(a,b){this.f(this.a,this.c(b))}function mc(a,b){this.f(b,0)}function nc(a,b){this.f(b,N-this.c(b))}function oc(a,b){this.f(b,N)}function pc(a,b){var c=this.c(this.a),d=this.c(b);this.f(b,qc(a,d,c)+(c-(c&J)))}function rc(a,b){var c=this.c(b);this.f(b,qc(a,c,0))}function sc(a,b){b=this.c(b);var c=this.c(this.a);this.f(this.a,qc(a,c,b)+(b-(b&J)))} -function tc(a,b){var c=this.c(this.a),d=c;if(a&=384)switch(d-=d&J,a){case 256:d+=J;break;case 384:d+=c>P?J:0}c=d;this.f(this.a,c);b&&this.f(b,c)}function uc(a,b){var c=(this.c(this.a)&J)*K,d=this.c(b);this.f(b,qc(a,d,c)+c)}function vc(a,b){var c=this.a*K,d=this.c(b);this.f(b,qc(a,d,c)+c)}function wc(a,b){b=(this.c(b)&J)*K;var c=this.c(this.a);this.f(this.a,qc(a,c,b)+b)}function xc(a,b){var c=this.c(this.a),d=(c&J)*K,c=qc(a,c,d)+d;this.f(this.a,c);b&&this.f(b,c)} -function yc(a,b){var c=this.c(this.a)&J,d=this.c(b);this.f(b,zc(a,d,c)+c)}function Ac(a,b){var c=this.c(b);this.f(b,zc(a,c,this.a)+this.a)}function Bc(a,b){b=this.c(b)&J;var c=this.c(this.a);this.f(this.a,zc(a,c,b)+b)}function Cc(a,b){var c=this.c(this.a),d=c;if(a&=384)switch(d&=J,a){case 256:d+=J*K;break;case 384:d+=c>Wa?J*K:0}c=d;this.f(this.a,c);b&&this.f(b,c)}function Dc(a,b){var c=this.c(this.a)/K|0,d=this.c(b);this.f(b,zc(a,d,c)+c)}function Ec(a,b){var c=this.c(b);this.f(b,zc(a,c,0))} -function Fc(a,b){b=this.c(b)/K|0;var c=this.c(this.a);this.f(this.a,zc(a,c,b)+b)}function Gc(a,b){var c=this.c(this.a),d=c/K|0,c=zc(a,c,d)+d;this.f(this.a,c);b&&this.f(b,c)}function V(a){Hc[a&7].call(this,a,a>>3&127)}function Ic(){}function T(a){this.M("undefined opcode: "+ja(a));this.j=(this.j+-1)%I;S(this)}function Jc(a){a>P&&(a!=Xa?a=Ya-a:this.g|=163840);return a}function Kc(a,b){var c=(a+b)%O;Lc.call(this,a,b,c);return c}function W(a,b){return((a/Q|0)&(b/Q|0))*Q+((a&b)>>>0)} -function X(a,b,c){var d=!1,e=!1,f=b-b%M;a=a%M+b*M%O;b=this.o=f+Math.trunc(b/2);c>P&&(c=O-c,d=!d);b>P&&(a?(b=N-b,a=O-a):b&&(b=O-b),e=!0,d=!d);if(b>=c)return this.g|=131104,-1;f=this.La;f[0]=0;f[1]=0;f=this.ba;f[0]=1;f[1]=0;f=this.X;f[0]=c;f[1]=0;c=this.ca;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=O,b[1]--),Nc(this.La,this.ba),Oc(this.ca)))break;Pc(this.X);Pc(this.ba)}while(!Oc(this.ba)); -a=this.La[0];this.o=this.ca[0];d&&a&&(a=O-a);e&&this.o&&(this.o=O-this.o);return a}function Qc(a,b){return((a/Q|0)^(b/Q|0))*Q+((a^b)>>>0)}function Rc(a,b){return(~((a/Q|0)^(b/Q|0))&15)*Q+(~(a^b)>>>0)}function Y(a,b){return(a/Q|0|b/Q|0)*Q+((a|b)>>>0)} -function Z(a,b,c){var d=a,e=b;b=!1;var f;d>P&&(d=O-d,b=!b);e>P&&(e=O-e,b=!b);if(dP)&&(f!=N||a<=P)&&(this.g|=131072),a;c=a;b=f;a=b-b%M;b=2*b%O+Math.trunc(c/M);c=a+c%M;d=b-b%M;a!=d&&(b=a+(b-d),this.g|=131072);this.o=c;return b} -function Sc(a){a?a==Xa?this.g|=163840:a=Ya-a:this.g|=98304;return a}function Tc(a,b){var c=a-b;0>c&&(c+=O);Lc.call(this,c,b,a);return c}function Lc(a,b,c){a=Math.trunc(a/Za);b=Math.trunc(b/Za);c=Math.trunc(c/Za);var d=a^(a^b)&(b^c);this.g=this.g|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function zc(a,b,c){switch(a&384){case 0:b-=b&J;break;case 128:b=0;break;case 256:b=J*K;break;case 384:b=c>Wa?J*K:0}return b} -function qc(a,b,c){switch(a&384){case 0:b&=J;break;case 128:b=0;break;case 256:b=J;break;case 384:b=c>P?J:0}return b}function Nc(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=O&&(a[0]%=O,a[1]++)}function Mc(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Pc(a){a[1]%2&&(a[0]+=O);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function Oc(a){return!a[0]&&!a[1]} -var fc=[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},gc,function(a,b){0>this.v&&gc.call(this);hc.call(this,0,b)},hc,function(a,b){0>this.v&&gc.call(this);ic.call(this,0,b)},ic,function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},jc,kc,lc,function(a,b){b&&this.f(b,this.c(this.a))},function(a,b){a=this.c(this.a);a=(a/K|0)+a%K*K;this.f(b,a)},function(a,b){this.f(b,this.a*K)},function(a,b){a=this.c(b);a=(a/K|0)+a%K*K;this.f(this.a,a)},function(a,b){a=this.c(this.a);a=(a/K|0)+a%K*K;this.f(this.a,a);b&&this.f(b,a)},function(a,b){this.f(b,Sc.call(this,this.c(this.a)))},function(a,b){this.f(b,Sc.call(this,this.a))},function(a,b){this.f(this.a, -Sc.call(this,this.c(b)))},function(a,b){a=Sc.call(this,this.c(this.a));this.f(this.a,a);b&&this.f(b,a)},function(a,b){this.f(b,Jc.call(this,this.c(this.a)))},function(a,b){this.f(b,this.a)},function(a,b){this.f(this.a,Jc.call(this,this.c(b)))},function(a,b){a=Jc.call(this,this.c(this.a));this.f(this.a,a);b&&this.f(b,a)},function(a,b){this.f(b,Z.call(this,this.c(b),this.c(this.a),!0))},function(a,b){this.f(b,Z.call(this,this.c(b),this.a,!0))},function(a,b){this.f(this.a,Z.call(this,this.c(b),this.c(this.a), -!0))},function(a,b){this.f(this.a,this.f(b,Z.call(this,this.c(b),this.c(this.a),!0)))},function(a,b){this.f(b,Z.call(this,this.c(b),this.c(this.a)));this.f(b+1&15,this.o)},function(a,b){this.f(b,Z.call(this,this.c(b),this.a));this.f(b+1&15,this.o)},function(a,b){this.f(this.a,Z.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Z.call(this,this.c(b),this.c(this.a))));this.f(b+1&15,this.o)},function(a,b){a=X.call(this,this.c(b),0,this.c(this.a));0>a||(this.f(b,a),this.f(b+1& -15,this.o))},function(a,b){a=X.call(this,this.c(b),0,this.a);0>a||(this.f(b,a),this.f(b+1&15,this.o))},function(a,b){a=X.call(this,this.c(b),0,this.c(this.a));0>a||this.f(this.a,a)},function(a,b){a=X.call(this,this.c(b),0,this.c(this.a));0>a||this.f(b,this.f(this.a,a))},function(a,b){a=this.c(b);var c=this.c(b+1&15),c=X.call(this,c,a,this.c(this.a));0>c||(this.f(b,c),this.f(b+1&15,this.o))},function(a,b){a=this.c(b);var c=this.c(b+1&15),c=X.call(this,c,a,this.a);0>c||(this.f(b,c),this.f(b+1&15,this.o))}, -function(a,b){a=this.c(b);b=this.c(b+1&15);b=X.call(this,b,a,this.c(this.a));0>b||this.f(this.a,b)},function(a,b){a=this.c(b);var c=this.c(b+1&15),c=X.call(this,c,a,this.c(this.a));0>c||(this.f(b,this.f(this.a,c)),this.f(b+1&15,this.o))},function(a,b){var c=(this.a<<14>>14)%256;if(c){a=this.c(b);var d=a>P?-(O-a):a;0d?M:0,c=L):(d=d*Math.pow(2,c)%M,c=M-Math.pow(2,35-c)),a<=P?a+c>P&&(this.g|=131072):a-c<=P&&(this.g|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+O:d;this.f(b, -a)}},function(a,b){if(a=(this.a<<14>>14)%36){var c=this.c(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%O+Math.trunc(c/Math.pow(2,36-a));this.f(b,c)}},function(a,b){if(a=(this.a<<14>>14)%256){var c=this.c(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.f(b,c)}},function(a,b){a=0;var c=this.c(b);if(c){for(;c>14)%256){var c,d=this.c(b),e=this.c(b+1&15);if(0L&&dL&&eP&&(this.g|=131072):e-c<=P&&(this.g|=131072);e=0;f>L&&(d+=M,e+=M)}else d=d*Math.pow(2,a)%M+Math.trunc(e%M/Math.pow(2,35-a)),e=e*Math.pow(2,a)%M,c=M-Math.pow(2,35-a),f<=P?f+c>P&&(this.g|=131072):(f-c<=P&&(this.g|=131072),d+=M,e+=M)}else-36>=a?(e=-72>=a?d>L?N:0:Math.trunc(d%M/Math.pow(2,-a-35)),d<=L?d=0:(d=N,e+=M)):(c=d>L?O-Math.pow(2,36+a):0,e=Math.trunc(e%M/Math.pow(2,-a))+d%M*Math.pow(2, -35+a)%M,d=Math.trunc(d/Math.pow(2,-a))+c,d>L&&(e+=M));this.f(b,d);this.f(b+1&15,e)}},function(a,b){if(a=(this.a<<14>>14)%72){var c=this.c(b),d=this.c(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%O+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%O+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%O+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%O+Math.trunc(d/Math.pow(2,72-a)));this.f(b,c);this.f(b+1&15,d)}},function(a,b){if(a=(this.a<<14>>14)%256){var c=this.c(b),d=this.c(b+1&15);0< -a?36<=a?(c=72<=a?0:d*Math.pow(2,a-36)%O,d=0):(c=c*Math.pow(2,a)%O+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%O):-36>=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%O,c=Math.trunc(c/Math.pow(2,-a)));this.f(b,c);this.f(b+1&15,d)}},T,function(a,b){a=this.c(b);this.f(b,this.c(this.a));this.f(this.a,a)},function(a,b){a=!1;for(var c=this.c(b),d=c/K|0,c=c&J;!a;)this.f(c,this.c(d)),c==this.a&&(a=!0),d=d+1&J,c=c+1&J,this.h.B||(this.f(b,d*K+c),a|| -(this.j=(this.j+-1)%I),a=!0)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a,b){a=b<<14;this.g&a&&(this.g&=~a,this.j=this.a%I)},function(){this.da=this.a},T,function(a){this.b(a)},function(a,b){a=this.c(b);a+=262145;this.f(a&J,this.c(this.a));a>=O&&(a-=O);a/K|0||(this.g|=262144);this.f(b,a)},function(a,b){a=this.c(b);var c=this.c(a&J);this.f(this.a,c);this.a==b&&(a=c);a-=262145;0>a&&(a+=O);(a/K|0)==J&&(this.g|=262144);this.f(b,a)},function(a){this.b(a)},function(){this.f(this.a, -(this.g&J)*K+this.j);this.j=(this.a+1)%I},function(a,b){this.f(b,(this.g&J)*K+this.j);this.j=this.a%I},function(a){this.b(a)},function(a){this.b(a)},function(a,b){this.f(b,Kc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b,Kc.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,Kc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Kc.call(this,this.c(b),this.c(this.a))))},function(a,b){this.f(b,Tc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b, -Tc.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,Tc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Tc.call(this,this.c(b),this.c(this.a))))},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},mc,mc,function(){this.f(this.a,0)},function(a,b){this.f(this.a,this.f(b,0))},function(a,b){this.f(b,W.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b,W.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,W.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,W.call(this,this.c(b),this.c(this.a))))},function(a,b){this.f(b, -W.call(this,N-this.c(b),this.c(this.a)))},function(a,b){this.f(b,W.call(this,N-this.c(b),this.a))},function(a,b){this.f(this.a,W.call(this,N-this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,W.call(this,N-this.c(b),this.c(this.a))))},jc,kc,Ic,jc,function(a,b){this.f(b,W.call(this,this.c(b),N-this.c(this.a)))},function(a,b){this.f(b,W.call(this,this.c(b),N-this.a))},function(a,b){this.f(this.a,W.call(this,this.c(b),N-this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,W.call(this, -this.c(b),N-this.c(this.a))))},Ic,Ic,lc,lc,function(a,b){this.f(b,Qc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b,Qc.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,Qc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Qc.call(this,this.c(b),this.c(this.a))))},function(a,b){this.f(b,Y.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b,Y.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,Y.call(this,this.c(b),this.c(this.a)))},function(a, -b){this.f(this.a,this.f(b,Y.call(this,this.c(b),this.c(this.a))))},function(a,b){this.f(b,W.call(this,N-this.c(b),N-this.c(this.a)))},function(a,b){this.f(b,W.call(this,N-this.c(b),N-this.a))},function(a,b){this.f(this.a,W.call(this,N-this.c(b),N-this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,W.call(this,N-this.c(b),N-this.c(this.a))))},function(a,b){this.f(b,Rc.call(this,this.c(b),this.c(this.a)))},function(a,b){this.f(b,Rc.call(this,this.c(b),this.a))},function(a,b){this.f(this.a,Rc.call(this, -this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Rc.call(this,this.c(b),this.c(this.a))))},nc,nc,function(a,b){this.f(this.a,N-this.c(b))},function(a,b){this.f(this.a,this.f(b,N-this.c(b)))},function(a,b){this.f(b,Y.call(this,N-this.c(b),this.c(this.a)))},function(a,b){this.f(b,Y.call(this,N-this.c(b),this.a))},function(a,b){this.f(this.a,Y.call(this,N-this.c(b),this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Y.call(this,N-this.c(b),this.c(this.a))))},function(a,b){this.f(b, -N-this.c(this.a))},function(a,b){this.f(b,N-this.a)},function(){this.f(this.a,N-this.c(this.a))},function(a,b){this.f(this.a,this.f(b,N-this.c(this.a)))},function(a,b){this.f(b,Y.call(this,this.c(b),N-this.c(this.a)))},function(a,b){this.f(b,Y.call(this,this.c(b),N-this.a))},function(a,b){this.f(this.a,Y.call(this,this.c(b),N-this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Y.call(this,this.c(b),N-this.c(this.a))))},function(a,b){this.f(b,Y.call(this,N-this.c(b),N-this.c(this.a)))},function(a, -b){this.f(b,Y.call(this,N-this.c(b),N-this.a))},function(a,b){this.f(this.a,Y.call(this,N-this.c(b),N-this.c(this.a)))},function(a,b){this.f(this.a,this.f(b,Y.call(this,N-this.c(b),N-this.c(this.a))))},oc,oc,function(){this.f(this.a,N)},function(a,b){this.f(this.a,this.f(b,N))},pc,rc,sc,tc,uc,vc,wc,xc,pc,rc,sc,tc,uc,vc,wc,xc,pc,rc,sc,tc,uc,vc,wc,xc,pc,rc,sc,tc,uc,vc,wc,xc,yc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,yc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,yc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,yc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V, -V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],Hc=[function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a,b){switch(b){case 0:a=this.c(this.a);a&8&&(this.g&=-131073);a&131072&&(this.g&=-262145);break;default:this.b(a)}},function(a,b){switch(b){case 0:a=0;this.g&131072&&(a|=8);this.g&262144&&(a|=65536);this.f(this.a,a);break;default:this.b(a)}},function(a){this.b(a)},function(a){this.b(a)}]; -function Uc(a){w.call(this,"ROM",a);this.O=this.a=null;this.l=+a.addr;this.g=+a.size;this.b=a.alias;"string"==typeof this.b&&(this.b=eval(this.b));this.j=a.file;this.o=la(this.j);if(this.j){a=this.j;var b=ma(this.o);"json"!=b&&"hex"!=b&&(a=oa()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Ja(c.va,a,b),(a=ta(a,b))?(c.a=a.H,c.O=a.O):c.j=null);Vc(c)})}}n(Uc,w); -Uc.prototype.Z=function(a,b,c,d){this.s=b;this.i=c;this.w=d;Vc(this)};Uc.prototype.V=function(){this.O&&(this.w&&this.w.a(this.id,this.l,this.g,this.O),delete this.O);return!0};Uc.prototype.R=function(){return!0}; -function Vc(a){if(!Ta(a)){if(a.j){if(!a.a||!a.s)return;a.g||(a.g=a.a.length);if(a.a.length!=a.g){var b="ROM size ("+ka(a.a.length,8,!0)+") does not match specified size ("+ka(a.g,8,!0)+")";a.h.error=!0;a.G(b)}else{b=a.l;if(Cb(a.s,b,a.g,Kb)){var c;for(c=0;c>>f.b;0>>=f.b;0>>a.b;0g&&g>=-Xa&&(g+=O);for(var g=Math.trunc(Math.abs(g))%O,h=d;f--&&h=p.Sa&&c<=p.cb&&(b=c-(p.Sa-p.Za));b&&(a.preventDefault&&a.preventDefault(),d.Ca(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==p.ab&&(b=p.$a);d.Ca(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ca(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.Z=function(a,b,c,d){this.u=a;this.s=b;this.i=c;this.w=d;G(this)}; -k.Ya=function(a){if(!this.a){var b=Tb(this.u,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ra(c[0]);if(d!=this.ua)return;c=ra(c[1]);if(this.a=Na(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.g);if(this.l=e.receiveData){this.g=a;this.status("Connected "+this.va+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.V=function(a,b){if(!b)if(this.Ya(this.g),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -k.R=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new R(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.Ca=function(a){if("number"==typeof a)this.b.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d\nLicense: GPL version 3 or later ");for(b=0;bdd){if(ed(d,this.C)){this.l=new R(this,"1.34.2",nd);ed(this.l)&&(od(this,d),a=pd,qd(this.l));this.l.set(kd,sa());rd(this.l);var e=this.a&&!this.A;if(a==ld||Ma("Click OK to restore the previous "+H+" machine state, or CANCEL to reset the machine.")){if(c=jd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ed(d,g):("error"==f&&"no machine state"!= -g?(this.G("Error: "+g),"unable to verify user"==g&&(ya(sd,""),this.b=null)):this.M(f+": "+g),qd(d),ed(d)?(c=jd(d),e=!0):c=!1))}e&&hd(this,c?d:null)}else a==pd&&d.clear()}else hd(this);delete this.C;delete this.v}e=z(this.id);for(f=0;fa[1];a=a[2];this.N=!0;this.h.F=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.i&&(td(this,this.i,b,c,a),vb(this,-2),this.i.J());this.K&&(od(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.j=0}; -function od(a,b){if(Ma("There may be a problem with your "+H+" machine.\n\nTo help us diagnose it, click OK to send this "+H+" machine state to http://www.pcjs.org.")){var c=a.X;a=a.b||"";b=b.toString();var d={};d.app=H;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function ud(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new R(a,"1.34.2"),g=new R(a,"1.34.2",id),h=sa();g.set(kd,h);f.set(kd,h);f.set(vd,"1.34.2");f.set(wd,window?window.location.href:null);f.set(xd,window?window.navigator.userAgent:"");a.i&&a.i.R&&(c&&(b&&(a.i.h.J=a.i.h.B),S(a.i)),d=a.i.R(b,c),"object"===typeof d&&f.set(a.i.id,d),c&&(a.i.h.F=!1,!1===d&&(e=null)));for(var h=z(a.id),l=0;l=d||30<=(c.Fa+=d))&&(e.textContent=c.h.B?c.W.toFixed(2)+"Mhz":"Stopped",c.Fa=0)}if(a.g&&(a=a.g,b=b||0,a.C)){c=a.i.h.B;d=!!(a.i.l&8);if(0>=b||60<=(a.A+=b)){e=a.i.j;if(a.m.PC){var f=a.w&&a.w.l||8,e=e||0,e=8==f?ja(e,void 0):ka(e,void 0);a.m.PC.textContent!=e&&(a.m.PC.textContent=e)}a.A=0}-1>b?a.b=a.i.j:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(B){g=null,a=B.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(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],q,x=/( [a-z]+=)(['"])(.*?)\2/g;q=x.exec(f);)l=0>l.indexOf(q[1])?l.replace(">",q[0]+">"):l.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[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);Fd(a,b,c)}})}else c(a,null)} -function Gd(a,b,c,d,e){function f(a){if(void 0===l){var b=h&&F(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function g(a){f("Error: "+a);q&&(--Cd||Fa(!0));q=!1}var h,l,q=!0;Cd++;Ka[b]={};try{if(h=document.getElementById(b)){var x;if("object"==typeof resources&&(x=resources.css)){var B=document.head||document.getElementsByTagName("head")[0],wa=document.createElement("style");wa.type="text/css";wa.styleSheet?wa.styleSheet.cssText=x:wa.appendChild(document.createTextNode(x));B.appendChild(wa)}d|| -(x=a,"pdp"==a.substr(0,3)&&(x="pdpjs"),d="/versions/"+x+"/1.34.2/components.xsl");x=function(e,l){l?Dd(d,null,a,null,!1,f,function(a,e){e?(Ja(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(h.outerHTML=e,--Cd||Fa(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Cd|| -Fa(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Dd(c,b,a,e,!0,f,x):Ed(c,null,b,a,e,!1,f,x)}else g("missing machine element: "+b)}catch(Hd){g(Hd.message)}return q}window.embedPDP10=function(a,b,c,d){Fa(!1);return Gd("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){Fa(!1);return Gd("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return A(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Pa[a]){for(var c=!0,d=Pa,e=a,f=b.length,g=[],h=[],l="",q=null,x=0;x>>a.f];a.h++;b=c.h(b&16383,b);a.h--;a=b}else a=this.j.b(this.f);gb(this,this.h=a)}};k.ob=function(a){a||this.j.i.B||mb(this,this.g)};k.nb=function(a){a?(this.o=!0,jb(this,!0)):(this.o=!1,jb(this),nb(this,0))};k.pb=function(a,b){this.g=a?this.g|1<c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.a["S"+b][1]=a.g&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.f;0f&&(r=f);if(h&&h.size){if(h.type==d){if(e+f<=h.ea)return h.Da+=h.ea-e,h.ea=e,!0;if(e>=h.ea+h.Da){r=h.size-(e-l);r>f&&(r=f);h.Da=e-h.ea+r;e=l+16384;f-=r;g++;continue}}return Gb(Hb,e,f)}e=new Cb(a,e,r,16384,d);Db(e,h);a.a[g++]=e;e=l+16384;f-=r}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Ib[d]+" at "+ja(b)),!0):Gb(Jb,b,c)} +function Ab(a,b,c){var d=a.a[(b&a.g)>>>a.f];a.h++;d.g(c,b&16383,b);a.h--}function Eb(a){for(var b=0,c=[],d=0;d=a.ha&&(a.ha+=a.na,c=!0);0<=a.oa&&a.oa<=Zb(a)&&(a.na=a.oa=-1,Yb(a),O(a),c=!0);c&&a.M(Zb(a)+" cycles: checksum="+ka(a.wa))}} +k.U=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.m[b]=c,!0;case "run":return this.m[b]=c,c.onclick=function(){var a;if(a=d.v)if(a=d.v,a.i.F)a=!0;else{var b=null,c,h=x(a.id);for(c=0;ca.W/a.ga&&(b=1);a.ia=b;b=a.Ha*a.ia;if(a.ga!=b){a.ga=b;b=a.ga.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.M("target speed: "+b)}c&&a.v&&(c=a.v,c.fa&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.fa.focus(),window&&window.scrollTo(b,d)))}wb(a,a.D);a.D=0;a.C=Ma();a.K=0;ac(a)}function cc(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function dc(a,b){var c=a.L-=a.N;a.N=0;b&&(a.L=0);return c} +k.xb=function(){if(this.i.B){this.ya>=this.Ja&&ac(this,!0);this.aa=0;this.ma=Ma();if(this.K){var a=this.ma-this.K;a>this.Ia&&(this.C+=a,this.C>this.ma&&(this.C=this.ma))}try{do{for(var b,c=this.i.Aa?1:this.pa,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Ea(b)}catch(f){if("number"!=typeof f)throw f;}b=dc(this,!0);this.aa+=b;this.D+=b;xb(this,b);vb(this,b);this.ja-=b;if(0>=this.ja){this.ja+=this.pa;++this.Ka>=ec&&(this.v&&yb(this.v,void 0),this.Ka=0);break}}while(this.i.B)}catch(f){O(this); +this.v&&this.v.stop(Ma(),Zb(this));a=f.stack||f.message;this.i.error=!0;this.G(a);return}if(this.i.B){a=setTimeout;b=this.Va;this.K=Ma();c=this.Ia;this.aa&&(c=Math.round(c*this.aa/this.pa));c-=this.K-this.ma;if(d=this.K-this.C)this.W=Math.round(this.D/(10*d))/100,864E5<=d&&(this.P=0,$b(this));if(0>c||this.Wc&&(this.C-=c),c=0;this.ya+=this.aa;this.K+=c;a(b,c)}}}; +function ub(a){var b;a.i.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.B)a.M(a.toString()+" busy");else{$b(a);a.i.B=!0;a.i.Pa=!0;if(b=a.m.run)b.textContent="Halt";a.v&&a.v.start(a.C,Zb(a));a.w||a.status("Started");setTimeout(a.Va,0)}}k.Ea=function(){return 0};function O(a){var b=!1;if(a.i.B){dc(a);wb(a,a.D);a.D=0;a.i.B=!1;if(b=a.m.run)b.textContent="Run";a.v&&a.v.stop(Ma(),Zb(a));b=!0;a.w||a.status("Stopped")}a.i.complete=void 0;return b}var bc=30,ec=15,Vb=["power","reset"]; +function fc(a){var b=+a.model||1001;Ub.call(this,a,1E6);this.eb=b;this.ta=+a.addrReset||0;this.fb=gc.bind(this);this.f=P.bind(this);this.la=null;this.Ua=[];this.i.complete=!1}n(fc,Ub);k=fc.prototype;k.reset=function(){this.status("Model "+this.eb);this.i.B&&O(this);this.a=this.A=this.qa=0;this.g=this.Ga=this.ta;this.u=this.da=-1;this.o=this.h=0;this.La=[0,0];this.ba=[0,0];this.X=[0,0];this.ca=[0,0];this.ka=this.g;this.l=0;this.b=this.tb;this.c=this.Eb;this.la=null;Xb(this);this.i.error=!1;Ub.prototype.reset.call(this)}; +k.Xa=function(){return 0};k.save=function(){var a=new M(this);a.set(0,[this.a,this.A,this.qa,this.g,this.da,this.u,this.h,this.l,this.Ga,this.ka,this.ta]);a.set(1,[]);a.set(2,[this.P,this.ia,this.i.J]);a.set(3,hc(this));a.set(4,cc(this));return a.data()}; +k.restore=function(a){var b;b=a[0];ea();ba();ea();var c=b[Symbol.iterator];b=c?c.call(b):fa(b);this.a=b.next().value;this.A=b.next().value;this.qa=b.next().value;this.g=b.next().value;this.da=b.next().value;this.u=b.next().value;this.h=b.next().value;this.l=b.next().value;this.Ga=b.next().value;this.ka=b.next().value;this.ta=b.next().value;b=a[2];this.P=b[0];$b(this,b[1]);this.i.J=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.f].b(a&16383,a)};k.Eb=function(a,b){var c=this.s;a=this.ka=a;c.a[(a&c.g)>>>c.f].c(b,a&16383,a);return b}; +k.Ea=function(a){this.i.complete=!0;var b=a?this.i.Pa?0:1:-1;this.i.Pa=!1;this.L=this.N=a;this.l=this.l&-5|0;do{if(a=this.l)if(a=this.l&11)this.l&2?this.la||(this.l&=-3):this.l&1&&this.l++,a=!1;if(a){if(this.l&4&&this.w.h(this.g,b)){O(this);break}if(0>b)break}this.l&=15;this.A&4194304?this.A=this.b(this.a):0<=this.da?(this.A=this.qa=this.b(this.da),this.da=-1):(this.A=this.qa=this.b(this.Ga=this.g),this.g=(this.g+1)%Za);this.A&=8388607;this.a=this.A&262143;if(a=this.A>>18&15)this.a=this.a+this.b(a)& +Ya;a=this.A&4194304?-1:this.qa/cb|0;0<=a&&this.fb(a)}while(0>4].call(this,a,a&15)}function Q(a){this.f(a)}function jc(){var a=0,b=this.b(this.a),c=b/db&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*db+(d<<24)+(b&16777215);a&&(b=(b+a)%K);this.c(this.a,b)} +function kc(a,b){a=this.b(this.a);if(0>this.u)this.u=a,this.A=this.a|4194304;else{var c=this.u/db&63,d=this.u>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.c(b,a);this.u=-1}}function lc(a,b){a=this.b(this.a);if(0>this.u)this.u=a,this.A=this.a|4194304;else{var c=this.u/db&63,d=this.u>>24&63;b=this.b(b)%Math.pow(2,d)*Math.pow(2,c)%K;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.c(this.a,a);this.u=-1}}function mc(a,b){this.c(b,this.b(this.a))} +function nc(a,b){this.c(b,this.a)}function oc(a,b){this.c(this.a,this.b(b))}function pc(a,b){this.c(b,0)}function qc(a,b){this.c(b,J-this.b(b))}function rc(a,b){this.c(b,J)}function sc(a,b){var c=this.b(this.a),d=this.b(b);this.c(b,tc(a,d,c)+(c-(c&E)))}function uc(a,b){var c=this.b(b);this.c(b,tc(a,c,0))}function vc(a,b){b=this.b(b);var c=this.b(this.a);this.c(this.a,tc(a,c,b)+(b-(b&E)))} +function wc(a,b){var c=this.b(this.a),d=c;if(a&=384)switch(d-=d&E,a){case 256:d+=E;break;case 384:d+=c>H?E:0}c=d;this.c(this.a,c);b&&this.c(b,c)}function xc(a,b){var c=(this.b(this.a)&E)*G,d=this.b(b);this.c(b,tc(a,d,c)+c)}function yc(a,b){var c=this.a*G,d=this.b(b);this.c(b,tc(a,d,c)+c)}function zc(a,b){b=(this.b(b)&E)*G;var c=this.b(this.a);this.c(this.a,tc(a,c,b)+b)}function Ac(a,b){var c=this.b(this.a),d=(c&E)*G,c=tc(a,c,d)+d;this.c(this.a,c);b&&this.c(b,c)} +function Bc(a,b){var c=this.b(this.a)&E,d=this.b(b);this.c(b,Cc(a,d,c)+c)}function Dc(a,b){var c=this.b(b);this.c(b,Cc(a,c,this.a)+this.a)}function Ec(a,b){b=this.b(b)&E;var c=this.b(this.a);this.c(this.a,Cc(a,c,b)+b)}function Fc(a,b){var c=this.b(this.a),d=c;if(a&=384)switch(d&=E,a){case 256:d+=E*G;break;case 384:d+=c>$a?E*G:0}c=d;this.c(this.a,c);b&&this.c(b,c)}function Gc(a,b){var c=this.b(this.a)/G|0,d=this.b(b);this.c(b,Cc(a,d,c)+c)}function Hc(a,b){var c=this.b(b);this.c(b,Cc(a,c,0))} +function Ic(a,b){b=this.b(b)/G|0;var c=this.b(this.a);this.c(this.a,Cc(a,c,b)+b)}function Jc(a,b){var c=this.b(this.a),d=c/G|0,c=Cc(a,c,d)+d;this.c(this.a,c);b&&this.c(b,c)}function R(a){Kc[a&7].call(this,a,a>>3&127)}function Lc(){}function Mc(){}function P(a){this.M("undefined opcode: "+ja(a));this.g=(this.g+-1)%Za;O(this)}function Nc(a){a>H&&(a!=I?a=bb-a:this.h|=163840);return a}function S(a,b){var c=(a+b)%K;Oc.call(this,a,b,c);return c}function T(a,b){return((a/L|0)&(b/L|0))*L+((a&b)>>>0)} +function U(a,b){return(aH&&(c=K-c,d=!d);b>H&&(a?(b=J-b,a=K-a):b&&(b=K-b),e=!0,d=!d);if(b>=c)return this.h|=131104,-1;f=this.La;f[0]=0;f[1]=0;f=this.ba;f[0]=1;f[1]=0;f=this.X;f[0]=c;f[1]=0;c=this.ca;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=K,b[1]--),Qc(this.La,this.ba),Rc(this.ca)))break;Sc(this.X);Sc(this.ba)}while(!Rc(this.ba)); +a=this.La[0];this.o=this.ca[0];d&&a&&(a=K-a);e&&this.o&&(this.o=K-this.o);return a}function Tc(a,b){return((a/L|0)^(b/L|0))*L+((a^b)>>>0)}function Uc(a,b){return(~((a/L|0)^(b/L|0))&15)*L+(~(a^b)>>>0)}function W(a,b){return(a/L|0|b/L|0)*L+((a|b)>>>0)} +function X(a,b,c){var d=a,e=b;b=!1;var f;d>H&&(d=K-d,b=!b);e>H&&(e=K-e,b=!b);if(dH)&&(f!=J||a<=H)&&(this.h|=131072),a;c=a;b=f;a=b-b%I;b=2*b%K+Math.trunc(c/I);c=a+c%I;d=b-b%I;a!=d&&(b=a+(b-d),this.h|=131072);this.o=c;return b} +function Vc(a){a?a==I?this.h|=163840:a=bb-a:this.h|=98304;return a}function Y(a){return ac&&(c+=K);Oc.call(this,c,b,a);return c}function Oc(a,b,c){a=Math.trunc(a/ab);b=Math.trunc(b/ab);c=Math.trunc(c/ab);var d=a^(a^b)&(b^c);this.h=this.h|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function Cc(a,b,c){switch(a&384){case 0:b-=b&E;break;case 128:b=0;break;case 256:b=E*G;break;case 384:b=c>$a?E*G:0}return b} +function tc(a,b,c){switch(a&384){case 0:b&=E;break;case 128:b=0;break;case 256:b=E;break;case 384:b=c>H?E:0}return b}function Qc(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=K&&(a[0]%=K,a[1]++)}function Pc(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function Sc(a){a[1]%2&&(a[0]+=K);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function Rc(a){return!a[0]&&!a[1]} +var ic=[Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},jc,function(a,b){0>this.u&&jc.call(this);kc.call(this,0,b)},kc,function(a,b){0>this.u&&jc.call(this);lc.call(this,0,b)},lc,function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, +function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)}, +function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},function(a){this.f(a)},mc,nc,oc,function(a,b){b&&this.c(b,this.b(this.a))},function(a,b){a=this.b(this.a);a=(a/G|0)+a%G*G;this.c(b,a)},function(a,b){this.c(b,this.a*G)},function(a,b){a=this.b(b);a=(a/G|0)+a%G*G;this.c(this.a,a)},function(a,b){a=this.b(this.a);a=(a/G|0)+a%G*G;this.c(this.a,a);b&&this.c(b,a)},function(a,b){this.c(b,Vc.call(this,this.b(this.a)))},function(a,b){this.c(b,Vc.call(this,this.a))},function(a,b){this.c(this.a, +Vc.call(this,this.b(b)))},function(a,b){a=Vc.call(this,this.b(this.a));this.c(this.a,a);b&&this.c(b,a)},function(a,b){this.c(b,Nc.call(this,this.b(this.a)))},function(a,b){this.c(b,this.a)},function(a,b){this.c(this.a,Nc.call(this,this.b(b)))},function(a,b){a=Nc.call(this,this.b(this.a));this.c(this.a,a);b&&this.c(b,a)},function(a,b){this.c(b,X.call(this,this.b(b),this.b(this.a),!0))},function(a,b){this.c(b,X.call(this,this.b(b),this.a,!0))},function(a,b){this.c(this.a,X.call(this,this.b(b),this.b(this.a), +!0))},function(a,b){this.c(this.a,this.c(b,X.call(this,this.b(b),this.b(this.a),!0)))},function(a,b){this.c(b,X.call(this,this.b(b),this.b(this.a)));this.c(b+1&15,this.o)},function(a,b){this.c(b,X.call(this,this.b(b),this.a));this.c(b+1&15,this.o)},function(a,b){this.c(this.a,X.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,X.call(this,this.b(b),this.b(this.a))));this.c(b+1&15,this.o)},function(a,b){a=V.call(this,this.b(b),0,this.b(this.a));0>a||(this.c(b,a),this.c(b+1& +15,this.o))},function(a,b){a=V.call(this,this.b(b),0,this.a);0>a||(this.c(b,a),this.c(b+1&15,this.o))},function(a,b){a=V.call(this,this.b(b),0,this.b(this.a));0>a||this.c(this.a,a)},function(a,b){a=V.call(this,this.b(b),0,this.b(this.a));0>a||this.c(this.a,a)},function(a,b){a=this.b(b);var c=this.b(b+1&15),c=V.call(this,c,a,this.b(this.a));0>c||(this.c(b,c),this.c(b+1&15,this.o))},function(a,b){a=this.b(b);var c=this.b(b+1&15),c=V.call(this,c,a,this.a);0>c||(this.c(b,c),this.c(b+1&15,this.o))},function(a, +b){a=this.b(b);b=this.b(b+1&15);b=V.call(this,b,a,this.b(this.a));0>b||this.c(this.a,b)},function(a,b){a=this.b(b);var c=this.b(b+1&15),c=V.call(this,c,a,this.b(this.a));0>c||(this.c(b,this.c(this.a,c)),this.c(b+1&15,this.o))},function(a,b){var c=(this.a<<14>>14)%256;if(c){a=this.b(b);var d=a>H?-(K-a):a;0d?I:0,c=H):(d=d*Math.pow(2,c)%I,c=I-Math.pow(2,35-c)),a<=H?a+c>H&&(this.h|=131072):a-c<=H&&(this.h|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+K:d;this.c(b,a)}}, +function(a,b){if(a=(this.a<<14>>14)%36){var c=this.b(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%K+Math.trunc(c/Math.pow(2,36-a));this.c(b,c)}},function(a,b){if(a=(this.a<<14>>14)%256){var c=this.b(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.c(b,c)}},function(a,b){a=0;var c=this.b(b);if(c){for(;c>14)%256){var c,d=this.b(b),e=this.b(b+1&15);if(0H&&dH&&eH&&(this.h|=131072):e-c<=H&&(this.h|=131072);e=0;f>H&&(d+=I,e+=I)}else d=d*Math.pow(2,a)%I+Math.trunc(e%I/Math.pow(2,35-a)),e=e*Math.pow(2,a)%I,c=I-Math.pow(2,35-a),f<=H?f+c>H&&(this.h|=131072):(f-c<=H&&(this.h|=131072),d+=I,e+=I)}else-36>=a?(e=-72>=a?d>H?J:0:Math.trunc(d%I/Math.pow(2,-a-35)),d<=H?d=0:(d=J,e+=I)):(c=d>H?K-Math.pow(2,36+a):0,e=Math.trunc(e%I/Math.pow(2,-a))+d%I*Math.pow(2,35+ +a)%I,d=Math.trunc(d/Math.pow(2,-a))+c,d>H&&(e+=I));this.c(b,d);this.c(b+1&15,e)}},function(a,b){if(a=(this.a<<14>>14)%72){var c=this.b(b),d=this.b(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%K+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%K+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%K+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%K+Math.trunc(d/Math.pow(2,72-a)));this.c(b,c);this.c(b+1&15,d)}},function(a,b){if(a=(this.a<<14>>14)%256){var c=this.b(b),d=this.b(b+1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%K,c=Math.trunc(c/Math.pow(2,-a)));this.c(b,c);this.c(b+1&15,d)}},P,function(a,b){a=this.b(b);this.c(b,this.b(this.a));this.c(this.a,a)},function(a,b){a=!1;for(var c=this.b(b),d=c/G|0,c=c&E;!a;)this.c(c,this.b(d)),c==this.a&&(a=!0),d=d+1&E,c=c+1&E,this.i.B||(this.c(b,d*G+c),a||(this.g= +(this.g+-1)%Za),a=!0)},function(a,b){a=(this.b(b)+262145)%J;this.c(b,a);a=I&&N(this,this.a)},function(a){this.f(a)},function(a,b){a=b<<14;this.h&a&&(this.h&=~a,N(this,this.a))},function(){this.da=this.a},P,function(a){this.f(a)},function(a,b){a=this.b(b);a+=262145;this.c(a&E,this.b(this.a));a>=K&&(a-=K);a/G|0||(this.h|=262144);this.c(b,a)},function(a,b){a=this.b(b);var c=this.b(a&E);this.c(this.a,c);this.a==b&&(a=c);a-=262145; +0>a&&(a+=K);(a/G|0)==E&&(this.h|=262144);this.c(b,a)},function(a){this.f(a)},function(){this.c(this.a,(this.h&E)*G+this.g);N(this,this.a+1)},function(a,b){this.c(b,(this.h&E)*G+this.g);N(this,this.a)},function(a){this.f(a)},function(a){this.f(a)},function(a,b){this.c(b,S.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(b,S.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,S.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,S.call(this,this.b(b),this.b(this.a))))}, +function(a,b){this.c(b,Z.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(b,Z.call(this,this.b(b),this.a))},function(a,b){this.c(this.a,Z.call(this,this.b(b),this.b(this.a)))},function(a,b){this.c(this.a,this.c(b,Z.call(this,this.b(b),this.b(this.a))))},Lc,function(a,b){0>U.call(this,this.b(b),this.a)&&N(this,this.g+1)},function(a,b){U.call(this,this.b(b),this.a)||N(this,this.g+1)},function(a,b){0>=U.call(this,this.b(b),this.a)&&N(this,this.g+1)},function(){N(this,this.g+1)},function(a, +b){0<=U.call(this,this.b(b),this.a)&&N(this,this.g+1)},function(a,b){U.call(this,this.b(b),this.a)&&N(this,this.g+1)},function(a,b){0U.call(this,this.b(b),this.b(this.a))&&N(this,this.g+1)},function(a,b){U.call(this,this.b(b),this.b(this.a))||N(this,this.g+1)},function(a,b){0>=U.call(this,this.b(b),this.b(this.a))&&N(this,this.g+1)},function(){N(this,this.g+1)},function(a,b){0<=U.call(this,this.b(b),this.b(this.a))&&N(this,this.g+ +1)},function(a,b){U.call(this,this.b(b),this.b(this.a))&&N(this,this.g+1)},function(a,b){0Y.call(this,this.b(b))&&N(this,this.a)},function(a,b){Y.call(this,this.b(b))||N(this,this.a)},function(a,b){0>=Y.call(this,this.b(b))&&N(this,this.a)},function(){N(this,this.a)},function(a,b){0<=Y.call(this,this.b(b))&&N(this,this.a)},function(a,b){Y.call(this,this.b(b))&&N(this,this.a)},function(a,b){0Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);Y.call(this,a)||N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);0>=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){N(this,this.g+1);b&&this.c(b,this.b(this.a))},function(a,b){a=this.b(this.a);0<=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);Y.call(this,a)&&N(this,this.g+ +1);b&&this.c(b,a)},function(a,b){a=this.b(this.a);0Y.call(this,a)&&N(this,this.a)},function(a,b){a=this.c(b,S.call(this,this.b(b),1));Y.call(this,a)||N(this,this.a)},function(a,b){a=this.c(b,S.call(this,this.b(b),1));0>=Y.call(this,a)&&N(this,this.a)},function(a,b){this.c(b,S.call(this,this.b(b),1));N(this,this.a)},function(a,b){a=this.c(b,S.call(this, +this.b(b),1));0<=Y.call(this,a)&&N(this,this.a)},function(a,b){a=this.c(b,S.call(this,this.b(b),1));Y.call(this,a)&&N(this,this.a)},function(a,b){a=this.c(b,S.call(this,this.b(b),1));0Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1));Y.call(this,a)||N(this,this.g+1);b&& +this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1));0>=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1));N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1));0<=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1));Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,S.call(this,this.b(this.a),1)); +0Y.call(this,a)&&N(this,this.a)},function(a,b){a=this.c(b,Z.call(this,this.b(b),1));Y.call(this,a)||N(this,this.a)},function(a,b){a=this.c(b,Z.call(this,this.b(b),1));0>=Y.call(this,a)&&N(this,this.a)},function(a,b){this.c(b,Z.call(this,this.b(b),1));N(this,this.a)},function(a,b){a=this.c(b,Z.call(this,this.b(b),1));0<=Y.call(this,a)&&N(this,this.a)}, +function(a,b){a=this.c(b,Z.call(this,this.b(b),1));Y.call(this,a)&&N(this,this.a)},function(a,b){a=this.c(b,Z.call(this,this.b(b),1));0Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this,this.b(this.a),1));Y.call(this,a)||N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this, +this.b(this.a),1));0>=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this,this.b(this.a),1));N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this,this.b(this.a),1));0<=Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this,this.b(this.a),1));Y.call(this,a)&&N(this,this.g+1);b&&this.c(b,a)},function(a,b){a=this.c(this.a,Z.call(this,this.b(this.a),1));0>>f.f;0>>=f.f;0>>a.f;0g&&g>=-I&&(g+=K);for(var g=Math.trunc(Math.abs(g))%K,h=d;f--&&h=p.Sa&&c<=p.cb&&(b=c-(p.Sa-p.Za));b&&(a.preventDefault&&a.preventDefault(),d.Ca(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==p.ab&&(b=p.$a);d.Ca(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ca(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.Z=function(a,b,c,d){this.v=a;this.s=b;this.j=c;this.w=d;D(this)}; +k.Ya=function(a){if(!this.a){var b=Wb(this.v,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ra(c[0]);if(d!=this.ua)return;c=ra(c[1]);if(this.a=Oa(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.g);if(this.l=e.receiveData){this.g=a;this.status("Connected "+this.va+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.V=function(a,b){if(!b)if(this.Ya(this.g),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +k.R=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new M(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.Ca=function(a){if("number"==typeof a)this.f.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d\nLicense: GPL version 3 or later ");for(b=0;bfd){if(gd(d,this.C)){this.l=new M(this,"1.34.2",pd);gd(this.l)&&(qd(this,d),a=rd,sd(this.l));this.l.set(md,sa());td(this.l);var e=this.a&&!this.A;if(a==nd||Na("Click OK to restore the previous "+Xa+" machine state, or CANCEL to reset the machine.")){if(c=ld(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gd(d,g):("error"==f&&"no machine state"!= +g?(this.G("Error: "+g),"unable to verify user"==g&&(xa(ud,""),this.f=null)):this.M(f+": "+g),sd(d),gd(d)?(c=ld(d),e=!0):c=!1))}e&&jd(this,c?d:null)}else a==rd&&d.clear()}else jd(this);delete this.C;delete this.u}e=x(this.id);for(f=0;fa[1];a=a[2];this.N=!0;this.i.F=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.j&&(vd(this,this.j,b,c,a),yb(this,-2),this.j.J());this.K&&(qd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.h=0}; +function qd(a,b){if(Na("There may be a problem with your "+Xa+" machine.\n\nTo help us diagnose it, click OK to send this "+Xa+" machine state to http://www.pcjs.org.")){var c=a.X;a=a.f||"";b=b.toString();var d={};d.app=Xa;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;q("http://www.pcjs.org/api/v1/report",d,!0)}} +function wd(a,b,c){var d,e="none";if(a.h)return null;a.h--;var f=new M(a,"1.34.2"),g=new M(a,"1.34.2",kd),h=sa();g.set(md,h);f.set(md,h);f.set(xd,"1.34.2");f.set(yd,window?window.location.href:null);f.set(zd,window?window.navigator.userAgent:"");a.j&&a.j.R&&(c&&(b&&(a.j.i.J=a.j.i.B),O(a.j)),d=a.j.R(b,c),"object"===typeof d&&f.set(a.j.id,d),c&&(a.j.i.F=!1,!1===d&&(e=null)));for(var h=x(a.id),l=0;l=d||30<=(c.Fa+=d))&&(e.textContent=c.i.B?c.W.toFixed(2)+"Mhz":"Stopped",c.Fa=0)}if(a.g&&(a=a.g,b=b||0,a.C)){c=a.j.i.B;d=!!(a.j.l&8);if(0>=b||60<=(a.A+=b)){e=a.j.g;if(a.m.PC){var f=a.w&&a.w.l||8,e=e||0,e=8==f?ja(e,void 0):ka(e,void 0);a.m.PC.textContent!=e&&(a.m.PC.textContent=e)}a.A=0}-1>b?a.f=a.j.g:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(F){g=null,a=F.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(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],r,A=/( [a-z]+=)(['"])(.*?)\2/g;r=A.exec(f);)l=0>l.indexOf(r[1])?l.replace(">",r[0]+">"):l.replace(new RegExp(r[1]+"(['\"])(.*?)\\1"),r[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);Hd(a,b,c)}})}else c(a,null)} +function Id(a,b,c,d,e){function f(a){if(void 0===l){var b=h&&C(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function g(a){f("Error: "+a);r&&(--Ed||Ga(!0));r=!1}var h,l,r=!0;Ed++;La[b]={};try{if(h=document.getElementById(b)){var A;if("object"==typeof resources&&(A=resources.css)){var F=document.head||document.getElementsByTagName("head")[0],za=document.createElement("style");za.type="text/css";za.styleSheet?za.styleSheet.cssText=A:za.appendChild(document.createTextNode(A));F.appendChild(za)}d|| +(A=a,"pdp"==a.substr(0,3)&&(A="pdpjs"),d="/versions/"+A+"/1.34.2/components.xsl");A=function(e,l){l?Fd(d,null,a,null,!1,f,function(a,e){e?(Ka(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(h.outerHTML=e,--Ed||Ga(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Ed|| +Ga(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Fd(c,b,a,e,!0,f,A):Gd(c,null,b,a,e,!1,f,A)}else g("missing machine element: "+b)}catch(Jd){g(Jd.message)}return r}window.embedPDP10=function(a,b,c,d){Ga(!1);return Id("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){Ga(!1);return Id("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return y(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Ra[a]){for(var c=!0,d=Ra,e=a,f=b.length,g=[],h=[],l="",r=null,A=0;A":62,"?":63,"@":64,Kd:65,wi:66,Ci:67,cj:68,E:69,ij:70,lj:71,xj:72,zj:73,Aj:74,Bj:75,Cj:76,Fj:77,Hj:78,Nj:79,Qj:80,Q:81,Sj:82,Vj:83,dk:84,fk:85,hk:86,ik:87,mk:88,nk:89,xf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pk:97,rk:98,uk:99,d:100,e:101,vk:102,wk:103,xk:104,yk:105,Ck:106,k:107,Dk:108,Ek:109,n:110,Fk:111,p:112,q:113,r:114,Gk:115,t:116,Jk:117,Kk:118,Lk:119,x:120, y:121,z:122,"{":123,"|":124,"}":125,"~":126,cc:127}; -function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b,c){var d="";b?32>=1,f--;return d} -function u(a,b,c){b?12"']/g,function(a){return xa[a]})}function ya(a,b){return(a+" ").slice(0,b)}function za(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} -var xa={"&":"&","<":"<",">":">",'"':""","'":"'"},Aa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function Ba(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e} +function pa(a,b,c){var d="";b?32>=1,f--;return d}function u(a,b,c){b?12"']/g,function(a){return xa[a]})}function ya(a,b){return(a+" ").slice(0,b)} +function za(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var xa={"&":"&","<":"<",">":">",'"':""","'":"'"},Aa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function Ba(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function Fa(a,b){var c,d={Z:null,ga:null,ya:null,xa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ya=g.load;d.xa=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c":62,"?":63,"@":64,jd:65,Lh:66,Rh:67,si:68,E:69,yi:70,Bi:71,Ni:72,Pi:73,Qi:74,Ri:75,Si:76,Vi:77,Xi:78,cj:79,fj:80,Q:81,hj:82,kj:83,tj:84,vj:85,xj:86,yj:87,Cj:88,Dj:89,Ke:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ej:97,Gj:98,Jj:99,d:100,e:101,Kj:102,Lj:103,Mj:104,Nj:105,Rj:106,k:107,Sj:108,Tj:109,n:110,Uj:111,p:112,q:113,r:114,Vj:115,t:116,Xj:117,Yj:118,Zj:119,x:120, y:121,z:122,"{":123,"|":124,"}":125,"~":126,Cb:127}; -function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b){b?12"']/g,function(a){return va[a]})}function wa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} -var va={"&":"&","<":"<",">":">",'"':""","'":"'"},xa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function na(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1a&&(a+=Math.pow(b,c)),0>a||a>=Math.pow(b,c))&&(a=null);if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function pa(a,b){b?12"']/g,function(a){return va[a]})} +function wa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var va={"&":"&","<":"<",">":">",'"':""","'":"'"},xa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function ya(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function za(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a, f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}