From b8a38c8ac6294bc339deff0a8398d7ac7a2c0b86 Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 3 Mar 2017 15:58:15 -0800 Subject: [PATCH] Finished PDP-10 logical operations --- modules/pdp10/lib/cpuops.js | 530 ++++++++++++++++++++++------- modules/pdp10/lib/cpustate.js | 2 + modules/pdp10/lib/debugger.js | 2 +- versions/pdpjs/1.34.2/pdp10-dbg.js | 374 ++++++++++---------- versions/pdpjs/1.34.2/pdp10.js | 193 +++++------ 5 files changed, 700 insertions(+), 401 deletions(-) diff --git a/modules/pdp10/lib/cpuops.js b/modules/pdp10/lib/cpuops.js index 559290aa4..d81a3ed65 100644 --- a/modules/pdp10/lib/cpuops.js +++ b/modules/pdp10/lib/cpuops.js @@ -312,7 +312,7 @@ PDP10.opLDB = function(op, acc) }; /** - * opIDPB(0o136000) + * opIDPB(0o136000): Increment Pointer and Deposit Byte * * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-16: * @@ -2584,7 +2584,12 @@ PDP10.opSOSG = function(op, acc) }; /** - * opSETZ(0o400000) and opSETZI(0o401000) + * opSETZ(0o400000): Set to Zeros + * opSETZI(0o401000): Set to Zeros Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M to all 0s. * * @this {CPUStatePDP10} * @param {number} op @@ -2596,7 +2601,11 @@ PDP10.opSETZ = function(op, acc) }; /** - * opSETZM(0o402000) + * opSETZM(0o402000): Set to Zeros Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M to all 0s. * * @this {CPUStatePDP10} * @param {number} op @@ -2608,7 +2617,11 @@ PDP10.opSETZM = function(op, acc) }; /** - * opSETZB(0o403000) + * opSETZB(0o403000): Set to Zeros Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M to all 0s. * * @this {CPUStatePDP10} * @param {number} op @@ -2616,14 +2629,15 @@ PDP10.opSETZM = function(op, acc) */ PDP10.opSETZB = function(op, acc) { - this.writeWord(acc, 0); - this.writeWord(this.regEA, 0); + this.writeWord(this.regEA, this.writeWord(acc, 0)); }; /** - * opAND(0o404000) + * opAND(0o404000): And with AC * - * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand ([E]) and [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2635,9 +2649,11 @@ PDP10.opAND = function(op, acc) }; /** - * opANDI(0o405000) + * opANDI(0o405000): And with AC Immediate * - * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand (E) and [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand (E) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2649,9 +2665,11 @@ PDP10.opANDI = function(op, acc) }; /** - * opANDM(0o406000) + * opANDM(0o406000): And with AC to Memory * - * Change the contents of the destination specified by M ([E]) to the AND function of the specified operand ([E]) and [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E]) to the AND function of the specified operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2663,9 +2681,12 @@ PDP10.opANDM = function(op, acc) }; /** - * opANDB(0o407000) + * opANDB(0o407000): And with AC to Both * - * Change the contents of the destination specified by M ([E] and [AC]) to the AND function of the specified operand ([E]) and [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the AND function of the specified operand ([E]) + * and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2673,13 +2694,16 @@ PDP10.opANDM = function(op, acc) */ PDP10.opANDB = function(op, acc) { - var result = PDP10.doAND(this.readWord(acc), this.readWord(this.regEA)); - this.writeWord(this.regEA, result); - this.writeWord(acc, result); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doAND(this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opANDCA(0o410000) + * opANDCA(0o410000): And with Complement of AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand ([E]) + * and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2687,11 +2711,16 @@ PDP10.opANDB = function(op, acc) */ PDP10.opANDCA = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); }; /** - * opANDCAI(0o411000) + * opANDCAI(0o411000): And with Complement of AC Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the specified operand (E) + * and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2699,11 +2728,16 @@ PDP10.opANDCA = function(op, acc) */ PDP10.opANDCAI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), this.regEA)); }; /** - * opANDCAM(0o412000) + * opANDCAM(0o412000): And with Complement of AC to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E]) to the AND function of the specified operand ([E]) + * and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2711,11 +2745,16 @@ PDP10.opANDCAI = function(op, acc) */ PDP10.opANDCAM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); }; /** - * opANDCAB(0o413000) + * opANDCAB(0o413000): And with Complement of AC to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the AND function of the specified operand ([E]) + * and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2723,11 +2762,16 @@ PDP10.opANDCAM = function(op, acc) */ PDP10.opANDCAB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opANDCM(0o420000) + * opANDCM(0o420000): And Complement of Memory with AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the complement of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2735,11 +2779,16 @@ PDP10.opANDCAB = function(op, acc) */ PDP10.opANDCM = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opANDCMI(0o421000) + * opANDCMI(0o421000): And Complement of Memory Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the complement of the specified + * operand (E) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2747,11 +2796,16 @@ PDP10.opANDCM = function(op, acc) */ PDP10.opANDCMI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(this.readWord(acc), PDP10.WORD_MASK - this.regEA)); }; /** - * opANDCMM(0o422000) + * opANDCMM(0o422000): And Complement of Memory to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E]) to the AND function of the complement of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2759,11 +2813,16 @@ PDP10.opANDCMI = function(op, acc) */ PDP10.opANDCMM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doAND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opANDCMB(0o423000) + * opANDCMB(0o423000): And Complement of Memory to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-20: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the AND function of the complement of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2771,11 +2830,16 @@ PDP10.opANDCMM = function(op, acc) */ PDP10.opANDCMB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doAND(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** - * opXOR(0o430000) + * opXOR(0o430000): Exclusive Or with AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the exclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2783,11 +2847,16 @@ PDP10.opANDCMB = function(op, acc) */ PDP10.opXOR = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doEOR(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opXORI(0o431000) + * opXORI(0o431000): Exclusive Or Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the exclusive OR function of the specified + * operand (E) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2795,11 +2864,16 @@ PDP10.opXOR = function(op, acc) */ PDP10.opXORI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doEOR(this.readWord(acc), this.regEA)); }; /** - * opXORM(0o432000) + * opXORM(0o432000): Exclusive Or to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E]) to the exclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2807,11 +2881,16 @@ PDP10.opXORI = function(op, acc) */ PDP10.opXORM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doEOR(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opXORB(0o433000) + * opXORB(0o433000): Exclusive Or to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the exclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2819,11 +2898,16 @@ PDP10.opXORM = function(op, acc) */ PDP10.opXORB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doEOR(this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opIOR(0o434000) + * opIOR(0o434000): Inclusive Or with AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2831,11 +2915,16 @@ PDP10.opXORB = function(op, acc) */ PDP10.opIOR = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opIORI(0o435000) + * opIORI(0o435000): Inclusive Or with AC Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the specified + * operand (E) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2843,11 +2932,16 @@ PDP10.opIOR = function(op, acc) */ PDP10.opIORI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(this.readWord(acc), this.regEA)); }; /** - * opIORM(0o436000) + * opIORM(0o436000): Inclusive Or with AC to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E]) to the inclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2855,11 +2949,16 @@ PDP10.opIORI = function(op, acc) */ PDP10.opIORM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doIOR(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opIORB(0o437000) + * opIORB(0o437000): Inclusive Or with AC to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the inclusive OR function of the specified + * operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2867,11 +2966,16 @@ PDP10.opIORM = function(op, acc) */ PDP10.opIORB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doIOR(this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opANDCB(0o440000) + * opANDCB(0o440000): And Complements of Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NOR function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -2879,11 +2983,16 @@ PDP10.opIORB = function(op, acc) */ PDP10.opANDCB = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opANDCBI(0o441000) + * opANDCBI(0o441000): And Complements of Both Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the AND function of the complements of both + * the specified operand (E) and [AC]. The result is the NOR function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -2891,11 +3000,16 @@ PDP10.opANDCB = function(op, acc) */ PDP10.opANDCBI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.regEA)); }; /** - * opANDCBM(0o442000) + * opANDCBM(0o442000): And Complements of Both to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E]) to the AND function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NOR function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -2903,11 +3017,16 @@ PDP10.opANDCBI = function(op, acc) */ PDP10.opANDCBM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opANDCBB(0o443000) + * opANDCBB(0o443000): And Complements of Both to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the AND function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NOR function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -2915,11 +3034,16 @@ PDP10.opANDCBM = function(op, acc) */ PDP10.opANDCBB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doAND(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** - * opEQV(0o444000) + * opEQV(0o444000): Equivalence with AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-23: + * + * Change the contents of the destination specified by M ([AC]) to the complement of the exclusive OR function of the + * specified operand ([E]) and [AC] (the result has 1s wherever the corresponding bits of the operands are the same). * * @this {CPUStatePDP10} * @param {number} op @@ -2927,11 +3051,16 @@ PDP10.opANDCBB = function(op, acc) */ PDP10.opEQV = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doEQV(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opEQVI(0o445000) + * opEQVI(0o445000): Equivalence Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-23: + * + * Change the contents of the destination specified by M ([AC]) to the complement of the exclusive OR function of the + * specified operand (E) and [AC] (the result has 1s wherever the corresponding bits of the operands are the same). * * @this {CPUStatePDP10} * @param {number} op @@ -2939,11 +3068,16 @@ PDP10.opEQV = function(op, acc) */ PDP10.opEQVI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doEQV(this.readWord(acc), this.regEA)); }; /** - * opEQVM(0o446000) + * opEQVM(0o446000): Equivalence to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-23: + * + * Change the contents of the destination specified by M ([E]) to the complement of the exclusive OR function of the + * specified operand ([E]) and [AC] (the result has 1s wherever the corresponding bits of the operands are the same). * * @this {CPUStatePDP10} * @param {number} op @@ -2951,11 +3085,16 @@ PDP10.opEQVI = function(op, acc) */ PDP10.opEQVM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doEQV(this.readWord(acc), this.readWord(this.regEA))); }; /** - * opEQVB(0o447000) + * opEQVB(0o447000): Equivalence to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-23: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the complement of the exclusive OR function of the + * specified operand ([E]) and [AC] (the result has 1s wherever the corresponding bits of the operands are the same). * * @this {CPUStatePDP10} * @param {number} op @@ -2963,13 +3102,16 @@ PDP10.opEQVM = function(op, acc) */ PDP10.opEQVB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doEQV(this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opSETCA(0o450000) and opSETCAI(0o451000) + * opSETCA(0o450000): Set to Complement of AC + * opSETCAI(0o451000): Set to Complement of AC Immediate * - * Change the contents of the destination specified by M ([AC]) to the complement of [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([AC]) to the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2981,9 +3123,11 @@ PDP10.opSETCA = function(op, acc) }; /** - * opSETCAM(0o452000) + * opSETCAM(0o452000): Set to Complement of AC Memory * - * Change the contents of the destination specified by M ([E]) to the complement of [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([E]) to the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -2995,9 +3139,11 @@ PDP10.opSETCAM = function(op, acc) }; /** - * opSETCAB(0o453000) + * opSETCAB(0o453000): Set to Complement of AC Both * - * Change the contents of the destination specified by M ([E] and [AC]) to the complement of [AC]. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3005,13 +3151,16 @@ PDP10.opSETCAM = function(op, acc) */ PDP10.opSETCAB = function(op, acc) { - var dst = PDP10.WORD_MASK - this.readWord(acc); - this.writeWord(acc, dst); - this.writeWord(this.regEA, dst); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK - this.readWord(acc))); }; /** - * opORCA(0o454000) + * opORCA(0o454000): Inclusive Or with Complement of AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the specified + * operand ([E]) and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3019,11 +3168,16 @@ PDP10.opSETCAB = function(op, acc) */ PDP10.opORCA = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); }; /** - * opORCAI(0o455000) + * opORCAI(0o455000): Inclusive Or with Complement of AC Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the specified + * operand (E) and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3031,11 +3185,16 @@ PDP10.opORCA = function(op, acc) */ PDP10.opORCAI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), this.regEA)); }; /** - * opORCAM(0o456000) + * opORCAM(0o456000): Inclusive Or with Complement of AC to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E]) to the inclusive OR function of the specified + * operand ([E]) and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3043,11 +3202,16 @@ PDP10.opORCAI = function(op, acc) */ PDP10.opORCAM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA))); }; /** - * opORCAB(0o457000) + * opORCAB(0o457000): Inclusive Or with Complement of AC to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-21: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the inclusive OR function of the specified + * operand ([E]) and the complement of [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3055,13 +3219,16 @@ PDP10.opORCAM = function(op, acc) */ PDP10.opORCAB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), this.readWord(this.regEA)))); }; /** - * opSETCM(0o460000) + * opSETCM(0o460000): Set to Complement of Memory * - * Change the contents of the destination specified by M ([AC]) to the complement of the specified source operand ([E]). + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([AC]) to the complement of the specified source + * operand ([E]). * * @this {CPUStatePDP10} * @param {number} op @@ -3073,9 +3240,12 @@ PDP10.opSETCM = function(op, acc) }; /** - * opSETCMI(0o461000) + * opSETCMI(0o461000): Set to Complement of Memory Immediate * - * Change the contents of the destination specified by M ([AC]) to the complement of the specified source operand (E). + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([AC]) to the complement of the specified source + * operand (E). * * @this {CPUStatePDP10} * @param {number} op @@ -3087,9 +3257,12 @@ PDP10.opSETCMI = function(op, acc) }; /** - * opSETCMM(0o462000) + * opSETCMM(0o462000): Set to Complement of Memory Memory * - * Change the contents of the destination specified by M ([E]) to the complement of the specified source operand ([E]). + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([E]) to the complement of the specified source + * operand ([E]). * * @this {CPUStatePDP10} * @param {number} op @@ -3101,9 +3274,12 @@ PDP10.opSETCMM = function(op, acc) }; /** - * opSETCMB(0o463000) + * opSETCMB(0o463000): Set to Complement of Memory Both * - * Change the contents of the destination specified by M ([E] and [AC]) to the complement of the specified source operand ([E]). + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-19: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the complement of the specified source + * operand ([E]). * * @this {CPUStatePDP10} * @param {number} op @@ -3111,13 +3287,16 @@ PDP10.opSETCMM = function(op, acc) */ PDP10.opSETCMB = function(op, acc) { - var dst = PDP10.WORD_MASK - this.readWord(this.regEA); - this.writeWord(acc, dst); - this.writeWord(this.regEA, dst); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opORCM(0o464000) + * opORCM(0o464000): Inclusive Or Complement of Memory with AC + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the complement of the + * specified operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3125,11 +3304,16 @@ PDP10.opSETCMB = function(op, acc) */ PDP10.opORCM = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opORCMI(0o465000) + * opORCMI(0o465000): Inclusive Or Complement of Memory Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the complement of the + * specified operand (E) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3137,11 +3321,16 @@ PDP10.opORCM = function(op, acc) */ PDP10.opORCMI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(this.readWord(acc), PDP10.WORD_MASK - this.regEA)); }; /** - * opORCMM(0o466000) + * opORCMM(0o466000): Inclusive Or Complement of Memory to Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E]) to the inclusive OR function of the complement of the + * specified operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3149,11 +3338,16 @@ PDP10.opORCMI = function(op, acc) */ PDP10.opORCMM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doIOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opORCMB(0o467000) + * opORCMB(0o467000): Inclusive Or Complement of Memory to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the inclusive OR function of the complement of the + * specified operand ([E]) and [AC]. * * @this {CPUStatePDP10} * @param {number} op @@ -3161,11 +3355,16 @@ PDP10.opORCMM = function(op, acc) */ PDP10.opORCMB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doIOR(this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** - * opORCB(0o470000) + * opORCB(0o470000): Inclusive Or Complements of Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NAND function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -3173,11 +3372,16 @@ PDP10.opORCMB = function(op, acc) */ PDP10.opORCB = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opORCBI(0o471000) + * opORCBI(0o471000): Inclusive Or Complements of Both Immediate + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([AC]) to the inclusive OR function of the complements of both + * the specified operand (E) and [AC]. The result is the NAND function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -3185,11 +3389,16 @@ PDP10.opORCB = function(op, acc) */ PDP10.opORCBI = function(op, acc) { - this.opUndefined(op); + this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.regEA)); }; /** - * opORCBM(0o472000) + * opORCBM(0o472000): Inclusive Or Complements of Both To Memory + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E]) to the inclusive OR function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NAND function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -3197,11 +3406,16 @@ PDP10.opORCBI = function(op, acc) */ PDP10.opORCBM = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA))); }; /** - * opORCBB(0o473000) + * opORCBB(0o473000): Inclusive Or Complements of Both to Both + * + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-22: + * + * Change the contents of the destination specified by M ([E] and [AC]) to the inclusive OR function of the complements of both + * the specified operand ([E]) and [AC]. The result is the NAND function of the operands. * * @this {CPUStatePDP10} * @param {number} op @@ -3209,13 +3423,16 @@ PDP10.opORCBM = function(op, acc) */ PDP10.opORCBB = function(op, acc) { - this.opUndefined(op); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.doIOR(PDP10.WORD_MASK - this.readWord(acc), PDP10.WORD_MASK - this.readWord(this.regEA)))); }; /** - * opSETO(0o474000) and opSETOI(0o475000) + * opSETO(0o474000): Set to Ones + * opSETOI(0o475000): Set to Ones Immediate * - * Change the contents of the destination specified by M (AC) to all 1s. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M (AC) to all 1s. * * @this {CPUStatePDP10} * @param {number} op @@ -3227,9 +3444,11 @@ PDP10.opSETO = function(op, acc) }; /** - * opSETOM(0o476000) + * opSETOM(0o476000): Set to Ones Memory * - * Change the contents of the destination specified by M ([E]) to all 1s. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M ([E]) to all 1s. * * @this {CPUStatePDP10} * @param {number} op @@ -3241,9 +3460,11 @@ PDP10.opSETOM = function(op, acc) }; /** - * opSETOB(0o477000) + * opSETOB(0o477000): Set to Ones Both * - * Change the contents of the destination specified by M ([E] and [AC]) to all 1s. + * From the DEC PDP-10 System Reference Manual (May 1968), p. 2-18: + * + * Change the contents of the destination specified by M ([E] and [AC]) to all 1s. * * @this {CPUStatePDP10} * @param {number} op @@ -3251,8 +3472,7 @@ PDP10.opSETOM = function(op, acc) */ PDP10.opSETOB = function(op, acc) { - this.writeWord(acc, PDP10.WORD_MASK); - this.writeWord(this.regEA, PDP10.WORD_MASK); + this.writeWord(this.regEA, this.writeWord(acc, PDP10.WORD_MASK)); }; /** @@ -4627,7 +4847,7 @@ PDP10.setHR = function(op, dst, src) /** * doAND(dst, src) * - * Used by callers to perform a logical "AND" of two 36-bit operands. + * Used by callers to perform the logical "and" (AND) of two 36-bit operands. * * @param {number} dst (36-bit value) * @param {number} src (36-bit value) @@ -4636,8 +4856,9 @@ PDP10.setHR = function(op, dst, src) PDP10.doAND = function(dst, src) { /* - * Since dst and src are 36-bit values, we must "AND" the low 32 bits separately from the higher bits, - * and then combine them with addition. + * Since dst and src are 36-bit values, we must AND the low 32 bits separately from the higher bits, + * and then combine them with addition. Since all bits above 36 will be zero, and since 0 AND 0 is 0, + * no special masking for the higher bits is required. * * WARNING: When using JavaScript's 32-bit operators with values that could set bit 31 and produce a * negative value, it's critical to perform a final right-shift of 0, ensuring that the final result is @@ -4646,6 +4867,75 @@ PDP10.doAND = function(dst, src) return ((((dst / PDP10.TWO_POW32)|0) & ((src / PDP10.TWO_POW32)|0)) * PDP10.TWO_POW32) + ((dst & src) >>> 0); }; +/** + * doEOR(dst, src) + * + * Used by callers to perform the logical "exclusive-or" (XOR) of two 36-bit operands. + * + * @param {number} dst (36-bit value) + * @param {number} src (36-bit value) + * @return {number} (dst ^ src) + */ +PDP10.doEOR = function(dst, src) +{ + /* + * Since dst and src are 36-bit values, we must XOR the low 32 bits separately from the higher bits, + * and then combine them with addition. Since all bits above 36 will be zero, and since 0 XOR 0 is 0, + * no special masking for the higher bits is required. + * + * WARNING: When using JavaScript's 32-bit operators with values that could set bit 31 and produce a + * negative value, it's critical to perform a final right-shift of 0, ensuring that the final result is + * positive. + */ + return ((((dst / PDP10.TWO_POW32)|0) ^ ((src / PDP10.TWO_POW32)|0)) * PDP10.TWO_POW32) + ((dst ^ src) >>> 0); +}; + +/** + * doEQV(dst, src) + * + * Used by callers to perform the logical "equivalence" (EQV) of two 36-bit operands. + * + * @param {number} dst (36-bit value) + * @param {number} src (36-bit value) + * @return {number} (~(dst ^ src)) + */ +PDP10.doEQV = function(dst, src) +{ + /* + * Since dst and src are 36-bit values, we must EQV the low 32 bits separately from the higher bits, + * and then combine them with addition. Since all bits above 36 will be zero, and since 0 EQV 0 is 1, + * we must mask the higher 4 bits with 0o17. + * + * WARNING: When using JavaScript's 32-bit operators with values that could set bit 31 and produce a + * negative value, it's critical to perform a final right-shift of 0, ensuring that the final result is + * positive. + */ + return ((~(((dst / PDP10.TWO_POW32)|0) ^ ((src / PDP10.TWO_POW32)|0)) & 0o17) * PDP10.TWO_POW32) + (~(dst ^ src) >>> 0); +}; + +/** + * doIOR(dst, src) + * + * Used by callers to perform the logical "inclusive-or" (OR) of two 36-bit operands. + * + * @param {number} dst (36-bit value) + * @param {number} src (36-bit value) + * @return {number} (dst | src) + */ +PDP10.doIOR = function(dst, src) +{ + /* + * Since dst and src are 36-bit values, we must OR the low 32 bits separately from the higher bits, + * and then combine them with addition. Since all bits above 36 will be zero, and since 0 OR 0 is 0, + * no special masking for the higher bits is required. + * + * WARNING: When using JavaScript's 32-bit operators with values that could set bit 31 and produce a + * negative value, it's critical to perform a final right-shift of 0, ensuring that the final result is + * positive. + */ + return ((((dst / PDP10.TWO_POW32)|0) | ((src / PDP10.TWO_POW32)|0)) * PDP10.TWO_POW32) + ((dst | src) >>> 0); +}; + /* * If we want the basic half-word operations to handle all the sub-operations; ie: * diff --git a/modules/pdp10/lib/cpustate.js b/modules/pdp10/lib/cpustate.js index 736532cc2..b35298c4d 100644 --- a/modules/pdp10/lib/cpustate.js +++ b/modules/pdp10/lib/cpustate.js @@ -769,10 +769,12 @@ class CPUStatePDP10 extends CPUPDP10 { * @this {CPUStatePDP10} * @param {number} addr * @param {number} data + * @return {number} (we return the data back to the caller to permit nested writes) */ writeWordToPhysical(addr, data) { this.bus.setWord(this.lastAddr = addr, data); + return data; } /** diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index 1f9faa9c3..29a26715f 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -3898,7 +3898,7 @@ if (DEBUGGER) { 0o42000: DebuggerPDP10.OPS.ANDCM, 0o42400: DebuggerPDP10.OPS.SETA, 0o43000: DebuggerPDP10.OPS.XOR, - 0o43400: DebuggerPDP10.OPS.IOR, + 0o43400: DebuggerPDP10.OPS.IOR, // MACRO alias: OR 0o44000: DebuggerPDP10.OPS.ANDCB, 0o44400: DebuggerPDP10.OPS.EQV, 0o45000: DebuggerPDP10.OPS.SETCA, diff --git a/versions/pdpjs/1.34.2/pdp10-dbg.js b/versions/pdpjs/1.34.2/pdp10-dbg.js index e52b9896f..7bfa19736 100644 --- a/versions/pdpjs/1.34.2/pdp10-dbg.js +++ b/versions/pdpjs/1.34.2/pdp10-dbg.js @@ -27,204 +27,208 @@ 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,ca="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)},da="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function ea(){ea=function(){};da.Symbol||(da.Symbol=fa)}var ga=0;function fa(a){return"jscomp_symbol_"+(a||"")+ga++} -function ha(){ea();var a=da.Symbol.iterator;a||(a=da.Symbol.iterator=da.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ca(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(this)}});ha=function(){}}function ia(a){var b=0;return ja(function(){return ba?-b:b}});ma("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var na=Math.pow(2,36),oa=-Math.pow(2,35),q={cc:0,vb:1,ec:2,fc:3,gc:4,hc:5,ic:6,jc:7,cb:8,kc:9,wb:10,lc:11,mc:12,xb:13,nc:14,oc:15,pc:16,qc:17,rc:18,sc:19,tc:20,uc:21,vc:22,wc:23,xc:24,yc:25,zc: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,bb:65,bc:66,dc:67,Ac:68,E:69,Bc:70,Cc:71,Dc:72,Ec:73,Fc:74,Gc:75,Hc:76,Ic:77,Jc:78,Kc:79,Lc:80,Q:81, +var l,fa="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)},ga="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this;function ha(){ha=function(){};ga.Symbol||(ga.Symbol=ia)}var ja=0;function ia(a){return"jscomp_symbol_"+(a||"")+ja++} +function ka(){ha();var a=ga.Symbol.iterator;a||(a=ga.Symbol.iterator=ga.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&fa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return la(this)}});ka=function(){}}function la(a){var b=0;return ma(function(){return ba?-b:b}});pa("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var qa=Math.pow(2,36),ra=-Math.pow(2,35),q={cc:0,vb:1,ec:2,fc:3,gc:4,hc:5,ic:6,jc:7,cb:8,kc:9,wb:10,lc:11,mc:12,xb:13,nc:14,oc:15,pc:16,qc:17,rc:18,sc:19,tc:20,uc:21,vc:22,wc:23,xc:24,yc:25,zc: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,bb:65,bc:66,dc:67,Ac:68,E:69,Bc:70,Cc:71,Dc:72,Ec:73,Fc:74,Gc:75,Hc:76,Ic:77,Jc:78,Kc:79,Lc:80,Q:81, Mc:82,Nc:83,Oc:84,Pc:85,Qc:86,Rc:87,Sc:88,Tc:89,zb:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Uc:97,Vc:98,Wc:99,d:100,e:101,Xc:102,Yc:103,Zc:104,$c:105,ad:106,k:107,bd:108,cd:109,n:110,dd:111,p:112,q:113,r:114,ed:115,t:116,gd:117,hd:118,jd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,yb:127}; -function pa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=g?48:55),e=String.fromCharCode(g)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ra(a,b,c){b?12"']/g,function(a){return Ca[a]})}function Da(a,b){return(a+" ").slice(0,b)} -function Ea(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ca={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fa(a,b,c){var d=0,e=a.length,g=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[f]);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 Ha(a,b,c,d){c=void 0===c?!1:c;var e=0,g=null,f=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,e),[g,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),f;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(g=h.responseText,200==h.status||!h.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, +function sa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a&&-1=g?48:55),e=String.fromCharCode(g)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function ua(a,b,c){b?12"']/g,function(a){return Fa[a]})}function Ga(a,b){return(a+" ").slice(0,b)} +function Ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Fa={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ia(a,b,c){var d=0,e=a.length,g=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[f]);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,g=null,f=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,e),[g,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),f;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(g=h.responseText,200==h.status||!h.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, g,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||(g=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,g,e),f=[g,e]);return f} -function Ia(a,b){var c,d={Y:null,T:null,na:null,ma:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,g,f;if("<"==b.substr(0,1))throw Error(b);f=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.na=f.load;d.ma=f.exec;if(e=f.bytes)d.Y=e;else if(e=f.words)for(d.Y=Array(2*e.length),g=c=0;c>8&255;else if(e=f.longs)for(d.Y=Array(4*e.length),g=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.na=f.load;d.ma=f.exec;if(e=f.bytes)d.Y=e;else if(e=f.words)for(d.Y=Array(2*e.length),g=c=0;c>8&255;else if(e=f.longs)for(d.Y=Array(4*e.length),g=c=0;c>8&255,d.Y[g++]=e[c]>>16&255,d.Y[g++]=e[c]>>24&255;else(e=f.data)?d.Ca=e:d.Y=f;d.Y&&(d.Y.length?1==d.Y.length&&(u(d.Y[0]),d=null):(u("Empty resource: "+a),d=null));d.T=f.symbols}catch(h){u("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ka=this.id:(this.La=this.id.substr(0,a),this.Ka=this.id.substr(a+1));this.j={ready:!1,Fa:!1,Xa:!1,U:!1,error:!1};this.Ma=null;this.j.error=!1;this.X=c||0;this.C=this.i=this.G=this.F=this.oa=null;w.push(this)}function ib(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function tb(){return Date.now()||+new Date} -function u(a){window&&window.alert(a)}function ub(a){var b=!1;window&&(b=window.confirm(a));return b}function vb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba?this.Ka=this.id:(this.La=this.id.substr(0,a),this.Ka=this.id.substr(a+1));this.v={ready:!1,Fa:!1,Xa:!1,U:!1,error:!1};this.Ma=null;this.v.error=!1;this.X=c||0;this.C=this.j=this.G=this.F=this.oa=null;w.push(this)}function lb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function wb(){return Date.now()||+new Date} +function u(a){window&&window.alert(a)}function xb(a){var b=!1;window&&(b=window.confirm(a));return b}function yb(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.Mb,a];this.C=this.i=this.G=this.F=null;this.exports={hold:this.Eb,toggle:this.Xb,reset:this.Tb, -set:this.Wb};D(this)}p(Yb,v);l=Yb.prototype;l.reset=function(a){this.stop();a&&$b(this,this.A=0)}; -l.ga=function(a,b,c,d){if(this.F&&this.F.ga(a,b,c,d)||this.i&&this.i.ga(a,b,c,d)||this.C&&this.C.ga(a,b,c,d))return!0;switch(b){case "PC":return this.I[b]=c,this.M++,!0;default:return"led"==a||"rled"==a?(this.I[b]=c,this.D[b]=d?1:0,this.M++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.I[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ac(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){bc(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){ac(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bc(a,b)}}(this,b),!0):v.prototype.ga.call(this,a,b,c,d)}};l.wa=function(a,b,c,d){this.F=a;this.G=b;this.i=c;this.C=d;cc(this);dc(this)};l.pa=function(a,b){if(!b)if(this.W&&ec(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.fa=function(a){return a?this.save():!0};l.save=function(){var a=new J(this);a.set(0,[this.f,this.A,this.u]);return a.data()}; -l.restore=function(a){if(a=a[0])fc(this,this.f=a[0]),$b(this,this.A=a[1]),gc(this,a[2]);return!0};l.Tb=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}dc(this);return!0};function hc(a,b,c){if(a=a.I[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function cc(a,b){for(var c in a.D)hc(a,c,null!=b?b:a.D[c])}function pc(a,b,c){if(a=a.I[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function dc(a){for(var b in a.b)pc(a,b,a.b[b][1])} -l.Eb=function(a,b,c){if(ac(this,b)){if(c){var d=this;setTimeout(function(){bc(d,b);a&&a()},+c);return!1}bc(this,b)}return!0};l.Wb=function(a,b){if("SR"==a)return gc(this,pa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,pc(this,a,c[1]),!0):!1};l.Xb=function(a){return ac(this,a)?(bc(this,a),!0):!1};function ac(a,b){var c=a.b[b];return c?(pc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=qc&&(a.P=b==rc,a.R=b==sc),!0):!1} -function bc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(pc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Nb=function(a){a||this.i.j.K||(this.i.u=this.f%Mb,this.b[tc]&&this.b[tc][1]&&uc(this.i))};l.Ob=function(){};l.Ib=function(a){a||this.i.V()}; -l.Gb=function(a){if(!a&&!this.i.j.K)if(this.b[tc]&&this.b[tc][1])uc(this.i);else{if((a=this.C)&&!Hb(a,!0))Ib(a,!0),vc(a,0,null),Ib(a,!1);else try{var b=this.i.Ja(1);0c;c++){var d=a,e="A"+c,g=b&1<c;c++){var d=a,e="D"+c,g=b&1<b;b++)a.b["S"+b][1]=a.u&1<d.length){for(var e=0,g=Array(4096),f=0;f>>a.f;0g&&(m=g);if(h&&h.size){if(h.type==d){if(e+g<=h.B)return h.Ha+=h.B-e,h.B=e,!0;if(e>=h.B+h.Ha){m=h.size-(e-k);m>g&&(m=g);h.Ha=e-h.B+m;e=k+16384;g-=m;f++;continue}}return Hc(Ic,e,g)}e=new Dc(a,e,m,16384,d);Ec(e,a.C,h);a.b[f++]=e;e=k+16384;g-=m}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+Jc[d]+" at "+ra(b)),!0):Hc(Kc,b,c)} -function Bc(a,b){var c=a.b[(b&a.u)>>>a.f];a.A++;b=c.G(b&16383,b);a.A--;return b}function Ac(a,b,c){var d=a.b[(b&a.u)>>>a.f];a.A++;d.F(c,b&16383,b);a.A--}function Fc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.ha,c=!0);0<=a.ja&&a.ja<=ed(a)&&(a.ha=a.ja=-1,ad(a),a.V(),c=!0);c&&a.g(ed(a)+" cycles: checksum="+t(a.ta))}} -l.ga=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.j.U)a=!0;else{var b=null,c,h=vb(a.id);for(c=0;ca.S/a.W?b=1:d=!0;a.aa=b;b=a.Ta*a.aa;if(a.W!=b){a.W=b;b=a.W.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&id(a.F)}xc(a,a.L);a.L=0;a.J=tb();a.N=0;gd(a);return d}function jd(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fd(a,b){var c=a.O-=a.P;a.P=0;b&&(a.O=0);return c} -l.Ub=function(){if(this.j.K){this.Aa>=this.Va&&gd(this,!0);this.ka=0;this.sa=tb();if(this.N){var a=this.sa-this.N;a>this.Ua&&(this.J+=a,this.J>this.sa&&(this.J=this.sa))}try{do{var b=jd(this,this.j.Ea?1:this.va);try{this.Ja(b)}catch(e){if("number"!=typeof e)throw e;}b=Fd(this,!0);this.ka+=b;this.L+=b;yc(this,b);wc(this,b);this.ba-=b;if(0>=this.ba){this.ba+=this.va;++this.Wa>=Gd&&(this.F&&L(this.F,void 0),this.Wa=0);break}}while(this.j.K)}catch(e){this.V();this.F&&this.F.stop(tb(),ed(this));Eb(this, -e.stack||e.message);return}if(this.j.K){a=setTimeout;b=this.kb;this.N=tb();var c=this.Ua;this.ka&&(c=Math.round(c*this.ka/this.va));var c=c-(this.N-this.sa),d=this.N-this.J;d&&(this.S=Math.round(this.L/(10*d))/100,864E5<=d&&(this.R=0,fd(this)));if(0>c||this.Sc&&(this.J-=c),c=0;this.Aa+=this.ka;this.N+=c;a(b,c)}}}; -function uc(a,b){if(!Fb(a))if(a.j.K)a.g(a.toString()+" busy");else{fd(a);a.j.K=!0;a.j.Pa=!0;var c=a.I.run;c&&(c.textContent="Halt");a.F&&(b&&id(a.F,!0),a.F.start(a.J,ed(a)));a.C||a.status("Started");setTimeout(a.kb,0)}}l.Ja=function(){return 0};l.V=function(a){var b=!1;if(this.j.K){Fd(this);xc(this,this.L);this.L=0;this.j.K=!1;if(b=this.I.run)b.textContent="Run";this.F&&this.F.stop(tb(),ed(this));b=!0;this.C||this.status("Stopped")}this.j.complete=a;return b};var hd=30,Gd=15,Yc=["power","reset"]; -function Hd(a){var b=+a.model||1001;Xc.call(this,a,1E6);this.jb=b;this.gb=+a.addrReset||0;this.Ab=Id.bind(this);this.b=N.bind(this);this.la=null;this.fb=[];this.j.complete=!1}p(Hd,Xc);l=Hd.prototype;l.reset=function(){this.status("Model "+this.jb);this.j.K&&this.V();this.f=this.H=this.Ba=0;this.u=this.ra=this.gb;this.Ra=this.ib=this.za=this.ub=this.Sa=!1;this.D=-1;this.qa=this.u;this.A=0;this.w=this.Qb;this.v=this.ac;this.la=null;$c(this);this.j.error=!1;Xc.prototype.reset.call(this)};l.rb=function(){return 0}; -l.save=function(){var a=new J(this);a.set(0,[this.f,this.H,this.D,this.Ba,this.u,this.ra,this.qa,this.A]);a.set(1,[]);a.set(2,[this.R,this.aa,this.j.Z]);a.set(3,Jd(this));a.set(4,kd(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ha();ea();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.f=b.next().value;this.H=b.next().value;this.D=b.next().value;this.Ba=b.next().value;this.u=b.next().value;this.ra=b.next().value;this.qa=b.next().value;this.A=b.next().value;b=a[2];this.R=b[0];fd(this,b[1]);this.j.Z=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;dQb&&(a!=Rb?a=Sb-a:this.Ra=this.za=!0);return a};function Ld(a,b){b?b==Rb?a.Ra=a.za=!0:b=Sb-b:a.ib=a.za=!0;return b}function Jd(a){var b=[];for(a=a.la;a;)b.push(a.Yb),a=a.next;return b}l.Qb=function(a){var b=this.G;a=this.qa=a;return b.b[(a&b.u)>>>b.f].w(a&16383,a)};l.ac=function(a,b){var c=this.G;a=this.qa=a;c.b[(a&c.u)>>>c.f].v(b,a&16383,a)}; -l.Ja=function(a){this.j.complete=!0;var b=this.C?Md(this.C)?1:this.j.Pa?-1:0:0,c=a?this.j.Pa?0:1:-1;this.j.Pa=!1;this.O=this.P=a;this.A=this.A&-5|(b?4:0);do{if(this.A){if(this.A&4){if(Nd(this.C,this.u,c)){this.V();break}++b||(this.A&=-5);c||c++}if(a=this.A&11)this.A&2?this.la||(this.A&=-3):this.A&1&&this.A++,a=!1;if(a){if(this.A&4&&Nd(this.C,this.u,c)){this.V();break}if(0>c)break}}this.A&=15;this.H=this.H&4194304?this.w(this.f):this.Ba=this.w(this.ra=this.u);this.H&=8388607;this.f=this.H&262143;if(a= -this.H>>18&15)this.f=this.f+this.w(a)&Nb;this.H&4194304?a=-1:(this.u=(this.u+1)%Mb,a=this.Ba/Wb|0);0<=a&&this.Ab(a)}while(0>4].call(this,a,a&15)}function O(a){this.b(a)} -function Pd(){var a=0,b=this.w(this.f),c=b/Xb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Xb+(d<<24)+(b&16777215);a&&(b=(b+a)%Ob);this.v(this.f,b)}function Qd(a,b){a=this.w(this.f);if(0>this.D)this.D=a,this.H=this.f|4194304,Kd(this,-1);else{var c=this.D/Xb&63,d=this.D>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.v(b,a);this.D=-1}} -function Rd(a,b){a=this.w(this.f);if(0>this.D)this.D=a,this.H=this.f|4194304,Kd(this,-1);else{var c=this.D/Xb&63,d=this.D>>24&63;b=this.w(b)%Math.pow(2,d)*Math.pow(2,c)%Ob;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.v(this.f,a);this.D=-1}}function Sd(a,b){this.v(b,this.w(this.f))}function Td(a,b){this.v(b,this.f)}function Ud(a,b){this.v(this.f,this.w(b))}function Vd(a,b){this.v(b,0)}function Wd(a,b){this.v(b,E-this.w(b))}function Xd(a,b){this.v(b,E)} -function Yd(a,b){var c=this.w(this.f),d=this.w(b);this.v(b,Zd(a,d,c)+(c-(c&H)))}function $d(a,b){var c=this.w(b);this.v(b,Zd(a,c,0))}function ae(a,b){b=this.w(b);var c=this.w(this.f);this.v(this.f,Zd(a,c,b)+(b-(b&H)))}function be(a,b){var c=this.w(this.f),d=c;if(a&=384)switch(d-=d&H,a){case 256:d+=H;break;case 384:d+=c>Qb?H:0}c=d;this.v(this.f,c);b&&this.v(b,c)}function ce(a,b){var c=(this.w(this.f)&H)*G,d=this.w(b);this.v(b,Zd(a,d,c)+c)} -function de(a,b){var c=this.f*G,d=this.w(b);this.v(b,Zd(a,d,c)+c)}function ee(a,b){b=(this.w(b)&H)*G;var c=this.w(this.f);this.v(this.f,Zd(a,c,b)+b)}function fe(a,b){var c=this.w(this.f),d=(c&H)*G,c=Zd(a,c,d)+d;this.v(this.f,c);b&&this.v(b,c)}function ge(a,b){var c=this.w(this.f)&H,d=this.w(b);this.v(b,he(a,d,c)+c)}function ie(a,b){var c=this.w(b);this.v(b,he(a,c,this.f)+this.f)}function je(a,b){b=this.w(b)&H;var c=this.w(this.f);this.v(this.f,he(a,c,b)+b)} -function ke(a,b){var c=this.w(this.f),d=c;if(a&=384)switch(d&=H,a){case 256:d+=H*G;break;case 384:d+=c>Pb?H*G:0}c=d;this.v(this.f,c);b&&this.v(b,c)}function le(a,b){var c=this.w(this.f)/G|0,d=this.w(b);this.v(b,he(a,d,c)+c)}function me(a,b){var c=this.w(b);this.v(b,he(a,c,0))}function ne(a,b){b=this.w(b)/G|0;var c=this.w(this.f);this.v(this.f,he(a,c,b)+b)}function oe(a,b){var c=this.w(this.f),d=c/G|0,c=he(a,c,d)+d;this.v(this.f,c);b&&this.v(b,c)}function Q(a){this.b(a)}function pe(){} -function N(a){this.g("undefined opcode: "+ra(a));Kd(this,-1);this.V()}function he(a,b,c){switch(a&384){case 0:b-=b&H;break;case 128:b=0;break;case 256:b=H*G;break;case 384:b=c>Pb?H*G:0}return b}function Zd(a,b,c){switch(a&384){case 0:b&=H;break;case 128:b=0;break;case 256:b=H;break;case 384:b=c>Qb?H:0}return b}function qe(a,b){return((a/Tb|0)&(b/Tb|0))*Tb+((a&b)>>>0)} -var Od=[O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},Pd,function(a,b){0>this.D&&Pd.call(this);Qd.call(this,0,b)},Qd,function(a,b){0>this.D&&Pd.call(this);Rd.call(this,0,b)},Rd,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 $b(a,b){v.call(this,"Panel",a,512);this.L=this.M=0;this.W=b;this.f=this.J=this.w=this.A=0;this.N=this.O=-1;this.P=this.R=this.H=!1;this.S=ac;this.D={};this.b={START:[1,1,!0,!1,this.Nb],STEP:[1,1,!1,!1,this.Ob],ENABLE:[1,1,!1,!1,this.Ib],CONT:[1,1,!0,!1,this.Gb],DEP:[0,0,!0,!1,this.Hb],EXAM:[1,1,!0,!1,this.Jb],LOAD:[1,1,!0,!1,this.Lb],TEST:[0,0,!0,!1,this.Kb]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Mb,a];this.C=this.j=this.G=this.F=null;this.exports={hold:this.Eb,toggle:this.Xb,reset:this.Tb, +set:this.Wb};D(this)}p($b,v);l=$b.prototype;l.reset=function(a){this.stop();a&&bc(this,this.A=0)}; +l.ga=function(a,b,c,d){if(this.F&&this.F.ga(a,b,c,d)||this.j&&this.j.ga(a,b,c,d)||this.C&&this.C.ga(a,b,c,d))return!0;switch(b){case "PC":return this.I[b]=c,this.M++,!0;default:return"led"==a||"rled"==a?(this.I[b]=c,this.D[b]=d?1:0,this.M++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.I[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){cc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){dc(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){cc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){dc(a,b)}}(this,b),!0):v.prototype.ga.call(this,a,b,c,d)}};l.wa=function(a,b,c,d){this.F=a;this.G=b;this.j=c;this.C=d;ec(this);fc(this)};l.pa=function(a,b){if(!b)if(this.W&&gc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.fa=function(a){return a?this.save():!0};l.save=function(){var a=new K(this);a.set(0,[this.f,this.A,this.w]);return a.data()}; +l.restore=function(a){if(a=a[0])hc(this,this.f=a[0]),bc(this,this.A=a[1]),ic(this,a[2]);return!0};l.Tb=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}fc(this);return!0};function jc(a,b,c){if(a=a.I[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ec(a,b){for(var c in a.D)jc(a,c,null!=b?b:a.D[c])}function kc(a,b,c){if(a=a.I[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function fc(a){for(var b in a.b)kc(a,b,a.b[b][1])} +l.Eb=function(a,b,c){if(cc(this,b)){if(c){var d=this;setTimeout(function(){dc(d,b);a&&a()},+c);return!1}dc(this,b)}return!0};l.Wb=function(a,b){if("SR"==a)return ic(this,sa(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,kc(this,a,c[1]),!0):!1};l.Xb=function(a){return cc(this,a)?(dc(this,a),!0):!1};function cc(a,b){var c=a.b[b];return c?(kc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=lc&&(a.P=b==tc,a.R=b==uc),!0):!1} +function dc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(kc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Nb=function(a){a||this.j.v.K||(this.j.w=this.f%Pb,this.b[vc]&&this.b[vc][1]&&wc(this.j))};l.Ob=function(){};l.Ib=function(a){a||this.j.V()}; +l.Gb=function(a){if(!a&&!this.j.v.K)if(this.b[vc]&&this.b[vc][1])wc(this.j);else{if((a=this.C)&&!Kb(a,!0))Lb(a,!0),xc(a,0,null),Lb(a,!1);else try{var b=this.j.Ja(1);0c;c++){var d=a,e="A"+c,g=b&1<c;c++){var d=a,e="D"+c,g=b&1<b;b++)a.b["S"+b][1]=a.w&1<d.length){for(var e=0,g=Array(4096),f=0;f>>a.f;0g&&(m=g);if(h&&h.size){if(h.type==d){if(e+g<=h.B)return h.Ha+=h.B-e,h.B=e,!0;if(e>=h.B+h.Ha){m=h.size-(e-k);m>g&&(m=g);h.Ha=e-h.B+m;e=k+16384;g-=m;f++;continue}}return Jc(Kc,e,g)}e=new Fc(a,e,m,16384,d);Gc(e,a.C,h);a.b[f++]=e;e=k+16384;g-=m}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+Lc[d]+" at "+ua(b)),!0):Jc(Mc,b,c)} +function Dc(a,b){var c=a.b[(b&a.w)>>>a.f];a.A++;b=c.G(b&16383,b);a.A--;return b}function Cc(a,b,c){var d=a.b[(b&a.w)>>>a.f];a.A++;d.F(c,b&16383,b);a.A--}function Hc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.ha,c=!0);0<=a.ja&&a.ja<=gd(a)&&(a.ha=a.ja=-1,cd(a),a.V(),c=!0);c&&a.g(gd(a)+" cycles: checksum="+t(a.ta))}} +l.ga=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.U)a=!0;else{var b=null,c,h=yb(a.id);for(c=0;ca.S/a.W?b=1:d=!0;a.aa=b;b=a.Ta*a.aa;if(a.W!=b){a.W=b;b=a.W.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&kd(a.F)}zc(a,a.L);a.L=0;a.J=wb();a.N=0;id(a);return d}function ld(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function md(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function nd(a,b){var c=a.O-=a.P;a.P=0;b&&(a.O=0);return c} +l.Ub=function(){if(this.v.K){this.Aa>=this.Va&&id(this,!0);this.ka=0;this.sa=wb();if(this.N){var a=this.sa-this.N;a>this.Ua&&(this.J+=a,this.J>this.sa&&(this.J=this.sa))}try{do{var b=ld(this,this.v.Ea?1:this.va);try{this.Ja(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.ka+=b;this.L+=b;Ac(this,b);yc(this,b);this.ba-=b;if(0>=this.ba){this.ba+=this.va;++this.Wa>=Id&&(this.F&&L(this.F,void 0),this.Wa=0);break}}while(this.v.K)}catch(e){this.V();this.F&&this.F.stop(wb(),gd(this));Hb(this, +e.stack||e.message);return}if(this.v.K){a=setTimeout;b=this.kb;this.N=wb();var c=this.Ua;this.ka&&(c=Math.round(c*this.ka/this.va));var c=c-(this.N-this.sa),d=this.N-this.J;d&&(this.S=Math.round(this.L/(10*d))/100,864E5<=d&&(this.R=0,hd(this)));if(0>c||this.Sc&&(this.J-=c),c=0;this.Aa+=this.ka;this.N+=c;a(b,c)}}}; +function wc(a,b){if(!Ib(a))if(a.v.K)a.g(a.toString()+" busy");else{hd(a);a.v.K=!0;a.v.Pa=!0;var c=a.I.run;c&&(c.textContent="Halt");a.F&&(b&&kd(a.F,!0),a.F.start(a.J,gd(a)));a.C||a.status("Started");setTimeout(a.kb,0)}}l.Ja=function(){return 0};l.V=function(a){var b=!1;if(this.v.K){nd(this);zc(this,this.L);this.L=0;this.v.K=!1;if(b=this.I.run)b.textContent="Run";this.F&&this.F.stop(wb(),gd(this));b=!0;this.C||this.status("Stopped")}this.v.complete=a;return b};var jd=30,Id=15,$c=["power","reset"]; +function Jd(a){var b=+a.model||1001;Zc.call(this,a,1E6);this.jb=b;this.gb=+a.addrReset||0;this.Ab=Kd.bind(this);this.b=N.bind(this);this.la=null;this.fb=[];this.v.complete=!1}p(Jd,Zc);l=Jd.prototype;l.reset=function(){this.status("Model "+this.jb);this.v.K&&this.V();this.f=this.H=this.Ba=0;this.w=this.ra=this.gb;this.Ra=this.ib=this.za=this.ub=this.Sa=!1;this.D=-1;this.qa=this.w;this.A=0;this.i=this.Qb;this.u=this.ac;this.la=null;bd(this);this.v.error=!1;Zc.prototype.reset.call(this)};l.rb=function(){return 0}; +l.save=function(){var a=new K(this);a.set(0,[this.f,this.H,this.D,this.Ba,this.w,this.ra,this.qa,this.A]);a.set(1,[]);a.set(2,[this.R,this.aa,this.v.Z]);a.set(3,Ld(this));a.set(4,md(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ka();ha();ka();var c=b[Symbol.iterator];b=c?c.call(b):la(b);this.f=b.next().value;this.H=b.next().value;this.D=b.next().value;this.Ba=b.next().value;this.w=b.next().value;this.ra=b.next().value;this.qa=b.next().value;this.A=b.next().value;b=a[2];this.R=b[0];hd(this,b[1]);this.v.Z=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;dTb&&(a!=Ub?a=Vb-a:this.Ra=this.za=!0);return a};function Nd(a,b){b?b==Ub?a.Ra=a.za=!0:b=Vb-b:a.ib=a.za=!0;return b}function Ld(a){var b=[];for(a=a.la;a;)b.push(a.Yb),a=a.next;return b}l.Qb=function(a){var b=this.G;a=this.qa=a;return b.b[(a&b.w)>>>b.f].i(a&16383,a)};l.ac=function(a,b){var c=this.G;a=this.qa=a;c.b[(a&c.w)>>>c.f].u(b,a&16383,a);return b}; +l.Ja=function(a){this.v.complete=!0;var b=this.C?Od(this.C)?1:this.v.Pa?-1:0:0,c=a?this.v.Pa?0:1:-1;this.v.Pa=!1;this.O=this.P=a;this.A=this.A&-5|(b?4:0);do{if(this.A){if(this.A&4){if(Pd(this.C,this.w,c)){this.V();break}++b||(this.A&=-5);c||c++}if(a=this.A&11)this.A&2?this.la||(this.A&=-3):this.A&1&&this.A++,a=!1;if(a){if(this.A&4&&Pd(this.C,this.w,c)){this.V();break}if(0>c)break}}this.A&=15;this.H=this.H&4194304?this.i(this.f):this.Ba=this.i(this.ra=this.w);this.H&=8388607;this.f=this.H&262143;if(a= +this.H>>18&15)this.f=this.f+this.i(a)&Qb;this.H&4194304?a=-1:(this.w=(this.w+1)%Pb,a=this.Ba/Yb|0);0<=a&&this.Ab(a)}while(0>4].call(this,a,a&15)}function P(a){this.b(a)} +function Rd(){var a=0,b=this.i(this.f),c=b/Zb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Zb+(d<<24)+(b&16777215);a&&(b=(b+a)%Rb);this.u(this.f,b)}function Sd(a,b){a=this.i(this.f);if(0>this.D)this.D=a,this.H=this.f|4194304,Md(this,-1);else{var c=this.D/Zb&63,d=this.D>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.u(b,a);this.D=-1}} +function Td(a,b){a=this.i(this.f);if(0>this.D)this.D=a,this.H=this.f|4194304,Md(this,-1);else{var c=this.D/Zb&63,d=this.D>>24&63;b=this.i(b)%Math.pow(2,d)*Math.pow(2,c)%Rb;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.u(this.f,a);this.D=-1}}function Ud(a,b){this.u(b,this.i(this.f))}function Vd(a,b){this.u(b,this.f)}function Wd(a,b){this.u(this.f,this.i(b))}function Xd(a,b){this.u(b,0)}function Yd(a,b){this.u(b,E-this.i(b))}function Zd(a,b){this.u(b,E)} +function $d(a,b){var c=this.i(this.f),d=this.i(b);this.u(b,ae(a,d,c)+(c-(c&G)))}function be(a,b){var c=this.i(b);this.u(b,ae(a,c,0))}function ce(a,b){b=this.i(b);var c=this.i(this.f);this.u(this.f,ae(a,c,b)+(b-(b&G)))}function de(a,b){var c=this.i(this.f),d=c;if(a&=384)switch(d-=d&G,a){case 256:d+=G;break;case 384:d+=c>Tb?G:0}c=d;this.u(this.f,c);b&&this.u(b,c)}function ee(a,b){var c=(this.i(this.f)&G)*F,d=this.i(b);this.u(b,ae(a,d,c)+c)} +function fe(a,b){var c=this.f*F,d=this.i(b);this.u(b,ae(a,d,c)+c)}function ge(a,b){b=(this.i(b)&G)*F;var c=this.i(this.f);this.u(this.f,ae(a,c,b)+b)}function he(a,b){var c=this.i(this.f),d=(c&G)*F,c=ae(a,c,d)+d;this.u(this.f,c);b&&this.u(b,c)}function ie(a,b){var c=this.i(this.f)&G,d=this.i(b);this.u(b,je(a,d,c)+c)}function ke(a,b){var c=this.i(b);this.u(b,je(a,c,this.f)+this.f)}function le(a,b){b=this.i(b)&G;var c=this.i(this.f);this.u(this.f,je(a,c,b)+b)} +function me(a,b){var c=this.i(this.f),d=c;if(a&=384)switch(d&=G,a){case 256:d+=G*F;break;case 384:d+=c>Sb?G*F:0}c=d;this.u(this.f,c);b&&this.u(b,c)}function ne(a,b){var c=this.i(this.f)/F|0,d=this.i(b);this.u(b,je(a,d,c)+c)}function oe(a,b){var c=this.i(b);this.u(b,je(a,c,0))}function pe(a,b){b=this.i(b)/F|0;var c=this.i(this.f);this.u(this.f,je(a,c,b)+b)}function qe(a,b){var c=this.i(this.f),d=c/F|0,c=je(a,c,d)+d;this.u(this.f,c);b&&this.u(b,c)}function Q(a){this.b(a)}function re(){} +function N(a){this.g("undefined opcode: "+ua(a));Md(this,-1);this.V()}function je(a,b,c){switch(a&384){case 0:b-=b&G;break;case 128:b=0;break;case 256:b=G*F;break;case 384:b=c>Sb?G*F:0}return b}function ae(a,b,c){switch(a&384){case 0:b&=G;break;case 128:b=0;break;case 256:b=G;break;case 384:b=c>Tb?G:0}return b}function R(a,b){return((a/H|0)&(b/H|0))*H+((a&b)>>>0)}function se(a,b){return((a/H|0)^(b/H|0))*H+((a^b)>>>0)}function te(a,b){return(~((a/H|0)^(b/H|0))&15)*H+(~(a^b)>>>0)} +function T(a,b){return(a/H|0|b/H|0)*H+((a|b)>>>0)} +var Qd=[P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},Rd,function(a,b){0>this.D&&Rd.call(this);Sd.call(this,0,b)},Sd,function(a,b){0>this.D&&Rd.call(this);Td.call(this,0,b)},Td,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)},Sd,Td,Ud,function(a,b){b&&this.v(b,this.w(this.f))},function(a,b){a=this.w(this.f);a=(a/G|0)+a%G*G;this.v(b,a)},function(a,b){this.v(b,this.f*G)},function(a,b){a=this.w(b);a=(a/G|0)+a%G*G;this.v(this.f,a)},function(a,b){a=this.w(this.f);a=(a/G|0)+a%G*G;this.v(this.f,a);b&&this.v(b,a)},function(a,b){this.v(b,Ld(this,this.w(this.f)))},function(a,b){this.v(b,this.f?Sb-this.f:0)},function(a,b){this.v(this.f,Ld(this, -this.w(b)))},function(a,b){a=Ld(this,this.w(this.f));this.v(this.f,a);b&&this.v(b,a)},function(a,b){this.v(b,this.abs(this.w(this.f)))},function(a,b){this.v(b,this.f)},function(a,b){this.v(this.f,this.abs(this.w(b)))},function(a,b){a=this.abs(this.w(this.f));this.v(this.f,a);b&&this.v(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)},N,function(a,b){a=this.w(b);this.v(b,this.w(this.f));this.v(this.f,a)},function(a,b){a=!1;for(var c=this.w(b),d=c/G|0,c=c&H;!a;)this.v(c,this.w(d)),c==this.f&&(a=!0),d=d+1&H,c=c+1&H,this.j.K||(this.v(b, -d*G+c),a||Kd(this,-1),a=!0)},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)},N,function(a){this.b(a)},function(a,b){a=this.w(b);a+=262145;this.v(a&H,this.w(this.f));a>=Ob&&(a-=Ob);a/G|0||(this.Sa=!0);this.v(b,a)},function(a,b){a=this.w(b);var c=this.w(a&H);this.v(this.f,c);this.f==b&&(a=c);a-=262145;0>a&&(a+=Ob);(a/G|0)==H&&(this.Sa=!0);this.v(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)},Ud,Vd,Wd,function(a,b){b&&this.u(b,this.i(this.f))},function(a,b){a=this.i(this.f);a=(a/F|0)+a%F*F;this.u(b,a)},function(a,b){this.u(b,this.f*F)},function(a,b){a=this.i(b);a=(a/F|0)+a%F*F;this.u(this.f,a)},function(a,b){a=this.i(this.f);a=(a/F|0)+a%F*F;this.u(this.f,a);b&&this.u(b,a)},function(a,b){this.u(b,Nd(this,this.i(this.f)))},function(a,b){this.u(b,this.f?Vb-this.f:0)},function(a,b){this.u(this.f,Nd(this, +this.i(b)))},function(a,b){a=Nd(this,this.i(this.f));this.u(this.f,a);b&&this.u(b,a)},function(a,b){this.u(b,this.abs(this.i(this.f)))},function(a,b){this.u(b,this.f)},function(a,b){this.u(this.f,this.abs(this.i(b)))},function(a,b){a=this.abs(this.i(this.f));this.u(this.f,a);b&&this.u(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)},N,function(a,b){a=this.i(b);this.u(b,this.i(this.f));this.u(this.f,a)},function(a,b){a=!1;for(var c=this.i(b),d=c/F|0,c=c&G;!a;)this.u(c,this.i(d)),c==this.f&&(a=!0),d=d+1&G,c=c+1&G,this.v.K||(this.u(b, +d*F+c),a||Md(this,-1),a=!0)},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)},N,function(a){this.b(a)},function(a,b){a=this.i(b);a+=262145;this.u(a&G,this.i(this.f));a>=Rb&&(a-=Rb);a/F|0||(this.Sa=!0);this.u(b,a)},function(a,b){a=this.i(b);var c=this.i(a&G);this.u(this.f,c);this.f==b&&(a=c);a-=262145;0>a&&(a+=Rb);(a/F|0)==G&&(this.Sa=!0);this.u(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)},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)},Vd,Vd,function(){this.v(this.f,0)},function(a,b){this.v(b,0);this.v(this.f,0)},function(a,b){this.v(b,qe(this.w(b),this.w(this.f)))},function(a,b){this.v(b,qe(this.w(b),this.f))},function(a,b){this.v(this.f,qe(this.w(b),this.w(this.f)))},function(a,b){a=qe(this.w(b),this.w(this.f));this.v(this.f,a);this.v(b,a)},function(a){this.b(a)},function(a){this.b(a)}, -function(a){this.b(a)},function(a){this.b(a)},Sd,Td,pe,Sd,function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},pe,pe,Ud,Ud,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)},Wd,Wd,function(a,b){this.v(this.f,E-this.w(b))},function(a,b){a=E-this.w(b);this.v(b,a);this.v(this.f,a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a){this.b(a)},function(a,b){this.v(b,E-this.w(this.f))},function(a,b){this.v(b,E-this.f)},function(){this.v(this.f,E-this.w(this.f))},function(a,b){a=E-this.w(this.f);this.v(b,a);this.v(this.f,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)},Xd,Xd,function(){this.v(this.f,E)},function(a,b){this.v(b,E);this.v(this.f,E)},Yd,$d,ae,be,ce,de,ee,fe,Yd,$d,ae,be,ce,de,ee,fe,Yd,$d,ae,be,ce,de,ee,fe,Yd,$d,ae,be,ce,de,ee,fe,ge,ie,je,ke,le,me,ne,oe,ge,ie,je,ke,le,me,ne,oe,ge,ie,je,ke,le,me,ne,oe,ge,ie,je,ke,le,me,ne,oe,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)},Xd,Xd,function(){this.u(this.f,0)},function(a,b){this.u(this.f,this.u(b,0))},function(a,b){this.u(b,R(this.i(b),this.i(this.f)))},function(a,b){this.u(b,R(this.i(b),this.f))},function(a,b){this.u(this.f,R(this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,R(this.i(b),this.i(this.f))))},function(a,b){this.u(b,R(E-this.i(b),this.i(this.f)))}, +function(a,b){this.u(b,R(E-this.i(b),this.f))},function(a,b){this.u(this.f,R(E-this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,R(E-this.i(b),this.i(this.f))))},Ud,Vd,re,Ud,function(a,b){this.u(b,R(this.i(b),E-this.i(this.f)))},function(a,b){this.u(b,R(this.i(b),E-this.f))},function(a,b){this.u(this.f,R(this.i(b),E-this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,R(this.i(b),E-this.i(this.f))))},re,re,Wd,Wd,function(a,b){this.u(b,se(this.i(b),this.i(this.f)))},function(a,b){this.u(b, +se(this.i(b),this.f))},function(a,b){this.u(this.f,se(this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,se(this.i(b),this.i(this.f))))},function(a,b){this.u(b,T(this.i(b),this.i(this.f)))},function(a,b){this.u(b,T(this.i(b),this.f))},function(a,b){this.u(this.f,T(this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,T(this.i(b),this.i(this.f))))},function(a,b){this.u(b,R(E-this.i(b),E-this.i(this.f)))},function(a,b){this.u(b,R(E-this.i(b),E-this.f))},function(a,b){this.u(this.f, +R(E-this.i(b),E-this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,R(E-this.i(b),E-this.i(this.f))))},function(a,b){this.u(b,te(this.i(b),this.i(this.f)))},function(a,b){this.u(b,te(this.i(b),this.f))},function(a,b){this.u(this.f,te(this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,te(this.i(b),this.i(this.f))))},Yd,Yd,function(a,b){this.u(this.f,E-this.i(b))},function(a,b){this.u(this.f,this.u(b,E-this.i(b)))},function(a,b){this.u(b,T(E-this.i(b),this.i(this.f)))},function(a,b){this.u(b, +T(E-this.i(b),this.f))},function(a,b){this.u(this.f,T(E-this.i(b),this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,T(E-this.i(b),this.i(this.f))))},function(a,b){this.u(b,E-this.i(this.f))},function(a,b){this.u(b,E-this.f)},function(){this.u(this.f,E-this.i(this.f))},function(a,b){this.u(this.f,this.u(b,E-this.i(this.f)))},function(a,b){this.u(b,T(this.i(b),E-this.i(this.f)))},function(a,b){this.u(b,T(this.i(b),E-this.f))},function(a,b){this.u(this.f,T(this.i(b),E-this.i(this.f)))},function(a, +b){this.u(this.f,this.u(b,T(this.i(b),E-this.i(this.f))))},function(a,b){this.u(b,T(E-this.i(b),E-this.i(this.f)))},function(a,b){this.u(b,T(E-this.i(b),E-this.f))},function(a,b){this.u(this.f,T(E-this.i(b),E-this.i(this.f)))},function(a,b){this.u(this.f,this.u(b,T(E-this.i(b),E-this.i(this.f))))},Zd,Zd,function(){this.u(this.f,E)},function(a,b){this.u(this.f,this.u(b,E))},$d,be,ce,de,ee,fe,ge,he,$d,be,ce,de,ee,fe,ge,he,$d,be,ce,de,ee,fe,ge,he,$d,be,ce,de,ee,fe,ge,he,ie,ke,le,me,ne,oe,pe,qe,ie,ke, +le,me,ne,oe,pe,qe,ie,ke,le,me,ne,oe,pe,qe,ie,ke,le,me,ne,oe,pe,qe,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)},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)},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]; -function re(a){v.call(this,"ROM",a,128);this.T=this.b=null;this.D=+a.addr;this.u=+a.size;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.A=a.file;this.H=sa(this.A);if(this.A){a=this.A;var b=ta(this.H);"json"!=b&&"hex"!=b&&(a=Aa()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ha(a,null,!0,function(a,b,g){g?(c.da("Unable to load ROM resource (error "+g+": "+a+")"),c.A=null):(ib(c.La,a,b),(a=Ia(a,b))?(c.b=a.Y,c.T=a.T):c.A=null);se(c)})}}p(re,v); -re.prototype.wa=function(a,b,c,d){this.G=b;this.i=c;this.C=d;se(this)};re.prototype.pa=function(){this.T&&(this.C&&te(this.C,this.id,this.D,this.u,this.T),delete this.T);return!0};re.prototype.fa=function(){return!0}; -function se(a){if(!Gb(a)){if(a.A){if(!a.b||!a.G)return;a.u||(a.u=a.b.length);if(a.b.length!=a.u)Eb(a,"ROM size ("+t(a.b.length,8,!0)+") does not match specified size ("+t(a.u,8,!0)+")");else{var b;b=a.D;if(Gc(a.G,b,a.u,Oc)){var c;for(c=0;c>>g.f;0>>= -g.f;0>>a.f;0f&&f>=oa&&(f+=na);f=Math.trunc(Math.abs(f))%na;void 0===g&&(g=e.size);for(h=d;g--&&h=q.bb&&c<=q.zb&&(b=c-(q.bb-q.vb));b&&(a.preventDefault&&a.preventDefault(),d.Na(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.xb&&(b=q.wb);d.Na(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.Na(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.wa=function(a,b,c,d){this.F=a;this.G=b;this.i=c;this.C=d;D(this)}; -l.tb=function(a){if(!this.b){var b=Zc(this.F,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ea(c[0]);if(d!=this.Ka)return;c=Ea(c[1]);if(this.b=wb(c)){var e=this.b.exports;if(e){var g=e.connect;g&&g.call(this.b,this.u);if(this.D=e.receiveData){this.u=a;this.status("Connected "+this.La+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.pa=function(a,b){if(!b)if(this.tb(this.u),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.fa=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new J(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Na=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 g=0;g<=b.length;g++){var f=b.charAt(g);if('"'==f||"'"==f)e?f==e&&(e=null):e=f;else if(f==d&&!e||!f)a.push(Ea(b.substring(c,g))),c=g+1}}return a} -function Be(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),g=a.pop();switch(d){case "*":d=g*e;break;case "/":if(!e)return!1;d=g/e;break;case "%":if(!e)return!1;d=g%e;break;case "+":d=g+e;break;case "-":d=g-e;break;case "<<":d=g<>":d=g>>e;break;case ">>>":d=g>>>e;break;case "<":d=g":d=g>e?1:0;break;case ">=":d=g>=e?1:0;break;case "==":d=g==e?1:0;break;case "!=":d=g!=e?1:0;break;case "&":d=g&e;break; +function(a){this.b(a)},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]; +function ue(a){v.call(this,"ROM",a,128);this.T=this.b=null;this.D=+a.addr;this.w=+a.size;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.A=a.file;this.H=va(this.A);if(this.A){a=this.A;var b=wa(this.H);"json"!=b&&"hex"!=b&&(a=Da()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ka(a,null,!0,function(a,b,g){g?(c.da("Unable to load ROM resource (error "+g+": "+a+")"),c.A=null):(lb(c.La,a,b),(a=La(a,b))?(c.b=a.Y,c.T=a.T):c.A=null);ve(c)})}}p(ue,v); +ue.prototype.wa=function(a,b,c,d){this.G=b;this.j=c;this.C=d;ve(this)};ue.prototype.pa=function(){this.T&&(this.C&&we(this.C,this.id,this.D,this.w,this.T),delete this.T);return!0};ue.prototype.fa=function(){return!0}; +function ve(a){if(!Jb(a)){if(a.A){if(!a.b||!a.G)return;a.w||(a.w=a.b.length);if(a.b.length!=a.w)Hb(a,"ROM size ("+t(a.b.length,8,!0)+") does not match specified size ("+t(a.w,8,!0)+")");else{var b;b=a.D;if(Ic(a.G,b,a.w,Qc)){var c;for(c=0;c>>g.f;0>>= +g.f;0>>a.f;0f&&f>=ra&&(f+=qa);f=Math.trunc(Math.abs(f))%qa;void 0===g&&(g=e.size);for(h=d;g--&&h=q.bb&&c<=q.zb&&(b=c-(q.bb-q.vb));b&&(a.preventDefault&&a.preventDefault(),d.Na(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.xb&&(b=q.wb);d.Na(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.Na(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.wa=function(a,b,c,d){this.F=a;this.G=b;this.j=c;this.C=d;D(this)}; +l.tb=function(a){if(!this.b){var b=ad(this.F,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ha(c[0]);if(d!=this.Ka)return;c=Ha(c[1]);if(this.b=zb(c)){var e=this.b.exports;if(e){var g=e.connect;g&&g.call(this.b,this.w);if(this.D=e.receiveData){this.w=a;this.status("Connected "+this.La+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.pa=function(a,b){if(!b)if(this.tb(this.w),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.fa=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new K(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Na=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.w.length&&(a.A=0);if(0>a.A||b!=a.w[a.A])a.w.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.w[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var g=0;g<=b.length;g++){var f=b.charAt(g);if('"'==f||"'"==f)e?f==e&&(e=null):e=f;else if(f==d&&!e||!f)a.push(Ha(b.substring(c,g))),c=g+1}}return a} +function Ee(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),g=a.pop();switch(d){case "*":d=g*e;break;case "/":if(!e)return!1;d=g/e;break;case "%":if(!e)return!1;d=g%e;break;case "+":d=g+e;break;case "-":d=g-e;break;case "<<":d=g<>":d=g>>e;break;case ">>>":d=g>>>e;break;case "<":d=g":d=g>e?1:0;break;case ">=":d=g>=e?1:0;break;case "==":d=g==e?1:0;break;case "!=":d=g!=e?1:0;break;case "&":d=g&e;break; case "^":d=g^e;break;case "|":d=g|e;break;case "&&":d=g&&e?1:0;break;case "||":d=g||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function R(a,b,c){var d;if(b){b=Ce(a,b);for(var e=0,g=!1,f=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,W--;f=r+f;d>>=8}d=t(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+f);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e} -function Ge(a,b){if(b)return Fe(a,b,a.W[b]);var c=0;for(b in a.W)Fe(a,b,a.W[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var Ee={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; -function He(a){ze.call(this,a);this.ya=!1;this.la=!0;this.va=S();this.L=S(0);this.ja=S(0);this.ba=S(0);this.H=[];this.b=this.M=this.J=[];Ie(this);this.R=this.ka=0;this.f=[];this.sa=void 0;Je(this);this.C=this;this.qa={};this.X=this.nb=0;this.S=null;this.O=[];Ke(this,a.messages);this.ua=a.commands;this.N=0;this.Ba=this.ta=null;this.D=this.Aa=this.za=this.ia=this.ra=0;this.ha=this.aa=null;var b=this;window?void 0===window[y]&&(window[y]=function(a){return dd(b,a)}):void 0===global[y]&&(global[y]=function(a){return dd(b, -a)})}p(He,ze);function U(a){a=a&&a.B;null==a&&(a=-1);return a}function S(a,b,c){return{B:void 0===a?null:a,qb:void 0===b?!1:b,ea:!1,ca:c}}function Le(a,b,c,d){a.B=b;a.qb=c||!1;a.ea=!1;a.ca=d}function Me(a){return[a.B,a.qb,a.ca,a.ea,a.Oa]}function Ne(a,b){var c=S(b[0],b[1],b[2]);c.ea=b[3];b[4]&&(c.lb=Ae(a,c.Oa=b[4]));return c}l=He.prototype; -l.wa=function(a,b,c,d){this.G=b;this.F=a;this.i=c;this.ha=a.u;(a=Zc(a,"messages"))&&Ke(this,a);Oe(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=U(V(d,c,d.ja));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.G.f;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var n=b[e];n.type==c?m++||d.g("..."):(c=n.type,m=Jc[c],n&&d.g(t(n.id,8)+" %"+t(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.i.ra==b&&(b=Kd(a.i,1)));if(0d&&(d=a.i.w(b)),0<=d&&(Le(a.f[a.R],b),++a.R==a.f.length&&(a.R=0)));return!1} -function Pf(a,b,c,d){var e=S(b.B),g=a.xa(b,1),f,h,k,m=0,n=g/Ub|0,r;for(r in Qf)if(f=Qf[r][n&r]){h=+r;n>>=6;switch(h){case 32512:k=Rf;m=n&3;break;case 32256:k=Sf;m=n&7;break;case 29248:k=Tf,m=(n&48)>>2|(n&6)>>1}break}k=k&&k[m]||"";"S"==k&&f>Uf&&(k="B");k=Vf[f||0]+k;k=Da(k,8);f?(k=28700==h?k+M(a,g/Vb&127,-1):k+M(a,g>>23&15,-1),k+=",",g&4194304&&(k+="@"),k+=M(a,g&262143,-1),(g=g>>18&15)&&(k+="("+M(a,g,-1)+")")):k+=Qe(g);g=k;f="";h=M(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.xa(e,1),f+=" "+Qe(k),null== -e.B)break;while(e.B!=b.B)}h+=Da(f,16)+g;c&&(h=Da(h,48)+";"+(c||""),h=a.i.j.Ea?h+("cycles="+ed(a.i).toString()+" cs="+t(a.i.ta)):h+(null!=d?"="+d.toString():""));return h}function Ie(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.f],!1)}a.M=["br"];if(a.J)for(b=1;b>>d.f],!0);a.J=["bw"];a.ra=0;a.ka=0} -l.Da=function(a,b,c){var d=!0;c||Wf(this,a,b,!1,!0);if(a!=this.b){var e=U(b);if(-1===e)this.g("invalid address: "+M(this,b.B)),d=!1;else{var g=this.G;g.b[e>>>g.f].Da(e&16383,a==this.J)}}d&&(a.push(b),c?b.ea=!0:(Xf(this,a,a.length-1,"set"),Je(this)));return d};function Wf(a,b,c,d,e){var g=!1;c=U(c);for(var f=1;f>>d.f],b==a.J));h.ea||Je(a);break}}return g} -function Yf(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,g=ra(d,2);Le(e.va,d);g+="="+M(e,e.xa(e.va),36)+" ";c+=g}if(b){b="";for(d=0;d=Ve?1:d==Te?23:18)+" "),b+=e;c+="\n"+b}return c}l.ob=function(a,b){return a[0]>b[0]?1:a[0]>>0,f],r=Fa(n,k,a.ob);0>r&&n.splice(-(r+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({fd:b,B:c,Fb:d,T:e,mb:g})}function ag(a,b,c){var d=[],e=U(b)>>>0;for(b=0;b>>0,h=g.Fb;if(e>=f&&eh[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.g(m)}h[3]&&(f=h[3],g=null);h=a.ba;m=b;h.B=m.B;h.ea=m.ea;h.ca=m.ca;a.g(Pf(a,b,f,g));e-=b.B-k;c++}}} -function Zf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(Kf+b):(a.P&&(a.g("ended assemble at "+M(a,a.ba.B)),a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(Gb(a)&&0n||"z"Uf&&(nd="B");if(Hg==Vf[ff]+nd){ef=29248!=ic?Ma:(Ma&3)<<1|(Ma&12)<<2;z=(md|ef<<6)*Ub;break}}if(0<= -z)break}if(0<=z)break}if(0<=z)if(cf)for(var od=cf.split(","),jb=0;jbF||127F||15F||262143< -F){a.g("memory address out of range: "+X[2]);z=-1;break}z+=F;if(X[3]){F=R(a,X[3]);if(void 0==F){z=-1;break}if(0>F||15Z.length&&(a.g("note: only "+Z.length+" available"),P=Z.length);T-=P;0>T&&(null==Z[Z.length-1].B?(P=T+P,T=0):T+=Z.length);var td=[];"call"==mf&&(lb=1E5,td=["CALL"]);for(void 0!==lf&&a.g(P+" instructions earlier:");0=Z.length&&(T=0);a.sa=P;of++;lb--}}of||(a.g("no "+nf+"history available"),a.sa=void 0)}else{var Sa=V(a,Y,a.ja);if(Sa){var va=0,rf="ds"==Pa;if(ka){if("l"==ka.charAt(0))ka=ka.substr(1)||Kg,va=De(a,ka);else{var sf=V(a,ka);sf&&(va=sf.B-Sa.B)}0>va&&(va=0);65536wf;wf++)uf+=String.fromCharCode((kc%64|0)+32),kc/=64}wa&&(wa+="\n");wa=rf?wa+(xa+","):wa+(Y+": "+xa+(0>vf?" "+uf:""))}wa&&a.g(wa);a.ca=Mg}}}}break;case "e":if("else"==f[0])break;var xf,yf,zf=f[0],wd=f[1];"e"==zf||"ew"==zf?(xf=a.xa,yf=a.eb):wd=null;if(null==wd)a.g("edit memory commands:"),a.g("\tew [a] [...] edit words at address a");else{var lc=V(a,wd,a.ja);if(lc)for(var mc=2;mcAd;){for(var ya=null,Qg=256;65536>ob.B>>>0;){Bd.B=a.xa(ob,2);if(null==ob.B||!Qg--)break;if(!(Bd.B&1)){for(var Rg=a,nc=Bd,Bf=null,pb=nc.B,Cf=pb,Cd=1;6>=Cd&&pb;Cd++){if(2If)a.g("step commands:"),a.g("\tp\tstep over instruction"),a.g("\tpr\tstep over instruction with register update");else if(a.N)a.g("step in progress");else{var Jf=S(a.i.u);a.xa(Jf);a.N?(a.Da(a.b,Jf,!0),af(a)||(a.F&&id(a.F),a.N=0)):fg(a,If?"tr":"t")}break;case "r":if("reset"==b){a.F&&a.F.reset();break}Mf(a,f);break;case "s":a:switch(f[1]){case "base":if(f[2]){var rb=+f[2]; -if(8==rb||10==rb||16==rb)a.ca=rb;else{a.g("invalid base: "+rb);break}}a.g("default base: "+a.ca);break;case "cs":var sb;void 0!==f[3]&&(sb=+f[3]);switch(f[2]){case "int":a.i.ha=sb;break;case "start":a.i.ua=sb;break;case "stop":a.i.ja=sb;break;default:a.g("unknown cs option");break a}void 0!==sb&&ad(a.i);a.g("checksums "+(a.i.j.Ea?"enabled":"disabled"));break;case "sp":void 0!==f[2]&&(fd(a.i,+f[2])||a.g("warning: using 1x multiplier, previous target not reached"));a.g("target speed: "+(a.i.W.toFixed(2)+ -"Mhz")+" ("+a.i.aa+"x)");break;default:if(f[1]){a.g("unknown option: "+f[1]);break}case "?":a.g("debugger options:"),a.g("\tbase #\t\tset default base to #"),a.g("\tcs int #\tset checksum cycle interval to #"),a.g("\tcs start #\tset checksum cycle start count to #"),a.g("\tcs stop #\tset checksum cycle stop count to #"),a.g("\tsp #\t\tset speed multiplier to #")}break;case "t":fg(a,f[0],f[1]);break;case "u":Nf(a,f[1],f[2],8);break;case "v":if("var"==f[0]){cg(a,b.substr(3))||(d=!1);break}if("ver"== -f[0]){a.g((Lb||"PDP10")+" version 1.34.2 ("+a.i.jb+",RELEASE)");a.g(window?window.navigator.userAgent:"");break}g=!0;break;case "?":if(f[1]){eg(a,b.substr(1));break}var Dd="commands:",Ed;for(Ed in hg)Dd+="\n"+Da(Ed,9)+hg[Ed];Md(a)||(Dd+="\nnote: history disabled if no exec breakpoints");a.g(Dd);break;default:g=!0}g&&(a.g("unknown command: "+b),d=!1)}}catch(Lf){a.g("debugger error: "+(Lf.stack||Lf.message)),d=!1}return d} -function dd(a,b,c){b=Ae(a,b,c);for(var d in b)if(!Zf(a,b[+d]))return!1;return!0} -var hg={"?":"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"},Uf=20,Vf=".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".split(" "), -Se=0,Te=1,Ue=2,Ve=3,We=4,Xe=5,Ye=6,Ze=7,Re="PC RA EA C0 C1 OV ND PD".split(" "),ig={},Qf=(ig[28672]={0:101},ig[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:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},ig[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Uf,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},ig[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},ig[29248]={24576:79,24640:80,25088:81,25152:82},ig[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},ig),Rf=["","I","M","S"],Sf=" L E LE A GE N G".split(" "),Tf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),$e=1E3,Kf=">> ";ab(function(){for(var a=C(document,y,"debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bmg){if(ng(d,this.M)){this.D=new J(this,"1.34.2",wg);ng(this.D)&&(xg(this,d),a=yg,zg(this.D));this.D.set(tg,Ga());Ag(this.D);var e=this.b&&!this.L;if(a==ug||ub("Click OK to restore the previous "+Lb+" machine state, or CANCEL to reset the machine.")){if(c=sg(d)){var g=d.get("code"),f=d.get("data");g&&("ok"==g?ng(d,f):("error"==g&&"no machine state"!= -f?(this.da("Error: "+f),"unable to verify user"==f&&(Ua(Bg,""),this.f=null)):this.g(g+": "+f),zg(d),ng(d)?(c=sg(d),e=!0):c=!1))}e&&qg(this,c?d:null)}else a==yg&&d.clear()}else qg(this);delete this.M;delete this.J}e=vb(this.id);for(g=0;ga[1];a=a[2];this.S=!0;this.j.U=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.i&&(Cg(this,this.i,b,c,a),L(this,-2),this.i.Z());this.P&&(xg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.A=0}; -function xg(a,b){if(ub("There may be a problem with your "+Lb+" machine.\n\nTo help us diagnose it, click OK to send this "+Lb+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.f||"";b=b.toString();var d={};d.app=Lb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ha("http://www.pcjs.org/api/v1/report",d,!0)}} -function gg(a,b,c){var d,e="none";if(a.A)return null;a.A--;var g=new J(a,"1.34.2"),f=new J(a,"1.34.2",rg),h=Ga();f.set(tg,h);g.set(tg,h);g.set(Dg,"1.34.2");g.set(Eg,window?window.location.href:null);g.set(Fg,window?window.navigator.userAgent:"");a.i&&a.i.fa&&(c&&(b&&(a.i.j.Z=a.i.j.K),a.i.V()),d=a.i.fa(b,c),"object"===typeof d&&g.set(a.i.id,d),c&&(a.i.j.U=!1,!1===d&&(e=null)));for(var h=vb(a.id),k=0;k=d||30<=(c.Qa+=d))&&(e.textContent=c.j.K?c.S.toFixed(2)+"Mhz":"Stopped",c.Qa=0)}if(a.u&&(a=a.u,b=b||0,a.M)){c=a.i.j.K;d=!!(a.i.A&8);if(0>=b||60<=(a.L+=b)){e=a.i.u;if(a.I.PC){var g=a.C&&a.C.ca||8,e=e||0,e=8==g?ra(e,void 0):t(e,void 0);a.I.PC.textContent!=e&&(a.I.PC.textContent=e)}a.L=0}-1>b?a.f=a.i.u:0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(f?' url="'+f+'"':"")));g||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));f=null;if("<"==a.charAt(0))try{g||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ha(e,null,!0,function(g,f,h){if(h||!f)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=f.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(f=f.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}f=f.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],f);$g(a,b,c)}})}else c(a,null)} -function ah(a,b,c,d,e){function g(a){if(void 0===k){var b=h&&C(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Ba(a))}function f(a){g("Error: "+a);m&&(--Xg||eb(!0));m=!1}var h,k,m=!0;Xg++;kb[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],A=document.createElement("style");A.type="text/css";A.styleSheet?A.styleSheet.cssText=n:A.appendChild(document.createTextNode(n));r.appendChild(A)}d|| -(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.2/components.xsl");n=function(e,k){k?Yg(d,null,a,null,!1,g,function(a,e){e?(ib(b,d,a),g("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Xg||eb(!0)):f("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),--Xg|| -eb(!0)):f("invalid machine element: "+b):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(a)}):f(e)};"<"!=c.charAt(0)?Yg(c,b,a,e,!0,g,n):Zg(c,null,b,a,e,!1,g,n)}else f("missing machine element: "+b)}catch(W){f(W.message)}return m}window.embedPDP10=function(a,b,c,d){eb(!1);return ah("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){eb(!1);return ah("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return xb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Ab[a]){for(var c=!0,d=Ab,e=a,g=b.length,f=[],h=[],k="",m=null,n=0;n=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1,Z--;f=r+f;d>>=8}d=t(c,0,!0)+" "+c+". "+ua(c,0,!0)+" "+("0b"+f);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e} +function Je(a,b){if(b)return Ie(a,b,a.W[b]);var c=0;for(b in a.W)Ie(a,b,a.W[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var He={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function Ke(a){Ce.call(this,a);this.ya=!1;this.la=!0;this.va=V();this.L=V(0);this.ja=V(0);this.ba=V(0);this.H=[];this.b=this.M=this.J=[];Le(this);this.R=this.ka=0;this.f=[];this.sa=void 0;Me(this);this.C=this;this.qa={};this.X=this.nb=0;this.S=null;this.O=[];Ne(this,a.messages);this.ua=a.commands;this.N=0;this.Ba=this.ta=null;this.D=this.Aa=this.za=this.ia=this.ra=0;this.ha=this.aa=null;var b=this;window?void 0===window[y]&&(window[y]=function(a){return fd(b,a)}):void 0===global[y]&&(global[y]=function(a){return fd(b, +a)})}p(Ke,Ce);function X(a){a=a&&a.B;null==a&&(a=-1);return a}function V(a,b,c){return{B:void 0===a?null:a,qb:void 0===b?!1:b,ea:!1,ca:c}}function Oe(a,b,c,d){a.B=b;a.qb=c||!1;a.ea=!1;a.ca=d}function Pe(a){return[a.B,a.qb,a.ca,a.ea,a.Oa]}function Qe(a,b){var c=V(b[0],b[1],b[2]);c.ea=b[3];b[4]&&(c.lb=De(a,c.Oa=b[4]));return c}l=Ke.prototype; +l.wa=function(a,b,c,d){this.G=b;this.F=a;this.j=c;this.ha=a.w;(a=ad(a,"messages"))&&Ne(this,a);Re(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=X(Y(d,c,d.ja));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.G.f;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var n=b[e];n.type==c?m++||d.g("..."):(c=n.type,m=Lc[c],n&&d.g(t(n.id,8)+" %"+t(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.j.ra==b&&(b=Md(a.j,1)));if(0d&&(d=a.j.i(b)),0<=d&&(Oe(a.f[a.R],b),++a.R==a.f.length&&(a.R=0)));return!1} +function Sf(a,b,c,d){var e=V(b.B),g=a.xa(b,1),f,h,k,m=0,n=g/Wb|0,r;for(r in Tf)if(f=Tf[r][n&r]){h=+r;n>>=6;switch(h){case 32512:k=Uf;m=n&3;break;case 32256:k=Vf;m=n&7;break;case 29248:k=Wf,m=(n&48)>>2|(n&6)>>1}break}k=k&&k[m]||"";"S"==k&&f>Xf&&(k="B");k=Yf[f||0]+k;k=Ga(k,8);f?(k=28700==h?k+M(a,g/Xb&127,-1):k+M(a,g>>23&15,-1),k+=",",g&4194304&&(k+="@"),k+=M(a,g&262143,-1),(g=g>>18&15)&&(k+="("+M(a,g,-1)+")")):k+=Te(g);g=k;f="";h=M(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.xa(e,1),f+=" "+Te(k),null== +e.B)break;while(e.B!=b.B)}h+=Ga(f,16)+g;c&&(h=Ga(h,48)+";"+(c||""),h=a.j.v.Ea?h+("cycles="+gd(a.j).toString()+" cs="+t(a.j.ta)):h+(null!=d?"="+d.toString():""));return h}function Le(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.f],!1)}a.M=["br"];if(a.J)for(b=1;b>>d.f],!0);a.J=["bw"];a.ra=0;a.ka=0} +l.Da=function(a,b,c){var d=!0;c||Zf(this,a,b,!1,!0);if(a!=this.b){var e=X(b);if(-1===e)this.g("invalid address: "+M(this,b.B)),d=!1;else{var g=this.G;g.b[e>>>g.f].Da(e&16383,a==this.J)}}d&&(a.push(b),c?b.ea=!0:($f(this,a,a.length-1,"set"),Me(this)));return d};function Zf(a,b,c,d,e){var g=!1;c=X(c);for(var f=1;f>>d.f],b==a.J));h.ea||Me(a);break}}return g} +function ag(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,g=ua(d,2);Oe(e.va,d);g+="="+M(e,e.xa(e.va),36)+" ";c+=g}if(b){b="";for(d=0;d=Ye?1:d==We?23:18)+" "),b+=e;c+="\n"+b}return c}l.ob=function(a,b){return a[0]>b[0]?1:a[0]>>0,f],r=Ia(n,k,a.ob);0>r&&n.splice(-(r+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({fd:b,B:c,Fb:d,T:e,mb:g})}function dg(a,b,c){var d=[],e=X(b)>>>0;for(b=0;b>>0,h=g.Fb;if(e>=f&&eh[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.g(m)}h[3]&&(f=h[3],g=null);h=a.ba;m=b;h.B=m.B;h.ea=m.ea;h.ca=m.ca;a.g(Sf(a,b,f,g));e-=b.B-k;c++}}} +function bg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(Nf+b):(a.P&&(a.g("ended assemble at "+M(a,a.ba.B)),a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(Jb(a)&&0n||"z"Xf&&(qd="B");if(Kg==Yf[jf]+qd){hf=29248!=mc?Pa:(Pa&3)<<1|(Pa&12)<<2;A=(pd|hf<<6)*Wb;break}}if(0<= +A)break}if(0<=A)break}if(0<=A)if(ff)for(var rd=ff.split(","),mb=0;mbI||127I||15 +I||262143I||15ca.length&&(a.g("note: only "+ca.length+" available"),S=ca.length);W-=S;0>W&&(null==ca[ca.length-1].B?(S=W+S,W=0):W+=ca.length);var wd=[];"call"==pf&&(ob=1E5,wd=["CALL"]);for(void 0!==of&&a.g(S+" instructions earlier:");0=ca.length&&(W=0);a.sa=S;rf++;ob--}}rf||(a.g("no "+qf+"history available"),a.sa=void 0)}else{var Va=Y(a,ba,a.ja);if(Va){var ya=0,uf="ds"==Sa;if(na){if("l"==na.charAt(0))na=na.substr(1)||Ng,ya=Ge(a,na);else{var vf=Y(a,na);vf&&(ya=vf.B-Va.B)}0>ya&&(ya=0);65536zf;zf++)xf+=String.fromCharCode((oc%64|0)+32),oc/=64}za&&(za+="\n");za=uf?za+(Aa+","):za+(ba+": "+Aa+(0>yf?" "+xf:""))}za&&a.g(za);a.ca=Pg}}}}break;case "e":if("else"==f[0])break;var Af,Bf,Cf=f[0],zd=f[1];"e"==Cf||"ew"==Cf?(Af=a.xa,Bf=a.eb):zd=null;if(null==zd)a.g("edit memory commands:"),a.g("\tew [a] [...] edit words at address a");else{var pc=Y(a,zd,a.ja);if(pc)for(var qc=2;qc< +f.length;qc++){var Ad=U(a,f[qc]);if(void 0===Ad){a.g("unknown value: "+f[qc]);break}a.g("changing "+M(a,pc.B)+" from "+Te(Af.call(a,pc))+" to "+Te(Ad));Bf.call(a,pc,Ad,1)}}break;case "g":a:{var Df=f[1],Rg=b;if(void 0!==Df){var Bd=Y(a,Df);if(!Bd)break a;Se(a,Bd,Rg);a.Da(a.b,Bd,!0)}df(a,!0,c)}break;case "h":a.v.K?(c||a.g("halting"),a.V()):Kb(a,!0)||c||a.g("already halted");break;case "i":if("if"==f[0]){var Cd;var qb=b.substr(2),qb=Ha(qb);U(a,qb)?(c||a.g("true: "+qb),Cd=!0):(c||a.g("false: "+qb),Cd= +!1);Cd||(d=!1);break}g=!0;break;case "k":var Sg=f[0];if("?"==f[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var Dd=0,Ed=V(),rb=V();for(a.g("stack trace for "+M(a,rb.B));10>Dd;){for(var Ba=null,Tg=256;65536>rb.B>>>0;){Ed.B=a.xa(rb,2);if(null==rb.B||!Tg--)break;if(!(Ed.B&1)){for(var Ug=a,rc=Ed,Ef=null,sb=rc.B,Ff=sb,Fd=1;6>=Fd&&sb;Fd++){if(2Lf)a.g("step commands:"),a.g("\tp\tstep over instruction"),a.g("\tpr\tstep over instruction with register update");else if(a.N)a.g("step in progress");else{var Mf=V(a.j.w);a.xa(Mf);a.N?(a.Da(a.b,Mf,!0),df(a)||(a.F&&kd(a.F),a.N=0)):ig(a,Lf?"tr":"t")}break;case "r":if("reset"==b){a.F&&a.F.reset(); +break}Pf(a,f);break;case "s":a:switch(f[1]){case "base":if(f[2]){var ub=+f[2];if(8==ub||10==ub||16==ub)a.ca=ub;else{a.g("invalid base: "+ub);break}}a.g("default base: "+a.ca);break;case "cs":var vb;void 0!==f[3]&&(vb=+f[3]);switch(f[2]){case "int":a.j.ha=vb;break;case "start":a.j.ua=vb;break;case "stop":a.j.ja=vb;break;default:a.g("unknown cs option");break a}void 0!==vb&&cd(a.j);a.g("checksums "+(a.j.v.Ea?"enabled":"disabled"));break;case "sp":void 0!==f[2]&&(hd(a.j,+f[2])||a.g("warning: using 1x multiplier, previous target not reached")); +a.g("target speed: "+(a.j.W.toFixed(2)+"Mhz")+" ("+a.j.aa+"x)");break;default:if(f[1]){a.g("unknown option: "+f[1]);break}case "?":a.g("debugger options:"),a.g("\tbase #\t\tset default base to #"),a.g("\tcs int #\tset checksum cycle interval to #"),a.g("\tcs start #\tset checksum cycle start count to #"),a.g("\tcs stop #\tset checksum cycle stop count to #"),a.g("\tsp #\t\tset speed multiplier to #")}break;case "t":ig(a,f[0],f[1]);break;case "u":Qf(a,f[1],f[2],8);break;case "v":if("var"==f[0]){fg(a, +b.substr(3))||(d=!1);break}if("ver"==f[0]){a.g((Ob||"PDP10")+" version 1.34.2 ("+a.j.jb+",RELEASE)");a.g(window?window.navigator.userAgent:"");break}g=!0;break;case "?":if(f[1]){hg(a,b.substr(1));break}var Gd="commands:",Hd;for(Hd in kg)Gd+="\n"+Ga(Hd,9)+kg[Hd];Od(a)||(Gd+="\nnote: history disabled if no exec breakpoints");a.g(Gd);break;default:g=!0}g&&(a.g("unknown command: "+b),d=!1)}}catch(Of){a.g("debugger error: "+(Of.stack||Of.message)),d=!1}return d} +function fd(a,b,c){b=De(a,b,c);for(var d in b)if(!bg(a,b[+d]))return!1;return!0} +var kg={"?":"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"},Xf=20,Yf=".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".split(" "), +Ve=0,We=1,Xe=2,Ye=3,Ze=4,$e=5,af=6,bf=7,Ue="PC RA EA C0 C1 OV ND PD".split(" "),lg={},Tf=(lg[28672]={0:101},lg[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:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},lg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Xf,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},lg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},lg[29248]={24576:79,24640:80,25088:81,25152:82},lg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, +28692:98,28696:99,28700:100},lg),Uf=["","I","M","S"],Vf=" L E LE A GE N G".split(" "),Wf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),cf=1E3,Nf=">> ";db(function(){for(var a=z(document,y,"debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bpg){if(qg(d,this.M)){this.D=new K(this,"1.34.2",zg);qg(this.D)&&(Ag(this,d),a=Bg,Cg(this.D));this.D.set(wg,Ja());Dg(this.D);var e=this.b&&!this.L;if(a==xg||xb("Click OK to restore the previous "+Ob+" machine state, or CANCEL to reset the machine.")){if(c=vg(d)){var g=d.get("code"),f=d.get("data");g&&("ok"==g?qg(d,f):("error"==g&&"no machine state"!= +f?(this.da("Error: "+f),"unable to verify user"==f&&(Xa(Eg,""),this.f=null)):this.g(g+": "+f),Cg(d),qg(d)?(c=vg(d),e=!0):c=!1))}e&&tg(this,c?d:null)}else a==Bg&&d.clear()}else tg(this);delete this.M;delete this.J}e=yb(this.id);for(g=0;ga[1];a=a[2];this.S=!0;this.v.U=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.j&&(Fg(this,this.j,b,c,a),L(this,-2),this.j.Z());this.P&&(Ag(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.A=0}; +function Ag(a,b){if(xb("There may be a problem with your "+Ob+" machine.\n\nTo help us diagnose it, click OK to send this "+Ob+" machine state to http://www.pcjs.org.")){var c=a.ba;a=a.f||"";b=b.toString();var d={};d.app=Ob;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 jg(a,b,c){var d,e="none";if(a.A)return null;a.A--;var g=new K(a,"1.34.2"),f=new K(a,"1.34.2",ug),h=Ja();f.set(wg,h);g.set(wg,h);g.set(Gg,"1.34.2");g.set(Hg,window?window.location.href:null);g.set(Ig,window?window.navigator.userAgent:"");a.j&&a.j.fa&&(c&&(b&&(a.j.v.Z=a.j.v.K),a.j.V()),d=a.j.fa(b,c),"object"===typeof d&&g.set(a.j.id,d),c&&(a.j.v.U=!1,!1===d&&(e=null)));for(var h=yb(a.id),k=0;k=d||30<=(c.Qa+=d))&&(e.textContent=c.v.K?c.S.toFixed(2)+"Mhz":"Stopped",c.Qa=0)}if(a.w&&(a=a.w,b=b||0,a.M)){c=a.j.v.K;d=!!(a.j.A&8);if(0>=b||60<=(a.L+=b)){e=a.j.w;if(a.I.PC){var g=a.C&&a.C.ca||8,e=e||0,e=8==g?ua(e,void 0):t(e,void 0);a.I.PC.textContent!=e&&(a.I.PC.textContent=e)}a.L=0}-1>b?a.f=a.j.w:0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(f?' url="'+f+'"':"")));g||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));f=null;if("<"==a.charAt(0))try{g||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ka(e,null,!0,function(g,f,h){if(h||!f)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=f.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(f=f.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}f=f.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],f);ch(a,b,c)}})}else c(a,null)} +function dh(a,b,c,d,e){function g(a){if(void 0===k){var b=h&&z(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Ea(a))}function f(a){g("Error: "+a);m&&(--$g||hb(!0));m=!1}var h,k,m=!0;$g++;nb[b]={};try{if(h=document.getElementById(b)){var n;if("object"==typeof resources&&(n=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=n:B.appendChild(document.createTextNode(n));r.appendChild(B)}d|| +(n=a,"pdp"==a.substr(0,3)&&(n="pdpjs"),d="/versions/"+n+"/1.34.2/components.xsl");n=function(e,k){k?ah(d,null,a,null,!1,g,function(a,e){e?(lb(b,d,a),g("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--$g||hb(!0)):f("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),--$g|| +hb(!0)):f("invalid machine element: "+b):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(a)}):f(e)};"<"!=c.charAt(0)?ah(c,b,a,e,!0,g,n):bh(c,null,b,a,e,!1,g,n)}else f("missing machine element: "+b)}catch(Z){f(Z.message)}return m}window.embedPDP10=function(a,b,c,d){hb(!1);return dh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){hb(!1);return dh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return Ab(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Db[a]){for(var c=!0,d=Db,e=a,g=b.length,f=[],h=[],k="",m=null,n=0;n":62,"?":63,"@":64,Ka:65,Bb:66,Db:67,$b:68,E:69,ac:70,bc:71,cc:72,dc:73,ec:74,fc:75,gc:76,hc:77,ic:78,jc:79,kc:80,Q:81, lc:82,mc:83,nc:84,oc:85,pc:86,qc:87,rc:88,sc:89,ab:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,tc:97,uc:98,vc:99,d:100,e:101,wc:102,xc:103,yc:104,zc:105,Ac:106,k:107,Bc:108,Cc:109,n:110,Dc:111,p:112,q:113,r:114,Ec:115,t:116,Fc:117,Gc:118,Hc:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Ya:127}; function ka(a,b,c,d){var e="";if(null==a||isNaN(a))for(;0a&&-1=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function la(a,b){b?12"']/g,function(a){return ra[a]})}function sa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={"&":"&","<":"<",">":">",'"':""","'":"'"}; +function na(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function oa(){var a=t();return-1!==a.indexOf("pcjs.org",a.length-8)}function pa(a){return a.replace(/[&<>"']/g,function(a){return ra[a]})}function sa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={"&":"&","<":"<",">":">",'"':""","'":"'"}; 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 v(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 u(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="",p;for(p in b)b.hasOwnProperty(p)&&(l&&(l+="&"),l+=p+"="+encodeURIComponent(b[p]));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 ua(a,b){var c,d={H:null,N: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&&(w(d.H[0]),d=null):(w("Empty resource: "+a),d=null));d.N=g.symbols}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.ma=this.id:(this.na=this.id.substr(0,a),this.ma=this.id.substr(a+1));this.c={ready:!1,sa:!1,Fa:!1,C:!1,error:!1};this.ua=null;this.c.error=!1;this.v=this.g=this.o=this.u=this.ba=null;C.push(this)}function Ia(a,b,c){Ja[a]&&b&&(Ja[a][b]=c)}function Ka(){return Date.now()||+new Date} +function B(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Oa=b.comment;this.Ua=b;this.exports={};this.m=this.bindings={};a=this.id.indexOf(".");0>a?this.ma=this.id:(this.na=this.id.substr(0,a),this.ma=this.id.substr(a+1));this.g={ready:!1,sa:!1,Fa:!1,C:!1,error:!1};this.ua=null;this.g.error=!1;this.v=this.h=this.o=this.u=this.ba=null;C.push(this)}function Ia(a,b,c){Ja[a]&&b&&(Ja[a][b]=c)}function Ka(){return Date.now()||+new Date} function w(a){window&&window.alert(a)}function La(a){var b=!1;window&&(b=window.confirm(a));return b}function D(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.lb,a];this.v=this.g=this.o=this.u=null;this.exports={hold:this.eb,toggle:this.wb,reset:this.sb, +var H="pdp10",K="PDPjs",Ua=Math.pow(2,18),Va=Math.pow(2,18)-1,Wa=Math.pow(2,36),L=Math.pow(2,36)-1,M=Math.pow(2,18),N=Math.pow(2,18)-1,Xa=Math.pow(2,17)-1,Ya=Math.pow(2,35)-1,Za=Math.pow(2,35),$a=Math.pow(2,36),O=Math.pow(2,32),ab=Math.pow(2,23),bb=Math.pow(2,30),H="pdp10",K="PDPjs"; +function cb(a,b){B.call(this,"Panel",a);this.B=this.D=0;this.R=b;this.b=this.w=this.i=this.j=0;this.G=this.I=-1;this.K=this.L=this.s=!1;this.O=db;this.l={};this.a={START:[1,1,!0,!1,this.mb],STEP:[1,1,!1,!1,this.nb],ENABLE:[1,1,!1,!1,this.hb],CONT:[1,1,!0,!1,this.fb],DEP:[0,0,!0,!1,this.gb],EXAM:[1,1,!0,!1,this.ib],LOAD:[1,1,!0,!1,this.kb],TEST:[0,0,!0,!1,this.jb]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.lb,a];this.v=this.h=this.o=this.u=null;this.exports={hold:this.eb,toggle:this.wb,reset:this.sb, set:this.vb};J(this)}n(cb,B);k=cb.prototype;k.reset=function(a){this.stop();a&&eb(this,this.j=0)}; -k.U=function(a,b,c,d){if(this.u&&this.u.U(a,b,c,d)||this.g&&this.g.U(a,b,c,d))return!0;switch(b){case "PC":return this.m[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.m[b]=c,this.l[b]=d?1:0,this.D++,!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(){fb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){gb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){fb(a, -b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){gb(a,b)}}(this,b),!0):B.prototype.U.call(this,a,b,c,d)}};k.Z=function(a,b,c,d){this.u=a;this.o=b;this.g=c;this.v=d;hb(this);ib(this)};k.V=function(a,b){if(!b)if(this.R&&jb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.P=function(a){return a?this.save():!0};k.save=function(){var a=new P(this);a.set(0,[this.b,this.j,this.i]);return a.data()}; +k.U=function(a,b,c,d){if(this.u&&this.u.U(a,b,c,d)||this.h&&this.h.U(a,b,c,d))return!0;switch(b){case "PC":return this.m[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.m[b]=c,this.l[b]=d?1:0,this.D++,!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(){fb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){gb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){fb(a, +b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){gb(a,b)}}(this,b),!0):B.prototype.U.call(this,a,b,c,d)}};k.Z=function(a,b,c,d){this.u=a;this.o=b;this.h=c;this.v=d;hb(this);ib(this)};k.V=function(a,b){if(!b)if(this.R&&jb(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};k.P=function(a){return a?this.save():!0};k.save=function(){var a=new P(this);a.set(0,[this.b,this.j,this.i]);return a.data()}; k.restore=function(a){if(a=a[0])kb(this,this.b=a[0]),eb(this,this.j=a[1]),lb(this,a[2]);return!0};k.sb=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}ib(this);return!0};function mb(a,b,c){if(a=a.m[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function hb(a,b){for(var c in a.l)mb(a,c,null!=b?b:a.l[c])}function nb(a,b,c){if(a=a.m[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a){for(var b in a.a)nb(a,b,a.a[b][1])} k.eb=function(a,b,c){if(fb(this,b)){if(c){var d=this;setTimeout(function(){gb(d,b);a&&a()},+c);return!1}gb(this,b)}return!0}; k.vb=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.o(b&16383,b);a.j--;a=b}else a=this.g.h(this.b);eb(this,this.j=a)}};k.kb=function(a){a||this.g.c.A||kb(this,this.i)};k.jb=function(a){a?(this.s=!0,hb(this,!0)):(this.s=!1,hb(this),lb(this,0))};k.lb=function(a,b){this.i=a?this.i|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.i&1<>>a.b];a.j++;b=c.o(b&16383,b);a.j--;a=b}else a=this.h.c(this.b);eb(this,this.j=a)}};k.kb=function(a){a||this.h.g.A||kb(this,this.i)};k.jb=function(a){a?(this.s=!0,hb(this,!0)):(this.s=!1,hb(this),lb(this,0))};k.lb=function(a,b){this.i=a?this.i|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.i&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.b;0f&&(p=f);if(h&&h.size){if(h.type==d){if(e+f<=h.aa)return h.wa+=h.aa-e,h.aa=e,!0;if(e>=h.aa+h.wa){p=h.size-(e-l);p>f&&(p=f);h.wa=e-h.aa+p;e=l+16384;f-=p;g++;continue}}return Cb(Db,e,f)}e=new S(a,e,p,16384,d);zb(e,h);a.a[g++]=e;e=l+16384;f-=p}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Eb[d]+" at "+la(b)),!0):Cb(Fb,b,c)}function xb(a,b,c){var d=a.a[(b&a.i)>>>a.b];a.j++;d.m(c,b&16383,b);a.j--} -function Ab(a){for(var b=0,c=[],d=0;d=a.W&&(a.W+=a.fa,c=!0);0<=a.ga&&a.ga<=Ub(a)&&(a.fa=a.ga=-1,Tb(a),Q(a),c=!0);c&&a.M(Ub(a)+" cycles: checksum="+r(a.oa))}} -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.c.C)a=!0;else{var b=null,c,h=D(a.id);for(c=0;ca.O/a.R&&(b=1);a.X=b;b=a.Ba*a.X;if(a.R!=b){a.R=b;b=a.R.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.M("target speed: "+b)}c&&a.u&&(c=a.u,c.ba&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.ba.focus(),window&&window.scrollTo(b,d)))}ub(a,a.B);a.B=0;a.w=Ka();a.G=0;Wb(a)}function Yb(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Zb(a,b){var c=a.I-=a.K;a.K=0;b&&(a.I=0);return c} -k.tb=function(){if(this.c.A){this.qa>=this.Da&&Wb(this,!0);this.da=0;this.ea=Ka();if(this.G){var a=this.ea-this.G;a>this.Ca&&(this.w+=a,this.w>this.ea&&(this.w=this.ea))}try{do{for(var b,c=this.c.ta?1:this.ha,d=this.D.length-1;0<=d;d--){var e=this.D[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.xa(b)}catch(f){if("number"!=typeof f)throw f;}b=Zb(this,!0);this.da+=b;this.B+=b;vb(this,b);tb(this,b);this.ca-=b;if(0>=this.ca){this.ca+=this.ha;++this.Ea>=$b&&(this.u&&R(this.u,void 0),this.Ea=0);break}}while(this.c.A)}catch(f){Q(this); -this.u&&this.u.stop(Ka(),Ub(this));a=f.stack||f.message;this.c.error=!0;this.F(a);return}if(this.c.A){a=setTimeout;b=this.Qa;this.G=Ka();c=this.Ca;this.da&&(c=Math.round(c*this.da/this.ha));c-=this.G-this.ea;if(d=this.G-this.w)this.O=Math.round(this.B/(10*d))/100,864E5<=d&&(this.L=0,Vb(this));if(0>c||this.Oc&&(this.w-=c),c=0;this.qa+=this.da;this.G+=c;a(b,c)}}}; -function sb(a){var b;a.c.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.c.A)a.M(a.toString()+" busy");else{Vb(a);a.c.A=!0;a.c.Ia=!0;if(b=a.m.run)b.textContent="Halt";a.u&&a.u.start(a.w,Ub(a));a.v||a.status("Started");setTimeout(a.Qa,0)}}k.xa=function(){return 0};function Q(a){var b=!1;if(a.c.A){Zb(a);ub(a,a.B);a.B=0;a.c.A=!1;if(b=a.m.run)b.textContent="Run";a.u&&a.u.stop(Ka(),Ub(a));b=!0;a.v||a.status("Stopped")}a.c.complete=void 0;return b}var Xb=30,$b=15,Rb=["power","reset"]; -function ac(a){var b=+a.model||1001;Qb.call(this,a,1E6);this.$a=b;this.Na=+a.addrReset||0;this.bb=bc.bind(this);this.a=U.bind(this);this.ja=null;this.Ma=[];this.c.complete=!1}n(ac,Qb);k=ac.prototype;k.reset=function(){this.status("Model "+this.$a);this.c.A&&Q(this);this.b=this.s=this.ra=0;this.j=this.Aa=this.Na;this.Pa=this.Za=this.za=!1;this.l=-1;this.ka=this.j;this.i=0;this.h=this.pb;this.f=this.Ab;this.ja=null;Sb(this);this.c.error=!1;Qb.prototype.reset.call(this)};k.Sa=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[this.b,this.s,this.l,this.ra,this.j,this.Aa,this.ka,this.i]);a.set(1,[]);a.set(2,[this.L,this.X,this.c.J]);a.set(3,cc(this));a.set(4,Yb(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.b=b.next().value;this.s=b.next().value;this.l=b.next().value;this.ra=b.next().value;this.j=b.next().value;this.Aa=b.next().value;this.ka=b.next().value;this.i=b.next().value;b=a[2];this.L=b[0];Vb(this,b[1]);this.c.J=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;dXa&&(a!=Ya?a=Za-a:this.Pa=this.za=!0);return a};function ec(a,b){b?b==Ya?a.Pa=a.za=!0:b=Za-b:a.Za=a.za=!0;return b}function cc(a){var b=[];for(a=a.ja;a;)b.push(a.xb),a=a.next;return b}k.pb=function(a){var b=this.o;a=this.ka=a;return b.a[(a&b.i)>>>b.b].h(a&16383,a)};k.Ab=function(a,b){var c=this.o;a=this.ka=a;c.a[(a&c.i)>>>c.b].f(b,a&16383,a)}; -k.xa=function(a){this.c.complete=!0;var b=a?this.c.Ia?0:1:-1;this.c.Ia=!1;this.I=this.K=a;this.i=this.i&-5|0;do{if(a=this.i)if(a=this.i&11)this.i&2?this.ja||(this.i&=-3):this.i&1&&this.i++,a=!1;if(a){if(this.i&4&&this.v.j(this.j,b)){Q(this);break}if(0>b)break}this.i&=15;this.s=this.s&4194304?this.h(this.b):this.ra=this.h(this.Aa=this.j);this.s&=8388607;this.b=this.s&262143;if(a=this.s>>18&15)this.b=this.b+this.h(a)&Va;this.s&4194304?a=-1:(this.j=(this.j+1)%Ua,a=this.ra/ab|0);0<=a&&this.bb(a)}while(0< -this.K);return this.c.complete?this.I-this.K:!1===this.c.complete?-1:0};y(function(){for(var a=I(document,H,"cpu"),b=0;b>4].call(this,a,a&15)}function V(a){this.a(a)}function gc(){var a=0,b=this.h(this.b),c=b/bb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*bb+(d<<24)+(b&16777215);a&&(b=(b+a)%L);this.f(this.b,b)} -function hc(a,b){a=this.h(this.b);if(0>this.l)this.l=a,this.s=this.b|4194304,dc(this);else{var c=this.l/bb&63,d=this.l>>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.l=-1}}function ic(a,b){a=this.h(this.b);if(0>this.l)this.l=a,this.s=this.b|4194304,dc(this);else{var c=this.l/bb&63,d=this.l>>24&63;b=this.h(b)%Math.pow(2,d)*Math.pow(2,c)%L;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.f(this.b,a);this.l=-1}}function jc(a,b){this.f(b,this.h(this.b))} -function kc(a,b){this.f(b,this.b)}function lc(a,b){this.f(this.b,this.h(b))}function mc(a,b){this.f(b,0)}function nc(a,b){this.f(b,M-this.h(b))}function oc(a,b){this.f(b,M)}function pc(a,b){var c=this.h(this.b),d=this.h(b);this.f(b,W(a,d,c)+(c-(c&O)))}function qc(a,b){var c=this.h(b);this.f(b,W(a,c,0))}function rc(a,b){b=this.h(b);var c=this.h(this.b);this.f(this.b,W(a,c,b)+(b-(b&O)))} -function sc(a,b){var c=this.h(this.b),d=c;if(a&=384)switch(d-=d&O,a){case 256:d+=O;break;case 384:d+=c>Xa?O:0}c=d;this.f(this.b,c);b&&this.f(b,c)}function tc(a,b){var c=(this.h(this.b)&O)*N,d=this.h(b);this.f(b,W(a,d,c)+c)}function uc(a,b){var c=this.b*N,d=this.h(b);this.f(b,W(a,d,c)+c)}function vc(a,b){b=(this.h(b)&O)*N;var c=this.h(this.b);this.f(this.b,W(a,c,b)+b)}function wc(a,b){var c=this.h(this.b),d=(c&O)*N,c=W(a,c,d)+d;this.f(this.b,c);b&&this.f(b,c)} -function xc(a,b){var c=this.h(this.b)&O,d=this.h(b);this.f(b,X(a,d,c)+c)}function yc(a,b){var c=this.h(b);this.f(b,X(a,c,this.b)+this.b)}function zc(a,b){b=this.h(b)&O;var c=this.h(this.b);this.f(this.b,X(a,c,b)+b)}function Ac(a,b){var c=this.h(this.b),d=c;if(a&=384)switch(d&=O,a){case 256:d+=O*N;break;case 384:d+=c>Wa?O*N:0}c=d;this.f(this.b,c);b&&this.f(b,c)}function Bc(a,b){var c=this.h(this.b)/N|0,d=this.h(b);this.f(b,X(a,d,c)+c)}function Cc(a,b){var c=this.h(b);this.f(b,X(a,c,0))} -function Dc(a,b){b=this.h(b)/N|0;var c=this.h(this.b);this.f(this.b,X(a,c,b)+b)}function Ec(a,b){var c=this.h(this.b),d=c/N|0,c=X(a,c,d)+d;this.f(this.b,c);b&&this.f(b,c)}function Y(a){this.a(a)}function Fc(){}function U(a){this.M("undefined opcode: "+la(a));dc(this);Q(this)}function X(a,b,c){switch(a&384){case 0:b-=b&O;break;case 128:b=0;break;case 256:b=O*N;break;case 384:b=c>Wa?O*N:0}return b} -function W(a,b,c){switch(a&384){case 0:b&=O;break;case 128:b=0;break;case 256:b=O;break;case 384:b=c>Xa?O:0}return b}function Gc(a,b){return((a/$a|0)&(b/$a|0))*$a+((a&b)>>>0)} -var fc=[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,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},gc,function(a,b){0>this.l&&gc.call(this);hc.call(this,0,b)},hc,function(a,b){0>this.l&&gc.call(this);ic.call(this,0,b)},ic,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, +k.V=function(a,b){var c=Sb(this.u,"autoStart");null!=c?this.g.J="true"==c?!0:"false"==c?!1:!!c:null==this.g.J&&(this.g.J=void 0===this.m.run);if(!b){if(a){Tb(this);if(!this.restore(a))return!1;Ub(this)}else this.reset();this.status("No debugger detected");this.g.J||this.M("CPU will not be auto-started "+(this.la?"(click Run to start)":"(type 'go' to start)"))}return!0};k.P=function(a){return a?this.save():!0};k.J=function(){return this.g.A?!0:this.g.J?(sb(this),!0):!1};k.Sa=function(){return 0}; +function Ub(a){void 0===a.pa&&(a.pa=0);void 0===a.fa&&(a.fa=-1);void 0===a.ga&&(a.ga=-1);a.g.ta=0<=a.pa&&0=a.W&&(a.W+=a.fa,c=!0);0<=a.ga&&a.ga<=Vb(a)&&(a.fa=a.ga=-1,Ub(a),Q(a),c=!0);c&&a.M(Vb(a)+" cycles: checksum="+r(a.oa))}} +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.g.C)a=!0;else{var b=null,c,h=D(a.id);for(c=0;ca.O/a.R&&(b=1);a.X=b;b=a.Ba*a.X;if(a.R!=b){a.R=b;b=a.R.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.M("target speed: "+b)}c&&a.u&&(c=a.u,c.ba&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.ba.focus(),window&&window.scrollTo(b,d)))}ub(a,a.B);a.B=0;a.w=Ka();a.G=0;Xb(a)}function Zb(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function $b(a,b){var c=a.I-=a.K;a.K=0;b&&(a.I=0);return c} +k.tb=function(){if(this.g.A){this.qa>=this.Da&&Xb(this,!0);this.da=0;this.ea=Ka();if(this.G){var a=this.ea-this.G;a>this.Ca&&(this.w+=a,this.w>this.ea&&(this.w=this.ea))}try{do{for(var b,c=this.g.ta?1:this.ha,d=this.D.length-1;0<=d;d--){var e=this.D[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.xa(b)}catch(f){if("number"!=typeof f)throw f;}b=$b(this,!0);this.da+=b;this.B+=b;vb(this,b);tb(this,b);this.ca-=b;if(0>=this.ca){this.ca+=this.ha;++this.Ea>=ac&&(this.u&&R(this.u,void 0),this.Ea=0);break}}while(this.g.A)}catch(f){Q(this); +this.u&&this.u.stop(Ka(),Vb(this));a=f.stack||f.message;this.g.error=!0;this.F(a);return}if(this.g.A){a=setTimeout;b=this.Qa;this.G=Ka();c=this.Ca;this.da&&(c=Math.round(c*this.da/this.ha));c-=this.G-this.ea;if(d=this.G-this.w)this.O=Math.round(this.B/(10*d))/100,864E5<=d&&(this.L=0,Wb(this));if(0>c||this.Oc&&(this.w-=c),c=0;this.qa+=this.da;this.G+=c;a(b,c)}}}; +function sb(a){var b;a.g.error?(a.M(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.g.A)a.M(a.toString()+" busy");else{Wb(a);a.g.A=!0;a.g.Ia=!0;if(b=a.m.run)b.textContent="Halt";a.u&&a.u.start(a.w,Vb(a));a.v||a.status("Started");setTimeout(a.Qa,0)}}k.xa=function(){return 0};function Q(a){var b=!1;if(a.g.A){$b(a);ub(a,a.B);a.B=0;a.g.A=!1;if(b=a.m.run)b.textContent="Run";a.u&&a.u.stop(Ka(),Vb(a));b=!0;a.v||a.status("Stopped")}a.g.complete=void 0;return b}var Yb=30,ac=15,Rb=["power","reset"]; +function bc(a){var b=+a.model||1001;Qb.call(this,a,1E6);this.$a=b;this.Na=+a.addrReset||0;this.bb=cc.bind(this);this.a=T.bind(this);this.ja=null;this.Ma=[];this.g.complete=!1}n(bc,Qb);k=bc.prototype;k.reset=function(){this.status("Model "+this.$a);this.g.A&&Q(this);this.b=this.s=this.ra=0;this.j=this.Aa=this.Na;this.Pa=this.Za=this.za=!1;this.l=-1;this.ka=this.j;this.i=0;this.c=this.pb;this.f=this.Ab;this.ja=null;Tb(this);this.g.error=!1;Qb.prototype.reset.call(this)};k.Sa=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[this.b,this.s,this.l,this.ra,this.j,this.Aa,this.ka,this.i]);a.set(1,[]);a.set(2,[this.L,this.X,this.g.J]);a.set(3,dc(this));a.set(4,Zb(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.b=b.next().value;this.s=b.next().value;this.l=b.next().value;this.ra=b.next().value;this.j=b.next().value;this.Aa=b.next().value;this.ka=b.next().value;this.i=b.next().value;b=a[2];this.L=b[0];Wb(this,b[1]);this.g.J=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;dYa&&(a!=Za?a=$a-a:this.Pa=this.za=!0);return a};function fc(a,b){b?b==Za?a.Pa=a.za=!0:b=$a-b:a.Za=a.za=!0;return b}function dc(a){var b=[];for(a=a.ja;a;)b.push(a.xb),a=a.next;return b}k.pb=function(a){var b=this.o;a=this.ka=a;return b.a[(a&b.i)>>>b.b].c(a&16383,a)};k.Ab=function(a,b){var c=this.o;a=this.ka=a;c.a[(a&c.i)>>>c.b].f(b,a&16383,a);return b}; +k.xa=function(a){this.g.complete=!0;var b=a?this.g.Ia?0:1:-1;this.g.Ia=!1;this.I=this.K=a;this.i=this.i&-5|0;do{if(a=this.i)if(a=this.i&11)this.i&2?this.ja||(this.i&=-3):this.i&1&&this.i++,a=!1;if(a){if(this.i&4&&this.v.j(this.j,b)){Q(this);break}if(0>b)break}this.i&=15;this.s=this.s&4194304?this.c(this.b):this.ra=this.c(this.Aa=this.j);this.s&=8388607;this.b=this.s&262143;if(a=this.s>>18&15)this.b=this.b+this.c(a)&Va;this.s&4194304?a=-1:(this.j=(this.j+1)%Ua,a=this.ra/ab|0);0<=a&&this.bb(a)}while(0< +this.K);return this.g.complete?this.I-this.K:!1===this.g.complete?-1:0};x(function(){for(var a=I(document,H,"cpu"),b=0;b>4].call(this,a,a&15)}function U(a){this.a(a)}function hc(){var a=0,b=this.c(this.b),c=b/bb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*bb+(d<<24)+(b&16777215);a&&(b=(b+a)%Wa);this.f(this.b,b)} +function ic(a,b){a=this.c(this.b);if(0>this.l)this.l=a,this.s=this.b|4194304,ec(this);else{var c=this.l/bb&63,d=this.l>>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.l=-1}}function jc(a,b){a=this.c(this.b);if(0>this.l)this.l=a,this.s=this.b|4194304,ec(this);else{var c=this.l/bb&63,d=this.l>>24&63;b=this.c(b)%Math.pow(2,d)*Math.pow(2,c)%Wa;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.f(this.b,a);this.l=-1}}function kc(a,b){this.f(b,this.c(this.b))} +function lc(a,b){this.f(b,this.b)}function mc(a,b){this.f(this.b,this.c(b))}function nc(a,b){this.f(b,0)}function oc(a,b){this.f(b,L-this.c(b))}function pc(a,b){this.f(b,L)}function qc(a,b){var c=this.c(this.b),d=this.c(b);this.f(b,V(a,d,c)+(c-(c&N)))}function rc(a,b){var c=this.c(b);this.f(b,V(a,c,0))}function sc(a,b){b=this.c(b);var c=this.c(this.b);this.f(this.b,V(a,c,b)+(b-(b&N)))} +function tc(a,b){var c=this.c(this.b),d=c;if(a&=384)switch(d-=d&N,a){case 256:d+=N;break;case 384:d+=c>Ya?N:0}c=d;this.f(this.b,c);b&&this.f(b,c)}function uc(a,b){var c=(this.c(this.b)&N)*M,d=this.c(b);this.f(b,V(a,d,c)+c)}function vc(a,b){var c=this.b*M,d=this.c(b);this.f(b,V(a,d,c)+c)}function wc(a,b){b=(this.c(b)&N)*M;var c=this.c(this.b);this.f(this.b,V(a,c,b)+b)}function xc(a,b){var c=this.c(this.b),d=(c&N)*M,c=V(a,c,d)+d;this.f(this.b,c);b&&this.f(b,c)} +function yc(a,b){var c=this.c(this.b)&N,d=this.c(b);this.f(b,W(a,d,c)+c)}function zc(a,b){var c=this.c(b);this.f(b,W(a,c,this.b)+this.b)}function Ac(a,b){b=this.c(b)&N;var c=this.c(this.b);this.f(this.b,W(a,c,b)+b)}function Bc(a,b){var c=this.c(this.b),d=c;if(a&=384)switch(d&=N,a){case 256:d+=N*M;break;case 384:d+=c>Xa?N*M:0}c=d;this.f(this.b,c);b&&this.f(b,c)}function Cc(a,b){var c=this.c(this.b)/M|0,d=this.c(b);this.f(b,W(a,d,c)+c)}function Dc(a,b){var c=this.c(b);this.f(b,W(a,c,0))} +function Ec(a,b){b=this.c(b)/M|0;var c=this.c(this.b);this.f(this.b,W(a,c,b)+b)}function Fc(a,b){var c=this.c(this.b),d=c/M|0,c=W(a,c,d)+d;this.f(this.b,c);b&&this.f(b,c)}function X(a){this.a(a)}function Gc(){}function T(a){this.M("undefined opcode: "+la(a));ec(this);Q(this)}function W(a,b,c){switch(a&384){case 0:b-=b&N;break;case 128:b=0;break;case 256:b=N*M;break;case 384:b=c>Xa?N*M:0}return b} +function V(a,b,c){switch(a&384){case 0:b&=N;break;case 128:b=0;break;case 256:b=N;break;case 384:b=c>Ya?N:0}return b}function Y(a,b){return((a/O|0)&(b/O|0))*O+((a&b)>>>0)}function Hc(a,b){return((a/O|0)^(b/O|0))*O+((a^b)>>>0)}function Ic(a,b){return(~((a/O|0)^(b/O|0))&15)*O+(~(a^b)>>>0)}function Z(a,b){return(a/O|0|b/O|0)*O+((a|b)>>>0)} +var gc=[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.a(a)},function(a){this.a(a)},function(a){this.a(a)},hc,function(a,b){0>this.l&&hc.call(this);ic.call(this,0,b)},ic,function(a,b){0>this.l&&hc.call(this);jc.call(this,0,b)},jc,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},jc,kc,lc,function(a,b){b&&this.f(b,this.h(this.b))},function(a,b){a=this.h(this.b);a=(a/N|0)+a%N*N;this.f(b,a)},function(a,b){this.f(b,this.b*N)},function(a,b){a=this.h(b);a=(a/N|0)+a%N*N;this.f(this.b,a)},function(a,b){a=this.h(this.b);a=(a/N|0)+a%N*N;this.f(this.b,a);b&&this.f(b,a)},function(a,b){this.f(b,ec(this,this.h(this.b)))},function(a,b){this.f(b,this.b?Za-this.b:0)},function(a,b){this.f(this.b,ec(this, -this.h(b)))},function(a,b){a=ec(this,this.h(this.b));this.f(this.b,a);b&&this.f(b,a)},function(a,b){this.f(b,this.abs(this.h(this.b)))},function(a,b){this.f(b,this.b)},function(a,b){this.f(this.b,this.abs(this.h(b)))},function(a,b){a=this.abs(this.h(this.b));this.f(this.b,a);b&&this.f(b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},U,function(a,b){a=this.h(b);this.f(b,this.h(this.b));this.f(this.b,a)},function(a,b){a=!1;for(var c=this.h(b),d=c/N|0,c=c&O;!a;)this.f(c,this.h(d)),c==this.b&&(a=!0),d=d+1&O,c=c+1&O,this.c.A||(this.f(b, -d*N+c),a||dc(this),a=!0)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},U,function(a){this.a(a)},function(a,b){a=this.h(b);a+=262145;this.f(a&O,this.h(this.b));a>=L&&(a-=L);this.f(b,a)},function(a,b){a=this.h(b);var c=this.h(a&O);this.f(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=L);this.f(b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, +function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},kc,lc,mc,function(a,b){b&&this.f(b,this.c(this.b))},function(a,b){a=this.c(this.b);a=(a/M|0)+a%M*M;this.f(b,a)},function(a,b){this.f(b,this.b*M)},function(a,b){a=this.c(b);a=(a/M|0)+a%M*M;this.f(this.b,a)},function(a,b){a=this.c(this.b);a=(a/M|0)+a%M*M;this.f(this.b,a);b&&this.f(b,a)},function(a,b){this.f(b,fc(this,this.c(this.b)))},function(a,b){this.f(b,this.b?$a-this.b:0)},function(a,b){this.f(this.b,fc(this, +this.c(b)))},function(a,b){a=fc(this,this.c(this.b));this.f(this.b,a);b&&this.f(b,a)},function(a,b){this.f(b,this.abs(this.c(this.b)))},function(a,b){this.f(b,this.b)},function(a,b){this.f(this.b,this.abs(this.c(b)))},function(a,b){a=this.abs(this.c(this.b));this.f(this.b,a);b&&this.f(b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, +function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},T,function(a,b){a=this.c(b);this.f(b,this.c(this.b));this.f(this.b,a)},function(a,b){a=!1;for(var c=this.c(b),d=c/M|0,c=c&N;!a;)this.f(c,this.c(d)),c==this.b&&(a=!0),d=d+1&N,c=c+1&N,this.g.A||(this.f(b, +d*M+c),a||ec(this),a=!0)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},T,function(a){this.a(a)},function(a,b){a=this.c(b);a+=262145;this.f(a&N,this.c(this.b));a>=Wa&&(a-=Wa);this.f(b,a)},function(a,b){a=this.c(b);var c=this.c(a&N);this.f(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=Wa);this.f(b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},mc,mc,function(){this.f(this.b,0)},function(a,b){this.f(b,0);this.f(this.b,0)},function(a,b){this.f(b,Gc(this.h(b),this.h(this.b)))},function(a,b){this.f(b,Gc(this.h(b),this.b))},function(a,b){this.f(this.b,Gc(this.h(b),this.h(this.b)))},function(a,b){a=Gc(this.h(b),this.h(this.b));this.f(this.b,a);this.f(b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -jc,kc,Fc,jc,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},Fc,Fc,lc,lc,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},nc,nc,function(a, -b){this.f(this.b,M-this.h(b))},function(a,b){a=M-this.h(b);this.f(b,a);this.f(this.b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a,b){this.f(b,M-this.h(this.b))},function(a,b){this.f(b,M-this.b)},function(){this.f(this.b,M-this.h(this.b))},function(a,b){a=M-this.h(this.b);this.f(b,a);this.f(this.b,a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},oc,oc,function(){this.f(this.b,M)},function(a,b){this.f(b,M);this.f(this.b,M)},pc,qc,rc,sc,tc,uc,vc,wc,pc,qc,rc,sc,tc,uc,vc,wc,pc,qc,rc,sc,tc,uc,vc,wc,pc,qc,rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, +function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},nc,nc,function(){this.f(this.b,0)},function(a,b){this.f(this.b,this.f(b,0))},function(a,b){this.f(b,Y(this.c(b),this.c(this.b)))},function(a,b){this.f(b,Y(this.c(b),this.b))},function(a,b){this.f(this.b,Y(this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Y(this.c(b),this.c(this.b))))},function(a,b){this.f(b,Y(L-this.c(b),this.c(this.b)))},function(a,b){this.f(b,Y(L-this.c(b), +this.b))},function(a,b){this.f(this.b,Y(L-this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Y(L-this.c(b),this.c(this.b))))},kc,lc,Gc,kc,function(a,b){this.f(b,Y(this.c(b),L-this.c(this.b)))},function(a,b){this.f(b,Y(this.c(b),L-this.b))},function(a,b){this.f(this.b,Y(this.c(b),L-this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Y(this.c(b),L-this.c(this.b))))},Gc,Gc,mc,mc,function(a,b){this.f(b,Hc(this.c(b),this.c(this.b)))},function(a,b){this.f(b,Hc(this.c(b),this.b))},function(a, +b){this.f(this.b,Hc(this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Hc(this.c(b),this.c(this.b))))},function(a,b){this.f(b,Z(this.c(b),this.c(this.b)))},function(a,b){this.f(b,Z(this.c(b),this.b))},function(a,b){this.f(this.b,Z(this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Z(this.c(b),this.c(this.b))))},function(a,b){this.f(b,Y(L-this.c(b),L-this.c(this.b)))},function(a,b){this.f(b,Y(L-this.c(b),L-this.b))},function(a,b){this.f(this.b,Y(L-this.c(b),L-this.c(this.b)))}, +function(a,b){this.f(this.b,this.f(b,Y(L-this.c(b),L-this.c(this.b))))},function(a,b){this.f(b,Ic(this.c(b),this.c(this.b)))},function(a,b){this.f(b,Ic(this.c(b),this.b))},function(a,b){this.f(this.b,Ic(this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Ic(this.c(b),this.c(this.b))))},oc,oc,function(a,b){this.f(this.b,L-this.c(b))},function(a,b){this.f(this.b,this.f(b,L-this.c(b)))},function(a,b){this.f(b,Z(L-this.c(b),this.c(this.b)))},function(a,b){this.f(b,Z(L-this.c(b),this.b))}, +function(a,b){this.f(this.b,Z(L-this.c(b),this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Z(L-this.c(b),this.c(this.b))))},function(a,b){this.f(b,L-this.c(this.b))},function(a,b){this.f(b,L-this.b)},function(){this.f(this.b,L-this.c(this.b))},function(a,b){this.f(this.b,this.f(b,L-this.c(this.b)))},function(a,b){this.f(b,Z(this.c(b),L-this.c(this.b)))},function(a,b){this.f(b,Z(this.c(b),L-this.b))},function(a,b){this.f(this.b,Z(this.c(b),L-this.c(this.b)))},function(a,b){this.f(this.b,this.f(b, +Z(this.c(b),L-this.c(this.b))))},function(a,b){this.f(b,Z(L-this.c(b),L-this.c(this.b)))},function(a,b){this.f(b,Z(L-this.c(b),L-this.b))},function(a,b){this.f(this.b,Z(L-this.c(b),L-this.c(this.b)))},function(a,b){this.f(this.b,this.f(b,Z(L-this.c(b),L-this.c(this.b))))},pc,pc,function(){this.f(this.b,L)},function(a,b){this.f(this.b,this.f(b,L))},qc,rc,sc,tc,uc,vc,wc,xc,qc,rc,sc,tc,uc,vc,wc,xc,qc,rc,sc,tc,uc,vc,wc,xc,qc,rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,yc,zc,Ac, +Bc,Cc,Dc,Ec,Fc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)}, -function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},function(a){this.a(a)},Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y]; -function Hc(a){B.call(this,"ROM",a);this.N=this.a=null;this.l=+a.addr;this.i=+a.size;this.b=a.alias;"string"==typeof this.b&&(this.b=eval(this.b));this.j=a.file;this.s=ma(this.j);if(this.j){a=this.j;var b=oa(this.s);"json"!=b&&"hex"!=b&&(a=t()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;v(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Ia(c.na,a,b),(a=ua(a,b))?(c.a=a.H,c.N=a.N):c.j=null);Ic(c)})}}n(Hc,B); -Hc.prototype.Z=function(a,b,c,d){this.o=b;this.g=c;this.v=d;Ic(this)};Hc.prototype.V=function(){this.N&&(this.v&&this.v.a(this.id,this.l,this.i,this.N),delete this.N);return!0};Hc.prototype.P=function(){return!0}; -function Ic(a){if(!Sa(a)){if(a.j){if(!a.a||!a.o)return;a.i||(a.i=a.a.length);if(a.a.length!=a.i){var b="ROM size ("+r(a.a.length,8,!0)+") does not match specified size ("+r(a.i,8,!0)+")";a.c.error=!0;a.F(b)}else{b=a.l;if(Bb(a.o,b,a.i,Jb)){var c;for(c=0;c>>f.b;0>>=f.b;0>>a.b;0g&&g>=ja&&(g+=ia);g=Math.trunc(Math.abs(g))%ia;void 0===f&&(f=e.size);for(h=d;f--&&h=q.Ka&&c<=q.ab&&(b=c-(q.Ka-q.Va));b&&(a.preventDefault&&a.preventDefault(),d.va(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.Xa&&(b=q.Wa);d.va(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.va(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.Z=function(a,b,c,d){this.u=a;this.o=b;this.g=c;this.v=d;J(this)}; -k.Ta=function(a){if(!this.a){var b=T(this.u,"connection");if(b){var c=b.split("->");if(2==c.length){var d=sa(c[0]);if(d!=this.ma)return;c=sa(c[1]);if(this.a=Ma(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.i);if(this.l=e.receiveData){this.i=a;this.status("Connected "+this.na+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.V=function(a,b){if(!b)if(this.Ta(this.i),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -k.P=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.va=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;bQc){if(Rc(d,this.D)){this.l=new P(this,"1.34.2",$c);Rc(this.l)&&(ad(this,d),a=bd,cd(this.l));this.l.set(Xc,ta());dd(this.l);var e=this.a&&!this.B;if(a==Yc||La("Click OK to restore the previous "+K+" machine state, or CANCEL to reset the machine.")){if(c=Wc(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Rc(d,g):("error"==f&&"no machine state"!= -g?(this.F("Error: "+g),"unable to verify user"==g&&(ya(ed,""),this.b=null)):this.M(f+": "+g),cd(d),Rc(d)?(c=Wc(d),e=!0):c=!1))}e&&Uc(this,c?d:null)}else a==bd&&d.clear()}else Uc(this);delete this.D;delete this.w}e=D(this.id);for(f=0;fa[1];a=a[2];this.O=!0;this.c.C=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.g&&(fd(this,this.g,b,c,a),R(this,-2),this.g.J());this.K&&(ad(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.j=0}; -function ad(a,b){if(La("There may be a problem with your "+K+" machine.\n\nTo help us diagnose it, click OK to send this "+K+" machine state to http://www.pcjs.org.")){var c=a.X;a=a.b||"";b=b.toString();var d={};d.app=K;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;v("http://www.pcjs.org/api/v1/report",d,!0)}} -function gd(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.34.2"),g=new P(a,"1.34.2",Vc),h=ta();g.set(Xc,h);f.set(Xc,h);f.set(hd,"1.34.2");f.set(id,window?window.location.href:null);f.set(jd,window?window.navigator.userAgent:"");a.g&&a.g.P&&(c&&(b&&(a.g.c.J=a.g.c.A),Q(a.g)),d=a.g.P(b,c),"object"===typeof d&&f.set(a.g.id,d),c&&(a.g.c.C=!1,!1===d&&(e=null)));for(var h=D(a.id),l=0;l>>f.b;0>>=f.b;0>>a.b;0g&&g>=ja&&(g+=ia);g=Math.trunc(Math.abs(g))%ia;void 0===f&&(f=e.size);for(h=d;f--&&h=q.Ka&&c<=q.ab&&(b=c-(q.Ka-q.Va));b&&(a.preventDefault&&a.preventDefault(),d.va(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.Xa&&(b=q.Wa);d.va(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.va(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.Z=function(a,b,c,d){this.u=a;this.o=b;this.h=c;this.v=d;J(this)}; +k.Ta=function(a){if(!this.a){var b=Sb(this.u,"connection");if(b){var c=b.split("->");if(2==c.length){var d=sa(c[0]);if(d!=this.ma)return;c=sa(c[1]);if(this.a=Ma(c)){var e=this.a.exports;if(e){var f=e.connect;f&&f.call(this.a,this.i);if(this.l=e.receiveData){this.i=a;this.status("Connected "+this.na+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};k.V=function(a,b){if(!b)if(this.Ta(this.i),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +k.P=function(a){return a?this.save():!0};k.reset=function(){};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return!0};k.va=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;bTc){if(Uc(d,this.D)){this.l=new P(this,"1.34.2",cd);Uc(this.l)&&(dd(this,d),a=ed,fd(this.l));this.l.set($c,ta());gd(this.l);var e=this.a&&!this.B;if(a==ad||La("Click OK to restore the previous "+K+" machine state, or CANCEL to reset the machine.")){if(c=Zc(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uc(d,g):("error"==f&&"no machine state"!= +g?(this.F("Error: "+g),"unable to verify user"==g&&(ya(hd,""),this.b=null)):this.M(f+": "+g),fd(d),Uc(d)?(c=Zc(d),e=!0):c=!1))}e&&Xc(this,c?d:null)}else a==ed&&d.clear()}else Xc(this);delete this.D;delete this.w}e=D(this.id);for(f=0;fa[1];a=a[2];this.O=!0;this.g.C=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.h&&(id(this,this.h,b,c,a),R(this,-2),this.h.J());this.K&&(dd(this,b),b.clear());!c&&this.l&&(this.l.clear(),delete this.l);this.j=0}; +function dd(a,b){if(La("There may be a problem with your "+K+" machine.\n\nTo help us diagnose it, click OK to send this "+K+" machine state to http://www.pcjs.org.")){var c=a.X;a=a.b||"";b=b.toString();var d={};d.app=K;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;u("http://www.pcjs.org/api/v1/report",d,!0)}} +function jd(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.34.2"),g=new P(a,"1.34.2",Yc),h=ta();g.set($c,h);f.set($c,h);f.set(kd,"1.34.2");f.set(ld,window?window.location.href:null);f.set(md,window?window.navigator.userAgent:"");a.h&&a.h.P&&(c&&(b&&(a.h.g.J=a.h.g.A),Q(a.h)),d=a.h.P(b,c),"object"===typeof d&&f.set(a.h.id,d),c&&(a.h.g.C=!1,!1===d&&(e=null)));for(var h=D(a.id),l=0;l=d||30<=(c.ya+=d))&&(e.textContent=c.c.A?c.O.toFixed(2)+"Mhz":"Stopped",c.ya=0)}if(a.i&&(a=a.i,b=b||0,a.D)){c=a.g.c.A;d=!!(a.g.i&8);if(0>=b||60<=(a.B+=b)){e=a.g.j;if(a.m.PC){var f=a.v&&a.v.l||8,e=e||0,e=8==f?la(e,void 0):r(e,void 0);a.m.PC.textContent!=e&&(a.m.PC.textContent=e)}a.B=0}-1>b?a.b=a.g.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(x){g=null,a=x.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");v(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],p,u=/( [a-z]+=)(['"])(.*?)\2/g;p=u.exec(f);)l=0>l.indexOf(p[1])?l.replace(">",p[0]+">"):l.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[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);rd(a,b,c)}})}else c(a,null)} -function sd(a,b,c,d,e){function f(a){if(void 0===l){var b=h&&I(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=qa(a))}function g(a){f("Error: "+a);p&&(--od||A(!0));p=!1}var h,l,p=!0;od++;Ja[b]={};try{if(h=document.getElementById(b)){var u;if("object"==typeof resources&&(u=resources.css)){var x=document.head||document.getElementsByTagName("head")[0],na=document.createElement("style");na.type="text/css";na.styleSheet?na.styleSheet.cssText=u:na.appendChild(document.createTextNode(u));x.appendChild(na)}d|| -(u=a,"pdp"==a.substr(0,3)&&(u="pdpjs"),d="/versions/"+u+"/1.34.2/components.xsl");u=function(e,l){l?pd(d,null,a,null,!1,f,function(a,e){e?(Ia(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(h.outerHTML=e,--od||A(!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),--od|| -A(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?pd(c,b,a,e,!0,f,u):qd(c,null,b,a,e,!1,f,u)}else g("missing machine element: "+b)}catch(td){g(td.message)}return p}window.embedPDP10=function(a,b,c,d){A(!1);return sd("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){A(!1);return sd("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return E(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Oa[a]){for(var c=!0,d=Oa,e=a,f=b.length,g=[],h=[],l="",p=null,u=0;u=d||30<=(c.ya+=d))&&(e.textContent=c.g.A?c.O.toFixed(2)+"Mhz":"Stopped",c.ya=0)}if(a.i&&(a=a.i,b=b||0,a.D)){c=a.h.g.A;d=!!(a.h.i&8);if(0>=b||60<=(a.B+=b)){e=a.h.j;if(a.m.PC){var f=a.v&&a.v.l||8,e=e||0,e=8==f?la(e,void 0):r(e,void 0);a.m.PC.textContent!=e&&(a.m.PC.textContent=e)}a.B=0}-1>b?a.b=a.h.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(y){g=null,a=y.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");u(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],p,v=/( [a-z]+=)(['"])(.*?)\2/g;p=v.exec(f);)l=0>l.indexOf(p[1])?l.replace(">",p[0]+">"):l.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[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);ud(a,b,c)}})}else c(a,null)} +function vd(a,b,c,d,e){function f(a){if(void 0===l){var b=h&&I(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function g(a){f("Error: "+a);p&&(--rd||A(!0));p=!1}var h,l,p=!0;rd++;Ja[b]={};try{if(h=document.getElementById(b)){var v;if("object"==typeof resources&&(v=resources.css)){var y=document.head||document.getElementsByTagName("head")[0],qa=document.createElement("style");qa.type="text/css";qa.styleSheet?qa.styleSheet.cssText=v:qa.appendChild(document.createTextNode(v));y.appendChild(qa)}d|| +(v=a,"pdp"==a.substr(0,3)&&(v="pdpjs"),d="/versions/"+v+"/1.34.2/components.xsl");v=function(e,l){l?sd(d,null,a,null,!1,f,function(a,e){e?(Ia(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=l.transformNode(e))?(h.outerHTML=e,--rd||A(!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),--rd|| +A(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?sd(c,b,a,e,!0,f,v):td(c,null,b,a,e,!1,f,v)}else g("missing machine element: "+b)}catch(wd){g(wd.message)}return p}window.embedPDP10=function(a,b,c,d){A(!1);return vd("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){A(!1);return vd("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return E(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Oa[a]){for(var c=!0,d=Oa,e=a,f=b.length,g=[],h=[],l="",p=null,v=0;v