Cleaned up IRQ handling, added support for DL11 overrun errors, and fixed buffered message output (although a better solution is needed longer term)
This commit is contained in:
parent
66f82736c9
commit
47a65f043f
13 changed files with 651 additions and 591 deletions
|
|
@ -3,13 +3,17 @@
|
||||||
; REBASE HIGHER LINK/BOT:140000
|
; REBASE HIGHER LINK/BOT:140000
|
||||||
; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING?
|
; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING?
|
||||||
|
|
||||||
PSW = 177776
|
|
||||||
DL11XCSR = 177564
|
|
||||||
DL11VEC = 64
|
|
||||||
|
|
||||||
KW11LKS = 177546
|
KW11LKS = 177546
|
||||||
KW11VEC = 100
|
KW11VEC = 100
|
||||||
|
|
||||||
|
DL11RCSR = 177560
|
||||||
|
DL11RBUF = 177562
|
||||||
|
DL11XCSR = 177564
|
||||||
|
DL11XBUF = 177566
|
||||||
|
DL11VEC = 64
|
||||||
|
|
||||||
|
PSW = 177776
|
||||||
|
|
||||||
.ASECT
|
.ASECT
|
||||||
.=140000
|
.=140000
|
||||||
START: RESET
|
START: RESET
|
||||||
|
|
@ -46,7 +50,7 @@ CLKAST:
|
||||||
ONECHR:
|
ONECHR:
|
||||||
TSTB @#DL11XCSR
|
TSTB @#DL11XCSR
|
||||||
BPL ONECHR
|
BPL ONECHR
|
||||||
MOVB R0,@#177566
|
MOVB R0,@#DL11XBUF
|
||||||
RTS PC
|
RTS PC
|
||||||
|
|
||||||
PRTPTR: .WORD 0
|
PRTPTR: .WORD 0
|
||||||
|
|
@ -63,10 +67,10 @@ PRINT:
|
||||||
PRTAST:
|
PRTAST:
|
||||||
TSTB @PRTPTR
|
TSTB @PRTPTR
|
||||||
BEQ 2$
|
BEQ 2$
|
||||||
MOVB @PRTPTR,@#177566
|
MOVB @PRTPTR,@#DL11XBUF
|
||||||
INC PRTPTR
|
INC PRTPTR
|
||||||
RTI
|
RTI
|
||||||
2$: CLRB @#177564
|
2$: CLRB @#DL11XCSR
|
||||||
RTI
|
RTI
|
||||||
|
|
||||||
BUFFER: .WORD 0 ; INPUT BUFFER POINTER
|
BUFFER: .WORD 0 ; INPUT BUFFER POINTER
|
||||||
|
|
@ -77,12 +81,12 @@ INPUT:
|
||||||
CLR LENGTH
|
CLR LENGTH
|
||||||
MOV #INPAST,@#60
|
MOV #INPAST,@#60
|
||||||
MOV #200,@#62
|
MOV #200,@#62
|
||||||
BISB #100,@#177560
|
BISB #100,@#DL11RCSR
|
||||||
RTS PC
|
RTS PC
|
||||||
|
|
||||||
INPAST:
|
INPAST:
|
||||||
MOV R0,-(SP)
|
MOV R0,-(SP)
|
||||||
MOVB @#177562,R0
|
MOVB @#DL11RBUF,R0
|
||||||
CMPB R0,#15
|
CMPB R0,#15
|
||||||
BEQ 7$ ; CARRIAGE RETURN
|
BEQ 7$ ; CARRIAGE RETURN
|
||||||
CMPB R0,#127.
|
CMPB R0,#127.
|
||||||
|
|
@ -132,7 +136,7 @@ CMD:
|
||||||
MOV R4,-(SP)
|
MOV R4,-(SP)
|
||||||
MOV #EOL,R0
|
MOV #EOL,R0
|
||||||
JSR PC,PRINT
|
JSR PC,PRINT
|
||||||
1$: BITB #100,@#177564
|
1$: BITB #100,@#DL11XCSR
|
||||||
BNE 1$
|
BNE 1$
|
||||||
CLR R4
|
CLR R4
|
||||||
MOV #CMDLST,R3 ; CMD LIST
|
MOV #CMDLST,R3 ; CMD LIST
|
||||||
|
|
|
||||||
|
|
@ -919,10 +919,10 @@ CPUPDP11.prototype.calcRemainingTime = function()
|
||||||
*
|
*
|
||||||
* Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below.
|
* Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below.
|
||||||
*
|
*
|
||||||
* TODO: Consider making the addTimer() and setTimer() interfaces more like the addTrigger() and setTrigger()
|
* TODO: Consider making the addTimer() and setTimer() interfaces more like the addIRQ() and setIRQ()
|
||||||
* interfaces (which return the underlying object instead of an array index) and maintaining a separate list
|
* interfaces (which return the underlying object instead of an array index) and maintaining a separate list
|
||||||
* of active timers, in order of highest to lowest cycle countdown values, as this could speed up getBurstCycles()
|
* of active timers, in order of highest to lowest cycle countdown values, as this could speed up
|
||||||
* and updateTimers() functions ever so slightly.
|
* getBurstCycles() and updateTimers() functions ever so slightly.
|
||||||
*
|
*
|
||||||
* @this {CPUPDP11}
|
* @this {CPUPDP11}
|
||||||
* @param {function()} callBack
|
* @param {function()} callBack
|
||||||
|
|
|
||||||
|
|
@ -1738,7 +1738,7 @@ PDP11.opSPL = function(opCode)
|
||||||
}
|
}
|
||||||
if (!(this.regPSW & PDP11.PSW.CMODE)) {
|
if (!(this.regPSW & PDP11.PSW.CMODE)) {
|
||||||
this.regPSW = (this.regPSW & ~(PDP11.PSW.UNUSED | PDP11.PSW.PRI)) | ((opCode & 0x7) << PDP11.PSW.SHIFT.PRI);
|
this.regPSW = (this.regPSW & ~(PDP11.PSW.UNUSED | PDP11.PSW.PRI)) | ((opCode & 0x7) << PDP11.PSW.SHIFT.PRI);
|
||||||
this.opFlags |= PDP11.OPFLAG.INTQ_DELAY;
|
this.opFlags |= PDP11.OPFLAG.IRQ_DELAY;
|
||||||
}
|
}
|
||||||
this.nStepCycles -= (4 + 1);
|
this.nStepCycles -= (4 + 1);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -96,15 +96,15 @@ Component.subclass(CPUStatePDP11, CPUPDP11);
|
||||||
* CPU offers timer services that will "fire" a callback after a specified delay, which are much more efficient than
|
* CPU offers timer services that will "fire" a callback after a specified delay, which are much more efficient than
|
||||||
* requiring the CPU to dive into an interrupt queue and decrement delay counts on every instruction.
|
* requiring the CPU to dive into an interrupt queue and decrement delay counts on every instruction.
|
||||||
*
|
*
|
||||||
* Second, devices that generate interrupts will allocate a trigger object during initialization; we will no longer
|
* Second, devices that generate interrupts will allocate an IRQ object during initialization; we will no longer
|
||||||
* be creating and destroying interrupt event objects and inserting/deleting them in a constantly changing queue. Each
|
* be creating and destroying interrupt event objects and inserting/deleting them in a constantly changing queue.
|
||||||
* trigger contains properties that never change (eg, the vector and priority), along with a "next" pointer that's
|
* Each IRQ contains properties that never change (eg, the vector and priority), along with a "next" pointer that's
|
||||||
* only used when the trigger is active.
|
* only used when the IRQ is active.
|
||||||
*
|
*
|
||||||
* When a device decides it's time to interrupt (either at the end of some I/O operation or when a timer has "fired"),
|
* When a device decides it's time to interrupt (either at the end of some I/O operation or when a timer has fired),
|
||||||
* it will simply "pull the trigger", which basically means that its trigger will be linked onto a list of active
|
* it will simply set the IRQ, which basically means that the IRQ will be linked onto a list of active IRQs, in
|
||||||
* triggers, and in priority order, so that when the CPU is ready to acknowledge interrupts, it need only check the
|
* priority order, so that when the CPU is ready to acknowledge interrupts, it need only check the top of the active
|
||||||
* top of the active trigger list.
|
* IRQ list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -112,10 +112,10 @@ Component.subclass(CPUStatePDP11, CPUPDP11);
|
||||||
* vector: number,
|
* vector: number,
|
||||||
* priority: number,
|
* priority: number,
|
||||||
* message: number,
|
* message: number,
|
||||||
* next: (Trigger|null)
|
* next: (IRQ|null)
|
||||||
* }} Trigger
|
* }} IRQ
|
||||||
*/
|
*/
|
||||||
var Trigger;
|
var IRQ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initProcessor()
|
* initProcessor()
|
||||||
|
|
@ -148,12 +148,12 @@ CPUStatePDP11.prototype.initProcessor = function()
|
||||||
|
|
||||||
this.nDisableTraps = 0;
|
this.nDisableTraps = 0;
|
||||||
|
|
||||||
/** @type {Trigger|null} */
|
/** @type {IRQ|null} */
|
||||||
this.triggerNext = null; // the head of the active triggers list, in priority order
|
this.irqNext = null; // the head of the active IRQ list, in priority order
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
/** @type {Array.<Trigger>} */
|
/** @type {Array.<IRQ>} */
|
||||||
this.aTriggers = []; // list of all triggers, active or not (just for debugging)
|
this.aIRQs = []; // list of all IRQs, active or not (just for debugging)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.flags.complete = false;
|
this.flags.complete = false;
|
||||||
|
|
@ -274,7 +274,7 @@ CPUStatePDP11.prototype.resetMMU = function()
|
||||||
this.lastAddr = 0; // this is queried by the Panel when it's not using its own ADDRESS register
|
this.lastAddr = 0; // this is queried by the Panel when it's not using its own ADDRESS register
|
||||||
this.lastOp = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
|
this.lastOp = 0; // stores the PC and any auto-incs or auto-decs from the last opcode; used to update MMR1 and MMR2
|
||||||
|
|
||||||
this.resetTriggers();
|
this.resetIRQs();
|
||||||
|
|
||||||
if (this.bus) this.setMemoryAccess();
|
if (this.bus) this.setMemoryAccess();
|
||||||
};
|
};
|
||||||
|
|
@ -768,130 +768,138 @@ CPUStatePDP11.prototype.setSP = function(addr)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addTrigger(vector, priority, message)
|
* addIRQ(vector, priority, message)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} vector
|
* @param {number} vector
|
||||||
* @param {number} priority
|
* @param {number} priority
|
||||||
* @param {number} [message]
|
* @param {number} [message]
|
||||||
* @return {Trigger}
|
* @return {IRQ}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.addTrigger = function(vector, priority, message)
|
CPUStatePDP11.prototype.addIRQ = function(vector, priority, message)
|
||||||
{
|
{
|
||||||
var trigger = {vector: vector, priority: priority, message: message || 0, next: null};
|
var irq = {vector: vector, priority: priority, message: message || 0, next: null};
|
||||||
if (DEBUG) this.aTriggers.push(trigger);
|
if (DEBUG) {
|
||||||
return trigger;
|
irq.name = PDP11.VECTORS[vector];
|
||||||
|
this.aIRQs.push(irq);
|
||||||
|
}
|
||||||
|
return irq;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* insertTrigger(trigger)
|
* insertIRQ(irq)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {Trigger} trigger
|
* @param {IRQ} irq
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.insertTrigger = function(trigger)
|
CPUStatePDP11.prototype.insertIRQ = function(irq)
|
||||||
{
|
{
|
||||||
if (trigger != this.triggerNext) {
|
if (irq != this.irqNext) {
|
||||||
var triggerPrev = this.triggerNext;
|
var irqPrev = this.irqNext;
|
||||||
if (!triggerPrev || triggerPrev.priority <= trigger.priority) {
|
if (!irqPrev || irqPrev.priority <= irq.priority) {
|
||||||
trigger.next = triggerPrev;
|
irq.next = irqPrev;
|
||||||
this.triggerNext = trigger;
|
this.irqNext = irq;
|
||||||
} else {
|
} else {
|
||||||
do {
|
do {
|
||||||
var triggerNext = triggerPrev.next;
|
var irqNext = irqPrev.next;
|
||||||
if (!triggerNext || triggerNext.priority <= trigger.priority) {
|
if (!irqNext || irqNext.priority <= irq.priority) {
|
||||||
trigger.next = triggerNext;
|
irq.next = irqNext;
|
||||||
triggerPrev.next = trigger;
|
irqPrev.next = irq;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
triggerPrev = triggerNext;
|
irqPrev = irqNext;
|
||||||
} while (triggerPrev);
|
} while (irqPrev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* See the writeXCSR() function for an explanation of why signalling an IRQ hardware interrupt
|
||||||
|
* should be done using IRQ_DELAY rather than setting IRQ directly.
|
||||||
|
*/
|
||||||
|
this.opFlags |= PDP11.OPFLAG.IRQ_DELAY;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removeTrigger(trigger)
|
* removeIRQ(irq)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {Trigger} trigger
|
* @param {IRQ} irq
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.removeTrigger = function(trigger)
|
CPUStatePDP11.prototype.removeIRQ = function(irq)
|
||||||
{
|
{
|
||||||
var triggerPrev = this.triggerNext;
|
var irqPrev = this.irqNext;
|
||||||
if (triggerPrev == trigger) {
|
if (irqPrev == irq) {
|
||||||
this.triggerNext = trigger.next;
|
this.irqNext = irq.next;
|
||||||
} else {
|
} else {
|
||||||
while (triggerPrev) {
|
while (irqPrev) {
|
||||||
var triggerNext = triggerPrev.next;
|
var irqNext = irqPrev.next;
|
||||||
if (triggerNext == trigger) {
|
if (irqNext == irq) {
|
||||||
triggerPrev.next = triggerNext.next;
|
irqPrev.next = irqNext.next;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
triggerPrev = triggerNext;
|
irqPrev = irqNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// We could also set trigger.next to null now, but strictly speaking, that shouldn't be necessary.
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* setTrigger(trigger)
|
|
||||||
*
|
|
||||||
* @this {CPUStatePDP11}
|
|
||||||
* @param {Trigger} trigger
|
|
||||||
* @return {boolean} (true if interrupt dispatched, false if not)
|
|
||||||
*/
|
|
||||||
CPUStatePDP11.prototype.setTrigger = function(trigger)
|
|
||||||
{
|
|
||||||
this.insertTrigger(trigger);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See the writeXCSR() function for an explanation of why signalling an INTQ hardware interrupt condition
|
* We could also set irq.next to null now, but strictly speaking, that shouldn't be necessary.
|
||||||
* should be done using INTQ_DELAY rather than setting INTQ directly.
|
*
|
||||||
|
* Last but not least, if there's still an IRQ on the active IRQ list, we need to make sure IRQ_DELAY
|
||||||
|
* is still set.
|
||||||
*/
|
*/
|
||||||
this.opFlags |= PDP11.OPFLAG.INTQ_DELAY;
|
if (this.irqNext) {
|
||||||
|
this.opFlags |= PDP11.OPFLAG.IRQ_DELAY;
|
||||||
if (trigger.message && this.messageEnabled(trigger.message | MessagesPDP11.INT)) {
|
|
||||||
this.printMessage("setInterrupt(vector=" + str.toOct(trigger.vector) + ",priority=" + trigger.priority + ")", true, true);
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clearTrigger(trigger)
|
* setIRQ(irq)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {Trigger} trigger
|
* @param {IRQ} irq
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.clearTrigger = function(trigger)
|
CPUStatePDP11.prototype.setIRQ = function(irq)
|
||||||
{
|
{
|
||||||
this.removeTrigger(trigger);
|
this.insertIRQ(irq);
|
||||||
|
|
||||||
if (trigger.message && this.messageEnabled(trigger.message | MessagesPDP11.INT)) {
|
if (irq.message && this.messageEnabled(irq.message | MessagesPDP11.INT)) {
|
||||||
this.printMessage("clearInterrupt(vector=" + str.toOct(trigger.vector) + ",priority=" + trigger.priority + ")", true, true);
|
this.printMessage("setIRQ(vector=" + str.toOct(irq.vector) + ",priority=" + irq.priority + ")", true, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checkTriggers(priority)
|
* clearIRQ(irq)
|
||||||
|
*
|
||||||
|
* @this {CPUStatePDP11}
|
||||||
|
* @param {IRQ} irq
|
||||||
|
*/
|
||||||
|
CPUStatePDP11.prototype.clearIRQ = function(irq)
|
||||||
|
{
|
||||||
|
this.removeIRQ(irq);
|
||||||
|
|
||||||
|
if (irq.message && this.messageEnabled(irq.message | MessagesPDP11.INT)) {
|
||||||
|
this.printMessage("clearIRQ(vector=" + str.toOct(irq.vector) + ",priority=" + irq.priority + ")", true, true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checkIRQs(priority)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
* @param {number} priority
|
* @param {number} priority
|
||||||
* @return {Trigger|null}
|
* @return {IRQ|null}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.checkTriggers = function(priority)
|
CPUStatePDP11.prototype.checkIRQs = function(priority)
|
||||||
{
|
{
|
||||||
return (this.triggerNext && this.triggerNext.priority > priority)? this.triggerNext : null;
|
return (this.irqNext && this.irqNext.priority > priority)? this.irqNext : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* resetTriggers(priority)
|
* resetIRQs(priority)
|
||||||
*
|
*
|
||||||
* @this {CPUStatePDP11}
|
* @this {CPUStatePDP11}
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.resetTriggers = function()
|
CPUStatePDP11.prototype.resetIRQs = function()
|
||||||
{
|
{
|
||||||
this.triggerNext = null;
|
this.irqNext = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -904,27 +912,30 @@ CPUStatePDP11.prototype.checkInterrupts = function()
|
||||||
{
|
{
|
||||||
var fInterrupt = false;
|
var fInterrupt = false;
|
||||||
|
|
||||||
if (this.opFlags & PDP11.OPFLAG.INTQ) {
|
if (this.opFlags & PDP11.OPFLAG.IRQ) {
|
||||||
this.opFlags &= ~PDP11.OPFLAG.INTQ;
|
|
||||||
|
|
||||||
var vector = PDP11.TRAP.PIRQ;
|
var vector = PDP11.TRAP.PIRQ;
|
||||||
var priority = (this.regPIR & PDP11.PSW.PRI) >> PDP11.PSW.SHIFT.PRI;
|
var priority = (this.regPIR & PDP11.PSW.PRI) >> PDP11.PSW.SHIFT.PRI;
|
||||||
|
|
||||||
var trigger = this.checkTriggers(priority);
|
var irq = this.checkIRQs(priority);
|
||||||
if (trigger) {
|
if (irq) {
|
||||||
vector = trigger.vector;
|
vector = irq.vector;
|
||||||
priority = trigger.priority;
|
priority = irq.priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.dispatchInterrupt(vector, priority)) {
|
if (this.dispatchInterrupt(vector, priority)) {
|
||||||
if (trigger) this.removeTrigger(trigger);
|
if (irq) this.removeIRQ(irq);
|
||||||
fInterrupt = true;
|
fInterrupt = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.irqNext && !this.regPIR) {
|
||||||
|
this.opFlags &= ~PDP11.OPFLAG.IRQ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (this.opFlags & PDP11.OPFLAG.INTQ_DELAY) {
|
else if (this.opFlags & PDP11.OPFLAG.IRQ_DELAY) {
|
||||||
/*
|
/*
|
||||||
* We know that INTQ (bit 1) is clear, so since INTQ_DELAY (bit 0) is set, incrementing opFlags
|
* We know that IRQ (bit 1) is clear, so since IRQ_DELAY (bit 0) is set, incrementing opFlags
|
||||||
* will transform INTQ_DELAY into INTQ, without affecting any other (higher) bits.
|
* will transform IRQ_DELAY into IRQ, without affecting any other (higher) bits.
|
||||||
*/
|
*/
|
||||||
this.opFlags++;
|
this.opFlags++;
|
||||||
}
|
}
|
||||||
|
|
@ -1087,7 +1098,7 @@ CPUStatePDP11.prototype.setPSW = function(newPSW)
|
||||||
this.regPSW = newPSW;
|
this.regPSW = newPSW;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Trigger (no pun intended) a call to checkInterrupts(), just in case.
|
* Trigger a call to checkInterrupts(), just in case.
|
||||||
*
|
*
|
||||||
* TODO: I think this is overdone; if you set a breakpoint on checkInterrupts(), you'll see that a significant
|
* TODO: I think this is overdone; if you set a breakpoint on checkInterrupts(), you'll see that a significant
|
||||||
* percentage of calls do nothing. For example, you'll usually see a spurious checkInterrupts() immediately after
|
* percentage of calls do nothing. For example, you'll usually see a spurious checkInterrupts() immediately after
|
||||||
|
|
@ -1096,11 +1107,11 @@ CPUStatePDP11.prototype.setPSW = function(newPSW)
|
||||||
* I mean, sure, it's POSSIBLE that the new PSW loaded by trap() actually set a lower priority, allowing a lower
|
* I mean, sure, it's POSSIBLE that the new PSW loaded by trap() actually set a lower priority, allowing a lower
|
||||||
* priority interrupt to immediately be acknowledged. But perhaps we should be a bit more rigorous here.
|
* priority interrupt to immediately be acknowledged. But perhaps we should be a bit more rigorous here.
|
||||||
*
|
*
|
||||||
* For example, we could avoid setting INTQ unless 1) there's actually an active interrupt trigger (ie, triggerNext
|
* For example, we could avoid setting IRQ unless 1) there's actually an active IRQ (ie, irqNext
|
||||||
* is not null) or 2) an optional fCheckInterrupts flag is passed to us, because the caller has some knowledge
|
* is not null) or 2) an optional fCheckInterrupts flag is passed to us, because the caller has some knowledge
|
||||||
* that priority could be changing. Just throwing out some ideas....
|
* that priority could be changing. Just throwing out some ideas....
|
||||||
*/
|
*/
|
||||||
this.opFlags |= PDP11.OPFLAG.INTQ;
|
this.opFlags |= PDP11.OPFLAG.IRQ;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1144,15 +1155,18 @@ CPUStatePDP11.prototype.getPIR = function()
|
||||||
*/
|
*/
|
||||||
CPUStatePDP11.prototype.setPIR = function(newPIR)
|
CPUStatePDP11.prototype.setPIR = function(newPIR)
|
||||||
{
|
{
|
||||||
newPIR &= 0xfe00;
|
newPIR &= PDP11.PIR.BITS;
|
||||||
if (newPIR) {
|
if (newPIR) {
|
||||||
var i = newPIR >> 9;
|
var bits = newPIR >> PDP11.PIR.SHIFT.BITS;
|
||||||
do {
|
do {
|
||||||
newPIR += 0x22;
|
newPIR += PDP11.PIR.PIA_INC;
|
||||||
} while (i >>= 1);
|
} while (bits >>= 1);
|
||||||
|
/*
|
||||||
|
* TODO: Which should we set: IRQ or IRQ_DELAY?
|
||||||
|
*/
|
||||||
|
this.opFlags |= PDP11.OPFLAG.IRQ;
|
||||||
}
|
}
|
||||||
this.regPIR = newPIR;
|
this.regPIR = newPIR;
|
||||||
this.opFlags |= PDP11.OPFLAG.INTQ;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1397,7 +1411,7 @@ CPUStatePDP11.prototype.trap = function(vector, flag, reason)
|
||||||
*
|
*
|
||||||
* Well, OK, we're also supposed to "lose interest" in the TF flag, too; otherwise, DEC tests fail.
|
* Well, OK, we're also supposed to "lose interest" in the TF flag, too; otherwise, DEC tests fail.
|
||||||
*
|
*
|
||||||
* Finally, setPSW() likes to always set INTQ, to force a check of hardware interrupts prior to
|
* Finally, setPSW() likes to always set IRQ, to force a check of hardware interrupts prior to
|
||||||
* the next instruction, just in case the PSW priority was lowered. However, there are "TRAP TEST"
|
* the next instruction, just in case the PSW priority was lowered. However, there are "TRAP TEST"
|
||||||
* tests like this one:
|
* tests like this one:
|
||||||
*
|
*
|
||||||
|
|
@ -1414,11 +1428,11 @@ CPUStatePDP11.prototype.trap = function(vector, flag, reason)
|
||||||
*
|
*
|
||||||
* where, after "TRAP 000" has executed, a hardware interrupt will be acknowledged, and instead of
|
* where, after "TRAP 000" has executed, a hardware interrupt will be acknowledged, and instead of
|
||||||
* executing the IOT, we'll execute the HALT and fail the test. We avoid that by relying on the same
|
* executing the IOT, we'll execute the HALT and fail the test. We avoid that by relying on the same
|
||||||
* trick that the SPL instruction uses: setting INTQ_DELAY instead of INTQ, which effectively delays
|
* trick that the SPL instruction uses: setting IRQ_DELAY instead of IRQ, which effectively delays
|
||||||
* INTQ detection for one instruction, which is just long enough to allow the diagnostic to pass.
|
* IRQ detection for one instruction, which is just long enough to allow the diagnostic to pass.
|
||||||
*/
|
*/
|
||||||
this.opFlags &= ~(flag | PDP11.OPFLAG.TRAP_TF | PDP11.OPFLAG.INTQ);
|
this.opFlags &= ~(flag | PDP11.OPFLAG.TRAP_TF | PDP11.OPFLAG.IRQ);
|
||||||
this.opFlags |= PDP11.OPFLAG.INTQ_DELAY | PDP11.OPFLAG.TRAP;
|
this.opFlags |= PDP11.OPFLAG.IRQ_DELAY | PDP11.OPFLAG.TRAP;
|
||||||
|
|
||||||
this.trapPSW = -1; // reset flag that we have a trap within a trap
|
this.trapPSW = -1; // reset flag that we have a trap within a trap
|
||||||
|
|
||||||
|
|
@ -2572,18 +2586,16 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
|
||||||
if (!nDebugState) nDebugState++;
|
if (!nDebugState) nDebugState++;
|
||||||
nDebugCheck++;
|
nDebugCheck++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.opFlags) {
|
if (this.opFlags) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're in the INTQ or WAIT state, check for any pending interrupts.
|
* If we're in the IRQ or WAIT state, check for any pending interrupts.
|
||||||
*
|
*
|
||||||
* NOTE: It's no coincidence that we're checking this BEFORE any pending traps, because in rare
|
* NOTE: It's no coincidence that we're checking this BEFORE any pending traps, because in rare
|
||||||
* cases (including some presented by those pesky "TRAP TEST" diagnostics), the process of dispatching
|
* cases (including some presented by those pesky "TRAP TEST" diagnostics), the process of dispatching
|
||||||
* an interrupt can trigger a TRAP_SP stack overflow condition, which must be dealt with BEFORE we
|
* an interrupt can trigger a TRAP_SP stack overflow condition, which must be dealt with BEFORE we
|
||||||
* execute the first instruction of the interrupt handler.
|
* execute the first instruction of the interrupt handler.
|
||||||
*/
|
*/
|
||||||
if ((this.opFlags & (PDP11.OPFLAG.INTQ_MASK | PDP11.OPFLAG.WAIT)) /* && nDebugState >= 0 */) {
|
if ((this.opFlags & (PDP11.OPFLAG.IRQ_MASK | PDP11.OPFLAG.WAIT)) /* && nDebugState >= 0 */) {
|
||||||
if (this.checkInterrupts()) {
|
if (this.checkInterrupts()) {
|
||||||
if (DEBUGGER && nDebugCheck && this.dbg.checkInstruction(this.getPC(), nDebugState)) {
|
if (DEBUGGER && nDebugCheck && this.dbg.checkInstruction(this.getPC(), nDebugState)) {
|
||||||
this.stopCPU();
|
this.stopCPU();
|
||||||
|
|
@ -2599,7 +2611,6 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
|
||||||
if (nDebugState < 0) break;
|
if (nDebugState < 0) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Next, check for any pending traps (which, as noted above, must be done after checkInterrupts()).
|
* Next, check for any pending traps (which, as noted above, must be done after checkInterrupts()).
|
||||||
*
|
*
|
||||||
|
|
@ -2616,8 +2627,9 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
|
||||||
if (nDebugState < 0) break;
|
if (nDebugState < 0) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.assert(!this.irqNext && !this.regPIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Snapshot the TF bit in opFlags, while clearing all other opFlags (except those in PRESERVE);
|
* Snapshot the TF bit in opFlags, while clearing all other opFlags (except those in PRESERVE);
|
||||||
* we'll check the TRAP_TF bit in opFlags when we come back around for another opcode.
|
* we'll check the TRAP_TF bit in opFlags when we come back around for another opcode.
|
||||||
|
|
|
||||||
|
|
@ -1262,14 +1262,14 @@ if (DEBUGGER) {
|
||||||
sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getLastPC()));
|
sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getLastPC()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.sMessagePrev && sMessage == this.sMessagePrev) return;
|
||||||
|
this.sMessagePrev = sMessage;
|
||||||
|
|
||||||
if (this.bitsMessage & MessagesPDP11.BUFFER) {
|
if (this.bitsMessage & MessagesPDP11.BUFFER) {
|
||||||
this.aMessageBuffer.push(sMessage);
|
this.aMessageBuffer.push(sMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.sMessagePrev && sMessage == this.sMessagePrev) return;
|
|
||||||
this.sMessagePrev = sMessage;
|
|
||||||
|
|
||||||
var fRunning;
|
var fRunning;
|
||||||
if ((this.bitsMessage & MessagesPDP11.HALT) && this.cpu && (fRunning = this.cpu.isRunning()) || this.isBusy(true)) {
|
if ((this.bitsMessage & MessagesPDP11.HALT) && this.cpu && (fRunning = this.cpu.isRunning()) || this.isBusy(true)) {
|
||||||
this.stopCPU();
|
this.stopCPU();
|
||||||
|
|
@ -3378,8 +3378,9 @@ if (DEBUGGER) {
|
||||||
this.bitsMessage &= ~bitsMessage;
|
this.bitsMessage &= ~bitsMessage;
|
||||||
fCriteria = false;
|
fCriteria = false;
|
||||||
if (bitsMessage == MessagesPDP11.BUFFER) {
|
if (bitsMessage == MessagesPDP11.BUFFER) {
|
||||||
for (var i = 0; i < this.aMessageBuffer.length; i++) {
|
var i = this.aMessageBuffer.length >= 1000? this.aMessageBuffer.length - 1000 : 0;
|
||||||
this.println(this.aMessageBuffer[i]);
|
while (i < this.aMessageBuffer.length) {
|
||||||
|
this.println(this.aMessageBuffer[i++]);
|
||||||
}
|
}
|
||||||
this.aMessageBuffer = [];
|
this.aMessageBuffer = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ var PDP11 = {
|
||||||
MASK: 0x3
|
MASK: 0x3
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* Processor Status Word definitions (stored in regPSW)
|
* Processor Status Word (stored in regPSW) at 177776
|
||||||
*/
|
*/
|
||||||
PSW: {
|
PSW: {
|
||||||
CF: 0x0001, // bit 0 (000001) Carry Flag
|
CF: 0x0001, // bit 0 (000001) Carry Flag
|
||||||
|
|
@ -185,6 +185,19 @@ var PDP11 = {
|
||||||
CMODE: 14
|
CMODE: 14
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
|
* Program Interrupt Register (stored in regPIR) at 177772
|
||||||
|
*
|
||||||
|
* The PIA bits at 5-7 are designed to align with PRI bits 5-7 in the PSW.
|
||||||
|
*/
|
||||||
|
PIR: {
|
||||||
|
BITS: 0xFE00, // bits 9-15 correspond to interrupt requests 1-7
|
||||||
|
PIA: 0x00EE, // the PIA bits contain two copies of the corresponding interrupt request priority
|
||||||
|
PIA_INC: 0x0022, // both sets of PIA bits can be incremented with this constant
|
||||||
|
SHIFT: {
|
||||||
|
BITS: 9
|
||||||
|
}
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
* PDP-11 trap vectors
|
* PDP-11 trap vectors
|
||||||
*/
|
*/
|
||||||
|
|
@ -248,9 +261,9 @@ var PDP11 = {
|
||||||
* Internal operation state flags
|
* Internal operation state flags
|
||||||
*/
|
*/
|
||||||
OPFLAG: {
|
OPFLAG: {
|
||||||
INTQ_DELAY: 0x01, // set INTQ on next check (set by SPL and traps)
|
IRQ_DELAY: 0x01, // set IRQ on next check (set by SPL and traps)
|
||||||
INTQ: 0x02, // call checkInterrupts()
|
IRQ: 0x02, // call checkInterrupts()
|
||||||
INTQ_MASK: 0x03,
|
IRQ_MASK: 0x03,
|
||||||
WAIT: 0x04, // WAIT operation in progress
|
WAIT: 0x04, // WAIT operation in progress
|
||||||
TRAP: 0x08, // set if last operation was a trap (see trapLast for the vector, and trapReason for the reason)
|
TRAP: 0x08, // set if last operation was a trap (see trapLast for the vector, and trapReason for the reason)
|
||||||
TRAP_TF: 0x10, // aka PDP11.PSW.TF (WARNING: do not change this bit, or you will likely break opRTI())
|
TRAP_TF: 0x10, // aka PDP11.PSW.TF (WARNING: do not change this bit, or you will likely break opRTI())
|
||||||
|
|
@ -492,10 +505,10 @@ var PDP11 = {
|
||||||
PPS: 0o177554, // PC11 Punch Status Register
|
PPS: 0o177554, // PC11 Punch Status Register
|
||||||
PPB: 0o177556, // PC11 Punch Buffer Register
|
PPB: 0o177556, // PC11 Punch Buffer Register
|
||||||
|
|
||||||
RCSR: 0o177560, // DL11 Display Terminal: Receiver Status Register
|
RCSR: 0o177560, // DL11 Receiver Status Register
|
||||||
RBUF: 0o177562, // DL11 Display Terminal: Receiver Data Buffer Register
|
RBUF: 0o177562, // DL11 Receiver Data Buffer Register
|
||||||
XCSR: 0o177564, // DL11 Display Terminal: Transmitter Status Register
|
XCSR: 0o177564, // DL11 Transmitter Status Register
|
||||||
XBUF: 0o177566, // DL11 Display Terminal: Transmitter Data Buffer Register
|
XBUF: 0o177566, // DL11 Transmitter Data Buffer Register
|
||||||
|
|
||||||
CNSW: 0o177570, // Console (Front Panel) Switch/Display Register
|
CNSW: 0o177570, // Console (Front Panel) Switch/Display Register
|
||||||
|
|
||||||
|
|
@ -578,9 +591,9 @@ var PDP11 = {
|
||||||
},
|
},
|
||||||
DL11: { // Serial Line Interface (program compatible with the KL11 for control of console teleprinters)
|
DL11: { // Serial Line Interface (program compatible with the KL11 for control of console teleprinters)
|
||||||
PRI: 4,
|
PRI: 4,
|
||||||
RVEC: 0o60,
|
RVEC: 0o060,
|
||||||
XVEC: 0o64,
|
XVEC: 0o064,
|
||||||
RCSR: { // 177560
|
RCSR: { // 177560: DL11 Receiver Status Register
|
||||||
RE: 0x0001, // Reader Enable (W/O)
|
RE: 0x0001, // Reader Enable (W/O)
|
||||||
DTR: 0x0002, // Data Terminal Ready (R/W)
|
DTR: 0x0002, // Data Terminal Ready (R/W)
|
||||||
RTS: 0x0004, // Request To Send (R/W)
|
RTS: 0x0004, // Request To Send (R/W)
|
||||||
|
|
@ -598,14 +611,14 @@ var PDP11 = {
|
||||||
WMASK: 0x006F, // bits writable
|
WMASK: 0x006F, // bits writable
|
||||||
BAUD: 9600
|
BAUD: 9600
|
||||||
},
|
},
|
||||||
RBUF: { // 177562
|
RBUF: { // 177562: DL11 Receiver Data Buffer Register
|
||||||
DATA: 0x00ff, // Received Data (R/O)
|
DATA: 0x00ff, // Received Data (R/O)
|
||||||
PARITY: 0x1000, // Received Data Parity (R/O)
|
PARITY: 0x1000, // Received Data Parity (R/O)
|
||||||
FE: 0x2000, // Framing Error (R/O)
|
FE: 0x2000, // Framing Error (R/O)
|
||||||
OE: 0x4000, // Overrun Error (R/O)
|
OE: 0x4000, // Overrun Error (R/O)
|
||||||
ERROR: 0x8000 // Error (R/O)
|
ERROR: 0x8000 // Error (R/O)
|
||||||
},
|
},
|
||||||
XCSR: { // 177564
|
XCSR: { // 177564: DL11 Transmitter Status Register
|
||||||
BREAK: 0x0001, // BREAK (R/W)
|
BREAK: 0x0001, // BREAK (R/W)
|
||||||
MAINT: 0x0004, // Maintenance (R/W)
|
MAINT: 0x0004, // Maintenance (R/W)
|
||||||
TIE: 0x0040, // Transmitter Interrupt Enable (R/W)
|
TIE: 0x0040, // Transmitter Interrupt Enable (R/W)
|
||||||
|
|
@ -614,7 +627,7 @@ var PDP11 = {
|
||||||
WMASK: 0x0045,
|
WMASK: 0x0045,
|
||||||
BAUD: 9600
|
BAUD: 9600
|
||||||
},
|
},
|
||||||
XBUF: { // 177566
|
XBUF: { // 177566: DL11 Transmitter Data Buffer Register
|
||||||
DATA: 0x00FF // Transmitted Data (W/O) TODO: Determine why pdp11.js effectively defined this as 0x7F
|
DATA: 0x00FF // Transmitted Data (W/O) TODO: Determine why pdp11.js effectively defined this as 0x7F
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -622,7 +635,7 @@ var PDP11 = {
|
||||||
PRI: 6,
|
PRI: 6,
|
||||||
VEC: 0o100,
|
VEC: 0o100,
|
||||||
DELAY: 0,
|
DELAY: 0,
|
||||||
LKS: {
|
LKS: { // 177546: KW11-L Clock Status
|
||||||
IE: 0x0040, // Interrupt Enable
|
IE: 0x0040, // Interrupt Enable
|
||||||
MON: 0x0080, // Monitor
|
MON: 0x0080, // Monitor
|
||||||
MASK: 0x00C0 // these are the only bits that can read or written
|
MASK: 0x00C0 // these are the only bits that can read or written
|
||||||
|
|
@ -630,9 +643,9 @@ var PDP11 = {
|
||||||
},
|
},
|
||||||
PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit)
|
PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit)
|
||||||
PRI: 4, // NOTE: reader has precedence over punch
|
PRI: 4, // NOTE: reader has precedence over punch
|
||||||
RVEC: 0o70, // reader vector
|
RVEC: 0o070, // reader vector
|
||||||
PVEC: 0o74, // punch vector
|
PVEC: 0o074, // punch vector
|
||||||
PRS: {
|
PRS: { // 177550: PC11 (and PR11) Reader Status Register
|
||||||
RE: 0x0001, // Reader Enable (W/O)
|
RE: 0x0001, // Reader Enable (W/O)
|
||||||
RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt)
|
RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt)
|
||||||
DONE: 0x0080, // Done (R/O)
|
DONE: 0x0080, // Done (R/O)
|
||||||
|
|
@ -643,15 +656,20 @@ var PDP11 = {
|
||||||
WMASK: 0x0041, // bits writable
|
WMASK: 0x0041, // bits writable
|
||||||
BAUD: 3600
|
BAUD: 3600
|
||||||
},
|
},
|
||||||
PRB: {
|
PRB: { // 177552: PC11 (and PR11) Reader Buffer Register
|
||||||
MASK: 0x00FF // Data
|
MASK: 0x00FF // Data
|
||||||
},
|
},
|
||||||
PPS: {
|
PPS: { // 177554: PC11 Punch Status Register
|
||||||
/*
|
/*
|
||||||
* TODO: Flesh this out if/when we add Paper Tape Punch support
|
* TODO: Flesh this out if/when we add Paper Tape Punch support
|
||||||
*/
|
*/
|
||||||
BAUD: 600
|
BAUD: 600
|
||||||
},
|
},
|
||||||
|
PPB: { // 177556: PC11 Punch Buffer Register
|
||||||
|
/*
|
||||||
|
* TODO: Flesh this out if/when we add Paper Tape Punch support
|
||||||
|
*/
|
||||||
|
}
|
||||||
},
|
},
|
||||||
RK11: { // RK11 Disk Controller
|
RK11: { // RK11 Disk Controller
|
||||||
PRI: 5,
|
PRI: 5,
|
||||||
|
|
@ -826,6 +844,15 @@ var PDP11 = {
|
||||||
RDATA: 0b1100, // Read Data
|
RDATA: 0b1100, // Read Data
|
||||||
RDNC: 0b1110 // Read Data without Header Check
|
RDNC: 0b1110 // Read Data without Header Check
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
VECTORS: {
|
||||||
|
0o060: "DL11.RCSR",
|
||||||
|
0o064: "DL11.XCSR",
|
||||||
|
0o070: "PC11.PRS",
|
||||||
|
0o074: "PC11.PPS",
|
||||||
|
0o100: "KW11",
|
||||||
|
0o160: "RL11",
|
||||||
|
0o220: "RK11"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
device.interruptKW11();
|
device.interruptKW11();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.kw11.trigger = cpu.addTrigger(PDP11.KW11.VEC, PDP11.KW11.PRI, MessagesPDP11.KW11);
|
this.kw11.irq = cpu.addIRQ(PDP11.KW11.VEC, PDP11.KW11.PRI, MessagesPDP11.KW11);
|
||||||
|
|
||||||
bus.addIOTable(this, DevicePDP11.UNIBUS_IOTABLE);
|
bus.addIOTable(this, DevicePDP11.UNIBUS_IOTABLE);
|
||||||
bus.addResetHandler(this.reset.bind(this));
|
bus.addResetHandler(this.reset.bind(this));
|
||||||
|
|
@ -176,7 +176,7 @@ DevicePDP11.prototype.interruptKW11 = function()
|
||||||
{
|
{
|
||||||
this.kw11.lks |= PDP11.KW11.LKS.MON;
|
this.kw11.lks |= PDP11.KW11.LKS.MON;
|
||||||
if (this.kw11.lks & PDP11.KW11.LKS.IE) {
|
if (this.kw11.lks & PDP11.KW11.LKS.IE) {
|
||||||
this.cpu.setTrigger(this.kw11.trigger);
|
this.cpu.setIRQ(this.kw11.irq);
|
||||||
}
|
}
|
||||||
if (this.cmp) this.cmp.updateDisplays(1);
|
if (this.cmp) this.cmp.updateDisplays(1);
|
||||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||||
|
|
|
||||||
|
|
@ -280,9 +280,9 @@ PC11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.triggerReaderInterrupt = this.cpu.addTrigger(PDP11.PC11.RVEC, PDP11.PC11.PRI, MessagesPDP11.PC11);
|
this.irqReader = this.cpu.addIRQ(PDP11.PC11.RVEC, PDP11.PC11.PRI, MessagesPDP11.PC11);
|
||||||
|
|
||||||
this.timerReaderAdvance = this.cpu.addTimer(function readyReader() {
|
this.timerReader = this.cpu.addTimer(function readyReader() {
|
||||||
pc11.advanceReader();
|
pc11.advanceReader();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -820,7 +820,7 @@ PC11.prototype.advanceReader = function()
|
||||||
this.prs |= PDP11.PC11.PRS.DONE;
|
this.prs |= PDP11.PC11.PRS.DONE;
|
||||||
this.prs &= ~PDP11.PC11.PRS.BUSY;
|
this.prs &= ~PDP11.PC11.PRS.BUSY;
|
||||||
if (this.prs & PDP11.PC11.PRS.RIE) {
|
if (this.prs & PDP11.PC11.PRS.RIE) {
|
||||||
this.cpu.setTrigger(this.triggerReaderInterrupt);
|
this.cpu.setIRQ(this.irqReader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -864,7 +864,7 @@ PC11.prototype.writePRS = function(data, addr)
|
||||||
if (this.prs & PDP11.PC11.PRS.ERROR) {
|
if (this.prs & PDP11.PC11.PRS.ERROR) {
|
||||||
data &= ~PDP11.PC11.PRS.RE;
|
data &= ~PDP11.PC11.PRS.RE;
|
||||||
if (this.prs & PDP11.PC11.PRS.RIE) {
|
if (this.prs & PDP11.PC11.PRS.RIE) {
|
||||||
this.cpu.setTrigger(this.triggerReaderInterrupt);
|
this.cpu.setIRQ(this.irqReader);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.prs &= ~PDP11.PC11.PRS.DONE;
|
this.prs &= ~PDP11.PC11.PRS.DONE;
|
||||||
|
|
@ -875,7 +875,7 @@ PC11.prototype.writePRS = function(data, addr)
|
||||||
* that's the rate we'll choose as well (ie, 1000ms / 300). As an aside, the original "low speed"
|
* that's the rate we'll choose as well (ie, 1000ms / 300). As an aside, the original "low speed"
|
||||||
* version of the reader ran at 10 CPS.
|
* version of the reader ran at 10 CPS.
|
||||||
*/
|
*/
|
||||||
this.cpu.setTimer(this.timerReaderAdvance, this.getBaudTimeout(this.nBaudReceive));
|
this.cpu.setTimer(this.timerReader, this.getBaudTimeout(this.nBaudReceive));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.prs = (this.prs & ~PDP11.PC11.PRS.WMASK) | (data & PDP11.PC11.PRS.WMASK);
|
this.prs = (this.prs & ~PDP11.PC11.PRS.WMASK) | (data & PDP11.PC11.PRS.WMASK);
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ RK11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
*/
|
*/
|
||||||
this.initController();
|
this.initController();
|
||||||
|
|
||||||
this.triggerInterrupt = this.cpu.addTrigger(PDP11.RK11.VEC, PDP11.RK11.PRI, MessagesPDP11.RK11);
|
this.irq = this.cpu.addIRQ(PDP11.RK11.VEC, PDP11.RK11.PRI, MessagesPDP11.RK11);
|
||||||
|
|
||||||
bus.addIOTable(this, RK11.UNIBUS_IOTABLE);
|
bus.addIOTable(this, RK11.UNIBUS_IOTABLE);
|
||||||
bus.addResetHandler(this.reset.bind(this));
|
bus.addResetHandler(this.reset.bind(this));
|
||||||
|
|
@ -950,9 +950,7 @@ RK11.prototype.processCommand = function()
|
||||||
if (fInterrupt) {
|
if (fInterrupt) {
|
||||||
this.csr &= ~PDP11.RK11.RKCS.GO;
|
this.csr &= ~PDP11.RK11.RKCS.GO;
|
||||||
this.csr |= PDP11.RK11.RKCS.CRDY;
|
this.csr |= PDP11.RK11.RKCS.CRDY;
|
||||||
if (this.csr & PDP11.RK11.RKCS.IE) {
|
if (this.csr & PDP11.RK11.RKCS.IE) this.cpu.setIRQ(this.irq);
|
||||||
this.cpu.setTrigger(this.triggerInterrupt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ RL11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
*/
|
*/
|
||||||
this.initController();
|
this.initController();
|
||||||
|
|
||||||
this.triggerInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI, MessagesPDP11.RL11);
|
this.irq = this.cpu.addIRQ(PDP11.RL11.VEC, PDP11.RL11.PRI, MessagesPDP11.RL11);
|
||||||
|
|
||||||
bus.addIOTable(this, RL11.UNIBUS_IOTABLE);
|
bus.addIOTable(this, RL11.UNIBUS_IOTABLE);
|
||||||
bus.addResetHandler(this.reset.bind(this));
|
bus.addResetHandler(this.reset.bind(this));
|
||||||
|
|
@ -965,9 +965,7 @@ RL11.prototype.processCommand = function()
|
||||||
|
|
||||||
if (fInterrupt) {
|
if (fInterrupt) {
|
||||||
this.csr |= PDP11.RL11.RLCS.DRDY | PDP11.RL11.RLCS.CRDY;
|
this.csr |= PDP11.RL11.RLCS.DRDY | PDP11.RL11.RLCS.CRDY;
|
||||||
if (this.csr & PDP11.RL11.RLCS.IE) {
|
if (this.csr & PDP11.RL11.RLCS.IE) this.cpu.setIRQ(this.irq);
|
||||||
this.cpu.setTrigger(this.triggerInterrupt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -284,42 +284,29 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
||||||
|
|
||||||
var serial = this;
|
var serial = this;
|
||||||
|
|
||||||
this.triggerReceiveInterrupt = this.cpu.addTrigger(PDP11.DL11.RVEC, PDP11.DL11.PRI, MessagesPDP11.DL11);
|
this.irqReceiver = this.cpu.addIRQ(PDP11.DL11.RVEC, PDP11.DL11.PRI, MessagesPDP11.DL11);
|
||||||
|
|
||||||
this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() {
|
this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() {
|
||||||
if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) {
|
var b = serial.receiveByte();
|
||||||
if (serial.abReceive.length) {
|
if (b >= 0) {
|
||||||
/*
|
serial.rbuf = b;
|
||||||
* Here, as elsewhere (eg, the PC11 component), even if I trusted all incoming data
|
if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) {
|
||||||
* to be byte values (which I don't), there's also the risk that it could be signed data
|
|
||||||
* (eg, -128 to 127, instead of 0 to 255). Both risks are good reasons to always mask
|
|
||||||
* the data assigned to RBUF with 0xff.
|
|
||||||
*/
|
|
||||||
serial.rbuf = serial.abReceive.shift() & 0xff;
|
|
||||||
if (serial.fUpperCase) {
|
|
||||||
/*
|
|
||||||
* Automatically transform lower-case ASCII codes to upper-case; fUpperCase should
|
|
||||||
* only be set when a terminal or some sort of pseudo-display is being used and we don't
|
|
||||||
* trust it to have its CAPS-LOCK setting correct.
|
|
||||||
*/
|
|
||||||
if (serial.rbuf >= 0x61 && serial.rbuf < 0x7A) {
|
|
||||||
serial.rbuf -= 0x20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
serial.rcsr |= PDP11.DL11.RCSR.RD;
|
serial.rcsr |= PDP11.DL11.RCSR.RD;
|
||||||
if (serial.rcsr & PDP11.DL11.RCSR.RIE) {
|
} else {
|
||||||
serial.cpu.setTrigger(serial.triggerReceiveInterrupt);
|
serial.rbuf |= PDP11.DL11.RBUF.OE | PDP11.DL11.RBUF.ERROR;
|
||||||
}
|
}
|
||||||
|
if (serial.rcsr & PDP11.DL11.RCSR.RIE) {
|
||||||
|
cpu.setIRQ(serial.irqReceiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.triggerTransmitInterrupt = this.cpu.addTrigger(PDP11.DL11.XVEC, PDP11.DL11.PRI, MessagesPDP11.DL11);
|
this.irqTransmitter = this.cpu.addIRQ(PDP11.DL11.XVEC, PDP11.DL11.PRI, MessagesPDP11.DL11);
|
||||||
|
|
||||||
this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() {
|
this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() {
|
||||||
serial.xcsr |= PDP11.DL11.XCSR.READY;
|
serial.xcsr |= PDP11.DL11.XCSR.READY;
|
||||||
if (serial.xcsr & PDP11.DL11.XCSR.TIE) {
|
if (serial.xcsr & PDP11.DL11.XCSR.TIE) {
|
||||||
serial.cpu.setTrigger(serial.triggerTransmitInterrupt);
|
cpu.setIRQ(serial.irqTransmitter);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -544,10 +531,43 @@ SerialPortPDP11.prototype.receiveData = function(data)
|
||||||
else {
|
else {
|
||||||
this.abReceive = this.abReceive.concat(data);
|
this.abReceive = this.abReceive.concat(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cpu.setTimer(this.timerReceiveInterrupt, this.getBaudTimeout(this.nBaudReceive));
|
this.cpu.setTimer(this.timerReceiveInterrupt, this.getBaudTimeout(this.nBaudReceive));
|
||||||
|
|
||||||
return true; // for now, return true regardless, since we're buffering everything anyway
|
return true; // for now, return true regardless, since we're buffering everything anyway
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* receiveByte()
|
||||||
|
*
|
||||||
|
* @this {SerialPortPDP11}
|
||||||
|
* @return {number} (0x00-0xff if byte available, -1 if not)
|
||||||
|
*/
|
||||||
|
SerialPortPDP11.prototype.receiveByte = function()
|
||||||
|
{
|
||||||
|
var b = -1;
|
||||||
|
if (this.abReceive.length) {
|
||||||
|
/*
|
||||||
|
* Here, as elsewhere (eg, the PC11 component), even if I trusted all incoming data
|
||||||
|
* to be byte values (which I don't), there's also the risk that it could be signed data
|
||||||
|
* (eg, -128 to 127, instead of 0 to 255). Both risks are good reasons to always mask
|
||||||
|
* the data assigned to RBUF with 0xff.
|
||||||
|
*/
|
||||||
|
b = this.abReceive.shift() & 0xff;
|
||||||
|
this.printMessage("receiveByte(" + str.toHexByte(b) + ")");
|
||||||
|
if (this.fUpperCase) {
|
||||||
|
/*
|
||||||
|
* Automatically transform lower-case ASCII codes to upper-case; fUpperCase should
|
||||||
|
* only be set when a terminal or some sort of pseudo-display is being used and we don't
|
||||||
|
* trust it to have its CAPS-LOCK setting correct.
|
||||||
|
*/
|
||||||
|
if (b >= 0x61 && b < 0x7A) b -= 0x20;
|
||||||
|
}
|
||||||
|
this.cpu.setTimer(this.timerReceiveInterrupt, this.getBaudTimeout(this.nBaudReceive));
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* transmitByte(b)
|
* transmitByte(b)
|
||||||
*
|
*
|
||||||
|
|
@ -618,6 +638,13 @@ SerialPortPDP11.prototype.transmitByte = function(b)
|
||||||
fTransmitted = true;
|
fTransmitted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOTE: When debugging issues involving the SerialPort, such as debugging code between a pair of
|
||||||
|
* transmitted bytes, you can pass 0 instead of getBaudTimeout() to setTimer() to minimize the amount
|
||||||
|
* of time spent waiting for XCSR.READY to be set again.
|
||||||
|
*/
|
||||||
|
this.cpu.setTimer(this.timerTransmitInterrupt, this.getBaudTimeout(this.nBaudTransmit));
|
||||||
|
|
||||||
return fTransmitted;
|
return fTransmitted;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -655,9 +682,6 @@ SerialPortPDP11.prototype.writeRCSR = function(data, addr)
|
||||||
SerialPortPDP11.prototype.readRBUF = function(addr)
|
SerialPortPDP11.prototype.readRBUF = function(addr)
|
||||||
{
|
{
|
||||||
this.rcsr &= ~PDP11.DL11.RCSR.RD;
|
this.rcsr &= ~PDP11.DL11.RCSR.RD;
|
||||||
if (this.abReceive.length > 0) {
|
|
||||||
this.cpu.setTimer(this.timerReceiveInterrupt, this.getBaudTimeout(this.nBaudReceive));
|
|
||||||
}
|
|
||||||
return this.rbuf;
|
return this.rbuf;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -696,16 +720,17 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr)
|
||||||
/*
|
/*
|
||||||
* If the device is READY, and TIE is being set, then request a hardware interrupt.
|
* If the device is READY, and TIE is being set, then request a hardware interrupt.
|
||||||
*
|
*
|
||||||
* Conversely, if TIE is being cleared, remove the request; this satisfies a test in MAINDEC TEST 15,
|
* Conversely, if TIE is being cleared, remove the request; this resolves a problem within
|
||||||
* which appears to clear, set, and clear the Transmitter Interrupt Enable (TIE) bit in rapid succession,
|
* MAINDEC TEST 15, where the Transmitter Interrupt Enable (TIE) bit is cleared, set, and cleared
|
||||||
* with the expectation that NO interrupt will be generated. However, this fix also requires a
|
* in rapid succession, with the expectation that NO interrupt will be generated. Note that
|
||||||
* complementary change in setTrigger(), to request hardware interrupts with INTQ_DELAY rather than INTQ.
|
* this fix also requires a complementary change in setIRQ(), to request hardware interrupts with
|
||||||
|
* IRQ_DELAY rather than IRQ.
|
||||||
*/
|
*/
|
||||||
if (this.xcsr & PDP11.DL11.XCSR.READY) {
|
if (this.xcsr & PDP11.DL11.XCSR.READY) {
|
||||||
if (data & PDP11.DL11.XCSR.TIE) {
|
if (data & PDP11.DL11.XCSR.TIE) {
|
||||||
this.cpu.setTrigger(this.triggerTransmitInterrupt);
|
this.cpu.setIRQ(this.irqTransmitter);
|
||||||
} else {
|
} else {
|
||||||
this.cpu.clearTrigger(this.triggerTransmitInterrupt);
|
this.cpu.clearIRQ(this.irqTransmitter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.xcsr = (this.xcsr & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK);
|
this.xcsr = (this.xcsr & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK);
|
||||||
|
|
@ -732,15 +757,8 @@ SerialPortPDP11.prototype.readXBUF = function(addr)
|
||||||
*/
|
*/
|
||||||
SerialPortPDP11.prototype.writeXBUF = function(data, addr)
|
SerialPortPDP11.prototype.writeXBUF = function(data, addr)
|
||||||
{
|
{
|
||||||
data &= PDP11.DL11.XBUF.DATA;
|
this.transmitByte(data & PDP11.DL11.XBUF.DATA);
|
||||||
this.transmitByte(data);
|
|
||||||
this.xcsr &= ~PDP11.DL11.XCSR.READY;
|
this.xcsr &= ~PDP11.DL11.XCSR.READY;
|
||||||
/*
|
|
||||||
* NOTE: When debugging issues involving the SerialPort, such as debugging code between a pair of
|
|
||||||
* transmitted bytes, you can pass 0 instead of getBaudTimeout() to setTimer() to minimize the amount
|
|
||||||
* of time spent waiting for XCSR.READY to be set again.
|
|
||||||
*/
|
|
||||||
this.cpu.setTimer(this.timerTransmitInterrupt, this.getBaudTimeout(this.nBaudTransmit));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
*/
|
*/
|
||||||
for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var fa=ca[da];fa in ba||(ba[fa]={});ba=ba[fa]}var ga=ca[ca.length-1],ha=ba[ga],ia=ha?ha:function(a){return Math.log(a)/Math.LN2};
|
for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var fa=ca[da];fa in ba||(ba[fa]={});ba=ba[fa]}var ga=ca[ca.length-1],ha=ba[ga],ia=ha?ha:function(a){return Math.log(a)/Math.LN2};
|
||||||
ia!=ha&&null!=ia&&aa(ba,ga,{configurable:!0,writable:!0,value:ia});
|
ia!=ha&&null!=ia&&aa(ba,ga,{configurable:!0,writable:!0,value:ia});
|
||||||
var ja={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Xc:1,Gf:3,Hf: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,
|
var ja={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Yc:1,Gf:3,Hf: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,
|
||||||
yc:65,Ef:66,Ff:67,If:68,E:69,Jf:70,Kf:71,Lf:72,Mf:73,Nf:74,Of:75,Pf:76,Qf:77,Rf:78,Sf:79,Tf:80,Q:81,Uf:82,Vf:83,Wf:84,Xf:85,Yf:86,Zf:87,$f:88,ag:89,hd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,bg:97,cg:98,dg:99,d:100,e:101,eg:102,fg:103,gg:104,hg:105,kg:106,k:107,lg:108,mg:109,n:110,ng:111,p:112,q:113,r:114,og:115,t:116,qg:117,rg:118,sg:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Yc:127};
|
zc:65,Ef:66,Ff:67,If:68,E:69,Jf:70,Kf:71,Lf:72,Mf:73,Nf:74,Of:75,Pf:76,Qf:77,Rf:78,Sf:79,Tf:80,Q:81,Uf:82,Vf:83,Wf:84,Xf:85,Yf:86,Zf:87,$f:88,ag:89,jd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,bg:97,cg:98,dg:99,d:100,e:101,eg:102,fg:103,gg:104,hg:105,kg:106,k:107,lg:108,mg:109,n:110,ng:111,p:112,q:113,r:114,og:115,t:116,qg:117,rg:118,sg:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Zc:127};
|
||||||
function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
|
function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
|
||||||
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function na(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)}
|
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function na(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)}
|
||||||
function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function oa(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function pa(a,b){return-1!==a.indexOf(b,a.length-b.length)}var ra={"&":"&","<":"<",">":">",'"':""","'":"'"};function sa(a){return a.replace(/[&<>"']/g,function(a){return ra[a]})}
|
function u(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function oa(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function pa(a,b){return-1!==a.indexOf(b,a.length-b.length)}var ra={"&":"&","<":"<",">":">",'"':""","'":"'"};function sa(a){return a.replace(/[&<>"']/g,function(a){return ra[a]})}
|
||||||
|
|
@ -50,296 +50,297 @@ function Ja(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}re
|
||||||
function Na(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
function Na(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
||||||
function Pa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Qa={init:[],show:[],exit:[]},Sa=!1,Ya=!1,Za=!0;function $a(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ab(a){Qa.init.push(a)}
|
function Pa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Qa={init:[],show:[],exit:[]},Sa=!1,Ya=!1,Za=!0;function $a(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function ab(a){Qa.init.push(a)}
|
||||||
function bb(a){if(Za)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function cb(a){!Za&&a?(Za=!0,Sa&&db("init"),Ya&&db("show")):Za=a}function db(a){Qa[a]&&bb(Qa[a])}$a("onload",function(){Sa=!0;bb(Qa.init)});$a("onpageshow",function(){Ya=!0;bb(Qa.show)});$a(Ma("Opera")||Ma("iOS")?"onunload":"onbeforeunload",function(){bb(Qa.exit)});
|
function bb(a){if(Za)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function cb(a){!Za&&a?(Za=!0,Sa&&db("init"),Ya&&db("show")):Za=a}function db(a){Qa[a]&&bb(Qa[a])}$a("onload",function(){Sa=!0;bb(Qa.init)});$a("onpageshow",function(){Ya=!0;bb(Qa.show)});$a(Ma("Opera")||Ma("iOS")?"onunload":"onbeforeunload",function(){bb(Qa.exit)});
|
||||||
function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Bc=b.comment;this.jd=b;b=this.id.indexOf(".");0>b?this.eb=this.id:(this.fb=this.id.substr(0,b),this.eb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,hb:!1,mc:!1,ma:!1,error:!1};this.bc=null;this.C.error=!1;this.D={};this.j=null;this.pa=d||0;z.push(this)}var eb=void 0,fb={};
|
function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Cc=b.comment;this.kd=b;b=this.id.indexOf(".");0>b?this.eb=this.id:(this.fb=this.id.substr(0,b),this.eb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,hb:!1,nc:!1,ma:!1,error:!1};this.cc=null;this.C.error=!1;this.D={};this.j=null;this.pa=d||0;z.push(this)}var eb=void 0,fb={};
|
||||||
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
if(window){eb||(eb=window.location.search.substr(1));for(var gb,hb=/\+/g,ib=/([^&=]+)=?([^&]*)/g;gb=ib.exec(eb);)fb[decodeURIComponent(gb[1].replace(hb," "))]=decodeURIComponent(gb[2].replace(hb," "))}function jb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
||||||
function B(a,b){b||(b=x);a.prototype=jb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var kb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else kb={},z=[];function lb(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function mb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<z.length;b++){var d=z[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
function B(a,b){b||(b=x);a.prototype=jb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var kb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else kb={},z=[];function lb(a,b,c){kb[a]&&b&&(kb[a][b]=c)}function mb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<z.length;b++){var d=z[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||||
function nb(a){if(void 0!==a){var b;for(b=0;b<z.length;b++)if(z[b].id===a)return z[b]}return null}function ob(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<z.length;d++)if(c)c==z[d]&&(c=null);else if(!(a!=z[d].type||b&&z[d].id.indexOf(b)))return z[d]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
function nb(a){if(void 0!==a){var b;for(b=0;b<z.length;b++)if(z[b].id===a)return z[b]}return null}function ob(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<z.length;d++)if(c)c==z[d]&&(c=null);else if(!(a!=z[d].type||b&&z[d].id.indexOf(b)))return z[d]}return null}function D(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
||||||
function E(a,b){b=F(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),l=0;l<h.length;l++)switch(g=h[l],g){case "pdp11-binding":(g=D(f))&&g.binding&&a.ua(g.type,g.binding,f,g.value),l=h.length}}}}
|
function E(a,b){b=F(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),l=0;l<h.length;l++)switch(g=h[l],g){case "pdp11-binding":(g=D(f))&&g.binding&&a.va(g.type,g.binding,f,g.value),l=h.length}}}}
|
||||||
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function F(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},ua:function(a,b,c){switch(b){case "clear":return this.D[b]||(this.D[b]=c,c.onclick=function(a){return function(){a.D.print&&(a.D.print.value="")}}(this)),!0;case "print":return this.D[b]||(this.Za=this.D[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},va:function(a,b,c){switch(b){case "clear":return this.D[b]||(this.D[b]=c,c.onclick=function(a){return function(){a.D.print&&(a.D.print.value="")}}(this)),!0;case "print":return this.D[b]||(this.Za=this.D[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
this.N=function(a){this.i(a,this.eb)}),!0;default:return!1}},log:function(){},i:function(){},status:function(a){this.i(this.eb+": "+a)},N:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},Ka:function(){return this.C.ma=!0},Ja:function(a,b){b&&(this.C.ma=!1);return!0}};function G(a,b,c,d){a.j&&(!0===c||I(a,c|0))&&a.j.message(b,d)}function I(a,b){if(a.j){a===a.j?b|=0:b=b||a.pa;var c=a.j.pa&b;return!!b&&c===b||!!(c&a.j.qd)}return!1}
|
this.N=function(a){this.i(a,this.eb)}),!0;default:return!1}},log:function(){},i:function(){},status:function(a){this.i(this.eb+": "+a)},N:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},Ka:function(){return this.C.ma=!0},Ja:function(a,b){b&&(this.C.ma=!1);return!0}};function G(a,b,c,d){a.j&&(!0===c||I(a,c|0))&&a.j.message(b,d)}function I(a,b){if(a.j){a===a.j?b|=0:b=b||a.pa;var c=a.j.pa&b;return!!b&&c===b||!!(c&a.j.rd)}return!1}
|
||||||
function pb(a,b){if(a.C.mc)return a.C.hb=!1,a.C.mc=!1;if(a.C.error)return a.i(a.toString()+" error"),!1;a.C.hb=b;return a.C.hb}function xb(a,b){a.C.hb&&(b?a.C.mc=!0:void 0===b&&a.i(a.toString()+" busy"));return a.C.hb}function J(a,b){a.C.error||(a.C.ready=!1!==b,a.C.ready&&(b=a.bc,a.bc=null,b&&b()))}function yb(a,b){b&&(a.C.ready?b():a.bc=b);return a.C.ready}function zb(a){return a.C.error?(a.i(a.toString()+" error"),!0):!1}function Ab(a,b){a.C.error=!0;a.N(b)}
|
function pb(a,b){if(a.C.nc)return a.C.hb=!1,a.C.nc=!1;if(a.C.error)return a.i(a.toString()+" error"),!1;a.C.hb=b;return a.C.hb}function xb(a,b){a.C.hb&&(b?a.C.nc=!0:void 0===b&&a.i(a.toString()+" busy"));return a.C.hb}function J(a,b){a.C.error||(a.C.ready=!1!==b,a.C.ready&&(b=a.cc,a.cc=null,b&&b()))}function yb(a,b){b&&(a.C.ready?b():a.cc=b);return a.C.ready}function zb(a){return a.C.error?(a.i(a.toString()+" error"),!0):!1}function Ab(a,b){a.C.error=!0;a.N(b)}
|
||||||
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
||||||
var Bb="undefined"!==typeof ArrayBuffer,Cb="UNKNOWN ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Db={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,dl11:262144,serial:262144,kw11:524288,timer:524288,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
var Bb="undefined"!==typeof ArrayBuffer,Cb="UNKNOWN ABORT ILLEGAL RED YELLOW FAULT TRACE HALT OPCODE INTERRUPT".split(" "),Db={cpu:1,trap:2,fault:4,"int":8,bus:16,memory:32,mmu:64,rom:128,device:256,panel:512,keyboard:1024,key:2048,pc11:4096,paper:4096,disk:8192,read:16384,write:32768,rk11:65536,rl11:131072,dl11:262144,serial:262144,kw11:524288,timer:524288,speaker:16777216,computer:33554432,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};
|
||||||
function Eb(a){x.call(this,"Panel",a,Eb,512);this.Aa=this.w=this.bb=this.Bb=this.A=this.F=0;this.I=this.J=this.H=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ed],STEP:[1,1,!1,!1,this.Fd],ENABLE:[1,1,!1,!1,this.Ad],CONT:[1,1,!0,!1,this.yd],DEP:[0,0,!0,!1,this.zd],EXAM:[1,1,!0,!1,this.Bd],LOAD:[1,1,!0,!1,this.Dd],TEST:[0,0,!0,!1,this.Cd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Gd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
function Eb(a){x.call(this,"Panel",a,Eb,512);this.Aa=this.w=this.bb=this.Bb=this.A=this.F=0;this.I=this.K=this.H=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Fd],STEP:[1,1,!1,!1,this.Gd],ENABLE:[1,1,!1,!1,this.Bd],CONT:[1,1,!0,!1,this.zd],DEP:[0,0,!0,!1,this.Ad],EXAM:[1,1,!0,!1,this.Cd],LOAD:[1,1,!0,!1,this.Ed],TEST:[0,0,!0,!1,this.Dd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Hd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()};
|
||||||
k.ua=function(a,b,c,d){if(this.B&&this.B.ua(a,b,c,d)||this.b&&this.b.ua(a,b,c,d)||this.j&&this.j.ua(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
k.va=function(a,b,c,d){if(this.B&&this.B.va(a,b,c,d)||this.b&&this.b.va(a,b,c,d)||this.j&&this.j.va(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,
|
||||||
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.ua.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.va.call(this,a,b,c,d)}};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ka=function(a,b){b||(Ob(),this.reset());return!0};k.Ja=function(){return!0};
|
||||||
function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.ga||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
|
function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ea()),c=8==(a.j&&a.j.oa||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))}
|
||||||
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.J="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ed=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.ob())};k.Fd=function(){};k.Ad=function(a){a||this.b.ea()};
|
function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Fd=function(a){a||this.b.C.X||(a=this.b,a.v.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.ob())};k.Gd=function(){};k.Bd=function(a){a||this.b.ea()};
|
||||||
k.yd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.ob();else{if((a=this.j)&&!xb(a,!0))pb(a,!0),a.pb(0,null),pb(a,!1);else try{var b=this.b.pb(1);0<b&&(Tb(this.b,b),Ub(this.b,b,!0),Vb(this.b,b))}catch(c){"number"!=typeof c&&Ab(this.b,c.stack||c.message)}this.stop();this.B&&this.B.wa()}};k.zd=function(a){a&&!this.b.C.X&&(this.I&&Wb(this),a=Xb(this,this.bb),this.L==Fb?this.v.nb(this.Aa,a):this.b.nb(this.Aa,a))};
|
k.zd=function(a){if(!a&&!this.b.C.X)if(Gb(this,"ENABLE"))this.b.ob();else{if((a=this.j)&&!xb(a,!0))pb(a,!0),a.pb(0,null),pb(a,!1);else try{var b=this.b.pb(1);0<b&&(Tb(this.b,b),Ub(this.b,b,!0),Vb(this.b,b))}catch(c){"number"!=typeof c&&Ab(this.b,c.stack||c.message)}this.stop();this.B&&this.B.xa()}};k.Ad=function(a){a&&!this.b.C.X&&(this.I&&Wb(this),a=Xb(this,this.bb),this.L==Fb?this.v.nb(this.Aa,a):this.b.nb(this.Aa,a))};
|
||||||
k.Bd=function(a){a||this.b.C.X||(this.J&&Wb(this),a=this.L==Fb?this.v.Va(this.Aa):this.b.Va(this.Aa),Xb(this,a))};k.Dd=function(a){a||this.b.C.X||Yb(this,this.bb)};k.Cd=function(a){a?(this.H=!0,Mb(this,!0)):(this.H=!1,Mb(this),Zb(this,0))};k.Gd=function(a,b){this.bb=a?this.bb|1<<b:this.bb&~(1<<b)};function Wb(a){var b=1145>a.b.ib?8:16,c=65472<=a.Aa&&a.Aa<65472+b,b=c?1:2,c=c?15:a.v.Sa;Gb(a,"STEP")||(b=-b);Yb(a,a.Aa&~c|a.Aa+b&c)}
|
k.Cd=function(a){a||this.b.C.X||(this.K&&Wb(this),a=this.L==Fb?this.v.Va(this.Aa):this.b.Va(this.Aa),Xb(this,a))};k.Ed=function(a){a||this.b.C.X||Yb(this,this.bb)};k.Dd=function(a){a?(this.H=!0,Mb(this,!0)):(this.H=!1,Mb(this),Zb(this,0))};k.Hd=function(a,b){this.bb=a?this.bb|1<<b:this.bb&~(1<<b)};function Wb(a){var b=1145>a.b.ib?8:16,c=65472<=a.Aa&&a.Aa<65472+b,b=c?1:2,c=c?15:a.v.Sa;Gb(a,"STEP")||(b=-b);Yb(a,a.Aa&~c|a.Aa+b&c)}
|
||||||
function Yb(a,b){a.Aa=b&a.v.Sa;b=a.Aa;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<<c)}function Xb(a,b){a.w=b&65535;b=a.w;for(var c=0;16>c;c++)$b(a,"D"+c,b&1<<c);return a.w}function $b(a,b,c){a.g[b]=c;a.H||Pb(a,b,c)}function nc(a){return void 0!==a.D.S0}function Zb(a,b){if(nc(a)){a.bb=b;for(var c=0;22>c;c++)a.f["S"+c][1]=b&1<<c?1:0;Nb(a)}}k.stop=function(){Yb(this,this.b.u[7])};k.uc=function(a){this.Aa=a};k.setData=function(a,b){b?this.Bb=a:this.w=a};k.Hd=function(a,b){return(b?this.Bb:this.bb)&65535};
|
function Yb(a,b){a.Aa=b&a.v.Sa;b=a.Aa;for(var c=0;22>c;c++)$b(a,"A"+c,b&1<<c)}function Xb(a,b){a.w=b&65535;b=a.w;for(var c=0;16>c;c++)$b(a,"D"+c,b&1<<c);return a.w}function $b(a,b,c){a.g[b]=c;a.H||Pb(a,b,c)}function nc(a){return void 0!==a.D.S0}function Zb(a,b){if(nc(a)){a.bb=b;for(var c=0;22>c;c++)a.f["S"+c][1]=b&1<<c?1:0;Nb(a)}}k.stop=function(){Yb(this,this.b.u[7])};k.vc=function(a){this.Aa=a};k.setData=function(a,b){b?this.Bb=a:this.w=a};k.Id=function(a,b){return(b?this.Bb:this.bb)&65535};
|
||||||
k.He=function(a){this.Bb=a};var oc={},Kb=(oc[65400]=[null,null,Eb.prototype.Hd,Eb.prototype.He,"CNSW"],oc);function Ob(){for(var a=!1,b=F(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=D(d),f=nb(e.id);f||(a=!0,f=new Eb(e));E(f,d);a&&J(f)}}ab(Ob);
|
k.He=function(a){this.Bb=a};var oc={},Kb=(oc[65400]=[null,null,Eb.prototype.Id,Eb.prototype.He,"CNSW"],oc);function Ob(){for(var a=!1,b=F(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=D(d),f=nb(e.id);f||(a=!0,f=new Eb(e));E(f,d);a&&J(f)}}ab(Ob);
|
||||||
function pc(a,b,c){x.call(this,"Bus",a,pc,16);this.b=b;this.j=c;this.J=a.busWidth||16;this.g=0;this.w=[];this.B=null;this.H=1<<this.J;this.Sa=this.H-1;this.Ia=qc;this.na=Math.log2(this.Ia);this.I=this.Ia>>2;this.v=this.Ia-1;this.F=this.H/this.Ia|0;this.gb=[];this.qa=0;this.f=!1;this.oc=0;this.A=[];this.md=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.Y=Array(this.F);for(b=0;b<this.F;b++)this.Y[b]=a;J(this)}B(pc);var qc=8192,wc=qc-1;
|
function pc(a,b,c){x.call(this,"Bus",a,pc,16);this.b=b;this.j=c;this.K=a.busWidth||16;this.g=0;this.w=[];this.B=null;this.H=1<<this.K;this.Sa=this.H-1;this.Ia=qc;this.na=Math.log2(this.Ia);this.I=this.Ia>>2;this.v=this.Ia-1;this.F=this.H/this.Ia|0;this.gb=[];this.qa=0;this.f=!1;this.pc=0;this.A=[];this.nd=[rc,sc,tc,uc];a=new K(this);vc(a,this.j);this.Y=Array(this.F);for(b=0;b<this.F;b++)this.Y[b]=a;J(this)}B(pc);var qc=8192,wc=qc-1;
|
||||||
function rc(a,b){var c=-1,d=this.controller,e=d.gb[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.gb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
function rc(a,b){var c=-1,d=this.controller,e=d.gb[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.gb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
||||||
function sc(a,b,c){var d=!1,e=this.controller,f=e.gb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.gb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
function sc(a,b,c){var d=!1,e=this.controller,f=e.gb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.gb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j,
|
||||||
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.gb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
b),!0,!e.qa))}function tc(a,b){var c=-1,d=this.controller;a=d.gb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.qa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.qa);return c}
|
||||||
function uc(a,b,c){var d=!1,e=this.controller;a=e.gb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
function uc(a,b,c){var d=!1,e=this.controller;a=e.gb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.qa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.qa))}
|
||||||
function xc(a,b){if(b!=a.g){var c;a.g&&(c=(1<<a.g)-qc,yc(a,c,qc,a.w),a.g=0);b&&(a.g=b,c=1<<b,a.Sa=c-1,c-=qc,a.w=zc(a,c,qc),a.B?yc(a,c,qc,a.B):(Ac(a,c,qc,Bc,a),a.B=zc(a,c,qc)))}}k=pc.prototype;k.reset=function(){for(var a=0;a<this.A.length;a++)this.A[a]();xc(this,16)};k.Ka=function(a,b){b||this.reset();return!0};
|
function xc(a,b){if(b!=a.g){var c;a.g&&(c=(1<<a.g)-qc,yc(a,c,qc,a.w),a.g=0);b&&(a.g=b,c=1<<b,a.Sa=c-1,c-=qc,a.w=zc(a,c,qc),a.B?yc(a,c,qc,a.B):(Ac(a,c,qc,Bc,a),a.B=zc(a,c,qc)))}}k=pc.prototype;k.reset=function(){for(var a=0;a<this.A.length;a++)this.A[a]();xc(this,16)};k.Ka=function(a,b){b||this.reset();return!0};
|
||||||
function Ac(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.na;0<g&&h<a.Y.length;){var l=a.Y[h],m=h*a.Ia,n=a.Ia-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.G)return l.Yb+=l.G-f,l.G=f,!0;if(f>=l.G+l.Yb){n=l.size-(f-m);n>g&&(n=g);l.Yb=f-l.G+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.Y[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.oc+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
|
function Ac(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.na;0<g&&h<a.Y.length;){var l=a.Y[h],m=h*a.Ia,n=a.Ia-(f-m);n>g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.G)return l.Zb+=l.G-f,l.G=f,!0;if(f>=l.G+l.Zb){n=l.size-(f-m);n>g&&(n=g);l.Zb=f-l.G+n;f=m+a.Ia;g-=n;h++;continue}}return Cc(1,f,g)}f=new K(a,f,n,a.Ia,d,e);vc(f,a.j,l);a.Y[h++]=f;f=m+a.Ia;g-=n}return 0>=g?(d==Dc&&(a.pc+=c),a.status((c>>10)+"Kb "+Ec[d]+" at "+na(b)),!0):Cc(2,b,c)}
|
||||||
function zc(a,b,c){var d=[];for(b>>>=a.na;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-=a.Ia;return d}function yc(a,b,c,d){var e=0;for(b>>>=a.na;0<c&&b<a.Y.length;){var f=d[e++];if(!f)break;a.Y[b++]=f;c-=a.Ia}}k.cc=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].ec(a&this.v,a)};k.dc=function(a){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;a=this.Y[(a&this.Sa)>>>this.na].rc(a&this.v,a);this.qa--;return a};
|
function zc(a,b,c){var d=[];for(b>>>=a.na;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-=a.Ia;return d}function yc(a,b,c,d){var e=0;for(b>>>=a.na;0<c&&b<a.Y.length;){var f=d[e++];if(!f)break;a.Y[b++]=f;c-=a.Ia}}k.dc=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].fc(a&this.v,a)};k.ec=function(a){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;a=this.Y[(a&this.Sa)>>>this.na].sc(a&this.v,a);this.qa--;return a};
|
||||||
k.sa=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].sc(b,a);this.qa--;return a};k.Kb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].hc(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a);this.qa--};
|
k.ta=function(a){3932160<=a&&(a=Fc(this.b,a));return this.Y[(a&this.Sa)>>>this.na].za(a&this.v,a)};k.Va=function(a){3932160<=a&&(a=Fc(this.b,a));var b=a&this.v,c=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;a=this.Y[c].tc(b,a);this.qa--;return a};k.Lb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].ic(a&this.v,b&255,a)};k.Cb=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.f=!1;this.qa++;this.Y[(a&this.Sa)>>>this.na].jc(a&this.v,b&255,a);this.qa--};
|
||||||
k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].Zb(a&this.v,b&65535,a)};k.nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));var c=a&this.v,d=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;this.Y[d].xc(c,b&65535,a);this.qa--};
|
k.Db=function(a,b){3932160<=a&&(a=Fc(this.b,a));this.Y[(a&this.Sa)>>>this.na].$b(a&this.v,b&65535,a)};k.nb=function(a,b){3932160<=a&&(a=Fc(this.b,a));var c=a&this.v,d=(a&this.Sa)>>>this.na;this.f=!1;this.qa++;this.Y[d].yc(c,b&65535,a);this.qa--};
|
||||||
function Gc(a){for(var b=0,c=[],d=0;d<a.F;d++){var e=a.Y[d];if(e.$a||e.td){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[h++]=n-g;l[h++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function Hc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&wc;if(void 0!==a.gb[m])return w("I/O address already registered: "+p(b,8,!0)),!1;a.gb[m]=[d,e,f,g,l||"unknown",h||16,!1]}return!0}
|
function Gc(a){for(var b=0,c=[],d=0;d<a.F;d++){var e=a.Y[d];if(e.$a||e.ud){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[h++]=n-g;l[h++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function Hc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&wc;if(void 0!==a.gb[m])return w("I/O address already registered: "+p(b,8,!0)),!1;a.gb[m]=[d,e,f,g,l||"unknown",h||16,!1]}return!0}
|
||||||
function Jb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.ib)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;t<r;t++,e+=2)if(n&&1<r&&(n=f[4]+t),!Hc(a,e,e,g,h,l,m,f[7]||b.pa,n||b.eb))return!1}}return!0}function Lb(a,b){a.A.push(b)}
|
function Jb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.ib)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,t=0;t<r;t++,e+=2)if(n&&1<r&&(n=f[4]+t),!Hc(a,e,e,g,h,l,m,f[7]||b.pa,n||b.eb))return!1}}return!0}function Lb(a,b){a.A.push(b)}
|
||||||
k.Na=function(a,b,c){this.f=!0;this.qa||(this.j&&I(this.j,4)&&G(this.j,"memory fault ("+c+") on "+L(this.j,a),!0,!0),b&&(this.b.Ba|=b),this.b.va(4,0,a))};function Ic(a){var b=a.f;a.f=!1;return b}function Cc(a,b,c){w("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function M(a){x.call(this,"Device",a,M,256);this.f={M:0,vc:-1}}B(M);k=M.prototype;
|
k.Na=function(a,b,c){this.f=!0;this.qa||(this.j&&I(this.j,4)&&G(this.j,"memory fault ("+c+") on "+L(this.j,a),!0,!0),b&&(this.b.Ba|=b),this.b.wa(4,0,a))};function Ic(a){var b=a.f;a.f=!1;return b}function Cc(a,b,c){w("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function M(a){x.call(this,"Device",a,M,256);this.f={M:0,wc:-1}}B(M);k=M.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.j=d;var e=this;this.f.vc=Jc(c,function(){e.f.Sb|=128;e.f.Sb&64&&Kc(e.b,e.f.Ge);e.B&&e.B.wa(1);Lc(e.b,e.f.vc,1E3/60)});this.f.Ge=Mc(64,6,524288);Jb(b,this,Nc);Lb(b,this.reset.bind(this));d&&Oc(d,64,function(a){var b=e.b;N(e,"KIPDR",b.S[0],0,a[0]);N(e,"KDPDR",b.S[0],8,a[0]);N(e,"KIPAR",b.ka[0],0,a[0]);N(e,"KDPAR",b.ka[0],8,a[0],!0);N(e,"SIPDR",b.S[1],0,a[0]);N(e,"SDPDR",b.S[1],8,a[0]);N(e,"SIPAR",b.ka[1],0,a[0]);N(e,"SDPAR",b.ka[1],8,a[0],!0);N(e,
|
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.j=d;var e=this;this.f.wc=Jc(c,function(){e.f.Ub|=128;e.f.Ub&64&&Kc(e.b,e.f.Sb);e.B&&e.B.xa(1);Lc(e.b,e.f.wc,1E3/60)});this.f.Sb=Mc(64,6,524288);Jb(b,this,Nc);Lb(b,this.reset.bind(this));d&&Oc(d,64,function(a){var b=e.b;N(e,"KIPDR",b.R[0],0,a[0]);N(e,"KDPDR",b.R[0],8,a[0]);N(e,"KIPAR",b.ka[0],0,a[0]);N(e,"KDPAR",b.ka[0],8,a[0],!0);N(e,"SIPDR",b.R[1],0,a[0]);N(e,"SDPDR",b.R[1],8,a[0]);N(e,"SIPAR",b.ka[1],0,a[0]);N(e,"SDPAR",b.ka[1],8,a[0],!0);N(e,
|
||||||
"UIPDR",b.S[3],0,a[0]);N(e,"UDPDR",b.S[3],8,a[0]);N(e,"UIPAR",b.ka[3],0,a[0]);N(e,"UDPAR",b.ka[3],8,a[0],!0)});J(this)};function N(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Sb=128;Lc(this.b,this.f.vc,1E3/60,!0)};k.Od=function(){return this.f.Sb};k.Oe=function(a){this.f.Sb=a&192};k.Qd=function(){return Pc(this.b)};k.Qe=function(a){Qc(this.b,a&-129|this.b.Ca&128)};k.Rd=function(){return Zc(this.b)};
|
"UIPDR",b.R[3],0,a[0]);N(e,"UDPDR",b.R[3],8,a[0]);N(e,"UIPAR",b.ka[3],0,a[0]);N(e,"UDPAR",b.ka[3],8,a[0],!0)});J(this)};function N(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Ub=128;Lc(this.b,this.f.wc,1E3/60,!0)};k.Pd=function(){return this.f.Ub};k.Oe=function(a){this.f.Ub=a&192};k.Rd=function(){return Pc(this.b)};k.Qe=function(a){Qc(this.b,a&-129|this.b.Da&128)};k.Sd=function(){return Zc(this.b)};
|
||||||
k.Sd=function(){return $c(this.b)};k.Td=function(){return this.b.Xa};k.Re=function(a){ad(this.b,a)};k.Ae=function(a){a=a>>1&63;var b=this.b.Xb[a>>1];return a&1?b>>16:b&65535};k.Af=function(a,b){b=b>>1&63;var c=b>>1;this.b.Xb[c]=b&1?this.b.Xb[c]&65535|(a&63)<<16:this.b.Xb[c]&-65536|a&65534};k.te=function(a){return this.b.S[1][a>>1&7]};k.tf=function(a,b){this.b.S[1][b>>1&7]=a&65295};k.re=function(a){return this.b.S[1][(a>>1&7)+8]};k.rf=function(a,b){this.b.S[1][(b>>1&7)+8]=a&65295};
|
k.Td=function(){return $c(this.b)};k.Ud=function(){return this.b.Xa};k.Re=function(a){ad(this.b,a)};k.Be=function(a){a=a>>1&63;var b=this.b.Yb[a>>1];return a&1?b>>16:b&65535};k.Af=function(a,b){b=b>>1&63;var c=b>>1;this.b.Yb[c]=b&1?this.b.Yb[c]&65535|(a&63)<<16:this.b.Yb[c]&-65536|a&65534};k.ue=function(a){return this.b.R[1][a>>1&7]};k.tf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.se=function(a){return this.b.R[1][(a>>1&7)+8]};k.rf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};
|
||||||
k.se=function(a){return this.b.ka[1][a>>1&7]};k.sf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.qe=function(a){return this.b.ka[1][(a>>1&7)+8]};k.qf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.S[1][b]&=65295};k.Nd=function(a){return this.b.S[0][a>>1&7]};k.Ne=function(a,b){b=b>>1&7;this.b.S[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Ld=function(a){return this.b.S[0][(a>>1&7)+8]};k.Le=function(a,b){this.b.S[0][(b>>1&7)+8]=a&65295};
|
k.te=function(a){return this.b.ka[1][a>>1&7]};k.sf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.re=function(a){return this.b.ka[1][(a>>1&7)+8]};k.qf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.R[1][b]&=65295};k.Od=function(a){return this.b.R[0][a>>1&7]};k.Ne=function(a,b){b=b>>1&7;this.b.R[0][b]=a&=65295;I(this,64)&&G(this,"writeKIPDR["+b+"]: "+na(a),!0)};k.Md=function(a){return this.b.R[0][(a>>1&7)+8]};k.Le=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};
|
||||||
k.Md=function(a){return this.b.ka[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.Kd=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.S[0][b]&=65295};k.ze=function(a){return this.b.S[3][a>>1&7]};k.zf=function(a,b){this.b.S[3][b>>1&7]=a&65295};k.xe=function(a){return this.b.S[3][(a>>1&7)+8]};k.xf=function(a,b){this.b.S[3][(b>>1&7)+8]=a&65295};k.ye=function(a){return this.b.ka[3][a>>1&7]};
|
k.Nd=function(a){return this.b.ka[0][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ld=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.R[0][b]&=65295};k.Ae=function(a){return this.b.R[3][a>>1&7]};k.zf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.ye=function(a){return this.b.R[3][(a>>1&7)+8]};k.xf=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};k.ze=function(a){return this.b.ka[3][a>>1&7]};
|
||||||
k.yf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.we=function(a){return this.b.ka[3][(a>>1&7)+8]};k.wf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.S[3][b]&=65295};k.Ib=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Lb=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.Yd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.We=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};k.ae=function(){return this.b.u[7]};
|
k.yf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.xe=function(a){return this.b.ka[3][(a>>1&7)+8]};k.wf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.R[3][b]&=65295};k.Ib=function(a){a&=7;return this.b.P&2048?this.b.cb[a]:this.b.u[a]};k.Mb=function(a,b){b&=7;this.b.P&2048?this.b.cb[b]=a:this.b.u[b]=a};k.Zd=function(){return this.b.P&49152?this.b.Oa[0]:this.b.u[6]};k.We=function(a){this.b.P&49152?this.b.Oa[0]=a:this.b.u[6]=a};k.be=function(){return this.b.u[7]};
|
||||||
k.Ze=function(a){this.b.u[7]=a};k.Jb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Mb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.Zd=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.Xe=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.$d=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Ye=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};k.Jd=function(a){return this.b.Rc[a-65504>>1]};
|
k.Ze=function(a){this.b.u[7]=a};k.Jb=function(a){a&=7;return this.b.P&2048?this.b.u[a]:this.b.cb[a]};k.Nb=function(a,b){b&=7;this.b.P&2048?this.b.u[b]=a:this.b.cb[b]=a};k.$d=function(){return 1==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.Xe=function(a){1==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.ae=function(){return 3==(this.b.P&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Ye=function(a){3==(this.b.P&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};k.Kd=function(a){return this.b.Sc[a-65504>>1]};
|
||||||
k.Je=function(a,b){this.b.Rc[b-65504>>1]=a};k.Oc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.oc}a=(a>>6)-1}else a=0;return a};k.Uc=function(){};k.ve=function(){return 1};k.vf=function(){};k.Id=function(){return this.b.Ba};k.Ie=function(){this.b.Ba=0};k.Pd=function(){return this.b.Qc};k.Pe=function(a,b){b&1||(a&=255);this.b.Qc=a};k.Ud=function(a,b){return b?0:this.b.Wb};k.Se=function(a){bd(this.b,a)};k.ue=function(a,b){return b?0:this.b.lb&65280};k.uf=function(a){this.b.lb=a|255};
|
k.Je=function(a,b){this.b.Sc[b-65504>>1]=a};k.Pc=function(a){if(65520==a){a=0;switch(Dc){case Dc:a=this.v.pc}a=(a>>6)-1}else a=0;return a};k.Vc=function(){};k.we=function(){return 1};k.vf=function(){};k.Jd=function(){return this.b.Ba};k.Ie=function(){this.b.Ba=0};k.Qd=function(){return this.b.Rc};k.Pe=function(a,b){b&1||(a&=255);this.b.Rc=a};k.Vd=function(a,b){return b?0:this.b.Kb};k.Se=function(a){bd(this.b,a)};k.ve=function(a,b){return b?0:this.b.lb&65280};k.uf=function(a){this.b.lb=a|255};
|
||||||
k.Xd=function(){return cd(this.b)};k.Ve=function(a){dd(this.b,a&-1793|cd(this.b)&1792);this.b.K|=128};k.Tc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
k.Yd=function(){return cd(this.b)};k.Ve=function(a){dd(this.b,a&-1793|cd(this.b)&1792);this.b.J|=128};k.Uc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
||||||
var O={},Nc=(O[61568]=[null,null,M.prototype.Ae,M.prototype.Af,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.te,M.prototype.tf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.re,M.prototype.rf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.se,M.prototype.sf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.qe,M.prototype.qf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Nd,M.prototype.Ne,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Ld,M.prototype.Le,"KDPDR",8,1145,64],O[62688]=
|
var O={},Nc=(O[61568]=[null,null,M.prototype.Be,M.prototype.Af,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.ue,M.prototype.tf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.se,M.prototype.rf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.te,M.prototype.sf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.re,M.prototype.qf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Od,M.prototype.Ne,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Md,M.prototype.Le,"KDPDR",8,1145,64],O[62688]=
|
||||||
[null,null,M.prototype.Md,M.prototype.Me,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Kd,M.prototype.Ke,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Td,M.prototype.Re,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Od,M.prototype.Oe,"LKS"],O[65402]=[null,null,M.prototype.Qd,M.prototype.Qe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Rd,M.prototype.Tc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Sd,M.prototype.Tc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.ze,M.prototype.zf,
|
[null,null,M.prototype.Nd,M.prototype.Me,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Ld,M.prototype.Ke,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Ud,M.prototype.Re,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Pd,M.prototype.Oe,"LKS"],O[65402]=[null,null,M.prototype.Rd,M.prototype.Qe,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Sd,M.prototype.Uc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Td,M.prototype.Uc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.Ae,M.prototype.zf,
|
||||||
"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.xe,M.prototype.xf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ye,M.prototype.yf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.we,M.prototype.wf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Ib,M.prototype.Lb,"R0SET0"],O[65473]=[null,null,M.prototype.Ib,M.prototype.Lb,"R1SET0"],O[65474]=[null,null,M.prototype.Ib,M.prototype.Lb,"R2SET0"],O[65475]=[null,null,M.prototype.Ib,M.prototype.Lb,"R3SET0"],O[65476]=[null,null,M.prototype.Ib,
|
"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.ye,M.prototype.xf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ze,M.prototype.yf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.xe,M.prototype.wf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Ib,M.prototype.Mb,"R0SET0"],O[65473]=[null,null,M.prototype.Ib,M.prototype.Mb,"R1SET0"],O[65474]=[null,null,M.prototype.Ib,M.prototype.Mb,"R2SET0"],O[65475]=[null,null,M.prototype.Ib,M.prototype.Mb,"R3SET0"],O[65476]=[null,null,M.prototype.Ib,
|
||||||
M.prototype.Lb,"R4SET0"],O[65477]=[null,null,M.prototype.Ib,M.prototype.Lb,"R5SET0"],O[65478]=[null,null,M.prototype.Yd,M.prototype.We,"R6KERNEL"],O[65479]=[null,null,M.prototype.ae,M.prototype.Ze,"R7KERNEL"],O[65480]=[null,null,M.prototype.Jb,M.prototype.Mb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Jb,M.prototype.Mb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Jb,M.prototype.Mb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Jb,M.prototype.Mb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Jb,
|
M.prototype.Mb,"R4SET0"],O[65477]=[null,null,M.prototype.Ib,M.prototype.Mb,"R5SET0"],O[65478]=[null,null,M.prototype.Zd,M.prototype.We,"R6KERNEL"],O[65479]=[null,null,M.prototype.be,M.prototype.Ze,"R7KERNEL"],O[65480]=[null,null,M.prototype.Jb,M.prototype.Nb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Jb,M.prototype.Nb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Jb,M.prototype.Nb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Jb,M.prototype.Nb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Jb,
|
||||||
M.prototype.Mb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Jb,M.prototype.Mb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Zd,M.prototype.Xe,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.$d,M.prototype.Ye,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Jd,M.prototype.Je,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Oc,M.prototype.Uc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Oc,M.prototype.Uc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.ve,M.prototype.vf,"SYSID",1,1170],O[65526]=
|
M.prototype.Nb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Jb,M.prototype.Nb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.$d,M.prototype.Xe,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.ae,M.prototype.Ye,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Kd,M.prototype.Je,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Pc,M.prototype.Vc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Pc,M.prototype.Vc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.we,M.prototype.vf,"SYSID",1,1170],O[65526]=
|
||||||
[null,null,M.prototype.Id,M.prototype.Ie,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Pd,M.prototype.Pe,"MB",1,1170],O[65530]=[null,null,M.prototype.Ud,M.prototype.Se,"PIR"],O[65532]=[null,null,M.prototype.ue,M.prototype.uf,"SL"],O[65534]=[null,null,M.prototype.Xd,M.prototype.Ve,"PSW"],O);
|
[null,null,M.prototype.Jd,M.prototype.Ie,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Qd,M.prototype.Pe,"MB",1,1170],O[65530]=[null,null,M.prototype.Vd,M.prototype.Se,"PIR"],O[65532]=[null,null,M.prototype.ve,M.prototype.uf,"SL"],O[65534]=[null,null,M.prototype.Yd,M.prototype.Ve,"PSW"],O);
|
||||||
ab(function(){for(var a=F(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=D(d);switch(c.type){case "default":c=new M(c);E(c,d);break;case "pc11":c=new ed(c);E(c,d);break;case "rl11":c=new P(c);E(c,d);break;case "rk11":c=new Q(c),E(c,d)}}});var fd;if(Bb){var gd=new ArrayBuffer(2);(new DataView(gd)).setUint16(0,256,!0);fd=256===(new Uint16Array(gd))[0]}else fd=!1;var hd=fd;
|
ab(function(){for(var a=F(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=D(d);switch(c.type){case "default":c=new M(c);E(c,d);break;case "pc11":c=new ed(c);E(c,d);break;case "rl11":c=new P(c);E(c,d);break;case "rk11":c=new Q(c),E(c,d)}}});var fd;if(Bb){var gd=new ArrayBuffer(2);(new DataView(gd)).setUint16(0,256,!0);fd=256===(new Uint16Array(gd))[0]}else fd=!1;var hd=fd;
|
||||||
function K(a,b,c,d,e,f){this.v=a;this.id=id+=2;this.b=null;this.G=b;this.Yb=c;this.size=d||0;this.type=e||jd;this.f=e==kd;this.controller=null;vc(this);this.$a=this.td=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],ld(this,f.md);else if(Bb)this.A=new ArrayBuffer(this.size),this.F=new DataView(this.A,0,this.size),this.D=new Uint8Array(this.A,0,this.size),this.I=new Uint16Array(this.A,0,this.size>>1),this.b=new Int32Array(this.A,0,this.size>>2),ld(this,hd?md:nd);else{a=this.b=Array(this.size>>
|
function K(a,b,c,d,e,f){this.v=a;this.id=id+=2;this.b=null;this.G=b;this.Zb=c;this.size=d||0;this.type=e||jd;this.f=e==kd;this.controller=null;vc(this);this.$a=this.ud=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],ld(this,f.nd);else if(Bb)this.A=new ArrayBuffer(this.size),this.F=new DataView(this.A,0,this.size),this.D=new Uint8Array(this.A,0,this.size),this.I=new Uint16Array(this.A,0,this.size>>1),this.b=new Int32Array(this.A,0,this.size>>2),ld(this,hd?md:nd);else{a=this.b=Array(this.size>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;ld(this,od)}else ld(this)}var jd=0,Dc=1,kd=2,Bc=4,Ec=["NONE","RAM","ROM","VID","H/W"],id=0;
|
2);for(f=0;f<a.length;f++)a[f]=0;ld(this,od)}else ld(this)}var jd=0,Dc=1,kd=2,Bc=4,Ec=["NONE","RAM","ROM","VID","H/W"],id=0;
|
||||||
K.prototype={constructor:K,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Bb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Bb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.$a=!0}return!1},wb:function(a,b){b?this.g++||pd(this,qd,!1):this.B++||rd(this,qd,!1)},J:function(a,b){this.j&&I(this.j,32)&&G(this.j,
|
K.prototype={constructor:K,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Bb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.F.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Bb)for(b=0;b<a.length;b++)this.F.setInt32(b<<2,a[b],!0);else this.b=a;return this.$a=!0}return!1},wb:function(a,b){b?this.g++||pd(this,qd,!1):this.B++||rd(this,qd,!1)},K:function(a,b){this.j&&I(this.j,32)&&G(this.j,
|
||||||
"attempt to read invalid address "+L(this.j,b),!0);this.v.Na(b,32,2);return 255},w:function(a,b,c){this.j&&I(this.j,32)&&G(this.j,"attempt to write "+L(this.j,b)+" to invalid addresses "+L(this.j,c),!0);this.v.Na(c,32,4)},L:function(a,b){return this.ec(a++,b++)|this.ec(a,b)<<8},H:function(a,b,c){this.hc(a++,b&255,c++);this.hc(a,b>>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
|
"attempt to read invalid address "+L(this.j,b),!0);this.v.Na(b,32,2);return 255},w:function(a,b,c){this.j&&I(this.j,32)&&G(this.j,"attempt to write "+L(this.j,b)+" to invalid addresses "+L(this.j,c),!0);this.v.Na(c,32,4)},L:function(a,b){return this.fc(a++,b++)|this.fc(a,b)<<8},H:function(a,b,c){this.ic(a++,b&255,c++);this.ic(a,b>>8,c)},U:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a,b){a&1&&this.v.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+
|
||||||
1]&255)<<8},Da:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.$a=!0},Pa:function(a,b,c){a&1&&this.v.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.$a=!0},R:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,1,c.O)&&c.ea(!0)}return this.rc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,2,c.O)&&c.ea(!0)}return this.sc(a,b)},oa:function(a,
|
1]&255)<<8},Ea:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<<a)|b<<a;this.$a=!0},Pa:function(a,b,c){a&1&&this.v.Na(c,64,4);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.$a=!0},S:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,1,c.O)&&c.ea(!0)}return this.sc(a,b)},eb:function(a,b){if(this.j&&null!=this.G){var c=this.j;sd(c,this.G+a,2,c.O)&&c.ea(!0)}return this.tc(a,b)},oa:function(a,
|
||||||
b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.ic(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.xc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2);
|
b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,1,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.jc(a,b,c)},Fa:function(a,b,c){if(this.j&&null!=this.G){var d=this.j;sd(d,this.G+a,2,d.F)&&d.ea(!0)}this.f?this.w(a,b,c):this.yc(a,b,c)},O:function(a){return this.D[a]},T:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ba:function(a,b){a&1&&this.v.Na(b,64,2);return this.F.getUint16(a,!0)},fb:function(a,b){a&1&&this.v.Na(b,64,2);
|
||||||
a=this.I[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){this.D[a]=b;this.$a=!0},xa:function(a,b,c){this.D[a]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ea:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.$a=!0},Ga:function(a,b,c){a&1&&this.v.Na(c,64,4);this.I[a>>1]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
a=this.I[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ga:function(a,b){this.D[a]=b;this.$a=!0},sa:function(a,b,c){this.D[a]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ca:function(a,b,c){a&1&&this.v.Na(c,64,4);this.F.setUint16(a,b,!0);this.$a=!0},Ga:function(a,b,c){a&1&&this.v.Na(c,64,4);this.I[a>>1]=b;this.$a=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j,
|
||||||
b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&rd(a,qd,!1),(a.g=c.g)&&pd(a,qd,!1))}function td(a,b){b?--a.g||(a.hc=a.f?a.w:a.ic,a.Zb=a.f?a.H:a.xc):--a.B||(a.ec=a.rc,a.za=a.sc)}function pd(a,b,c){c&&a.g||(a.hc=!a.f&&b[1]||a.w,a.Zb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ic=b[1]||a.w,a.xc=b[3]||a.H}function rd(a,b,c){c&&a.B||(a.ec=b[0]||a.J,a.za=b[2]||a.L);if(c||void 0===c)a.rc=b[0]||a.J,a.sc=b[2]||a.L}function ld(a,b){b||(b=ud);rd(a,b,void 0);pd(a,b,void 0)}
|
b)+")",!0)}};function vc(a,b,c){a.j=b;a.B=a.g=0;c&&((a.B=c.B)&&rd(a,qd,!1),(a.g=c.g)&&pd(a,qd,!1))}function td(a,b){b?--a.g||(a.ic=a.f?a.w:a.jc,a.$b=a.f?a.H:a.yc):--a.B||(a.fc=a.sc,a.za=a.tc)}function pd(a,b,c){c&&a.g||(a.ic=!a.f&&b[1]||a.w,a.$b=!a.f&&b[3]||a.H);if(c||void 0===c)a.jc=b[1]||a.w,a.yc=b[3]||a.H}function rd(a,b,c){c&&a.B||(a.fc=b[0]||a.K,a.za=b[2]||a.L);if(c||void 0===c)a.sc=b[0]||a.K,a.tc=b[2]||a.L}function ld(a,b){b||(b=ud);rd(a,b,void 0);pd(a,b,void 0)}
|
||||||
var ud=[],od=[K.prototype.U,K.prototype.Da,K.prototype.fa,K.prototype.Pa],qd=[K.prototype.R,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var nd=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ea],md=[K.prototype.T,K.prototype.xa,K.prototype.fb,K.prototype.Ga];
|
var ud=[],od=[K.prototype.U,K.prototype.Ea,K.prototype.fa,K.prototype.Pa],qd=[K.prototype.S,K.prototype.oa,K.prototype.eb,K.prototype.Fa];if(Bb)var nd=[K.prototype.O,K.prototype.ga,K.prototype.ba,K.prototype.Ca],md=[K.prototype.T,K.prototype.sa,K.prototype.fb,K.prototype.Ga];
|
||||||
function vd(a,b){x.call(this,"CPU",a,vd,1);b=a.cycles||b;var c=a.multiplier||1;this.Nb=0;this.tb=b;this.jb=c;this.Pb=Math.round(this.tb/1E4)/100;this.Ab=this.Pb*this.jb;this.C.X=!1;this.C.gc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Tb=this.Ea=0;this.Ub=a.csStart;this.Gb=a.csInterval;this.Hb=a.csStop;this.L=[];this.Fc=this.Ee.bind(this);J(this)}B(vd);var wd=["power","reset"];k=vd.prototype;
|
function vd(a,b){x.call(this,"CPU",a,vd,1);b=a.cycles||b;var c=a.multiplier||1;this.Ob=0;this.tb=b;this.jb=c;this.Qb=Math.round(this.tb/1E4)/100;this.Ab=this.Qb*this.jb;this.C.X=!1;this.C.hc=!1;this.C.Eb=a.autoStart;this.C.Fb=!1;this.Vb=this.Ca=0;this.Wb=a.csStart;this.Gb=a.csInterval;this.Hb=a.csStop;this.O=[];this.Gc=this.Fe.bind(this);J(this)}B(vd);var wd=["power","reset"];k=vd.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b<wd.length;b++)(c=this.D[wd[b]])&&this.B.ua(null,wd[b],c);a=xd(a,"autoStart");null!=a&&(this.C.Eb="true"==a?!0:"false"==a?!1:!!a);J(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.j=d;this.w=a.w;for(b=0;b<wd.length;b++)(c=this.D[wd[b]])&&this.B.va(null,wd[b],c);a=xd(a,"autoStart");null!=a&&(this.C.Eb="true"==a?!0:"false"==a?!1:!!a);J(this)};k.reset=function(){};k.save=function(){return null};k.restore=function(){return!1};
|
||||||
k.Ka=function(a,b){if(!b){if(a&&this.restore){yd(this);if(!this.restore(a))return!1;zd(this)}else this.reset();this.j?(a=this.j,b=this.C.Eb,a.rb=!0,a.i("Type ? for help with PDPjs Debugger commands"),Ad(a),b||a.mb(),a.Ya&&(b=a.Ya,a.Ya=null,Bd(a,b))):this.i("No debugger detected")}return!0};k.Ja=function(a){return a?this.save():!0};k.Eb=function(){return this.C.Eb||!this.j&&void 0===this.D.run?(this.ob(),!0):!1};k.Kc=function(){return 0};
|
k.Ka=function(a,b){if(!b){if(a&&this.restore){yd(this);if(!this.restore(a))return!1;zd(this)}else this.reset();this.j?(a=this.j,b=this.C.Eb,a.rb=!0,a.i("Type ? for help with PDPjs Debugger commands"),Ad(a),b||a.mb(),a.Ya&&(b=a.Ya,a.Ya=null,Bd(a,b))):this.i("No debugger detected")}return!0};k.Ja=function(a){return a?this.save():!0};k.Eb=function(){return this.C.Eb||!this.j&&void 0===this.D.run?(this.ob(),!0):!1};k.Lc=function(){return 0};
|
||||||
function zd(a){void 0===a.Ub&&(a.Ub=0);void 0===a.Gb&&(a.Gb=-1);void 0===a.Hb&&(a.Hb=-1);a.C.Fb=0<=a.Ub&&0<a.Gb;a.C.Fb&&(a.Tb=0,a.Ea=a.Ub-a.oa)}function Vb(a,b){if(a.C.Fb){var c=!1;a.Tb=a.Tb+a.Kc()|0;a.Ea-=b;0>=a.Ea&&(a.Ea+=a.Gb,c=!0);0<=a.Hb&&a.Hb<=Cd(a)&&(a.Gb=a.Hb=-1,zd(a),a.ea(),c=!0);c&&a.i(Cd(a)+" cycles: checksum="+p(a.Tb))}}
|
function zd(a){void 0===a.Wb&&(a.Wb=0);void 0===a.Gb&&(a.Gb=-1);void 0===a.Hb&&(a.Hb=-1);a.C.Fb=0<=a.Wb&&0<a.Gb;a.C.Fb&&(a.Vb=0,a.Ca=a.Wb-a.oa)}function Vb(a,b){if(a.C.Fb){var c=!1;a.Vb=a.Vb+a.Lc()|0;a.Ca-=b;0>=a.Ca&&(a.Ca+=a.Gb,c=!0);0<=a.Hb&&a.Hb<=Cd(a)&&(a.Gb=a.Hb=-1,zd(a),a.ea(),c=!0);c&&a.i(Cd(a)+" cycles: checksum="+p(a.Vb))}}
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.C.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.C.ma);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.C.ready?"powered yet":"ready yet"+(b.bc?" (waiting for notification)":""))+".");a=!1}a&&(d.C.X?d.ea():d.ob())},
|
k.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.C.ma)a=!0;else{var b=null,c,h=mb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.C.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.C.ma);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.C.ready?"powered yet":"ready yet"+(b.cc?" (waiting for notification)":""))+".");a=!1}a&&(d.C.X?d.ea():d.ob())},
|
||||||
!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Dd(d,d.jb<<1,!0)},c.textContent=this.Ab.toFixed(2)+"Mhz",!0}return!1};k.wa=function(a){this.B&&this.B.wa(a)};function Ub(a,b,c){a.oa+=b;c&&(a.ga=a.b=a.I=0)}function Ed(a,b){var c=1;b&&1<a.jb&&a.Da&&(c=a.Da/a.Pb);a.Dc=Math.round(1E3/30);a.ub=Math.floor(a.tb/30*c);b||(a.Fa=a.ub);a.Qb=0}function Cd(a){return a.oa+a.ba+a.ga-a.b}function yd(a){a.Da=0;a.Ec=0;a.oa=a.ba=a.ga=a.b=a.I=0;zd(a);Dd(a,1)}
|
!0;case "speed":return this.D[b]=c,!0;case "setSpeed":return this.D[b]=c,c.onclick=function(){Dd(d,d.jb<<1,!0)},c.textContent=this.Ab.toFixed(2)+"Mhz",!0}return!1};k.xa=function(a){this.B&&this.B.xa(a)};function Ub(a,b,c){a.oa+=b;c&&(a.ga=a.b=a.I=0)}function Ed(a,b){var c=1;b&&1<a.jb&&a.Ea&&(c=a.Ea/a.Qb);a.Ec=Math.round(1E3/30);a.ub=Math.floor(a.tb/30*c);b||(a.Fa=a.ub);a.Rb=0}function Cd(a){return a.oa+a.ba+a.ga-a.b}function yd(a){a.Ea=0;a.Fc=0;a.oa=a.ba=a.ga=a.b=a.I=0;zd(a);Dd(a,1)}
|
||||||
function Dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Da/a.Ab?b=1:d=!0;a.jb=b;b=a.Pb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Ed(a);return d}function Jc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&b<a.L.length&&(d||0>a.L[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Fd(a)),a.L[b][0]=c)}
|
function Dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Ea/a.Ab?b=1:d=!0;a.jb=b;b=a.Qb*a.jb;if(a.Ab!=b){a.Ab=b;b=a.Ab.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.B&&a.B.mb()}Ub(a,a.ba);a.ba=0;a.U=Ba();a.fa=0;Ed(a);return d}function Jc(a,b){var c=a.O.length;a.O.push([-1,b]);return c}function Lc(a,b,c,d){0<=b&&b<a.O.length&&(d||0>a.O[b][0])&&(c=a.tb*a.jb/1E3*c|0,a.C.X&&(c+=Fd(a)),a.O[b][0]=c)}
|
||||||
function Gd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fd(a,b){var c=a.ga-=a.b;a.b=a.I=0;b&&(a.ga=0);return c}
|
function Gd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fd(a,b){var c=a.ga-=a.b;a.b=a.I=0;b&&(a.ga=0);return c}
|
||||||
k.Ee=function(){if(this.C.X){this.Qb>=this.tb&&Ed(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Dc&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Gd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Fd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Ec&&(this.wa(),this.Ec=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Cd(this));Ab(this,e.stack||
|
k.Fe=function(){if(this.C.X){this.Rb>=this.tb&&Ed(this,!0);this.Ya=0;this.sb=Ba();if(this.fa){var a=this.sb-this.fa;a>this.Ec&&(this.U+=a,this.U>this.sb&&(this.U=this.sb))}try{do{var b=Gd(this,this.C.Fb?1:this.ub);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Fd(this,!0);this.Ya+=b;this.ba+=b;Vb(this,b);Tb(this,b);this.Fa-=b;if(0>=this.Fa){this.Fa+=this.ub;15<=++this.Fc&&(this.xa(),this.Fc=0);break}}while(this.C.X)}catch(e){this.ea();this.B&&this.B.stop(Ba(),Cd(this));Ab(this,e.stack||
|
||||||
e.message);return}if(this.C.X){a=setTimeout;b=this.Fc;this.fa=Ba();var c=this.Dc;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Da=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Dd(this)));if(0>c||this.Da<this.Ab)-1E3>c&&(this.U-=c),c=0;this.Qb+=this.Ya;this.fa+=c;a(b,c)}}};
|
e.message);return}if(this.C.X){a=setTimeout;b=this.Gc;this.fa=Ba();var c=this.Ec;this.Ya&&(c=Math.round(c*this.Ya/this.ub));var c=c-(this.fa-this.sb),d=this.fa-this.U;d&&(this.Ea=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.oa=0,Dd(this)));if(0>c||this.Ea<this.Ab)-1E3>c&&(this.U-=c),c=0;this.Rb+=this.Ya;this.fa+=c;a(b,c)}}};
|
||||||
k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Dd(this);this.C.X=!0;this.C.gc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Cd(this)));setTimeout(this.Fc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Fd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Cd(this));b=!0}this.C.complete=a;return b};
|
k.ob=function(a){if(zb(this))return!1;if(this.C.X)return this.i(this.toString()+" busy"),!1;Dd(this);this.C.X=!0;this.C.hc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.mb(!0),this.B.start(this.U,Cd(this)));setTimeout(this.Gc,0);return!0};k.pb=function(){return 0};k.ea=function(a){var b=!1;if(this.C.X){Fd(this);Ub(this,this.ba);this.ba=0;this.C.X=!1;if(b=this.D.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Cd(this));b=!0}this.C.complete=a;return b};
|
||||||
function Hd(a){this.ib=+a.model||1170;this.Ac=a.addrReset||0;vd.call(this,a,6666667);this.vb=0;this.Cc=255;1120==this.ib?(this.decode=Id.bind(this),this.xa=this.rd,this.vb=8,this.Cc=-1):(this.decode=Jd.bind(this),this.xa=this.sd);Kd(this);this.J=0;this.R=null;this.C.complete=!1}B(Hd,vd);k=Hd.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Kd(this);yd(this);this.C.error=!1;this.parent.reset.call(this)};
|
function Hd(a){this.ib=+a.model||1170;this.Bc=a.addrReset||0;vd.call(this,a,6666667);this.vb=0;this.Dc=255;1120==this.ib?(this.decode=Id.bind(this),this.sa=this.sd,this.vb=8,this.Dc=-1):(this.decode=Jd.bind(this),this.sa=this.td);Kd(this);this.L=0;this.K=null;this.C.complete=!1}B(Hd,vd);k=Hd.prototype;k.reset=function(){this.status("model "+this.ib);this.C.X&&this.ea();Kd(this);yd(this);this.C.error=!1;this.parent.reset.call(this)};
|
||||||
function Kd(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Ac,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.gd=[4,2,0,1];a.S=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
function Kd(a){a.V=65536;a.W=32768;a.ca=65535;a.aa=32768;a.P=15;a.u=[0,0,0,0,0,0,0,a.Bc,-1,-2,-3,-4,-5,-6,-7,-8];a.cb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.A=0;a.rb=0;a.hd=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0]];a.Xb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Rc=[0,0,0,0,0,0,0,0];a.Qc=0;a.K=0;a.F=a.H=0;a.g=a.f=a.Ob=0;a.Ga=-1;Sb(a)}function Sb(a){a.Ca=0;a.jc=0;a.kc=0;a.Xa=0;a.Ba=0;a.Wb=0;a.lb=255;a.O=0;a.qb=0;a.Pa=262143;a.Rb=0;a.ta=0;a.R=null;a.v&&Ld(a)}function Ld(a){a.O?(a.T=65536,a.zc=a.Xa&16?4186112:253952,a.da=a.vd,a.za=a.Be,a.Zb=a.Bf,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.zc=57344,a.da=a.ud,a.za=a.Pc,a.Zb=a.Vc,xc(a.v,16))}
|
0,0,0,0,0,0,0,0,0,0]];a.Yb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Sc=[0,0,0,0,0,0,0,0];a.Rc=0;a.J=0;a.F=a.H=0;a.g=a.f=a.Pb=0;a.Ga=-1;Sb(a)}function Sb(a){a.Da=0;a.kc=0;a.lc=0;a.Xa=0;a.Ba=0;a.Kb=0;a.lb=255;a.S=0;a.qb=0;a.Pa=262143;a.Tb=0;a.ua=0;a.K=null;a.v&&Ld(a)}function Ld(a){a.S?(a.T=65536,a.Ac=a.Xa&16?4186112:253952,a.da=a.wd,a.za=a.Ce,a.$b=a.Bf,xc(a.v,a.Xa&16?22:18)):(a.T=0,a.Ac=57344,a.da=a.vd,a.za=a.Qc,a.$b=a.Wc,xc(a.v,16))}
|
||||||
function Pc(a){var b=a.Ca;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Qc(a,b){b&=-3073;if(a.Ca!=b){b&57344&&!(a.Ca&57344)&&(a.jc=a.ta>>16&65535,a.kc=a.ta&65535);a.Ca=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.O!=c&&(a.O=c,Ld(a))}}function Zc(a){a.Ca&57344||(a.jc=a.ta>>16&65535);a=a.jc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function $c(a){a.Ca&57344||(a.kc=a.ta&65535);return a.kc}function ad(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Ld(a))}
|
function Pc(a){var b=a.Da;b&57344||(b=b&-3199|a.qb<<5|a.rb<<1);return b}function Qc(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.kc=a.ua>>16&65535,a.lc=a.ua&65535);a.Da=b;a.qb=b>>5&3;a.rb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.S!=c&&(a.S=c,Ld(a))}}function Zc(a){a.Da&57344||(a.kc=a.ua>>16&65535);a=a.kc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function $c(a){a.Da&57344||(a.lc=a.ua&65535);return a.lc}function ad(a,b){1170>a.ib&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Pa=b&16?4194303:262143,Ld(a))}
|
||||||
k.Kc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Dd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.I){for(var f=0,g=Array(b.I),h=0;h<e.length-1;)for(var l=e[h++],m=e[h++];l--;)g[f++]=m;e=g}f=b.Y[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
k.Lc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.oa,this.jb]);a.set(2,Gc(this.v));return a.data()};k.restore=function(a){var b=a[1];this.oa=b[1];Dd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.I){for(var f=0,g=Array(b.I),h=0;h<e.length-1;)for(var l=e[h++],m=e[h++];l--;)g[f++]=m;e=g}f=b.Y[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
||||||
function Md(a){return a.V&65536?1:0}function Nd(a){return a.W&32768?2:0}function Od(a){return a.ca&65535?0:4}function Pd(a){return a.aa&32768?8:0}function Qd(a){var b=a.u[7];a.ta=b;var c=a.za(b);a.u[7]=b+2&65535;return c}function Rd(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function T(a,b){a.u[7]=b&65535}function Mc(a,b,c){return{wc:a,kb:b,message:c||0,next:null}}function Sd(a,b){var c=a.R;if(c==b)a.R=b.next;else for(;c;){a=c.next;if(a==b){c.next=a.next;break}c=a}}
|
function Md(a){return a.V&65536?1:0}function Nd(a){return a.W&32768?2:0}function Od(a){return a.ca&65535?0:4}function Pd(a){return a.aa&32768?8:0}function Qd(a){var b=a.u[7];a.ua=b;var c=a.za(b);a.u[7]=b+2&65535;return c}function Rd(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function T(a,b){a.u[7]=b&65535}function Mc(a,b,c){return{xc:a,kb:b,message:c||0,next:null}}function Sd(a,b){var c=a.K;if(c==b)a.K=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.K&&(a.J|=1)}
|
||||||
function Kc(a,b){if(b!=a.R){var c=a.R;if(!c||c.kb<=b.kb)b.next=c,a.R=b;else{do{var d=c.next;if(!d||d.kb<=b.kb){b.next=d;c.next=b;break}c=d}while(c)}}a.K|=1;b.message&&I(a,b.message|8)&&G(a,"setInterrupt(vector="+na(b.wc)+",priority="+b.kb+")",!0,!0)}function Td(a){return a.K&64?(a.va(168,64,-5),!0):a.K&32?(a.va(4,32,-4),!0):a.K&16?(a.va(12,16,-6),!0):!1}function cd(a){return a.P=a.P&63728|Pd(a)|Od(a)|Nd(a)|Md(a)}
|
function Kc(a,b){if(b!=a.K){var c=a.K;if(!c||c.kb<=b.kb)b.next=c,a.K=b;else{do{var d=c.next;if(!d||d.kb<=b.kb){b.next=d;c.next=b;break}c=d}while(c)}}a.J|=1;b.message&&I(a,b.message|8)&&G(a,"setIRQ(vector="+na(b.xc)+",priority="+b.kb+")",!0,!0)}function Td(a){return a.J&64?(a.wa(168,64,-5),!0):a.J&32?(a.wa(4,32,-4),!0):a.J&16?(a.wa(12,16,-6),!0):!1}function cd(a){return a.P=a.P&63728|Pd(a)|Od(a)|Nd(a)|Md(a)}
|
||||||
function dd(a,b){a.aa=b<<12;a.ca=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.cb.length;0<=--c;){var d=a.u[c];a.u[c]=a.cb[c];a.cb[c]=d}a.A=b>>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.K|=2}function bd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1)}a.Wb=b;a.K|=2}function U(a,b){a.K&128||(a.aa=a.ca=b,a.W=0)}function Ud(a,b,c){a.K&128||(a.aa=a.ca=a.V=b,a.W=c||0)}function Vd(a,b,c,d){a.K&128||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))}
|
function dd(a,b){a.aa=b<<12;a.ca=~b&4;a.W=b<<14;a.V=b<<16;if((b^a.P)&2048)for(var c=a.cb.length;0<=--c;){var d=a.u[c];a.u[c]=a.cb[c];a.cb[c]=d}a.A=b>>14&3;c=a.P>>14&3;a.A!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.A]);a.P=b;a.J|=2}function bd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.J|=2}a.Kb=b}function U(a,b){a.J&128||(a.aa=a.ca=b,a.W=0)}function Ud(a,b,c){a.J&128||(a.aa=a.ca=a.V=b,a.W=c||0)}function Vd(a,b,c,d){a.J&128||(a.aa=a.ca=a.V=b,a.W=(c^b)&(d^b))}
|
||||||
function Wd(a,b){a.K&128||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Xd(a,b,c,d){a.K&128||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))}k.va=function(a,b,c){if(!this.J){0>this.Ga?this.Ga=cd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ta=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);dd(this,f&-12289|this.Ga>>2&12288);Yd(this,this.Ga,d);Yd(this,this.u[7],d);T(this,e);this.K&=~(b|18);this.K|=9;this.Ga=-1;this.ld=a;this.Wc=c;if(-3<=c)throw a;}};
|
function Wd(a,b){a.J&128||(a.aa=a.ca=a.V=b,a.W=a.aa^a.V>>1)}function Xd(a,b,c,d){a.J&128||(a.aa=a.ca=a.V=b,a.W=(c^d)&(d^b))}k.wa=function(a,b,c){if(!this.L){0>this.Ga?this.Ga=cd(this):this.A||(c=-3);var d=!1;-3==c&&(a=4,this.Ba|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.A=0;var e=this.za(a|this.T),f=this.za(a+2&65535|this.T);dd(this,f&-12289|this.Ga>>2&12288);Yd(this,this.Ga,d);Yd(this,this.u[7],d);T(this,e);this.J&=~(b|18);this.J|=9;this.Ga=-1;this.md=a;this.Xc=c;if(-3<=c)throw a;}};
|
||||||
function Zd(a){var b=ue(a),c=ue(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);dd(a,c);a.K&=-17}function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Xb[c]+(b&8190)&4194302:b&-3932161);return b}
|
function Zd(a){var b=te(a),c=te(a)&-1793;a.P&49152&&(c=c&-225|a.P&63712);T(a,b);dd(a,c);a.J&=-17}function Fc(a,b){var c=b>>13&31;31>c&&(b=a.Xa&32?a.Yb[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||||
function ve(a,b,c){var d,e,f;if(!(c&a.O))return f=b&65535,57344<=f&&(f|=a.zc),f;d=b>>13;a.Xa&a.gd[a.A]||(d&=7);e=a.S[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.J)return f;f&1&&!(c&1)&&(a.Ba|=64,a.va(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.S[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb=
|
function ue(a,b,c){var d,e,f;if(!(c&a.S))return f=b&65535,57344<=f&&(f|=a.Ac),f;d=b>>13;a.Xa&a.hd[a.A]||(d&=7);e=a.R[a.A][d];f=(a.ka[a.A][d]<<6)+(b&8191)&a.Pa;if(a.L)return f;f&1&&!(c&1)&&(a.Ba|=64,a.wa(4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.A][d]=e;if(f!=(4194170&a.Pa)||a.A)a.qb=
|
||||||
a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Ca&57344||(g|=a.Ca&4096|a.qb<<5|a.rb<<1,Qc(a,a.Ca&-61695|g&61694)),a.va(168,64,-1)),a.Ca&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Ca|=4096,a.Ca&512&&(a.K|=64)));return f}function we(a,b){return a.v.cc(b)}function ue(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Yd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ta=a.ta&65535|(a.ta&-65536)<<8|16121856;c||a.xa(4,-2,d);a.Zb(d,b)}
|
a.A,a.rb=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.qb<<5|a.rb<<1,Qc(a,a.Da&-61695|g&61694)),a.wa(168,64,-1)),a.Da&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ve(a,b){return a.v.dc(b)}function te(a){var b=a.za(a.u[6]|a.T);a.u[6]=a.u[6]+2&65535;return b}function Yd(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.sa(4,-2,d);a.$b(d,b)}
|
||||||
function xe(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.va(4,0,-2),0;case 1:return 6==c&&a.xa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.xa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.xa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,6==c&&a.xa(d,
|
function we(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d,
|
||||||
0,e),a.b-=6,e|g;case 7:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ta=a.ta&65535|(a.ta&-65536)<<8|(f<<3&248|c)<<16;return e}k.rd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.K|=32)};k.sd=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.va(4,0,-3):(this.Ba|=8,this.K|=32)))};k.dc=function(a){if(!this.O)return this.v.dc(a);this.J++;a=we(this,ve(this,a,3));this.J--;return a};
|
0,e),a.b-=6,e|g;case 7:return e=a.za(Rd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.T),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.sd=function(a,b,c){!this.A&&0>=b&&c<=this.lb&&(this.J|=32)};k.td=function(a,b,c){this.A||(65534<=c&&(c|=-65536),a&4&&c<=this.lb&&(c<=this.lb-32?this.wa(4,0,-3):(this.Ba|=8,this.J|=32)))};k.ec=function(a){if(!this.S)return this.v.ec(a);this.L++;a=ve(this,ue(this,a,3));this.L--;return a};
|
||||||
k.Va=function(a){if(!this.O)return this.v.Va(a);this.J++;a=this.Pc(ve(this,a,2));this.J--;return a};k.Cb=function(a,b){this.O?(this.J++,a=ve(this,a,5),a&1&&this.b--,this.v.Kb(a,b),this.J--):this.v.Cb(a,b)};k.nb=function(a,b){this.O?(this.J++,this.Vc(ve(this,a,4),b),this.J--):this.v.nb(a,b)};k.ud=function(a,b,c){return xe(this,a,b,c)};k.vd=function(a,b,c){return ve(this,xe(this,a,b,c),c)};k.Pc=function(a){return this.v.sa(this.Rb=a)};k.Be=function(a){return this.v.sa(this.Rb=ve(this,a,2))};
|
k.Va=function(a){if(!this.S)return this.v.Va(a);this.L++;a=this.Qc(ue(this,a,2));this.L--;return a};k.Cb=function(a,b){this.S?(this.L++,a=ue(this,a,5),a&1&&this.b--,this.v.Lb(a,b),this.L--):this.v.Cb(a,b)};k.nb=function(a,b){this.S?(this.L++,this.Wc(ue(this,a,4),b),this.L--):this.v.nb(a,b)};k.vd=function(a,b,c){return we(this,a,b,c)};k.wd=function(a,b,c){return ue(this,we(this,a,b,c),c)};k.Qc=function(a){return this.v.ta(this.Tb=a)};k.Ce=function(a){return this.v.ta(this.Tb=ue(this,a,2))};
|
||||||
k.Vc=function(a,b){this.v.Db(this.Rb=a,b&65535)};k.Bf=function(a,b){this.v.Db(this.Rb=ve(this,a,4),b)};function ye(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=xe(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
k.Wc=function(a,b){this.v.Db(this.Tb=a,b&65535)};k.Bf=function(a,b){this.v.Db(this.Tb=ue(this,a,4),b)};function xe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=we(a,b,d,2),c&65536||61440!==(a.P&61440)&&(d&=65535),a.A=a.P>>12&3,c=a.za(d|c&a.T),a.A=a.P>>14&3):c=6!=d||(a.P>>2&12288)===(a.P&12288)?a.u[d]:a.Oa[a.P>>12&3];return c}
|
||||||
function ze(a,b,c,d){a.ta=a.ta&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=xe(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ve(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c+a.vb]&a.Cc}function Be(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.sa(a.da(b,c,2)):a.u[c+a.vb]}function Ce(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return xe(a,b,c,8)}
|
function ye(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=we(a,b,e,4),c&65536||(e&=65535),a.A=a.P>>12&3,e=ue(a,e|c&65536,4),a.A=a.P>>14&3,a.v.Db(e,d)):6!=e||(a.P>>2&12288)===(a.P&12288)?a.u[e]=d:a.Oa[a.P>>12&3]=d}function ze(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?ve(a,a.da(b,c,3)):a.u[c+a.vb]&a.Dc}function Ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c+a.vb]}function Be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return we(a,b,c,8)}
|
||||||
function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?we(a,a.da(b,c,3)):a.u[c]&255}function Ee(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.sa(a.da(b,c,2)):a.u[c]}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ob=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,we(a,e)),e&1&&a.b--,a.v.Kb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
function Ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ve(a,a.da(b,c,3)):a.u[c]&255}function De(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.ta(a.da(b,c,2)):a.u[c]}function Ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Pb=a.da(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ve(a,e)),e&1&&a.b--,a.v.Lb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}
|
||||||
function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.sa(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Ge(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Kb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function He(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.da(b,e,6),a.v.Db(e,d.call(a,0>c?a.u[-c-1]:c,a.v.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])}function Fe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.v.Lb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.da(b,d,4),a.v.Db(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}
|
||||||
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
||||||
k.pb=function(a){this.C.complete=!0;var b=this.j?Ie(this.j)?1:this.C.gc?-1:0:0,c=a?this.C.gc?0:1:-1;this.C.gc=!1;this.ga=this.b=a;do{if(b){if(Je(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.K){if(a=this.K&7)if(a=!1,this.K&2){this.K&=-3;var d=160,e=(this.Wb&224)>>5,f=this.R&&this.R.kb>e?this.R:null;f&&(d=f.wc,e=f.kb);e>(this.P&224)>>5?(this.K&4&&(Rd(this,2),this.K&=-5),this.va(d,0,-9),e=!0):e=!1;e&&(f&&Sd(this,f),a=!0)}else this.K&1&&this.K++;if(a){if(b&&Je(this.j,this.u[7],c)){this.ea();
|
k.pb=function(a){this.C.complete=!0;var b=this.j?He(this.j)?1:this.C.hc?-1:0:0,c=a?this.C.hc?0:1:-1;this.C.hc=!1;this.ga=this.b=a;do{if(b){if(Ie(this.j,this.u[7],c)){this.ea();break}c||c++;b++}if(this.J){if(a=this.J&7)if(a=!1,this.J&2){var d=160,e=(this.Kb&224)>>5,f=this.K&&this.K.kb>e?this.K:null;f&&(d=f.xc,e=f.kb);e>(this.P&224)>>5?(this.J&4&&(Rd(this,2),this.J&=-5),this.wa(d,0,-9),e=!0):e=!1;e&&(f&&Sd(this,f),a=!0);this.K||this.Kb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Ie(this.j,this.u[7],
|
||||||
break}if(0>c)break}if(this.K&112&&Td(this)){if(b&&Je(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.K=this.K&7|this.P&16;this.decode(Qd(this))}while(0<this.b);return this.C.complete?this.ga-this.b:void 0===this.C.complete?0:-1};ab(function(){for(var a=F(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Hd(d);E(d,c)}});function Ke(a,b){var c=b+a;Vd(this,c,a,b);return c&65535}function Le(a,b){var c=b+a;Vd(this,c<<8,a<<8,b<<8);return c&255}
|
c)){this.ea();break}if(0>c)break}if(this.J&112&&Td(this)){if(b&&Ie(this.j,this.u[7],c)){this.ea();break}if(0>c)break}}this.J=this.J&7|this.P&16;this.decode(Qd(this))}while(0<this.b);return this.C.complete?this.ga-this.b:void 0===this.C.complete?0:-1};ab(function(){for(var a=F(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Hd(d);E(d,c)}});function Je(a,b){var c=b+a;Vd(this,c,a,b);return c&65535}function Ke(a,b){var c=b+a;Vd(this,c<<8,a<<8,b<<8);return c&255}
|
||||||
function Me(a,b){a=b<<1;Wd(this,a);return a&65535}function Ne(a,b){a=b<<1;Wd(this,a<<8);return a&255}function Oe(a,b){a=b&32768|b>>1|b<<16;Wd(this,a);return a&65535}function Pe(a,b){a=b&128|b>>1|b<<8;Wd(this,a<<8);return a&255}function Qe(a,b){a=b&~a;U(this,a);return a}function Re(a,b){a=b&~a;U(this,a<<8);return a}function Se(a,b){a|=b;U(this,a);return a}function Te(a,b){a|=b;U(this,a<<8);return a}function Ue(a,b){a=~b|65536;Ud(this,a);return a&65535}
|
function Le(a,b){a=b<<1;Wd(this,a);return a&65535}function Me(a,b){a=b<<1;Wd(this,a<<8);return a&255}function Ne(a,b){a=b&32768|b>>1|b<<16;Wd(this,a);return a&65535}function Oe(a,b){a=b&128|b>>1|b<<8;Wd(this,a<<8);return a&255}function Pe(a,b){a=b&~a;U(this,a);return a}function Qe(a,b){a=b&~a;U(this,a<<8);return a}function Re(a,b){a|=b;U(this,a);return a}function Se(a,b){a|=b;U(this,a<<8);return a}function Te(a,b){a=~b|65536;Ud(this,a);return a&65535}
|
||||||
function Ve(a,b){a=~b|256;Ud(this,a<<8);return a&255}function We(a,b){a=b-a;this.K&128||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function Xe(a,b){a=b-a;var c=a<<8;b<<=8;this.K&128||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Ye(a,b){a=b+a;this.K&128||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ze(a,b){a=b+a;var c=a<<8;this.K&128||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function $e(a,b){a=-b;Ud(this,a,a&b&32768);return a&65535}
|
function Ue(a,b){a=~b|256;Ud(this,a<<8);return a&255}function Ve(a,b){a=b-a;this.J&128||(this.aa=this.ca=a,this.W=b&(b^a));return a&65535}function We(a,b){a=b-a;var c=a<<8;b<<=8;this.J&128||(this.aa=this.ca=c,this.W=b&(b^c));return a&255}function Xe(a,b){a=b+a;this.J&128||(this.aa=this.ca=a,this.W=a&(b^a));return a&65535}function Ye(a,b){a=b+a;var c=a<<8;this.J&128||(this.aa=this.ca=c,this.W=c&(b<<8^c));return a&255}function Ze(a,b){a=-b;Ud(this,a,a&b&32768);return a&65535}
|
||||||
function af(a,b){a=-b;Ud(this,a<<8,(a&b&128)<<8);return a&255}function bf(a,b){a=b<<1|this.V>>16&1;Wd(this,a);return a&65535}function cf(a,b){a=b<<1|this.V>>16&1;Wd(this,a<<8);return a&255}function df(a,b){a=(this.V&65536|b)>>1|b<<16;Wd(this,a);return a&65535}function ef(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Wd(this,a<<8);return a&255}function ff(a,b){var c=b-a;Xd(this,c,a,b);return c&65535}function gf(a,b){var c=b-a;Xd(this,c<<8,a<<8,b<<8);return c&255}
|
function $e(a,b){a=-b;Ud(this,a<<8,(a&b&128)<<8);return a&255}function af(a,b){a=b<<1|this.V>>16&1;Wd(this,a);return a&65535}function bf(a,b){a=b<<1|this.V>>16&1;Wd(this,a<<8);return a&255}function cf(a,b){a=(this.V&65536|b)>>1|b<<16;Wd(this,a);return a&65535}function df(a,b){a=((this.V&65536)>>8|b)>>1|b<<8;Wd(this,a<<8);return a&255}function ef(a,b){var c=b-a;Xd(this,c,a,b);return c&65535}function ff(a,b){var c=b-a;Xd(this,c<<8,a<<8,b<<8);return c&255}
|
||||||
function hf(a,b){this.K&128||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function jf(a,b){a^=b;U(this,a);return a&65535}function kf(a){V(this,a,Be(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function gf(a,b){this.J&128||(this.aa=this.ca=b&65280,this.W=this.V=0);return(b<<8|b>>8)&65535}function hf(a,b){a^=b;U(this,a);return a&65535}function jf(a){V(this,a,Ae(this,a),Je);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
||||||
function lf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.V=c<<17-b,c>>=b;else if(b)if(16<b)this.W=c,c=0;else{this.V=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.aa=this.ca=c;this.b-=(this.g?6:7)+b}
|
function kf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.V=this.W=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.V=c<<17-b,c>>=b;else if(b)if(16<b)this.W=c,c=0;else{this.V=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.W=32768)}this.u[a]=c&65535;this.aa=this.ca=c;this.b-=(this.g?6:7)+b}
|
||||||
function mf(a){var b=Ee(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.V=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.W=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function nf(a){W(this,a,!Md(this))}function of(a){W(this,a,Md(this))}
|
function lf(a){var b=De(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.V=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.V=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.W=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.aa=d>>16;this.ca=d>>16|d;this.b-=(this.g?6:7)+b}function mf(a){W(this,a,!Md(this))}function nf(a){W(this,a,Md(this))}
|
||||||
function pf(a){V(this,a,Be(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){Fe(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){V(this,a,Be(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function sf(a){Fe(this,a,Ae(this,a),Te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
function of(a){V(this,a,Ae(this,a),Pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function pf(a){Ee(this,a,ze(this,a),Qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function qf(a){V(this,a,Ae(this,a),Re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function rf(a){Ee(this,a,ze(this,a),Se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}
|
||||||
function tf(a){var b=Be(this,a);a=Ee(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){var b=Ae(this,a);a=De(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function vf(a){W(this,a,Od(this))}function wf(a){W(this,a,!Pd(this)==!Nd(this))}function xf(a){W(this,a,!Od(this)&&!Pd(this)==!Nd(this))}function yf(a){W(this,a,!Md(this)&&!Od(this))}
|
function sf(a){var b=Ae(this,a);a=De(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function tf(a){var b=ze(this,a);a=Ce(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function uf(a){W(this,a,Od(this))}function vf(a){W(this,a,!Pd(this)==!Nd(this))}function wf(a){W(this,a,!Od(this)&&!Pd(this)==!Nd(this))}function xf(a){W(this,a,!Md(this)&&!Od(this))}
|
||||||
function zf(a){W(this,a,Od(this)||!Pd(this)!=!Nd(this))}function Af(a){W(this,a,Md(this)||Od(this))}function Bf(a){W(this,a,!Pd(this)!=!Nd(this))}function Cf(a){W(this,a,Pd(this))}function Df(a){W(this,a,!Od(this))}function Ef(a){W(this,a,!Pd(this))}function Ff(){this.va(12,0,-8);this.b-=5}function Gf(a){W(this,a,!0)}function Hf(a){W(this,a,!Nd(this))}function If(a){W(this,a,Nd(this))}function Jf(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5}
|
function yf(a){W(this,a,Od(this)||!Pd(this)!=!Nd(this))}function zf(a){W(this,a,Md(this)||Od(this))}function Af(a){W(this,a,!Pd(this)!=!Nd(this))}function Bf(a){W(this,a,Pd(this))}function Cf(a){W(this,a,!Od(this))}function Df(a){W(this,a,!Pd(this))}function Ef(){this.wa(12,0,-8);this.b-=5}function Ff(a){W(this,a,!0)}function Gf(a){W(this,a,!Nd(this))}function Hf(a){W(this,a,Nd(this))}function If(a){a&1&&(this.V=0);a&2&&(this.W=0);a&4&&(this.ca=1);a&8&&(this.aa=0);this.b-=5}
|
||||||
function Kf(a){var b=Be(this,a);a=Ee(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Lf(a){var b=Ae(this,a);a=De(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
|
function Jf(a){var b=Ae(this,a);a=De(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Kf(a){var b=ze(this,a);a=Ce(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);Xd(this,c,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}
|
||||||
function Mf(a){var b=Ee(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Nf(){this.va(24,0,-8);this.b-=25}
|
function Lf(a){var b=De(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.V=this.W=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ca=d>>16|d,this.aa=d>>16):(this.W=32768,this.ca=d>>15|d,this.aa=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ca=this.aa=0,this.W=32768,this.V=65536,this.b-=7}function Mf(){this.wa(24,0,-8);this.b-=25}
|
||||||
function Of(){this.P&49152?(this.Ba|=128,this.va(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Pf(this.j):this.ea());this.b-=7}function Qf(){this.va(16,0,-8);this.b-=25}var Rf=[0,7,7,10,7,11,9,13];function Sf(a){this.I=this.b;T(this,Ce(this,a));this.b=this.I-Rf[this.g]}var Tf=[0,14,14,17,14,18,16,20];function Uf(a){this.I=this.b;var b=Ce(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.I-Tf[this.g]}
|
function Nf(){this.P&49152?(this.Ba|=128,this.wa(4,0,-7)):(this.w&&1120==this.ib&&this.w.setData(this.u[0],!0),this.j?Of(this.j):this.ea());this.b-=7}function Pf(){this.wa(16,0,-8);this.b-=25}var Qf=[0,7,7,10,7,11,9,13];function Rf(a){this.I=this.b;T(this,Be(this,a));this.b=this.I-Qf[this.g]}var Sf=[0,14,14,17,14,18,16,20];function Tf(a){this.I=this.b;var b=Be(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.I-Sf[this.g]}
|
||||||
var Vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Wf(a){var b=Be(this,a);this.I=this.b;U(this,He(this,a,b));this.b=this.I-Vf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Xf(a){var b=Ae(this,a);U(this,Ge(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Yf=[7,13,13,17,14,18,17,21];
|
var Uf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Vf(a){var b=Ae(this,a);this.I=this.b;U(this,Ge(this,a,b));this.b=this.I-Uf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Wf(a){var b=ze(this,a);U(this,Fe(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var Xf=[7,13,13,17,14,18,17,21];
|
||||||
function Zf(a){var b=Ee(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.K&128||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767<b?65536:0);this.b-=23}function $f(){this.b-=5}function ag(){this.P&49152||(this.v.reset(),Sb(this),this.w&&this.w.setData(this.u[0],!0));this.b-=667}function bg(a){if(a&8)X.call(this,a);else{var b=ue(this);a&=7;7==a?T(this,b):(T(this,this.u[a]),this.u[a]=b);this.b-=9}}
|
function Yf(a){var b=De(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&128||(this.aa=b>>16,this.ca=this.aa|b,this.W=0,this.V=-32768>b||32767<b?65536:0);this.b-=23}function Zf(){this.b-=5}function $f(){this.P&49152||(this.v.reset(),Sb(this),this.w&&this.w.setData(this.u[0],!0));this.b-=667}function ag(a){if(a&8)X.call(this,a);else{var b=te(this);a&=7;7==a?T(this,b):(T(this,this.u[a]),this.u[a]=b);this.b-=9}}
|
||||||
function cg(){Zd(this);this.b-=13}function dg(a){a&1&&(this.V=65536);a&2&&(this.W=32768);a&4&&(this.ca=0);a&8&&(this.aa=32768);this.b-=5}function eg(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function fg(a){V(this,a,Be(this,a),ff);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function gg(a){V(this,a,0,hf);this.b-=this.g?9:3+(7==this.f?2:0)}function hg(){this.va(28,0,-8);this.b-=5}
|
function bg(){Zd(this);this.b-=13}function cg(a){a&1&&(this.V=65536);a&2&&(this.W=32768);a&4&&(this.ca=0);a&8&&(this.aa=32768);this.b-=5}function dg(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function eg(a){V(this,a,Ae(this,a),ef);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function fg(a){V(this,a,0,gf);this.b-=this.g?9:3+(7==this.f?2:0)}function gg(){this.wa(28,0,-8);this.b-=5}
|
||||||
function ig(){this.w&&(this.w.uc(this.u[7],!0),this.w.setData(this.u[0],!0));this.K|=4;Rd(this,-2);this.b-=3}function jg(a){V(this,a,this.u[(a>>6&7)+this.vb],jf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Pf(b)):b=!1;b||this.va(8,0,-8)}function Id(a){kg[a>>12].call(this,a)}function lg(a){mg[a>>6&3].call(this,a)}function ng(a){og[a>>6&3].call(this,a)}function pg(a){qg[a>>6&3].call(this,a)}
|
function hg(){this.w&&(this.w.vc(this.u[7],!0),this.w.setData(this.u[0],!0));this.J|=4;Rd(this,-2);this.b-=3}function ig(a){V(this,a,this.u[(a>>6&7)+this.vb],hf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Of(b)):b=!1;b||this.wa(8,0,-8)}function Id(a){jg[a>>12].call(this,a)}function kg(a){lg[a>>6&3].call(this,a)}function mg(a){ng[a>>6&3].call(this,a)}function og(a){pg[a>>6&3].call(this,a)}
|
||||||
function rg(a){sg[a&15].call(this,a)}function tg(a){ug[a&15].call(this,a)}function vg(a){wg[a>>6&3].call(this,a)}function xg(a){yg[a>>6&3].call(this,a)}function zg(a){Ag[a>>6&3].call(this,a)}
|
function qg(a){rg[a&15].call(this,a)}function sg(a){tg[a&15].call(this,a)}function ug(a){vg[a>>6&3].call(this,a)}function wg(a){xg[a>>6&3].call(this,a)}function yg(a){zg[a>>6&3].call(this,a)}
|
||||||
var kg=[function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,X,function(a){Cg[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Bg=[function(a){Dg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,X,X,X],mg=[function(a){Ud(this,He(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){V(this,a,0,
|
var jg=[function(a){Ag[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,jf,X,function(a){Bg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,eg,X],Ag=[function(a){Cg[a>>4&15].call(this,a)},Ff,Cf,uf,vf,Af,wf,yf,Tf,Tf,kg,mg,og,X,X,X],lg=[function(a){Ud(this,Ge(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ve);this.b-=this.g?9:3+(7==this.f?2:0)}],ng=[function(a){V(this,a,0,
|
||||||
$e);this.b-=this.g?11:6},function(a){V(this,a,Md(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Md(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ee(this,a);Ud(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],qg=[function(a){V(this,a,0,df);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}],
|
Ze);this.b-=this.g?11:6},function(a){V(this,a,Md(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Md(this)?1:0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=De(this,a);Ud(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],pg=[function(a){V(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}],
|
||||||
Dg=[function(a){Eg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,X,rg,tg,gg,gg,gg,gg],Eg=[Of,ig,cg,Ff,Qf,ag,X,X,X,X,X,X,X,X,X,X],sg=[$f,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},Jf,function(){this.ca=1;this.b-=5},Jf,Jf,Jf,function(){this.aa=0;this.b-=5},Jf,Jf,Jf,Jf,Jf,Jf,Jf],ug=[$f,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},dg,function(){this.ca=0;this.b-=5},dg,dg,dg,function(){this.aa=32768;this.b-=5},dg,dg,dg,dg,dg,dg,dg],Cg=[Ef,Cf,yf,Af,Hf,If,nf,of,Nf,
|
Cg=[function(a){Dg[a&15].call(this,a)},X,X,X,Rf,Rf,Rf,Rf,ag,X,qg,sg,fg,fg,fg,fg],Dg=[Nf,hg,bg,Ef,Pf,$f,X,X,X,X,X,X,X,X,X,X],rg=[Zf,function(){this.V=0;this.b-=5},function(){this.W=0;this.b-=5},If,function(){this.ca=1;this.b-=5},If,If,If,function(){this.aa=0;this.b-=5},If,If,If,If,If,If,If],tg=[Zf,function(){this.V=65536;this.b-=5},function(){this.W=32768;this.b-=5},cg,function(){this.ca=0;this.b-=5},cg,cg,cg,function(){this.aa=32768;this.b-=5},cg,cg,cg,cg,cg,cg,cg],Bg=[Df,Bf,xf,zf,Gf,Hf,mf,nf,Mf,
|
||||||
hg,vg,xg,zg,X,X,X],wg=[function(a){Ud(this,Ge(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,1,Xe);this.b-=this.g?9:3+(7==this.f?2:0)}],yg=[function(a){Fe(this,a,0,af);this.b-=this.g?11:6},function(a){Fe(this,a,Md(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,Md(this)?1:0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
|
gg,ug,wg,yg,X,X,X],vg=[function(a){Ud(this,Fe(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,0,Ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,1,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,1,We);this.b-=this.g?9:3+(7==this.f?2:0)}],xg=[function(a){Ee(this,a,0,$e);this.b-=this.g?11:6},function(a){Ee(this,a,Md(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,Md(this)?1:0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=
|
||||||
De(this,a);Ud(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Ag=[function(a){Fe(this,a,0,ef);this.b-=this.g?9+(this.Ob&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,cf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Fe(this,a,0,Pe);this.b-=this.g?9+(this.Ob&1):3+(7==this.f?2:0)},function(a){Fe(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}];function Jd(a){Fg[a>>12].call(this,a)}
|
Ce(this,a);Ud(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],zg=[function(a){Ee(this,a,0,df);this.b-=this.g?9+(this.Pb&1):3+(7==this.f?2:0)},function(a){Ee(this,a,0,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ee(this,a,0,Oe);this.b-=this.g?9+(this.Pb&1):3+(7==this.f?2:0)},function(a){Ee(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}];function Jd(a){Eg[a>>12].call(this,a)}
|
||||||
var Fg=[function(a){Gg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,kf,function(a){Hg[a>>8&15].call(this,a)},function(a){Ig[a>>8&15].call(this,a)},Xf,Lf,uf,qf,sf,fg,X],Gg=[function(a){Jg[a>>4&15].call(this,a)},Gf,Df,vf,wf,Bf,xf,zf,Uf,Uf,lg,ng,pg,function(a){Kg[a>>6&3].call(this,a)},X,X],Kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ye(this,a,0);Yd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.I=
|
var Eg=[function(a){Fg[a>>8&15].call(this,a)},Vf,Jf,sf,of,qf,jf,function(a){Gg[a>>8&15].call(this,a)},function(a){Hg[a>>8&15].call(this,a)},Wf,Kf,tf,pf,rf,eg,X],Fg=[function(a){Ig[a>>4&15].call(this,a)},Ff,Cf,uf,vf,Af,wf,yf,Tf,Tf,kg,mg,og,function(a){Jg[a>>6&3].call(this,a)},X,X],Jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.T);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=xe(this,a,0);Yd(this,a);U(this,a);this.b-=11},function(a){var b=te(this);this.I=
|
||||||
this.b;ze(this,a,0,b);U(this,b);this.b=this.I-Yf[this.g]},function(a){U(this,He(this,a,Pd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Jg=[function(a){Lg[a&15].call(this,a)},X,X,X,Sf,Sf,Sf,Sf,bg,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.K|=1),this.b-=5):X.call(this,a)},rg,tg,gg,gg,gg,gg],Lg=[Of,ig,function(){Zd(this);this.K|=this.P&16;this.b-=13},Ff,Qf,ag,cg,function(){this.va(8,0,-8)},X,X,X,X,X,X,X,X],Hg=[Zf,Zf,Mf,Mf,lf,lf,mf,mf,jg,jg,X,X,X,X,eg,eg],Ig=[Ef,Cf,yf,Af,
|
this.b;ye(this,a,0,b);U(this,b);this.b=this.I-Xf[this.g]},function(a){U(this,Ge(this,a,Pd(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Ig=[function(a){Kg[a&15].call(this,a)},X,X,X,Rf,Rf,Rf,Rf,ag,function(a){a&8?(this.P&49152||(this.P=this.P&-2017|(a&7)<<5,this.J|=1),this.b-=5):X.call(this,a)},qg,sg,fg,fg,fg,fg],Kg=[Nf,hg,function(){Zd(this);this.J|=this.P&16;this.b-=13},Ef,Pf,$f,bg,function(){this.wa(8,0,-8)},X,X,X,X,X,X,X,X],Gg=[Yf,Yf,Lf,Lf,kf,kf,lf,lf,ig,ig,X,X,X,X,dg,dg],Hg=[Df,Bf,xf,zf,
|
||||||
Hf,If,nf,of,Nf,hg,vg,xg,zg,function(a){Mg[a>>6&3].call(this,a)},X,X],Mg=[X,function(a){a=ye(this,a,65536);Yd(this,a);U(this,a);this.b-=11},function(a){var b=ue(this);this.I=this.b;ze(this,a,65536,b);U(this,b);this.b=this.I-Yf[this.g]},X];
|
Gf,Hf,mf,nf,Mf,gg,ug,wg,yg,function(a){Lg[a>>6&3].call(this,a)},X,X],Lg=[X,function(a){a=xe(this,a,65536);Yd(this,a);U(this,a);this.b-=11},function(a){var b=te(this);this.I=this.b;ye(this,a,65536,b);U(this,b);this.b=this.I-Xf[this.g]},X];
|
||||||
function Ng(a){x.call(this,"ROM",a,Ng,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Og(c)})}}B(Ng);k=Ng.prototype;
|
function Mg(a){x.call(this,"ROM",a,Mg,128);this.ja=this.B=null;this.A=a.addr;this.f=a.size;this.F=!1;this.w=a.alias;this.g=a.file;this.H=u(this.g);if(this.g){a=this.g;var b=oa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja):c.g=null);Ng(c)})}}B(Mg);k=Mg.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Og(this)};k.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
k.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Ng(this)};k.Ka=function(){this.ja&&(this.j&&Og(this.j,this.id,this.A,this.f,this.ja),delete this.ja);return!0};k.Ja=function(){return!0};
|
||||||
function Og(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Ng.prototype.pe,Ng.prototype.pf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,kd)){for(c=0;c<a.B.length;c++)a.v.Cb(b+c,a.B[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.w?b.push(a.w):
|
function Ng(a){if(!yb(a)){if(a.g){if(!a.B||!a.v)return;a.f||(a.f=a.B.length);if(a.B.length!=a.f)Ab(a,"ROM size ("+p(a.B.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+qc){var c={};b=(c[b]=[Mg.prototype.qe,Mg.prototype.pf,null,null,null,a.f>>1],c);if(Jb(a.v,a,b)){b=a.F=!0;break a}}else if(Ac(a.v,b,a.f,kd)){for(c=0;c<a.B.length;c++)a.v.Cb(b+c,a.B[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.w?b.push(a.w):
|
||||||
null!=a.w&&a.w.length&&(b=a.w);for(c=0;c<b.length;c++){var d=a,e=b[c],f=zc(d.v,d.A,d.f);yc(d.v,e,d.f,f)}a.F||delete a.B}}}J(a)}}k.pe=function(a){return this.B[a-this.A]};k.pf=function(){};ab(function(){for(var a=F(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Ng(d);E(d,c)}});
|
null!=a.w&&a.w.length&&(b=a.w);for(c=0;c<b.length;c++){var d=a,e=b[c],f=zc(d.v,d.A,d.f);yc(d.v,e,d.f,f)}a.F||delete a.B}}}J(a)}}k.qe=function(a){return this.B[a-this.A]};k.pf=function(){};ab(function(){for(var a=F(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Mg(d);E(d,c)}});
|
||||||
function Qg(a){x.call(this,"RAM",a,Qg);this.ja=this.B=null;this.g=a.addr;this.A=a.size;this.Ra=a.load;this.Qa=a.exec;this.w=!1;this.f=a.file;this.F=u(this.f);if(this.f){a=this.f;var b=oa(this.F);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja,null==c.Ra&&(c.Ra=a.Ra),null==c.Qa&&(c.Qa=a.Qa)):c.f=null);Rg(c)})}}
|
function Pg(a){x.call(this,"RAM",a,Pg);this.ja=this.B=null;this.g=a.addr;this.A=a.size;this.Ra=a.load;this.Qa=a.exec;this.w=!1;this.f=a.file;this.F=u(this.f);if(this.f){a=this.f;var b=oa(this.F);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(lb(c.fb,a,b),(a=Ea(a,b))?(c.B=a.ha,c.ja=a.ja,null==c.Ra&&(c.Ra=a.Ra),null==c.Qa&&(c.Qa=a.Qa)):c.f=null);Qg(c)})}}
|
||||||
B(Qg);Qg.prototype.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Rg(this)};Qg.prototype.Ka=function(){this.ja&&(this.j&&Pg(this.j,this.id,this.g,this.A,this.ja),delete this.ja);return!0};Qg.prototype.Ja=function(){return!0};function Rg(a){if(a.v&&(!a.w&&a.A&&Ac(a.v,a.g,a.A,Dc)&&(a.w=!0),!yb(a))){if(!a.w)w("No RAM allocated");else if(a.f){if(!a.B||!a.v)return;Sg(a,a.B,a.Ra,a.Qa,a.g)}J(a)}}
|
B(Pg);Pg.prototype.Ha=function(a,b,c,d){this.v=b;this.b=c;this.j=d;Qg(this)};Pg.prototype.Ka=function(){this.ja&&(this.j&&Og(this.j,this.id,this.g,this.A,this.ja),delete this.ja);return!0};Pg.prototype.Ja=function(){return!0};function Qg(a){if(a.v&&(!a.w&&a.A&&Ac(a.v,a.g,a.A,Dc)&&(a.w=!0),!yb(a))){if(!a.w)w("No RAM allocated");else if(a.f){if(!a.B||!a.v)return;Rg(a,a.B,a.Ra,a.Qa,a.g)}J(a)}}
|
||||||
Qg.prototype.reset=function(){if(this.w){for(var a=this.v,b=this.g,c=this.A,d=b&a.v,b=b>>>a.na;0<c&&b<a.Y.length;){var e=a.Y[b];if(e.controller&&a.B&&a.B.length==a.w.length){var f=a.B.indexOf(e);0<=f&&(e=a.w[f])}if(e){var f=c,g=0,h,d=d||0,g=g&255;void 0===f&&(f=e.size);if(Bb&&e.D)for(h=d;f--&&h<e.D.length;h++)e.D[h]=g;else for(h=d;f--&&h<e.size;h++)e.ic(d,g,e.G+d)}c-=a.Ia;b++;d=0}this.B&&Sg(this,this.B,this.Ra,this.Qa,this.g,!0)}};
|
Pg.prototype.reset=function(){if(this.w){for(var a=this.v,b=this.g,c=this.A,d=b&a.v,b=b>>>a.na;0<c&&b<a.Y.length;){var e=a.Y[b];if(e.controller&&a.B&&a.B.length==a.w.length){var f=a.B.indexOf(e);0<=f&&(e=a.w[f])}if(e){var f=c,g=0,h,d=d||0,g=g&255;void 0===f&&(f=e.size);if(Bb&&e.D)for(h=d;f--&&h<e.D.length;h++)e.D[h]=g;else for(h=d;f--&&h<e.size;h++)e.jc(d,g,e.G+d)}c-=a.Ia;b++;d=0}this.B&&Rg(this,this.B,this.Ra,this.Qa,this.g,!0)}};
|
||||||
function Sg(a,b,c,d,e,f){var g=!1;if(null==c)for(var h=0;h<b.length-1;){var l=b[h]&255|(b[h+1]&255)<<8;if(l)if(l&255){var m=h;if(1!=l){G(a,"invalid signature ("+q(l)+") at offset "+q(m),4096);break}if(h+6>=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0<n&&h<b.length;)l+=b[h++]&255,n--;if(n||h>=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
|
function Rg(a,b,c,d,e,f){var g=!1;if(null==c)for(var h=0;h<b.length-1;){var l=b[h]&255|(b[h+1]&255)<<8;if(l)if(l&255){var m=h;if(1!=l){G(a,"invalid signature ("+q(l)+") at offset "+q(m),4096);break}if(h+6>=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),t=h,v=n-=6;0<n&&h<b.length;)l+=b[h++]&255,n--;if(n||h>=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+=
|
||||||
b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.b.Cb(c+g,b[g]);g=!0}g&&null!=d&&(a=a.b,a.Ac=d,a.v.reset(),Sb(a),T(a,d),dd(a,0),!f&&a.j&&(a.ea()||Ad(a.j)));return g}
|
b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(v)for(G(a,"loading "+q(v)+" bytes at "+q(r)+"-"+q(r+v-1),4096);v--;)a.b.Cb(r++,b[t++]&255);else r&1?a.b.ea():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.b.Cb(c+g,b[g]);g=!0}g&&null!=d&&(a=a.b,a.Bc=d,a.v.reset(),Sb(a),T(a,d),dd(a,0),!f&&a.j&&(a.ea()||Ad(a.j)));return g}
|
||||||
ab(function(){for(var a=F(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Qg(d);E(d,c)}});function Tg(a){x.call(this,"Keyboard",a,Tg,1024);J(this)}B(Tg);Tg.prototype.ua=function(){return!1};Tg.prototype.Ha=function(a,b,c,d){this.B=a;this.b=c;this.j=d};ab(function(){for(var a=F(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Tg(d);E(d,c)}});
|
ab(function(){for(var a=F(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Pg(d);E(d,c)}});function Sg(a){x.call(this,"Keyboard",a,Sg,1024);J(this)}B(Sg);Sg.prototype.va=function(){return!1};Sg.prototype.Ha=function(a,b,c,d){this.B=a;this.b=c;this.j=d};ab(function(){for(var a=F(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Sg(d);E(d,c)}});
|
||||||
function Ug(a){this.R=a.baudReceive||9600;this.ga=a.baudTransmit||9600;this.fa=a.upperCase;this.w=this.F=null;this.U=a.tabSize;this.T=a.charBOL;this.H=0;x.call(this,"SerialPort",a,Ug,262144);var b=a.binding;if("console"==b)this.F="";else{var c;a=Vg;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.D[b])&&this.ua(null,a,b))}this.I=this.L=null;this.exports={connect:this.Nc,receiveData:this.fc}}B(Ug);var Vg="buffer";k=Ug.prototype;
|
function Tg(a){this.S=a.baudReceive||9600;this.oa=a.baudTransmit||9600;this.fa=a.upperCase;this.w=this.A=null;this.U=a.tabSize;this.T=a.charBOL;this.F=0;x.call(this,"SerialPort",a,Tg,262144);var b=a.binding;if("console"==b)this.A="";else{var c;a=Ug;b&&(void 0===c&&(c="Panel"),(c=ob(c,this.id))&&(b=c.D[b])&&this.va(null,a,b))}this.I=this.L=null;this.exports={connect:this.Oc,receiveData:this.gc}}B(Tg);var Ug="buffer";k=Tg.prototype;
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case Vg:return this.D[b]=this.w=c,c.onkeydown=function(a){a=a||window.event;var b=!1,c=a.keyCode;8==c?(b=!0,c=la.Yc):a.ctrlKey&&c>=la.yc&&c<=la.hd&&(b=!0,c-=la.yc-la.Xc);b&&(a.preventDefault&&a.preventDefault(),d.fc(c));return!0},c.onkeypress=function(a){a=a||window.event;d.fc(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData||
|
k.va=function(a,b,c){var d=this;switch(b){case Ug:return this.D[b]=this.w=c,c.onkeydown=function(a){a=a||window.event;var b=!1,c=a.keyCode;8==c?(b=!0,c=la.Zc):a.ctrlKey&&c>=la.zc&&c<=la.jd&&(b=!0,c-=la.zc-la.Yc);b&&(a.preventDefault&&a.preventDefault(),d.gc(c));return!0},c.onkeypress=function(a){a=a||window.event;d.gc(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData||
|
||||||
window.clipboardData)&&d.fc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;var e=this;this.xa=Mc(48,4,262144);this.ba=Jc(this.b,function(){e.f&128||!e.A.length||(e.J=e.A.shift()&255,e.fa&&97<=e.J&&122>e.J&&(e.J-=32),e.f|=128,e.f&64&&Kc(e.b,e.xa))});this.O=Mc(52,4,262144);this.oa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.O)});Jb(b,this,Wg);Lb(b,this.reset.bind(this));J(this)};
|
window.clipboardData)&&d.gc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
||||||
k.Nc=function(){if(!this.I){var a=xd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Nc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;var e=this;this.ga=Mc(48,4,262144);this.ba=Jc(this.b,function(){var a;a=-1;e.H.length&&(a=e.H.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.fa&&97<=a&&122>a&&(a-=32),Lc(e.b,e.ba,1E3/Math.round(e.S/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Kc(c,e.ga))});this.O=Mc(52,4,262144);this.sa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(c,e.O)});Jb(b,this,Vg);Lb(b,this.reset.bind(this));J(this)};
|
||||||
k.Ja=function(a){return a?this.save():!0};k.reset=function(){Xg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.J=0;a.f=0;a.g=128;a.A=[];return!0}k.fc=function(a){if("number"==typeof a)this.A.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.A.push(b)}else this.A=this.A.concat(a);Lc(this.b,this.ba,1E3/Math.round(this.R/10));return!0};
|
k.Oc=function(){if(!this.I){var a=xd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.eb)return;b=ya(b[1]);if(this.I=nb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.fb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ka=function(a,b){if(!b)if(this.Oc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
k.ce=function(){return this.f&65534};k.af=function(a){this.f=this.f&-112|a&111};k.be=function(){this.f&=-129;0<this.A.length&&Lc(this.b,this.ba,1E3/Math.round(this.R/10));return this.J};k.$e=function(){};k.De=function(){return this.g};k.Df=function(a){if(this.g&128)if(a&64)Kc(this.b,this.O);else{var b=this.b,c=this.O;Sd(b,c);c.message&&I(b,c.message|8)&&G(b,"clearInterrupt(vector="+na(c.wc)+",priority="+c.kb+")",!0,!0)}this.g=this.g&-70|a&69};k.Ce=function(){return 0};
|
k.Ja=function(a){return a?this.save():!0};k.reset=function(){Wg(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return Wg(this)};function Wg(a){a.K=0;a.f=0;a.g=128;a.H=[];return!0}k.gc=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.H.push(b)}else this.H=this.H.concat(a);Lc(this.b,this.ba,1E3/Math.round(this.S/10));return!0};
|
||||||
k.Cf=function(a){a&=255;G(this,"transmitByte("+p(a,2,!0)+")");this.L&&this.L.call(this.I,a);a&=127;if(this.w)if(13==a)this.H=0;else if(8==a)this.w.value=this.w.value.slice(0,-1),0<this.H&&this.H--;else{if(a){var b;b=(b=za[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.H%a,this.U&&(b=xa("",c)));this.T&&!this.H&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}}else if(null!=this.F){if(10==a||1024<=
|
k.de=function(){return this.f&65534};k.af=function(a){this.f=this.f&-112|a&111};k.ce=function(){this.f&=-129;return this.K};k.$e=function(){};k.Ee=function(){return this.g};k.Df=function(a){if(this.g&128)if(a&64)Kc(this.b,this.O);else{var b=this.b,c=this.O;Sd(b,c);c.message&&I(b,c.message|8)&&G(b,"clearIRQ(vector="+na(c.xc)+",priority="+c.kb+")",!0,!0)}this.g=this.g&-70|a&69};k.De=function(){return 0};
|
||||||
this.F.length)this.i(this.F),this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.oa,1E3/Math.round(this.ga/10))};var Yg={},Wg=(Yg[65392]=[null,null,Ug.prototype.ce,Ug.prototype.af,"RCSR"],Yg[65394]=[null,null,Ug.prototype.be,Ug.prototype.$e,"RBUF"],Yg[65396]=[null,null,Ug.prototype.De,Ug.prototype.Df,"XCSR"],Yg[65398]=[null,null,Ug.prototype.Ce,Ug.prototype.Cf,"XBUF"],Yg);
|
k.Cf=function(a){a&=255;G(this,"transmitByte("+p(a,2,!0)+")");this.L&&this.L.call(this.I,a);a&=127;if(this.w)if(13==a)this.F=0;else if(8==a)this.w.value=this.w.value.slice(0,-1),0<this.F&&this.F--;else{if(a){var b;b=(b=za[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.F%a,this.U&&(b=xa("",c)));this.T&&!this.F&&c&&(b=String.fromCharCode(this.T)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.F+=c}}else if(null!=this.A){if(10==a||1024<=
|
||||||
ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Ug(d);E(d,c)}});function ed(a){x.call(this,"PC11",a,ed);this.g=a.autoMount||null;this.F=0;this.fa=a.baudReceive||3600;this.J=this.L=this.f=0;this.I=[];this.H=Zg;this.w=sh;this.O=this.A="";this.ha=this.Ra=this.Qa=null;this.T=-1;this.R=!Ma("Mobi")&&window&&"FileReader"in window}B(ed);var Zg="",sh=0;k=ed.prototype;
|
this.A.length)this.i(this.A),this.A="";10!=a&&(this.A+=String.fromCharCode(a))}Lc(this.b,this.sa,1E3/Math.round(this.oa/10));this.g&=-129};var Xg={},Vg=(Xg[65392]=[null,null,Tg.prototype.de,Tg.prototype.af,"RCSR"],Xg[65394]=[null,null,Tg.prototype.ce,Tg.prototype.$e,"RBUF"],Xg[65396]=[null,null,Tg.prototype.Ee,Tg.prototype.Df,"XCSR"],Xg[65398]=[null,null,Tg.prototype.De,Tg.prototype.Cf,"XBUF"],Xg);
|
||||||
k.ua=function(a,b,c){var d=this,e=sh;switch(b){case "listTapes":return this.D[b]=c,c.onchange=function(){var a=d.D.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
|
ab(function(){for(var a=F(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Tg(d);E(d,c)}});function ed(a){x.call(this,"PC11",a,ed);this.g=a.autoMount||null;this.F=0;this.fa=a.baudReceive||3600;this.K=this.L=this.f=0;this.I=[];this.H=Yg;this.w=sh;this.O=this.A="";this.ha=this.Ra=this.Qa=null;this.U=-1;this.S=!Ma("Mobi")&&window&&"FileReader"in window}B(ed);var Yg="",sh=0;k=ed.prototype;
|
||||||
function(){var a=d.D.listTapes;a&&th(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;th(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
k.va=function(a,b,c){var d=this,e=sh;switch(b){case "listTapes":return this.D[b]=c,c.onchange=function(){var a=d.D.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick=
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.U=uh(a);var e=this;if((this.g=xd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.ba=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.J<e.I.length&&(e.L=e.I[e.J++]&255,vh(e,e.J/e.I.length*100),e.f|=128,e.f&=-2049,e.f&64&&Kc(e.b,e.ba))});Jb(b,this,wh);Lb(b,this.reset.bind(this));xh(this,"None",Zg,
|
function(){var a=d.D.listTapes;a&&th(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.S){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;th(d,u(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1};
|
||||||
!0);this.R&&xh(this,"Local Tape","?");xh(this,"Remote Tape","??");yh(this)||J(this)};k.Ka=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.L=0};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;this.ba=uh(a);var e=this;if((this.g=xd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.T=Mc(56,4,4096);this.ga=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K<e.I.length&&(e.L=e.I[e.K++]&255,vh(e,e.K/e.I.length*100),e.f|=128,e.f&=-2049,e.f&64&&Kc(e.b,e.T))});Jb(b,this,wh);Lb(b,this.reset.bind(this));xh(this,"None",Yg,
|
||||||
|
!0);this.S&&xh(this,"Local Tape","?");xh(this,"Remote Tape","??");yh(this)||J(this)};k.Ka=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){this.f&=-2241;this.L=0};
|
||||||
function yh(a){a.F=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.D.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=u(b,!0)}b&&c?zh(a,c,b,1,!0):Ah(a)}return!!a.F}
|
function yh(a){a.F=0;if(a.g){var b=a.g.path||"",c;if(!(c=a.g.name))a:{if((c=a.D.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=u(b,!0)}b&&c?zh(a,c,b,1,!0):Ah(a)}return!!a.F}
|
||||||
function th(a,b,c,d,e){if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"');a.H="??"}else a.H=c;zh(a,b,c,d,!1,e)}else Bh(a,!1)}
|
function th(a,b,c,d,e){if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"');a.H="??"}else a.H=c;zh(a,b,c,d,!1,e)}else Bh(a,!1)}
|
||||||
function zh(a,b,c,d,e,f){var g=-1;if(a.A.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Bh(a,!0),a.C.hb?a.N("PC11 busy"):(e&&(a.F++,I(a)&&G(a,"auto-loading tape: "+b)),Ch(a,b,c,d,f)?g++:a.C.hb=!0);g&&Dh(a,a.O,a.A,a.w,a.ha,a.Ra,a.Qa)}
|
function zh(a,b,c,d,e,f){var g=-1;if(a.A.toLowerCase()!=c.toLowerCase()||a.w!=d)g++,Bh(a,!0),a.C.hb?a.N("PC11 busy"):(e&&(a.F++,I(a)&&G(a,"auto-loading tape: "+b)),Ch(a,b,c,d,f)?g++:a.C.hb=!0);g&&Dh(a,a.O,a.A,a.w,a.ha,a.Ra,a.Qa)}
|
||||||
function Ch(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Dh(a,b,c,d,e),a.H="?");Ah(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Dh(a,b,c,d,e.ha,e.Ra,
|
function Ch(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Dh(a,b,c,d,e),a.H="?");Ah(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(lb(a.fb,e,f),(e=Ea(e,f))&&Dh(a,b,c,d,e.ha,e.Ra,
|
||||||
e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Ah(a)})}function xh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
e.Qa));a.C.hb=!1;a.F&&(a.F--,a.F||J(a));Ah(a)})}function xh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Ah(a){var b=a.D.listTapes;if(b&&b.options){a=a.H||a.A;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function vh(a,b){b|=0;if(b!==a.T){var c=a.D.readProgress;c&&(c=(c=F(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.T=b}}
|
function Ah(a){var b=a.D.listTapes;if(b&&b.options){a=a.H||a.A;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}function vh(a,b){b|=0;if(b!==a.U){var c=a.D.readProgress;c&&(c=(c=F(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.U=b}}
|
||||||
function Dh(a,b,c,d,e,f,g){a.O=b;a.A=c;a.w=d;a.ha=e;a.Ra=f;a.Qa=g;2==d?a.U&&Sg(a.U,e,f,g)?a.status("tape loaded: "+b):(a.O="",a.A="",a.H=Zg,a.w=sh,a.N("No load address available for tape: "+b)):(a.J=0,a.I=e,a.status("tape attached: "+b),vh(a,0))}function Bh(a,b){if(a.A||!1===b)a.O="",a.A="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.H=Zg,a.w=sh,Ah(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.Wd=function(){return this.f&65534};
|
function Dh(a,b,c,d,e,f,g){a.O=b;a.A=c;a.w=d;a.ha=e;a.Ra=f;a.Qa=g;2==d?a.ba&&Rg(a.ba,e,f,g)?a.status("tape loaded: "+b):(a.O="",a.A="",a.H=Yg,a.w=sh,a.N("No load address available for tape: "+b)):(a.K=0,a.I=e,a.status("tape attached: "+b),vh(a,0))}function Bh(a,b){if(a.A||!1===b)a.O="",a.A="",b||(a.w&&a.status(1==a.w?"tape detached":"tape unloaded"),a.H=Yg,a.w=sh,Ah(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.Xd=function(){return this.f&65534};
|
||||||
k.Ue=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Kc(this.b,this.ba)):(this.f&=-129,this.f|=2048,this.L=0,Lc(this.b,this.ga,1E3/Math.round(this.fa/10))));this.f=this.f&-66|a&65};k.Vd=function(){this.f&=-129;this.f|=2048;return this.L};k.Te=function(){};var Eh={},wh=(Eh[65384]=[null,null,ed.prototype.Wd,ed.prototype.Ue,"PRS"],Eh[65386]=[null,null,ed.prototype.Vd,ed.prototype.Te,"PRB"],Eh);
|
k.Ue=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Kc(this.b,this.T)):(this.f&=-129,this.f|=2048,this.L=0,Lc(this.b,this.ga,1E3/Math.round(this.fa/10))));this.f=this.f&-66|a&65};k.Wd=function(){this.f&=-129;this.f|=2048;return this.L};k.Te=function(){};var Eh={},wh=(Eh[65384]=[null,null,ed.prototype.Xd,ed.prototype.Ue,"PRS"],Eh[65386]=[null,null,ed.prototype.Wd,ed.prototype.Te,"PRB"],Eh);
|
||||||
function Fh(a,b,c){x.call(this,"Disk",{id:a.fb+".disk"+p(++Gh,4)},Fh,8192);this.controller=a;this.B=a.B;this.j=a.j;this.w=b;this.Ta=b.name;this.ac=b.ac;Hh(this,c,b.la,b.ra,b.ia,b.ya);J(this)}var Gh=0;B(Fh);k=Fh.prototype;k.Ha=function(a,b,c,d){this.j=d};
|
function Fh(a,b,c){x.call(this,"Disk",{id:a.fb+".disk"+p(++Gh,4)},Fh,8192);this.controller=a;this.B=a.B;this.j=a.j;this.w=b;this.Ta=b.name;this.bc=b.bc;Hh(this,c,b.la,b.ra,b.ia,b.ya);J(this)}var Gh=0;B(Fh);k=Fh.prototype;k.Ha=function(a,b,c,d){this.j=d};
|
||||||
function Hh(a,b,c,d,e,f){a.mode=b;a.la=c;a.ra=d;a.ia=e;a.ya=f;a.b=[];if("preload"!=a.mode){b=Array(a.la);for(c=0;c<b.length;c++){d=Array(a.ra);for(e=0;e<d.length;e++){f=Array(a.ia);for(var g=1;g<=f.length;g++)f[g-1]=Ih(null,c,e,g,a.ya,0);d[e]=f}b[c]=d}a.b=b}a.f=null}
|
function Hh(a,b,c,d,e,f){a.mode=b;a.la=c;a.ra=d;a.ia=e;a.ya=f;a.b=[];if("preload"!=a.mode){b=Array(a.la);for(c=0;c<b.length;c++){d=Array(a.ra);for(e=0;e<d.length;e++){f=Array(a.ia);for(var g=1;g<=f.length;g++)f[g-1]=Ih(null,c,e,g,a.ya,0);d[e]=f}b[c]=d}a.b=b}a.f=null}
|
||||||
function Jh(a,b,c,d,e){var f=c;if(a.v)return!0;a.Ta=b;a.La=c;a.tc=u(c);a.v=e;a.A=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ja[d];if(e){a.la=e[0];a.ra=e[1];a.ia=e[2];a.ya=e[3]||512;c=a.ya>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ra),v=0;v<t.length;v++)for(var A=t[v]=Array(a.ia),y=0;y<A.length;y++){for(var C=Ih(null,d,v,y+1,a.ya,0),qa=C.data,Ra=0;Ra<c;Ra++,f+=4)var R=qa[Ra]=b.getInt32(f,
|
function Jh(a,b,c,d,e){var f=c;if(a.v)return!0;a.Ta=b;a.La=c;a.uc=u(c);a.v=e;a.A=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ja[d];if(e){a.la=e[0];a.ra=e[1];a.ia=e[2];a.ya=e[3]||512;c=a.ya>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.la);for(d=0;d<a.b.length;d++)for(var t=a.b[d]=Array(a.ra),v=0;v<t.length;v++)for(var A=t[v]=Array(a.ia),y=0;y<A.length;y++){for(var C=Ih(null,d,v,y+1,a.ya,0),qa=C.data,Ra=0;Ra<c;Ra++,f+=4)var R=qa[Ra]=b.getInt32(f,
|
||||||
!0),e=e+R&-1;C.Ma=c;A[y]=C}a.f=e;c=a}else a.N("Unrecognized disk format ("+d+" bytes)");a.v&&(a.v.call(a.controller,a.w,c,a.Ta,a.La),a.v=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ac?"":e)+"&format=json"));return!!Da(f,
|
!0),e=e+R&-1;C.Ma=c;A[y]=C}a.f=e;c=a}else a.N("Unrecognized disk format ("+d+" bytes)");a.v&&(a.v.call(a.controller,a.w,c,a.Ta,a.La),a.v=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.bc?"":e)+"&format=json"));return!!Da(f,
|
||||||
null,!0,function(b,c,d){Kh(a,b,c,d)})}
|
null,!0,function(b,c,d){Kh(a,b,c,d)})}
|
||||||
function Kh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0<u(a.tc,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Ta]:h=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
function Kh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{lb(a.controller.fb,b,c);try{if(0<u(a.uc,!0).toLowerCase().indexOf("-readonly"))a.g=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.g=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Ta]:h=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
||||||
c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d<a.la;d++)for(f=0;f<a.ra;f++)for(g=0;g<a.ia;g++)if(l=h[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A<v;A++)t[A]=n;Lh(l,t)}else r=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=r;delete l.bytes}Ih(l,d,f);for(v=
|
c+")");if(h.length)if(1==h.length)w(h[0]);else{a.la=h.length;a.ra=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d<a.la;d++)for(f=0;f<a.ra;f++)for(g=0;g<a.ia;g++)if(l=h[d][f][g]){var m=l.length;void 0===m&&(m=l.length=512);var m=m>>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var v=m<<2,A=t.length;A<v;A++)t[A]=n;Lh(l,t)}else r=[],n=l.pattern=n|n<<8|n<<16|n<<24,l.data=r;delete l.bytes}Ih(l,d,f);for(v=
|
||||||
0;v<r.length;v++)c=c+r[v]&-1}a.b=h;a.f=c;e=a}else w("Empty disk image: "+a.Ta)}catch(y){w("Disk image error ("+b+"): "+y.message)}}a.v&&(a.v.call(a.A,a.w,e,a.Ta,a.La),a.v=null)}function Ih(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.ig=b;a.jg=c;a.Wa=a.Ma=0;a.$a=!1;return a}function Mh(a){return a.b.length?[a.b.length,a.b[0].length,a.b[0][0].length,a.b[0][0][0].length]:[0,0,0,0]}
|
0;v<r.length;v++)c=c+r[v]&-1}a.b=h;a.f=c;e=a}else w("Empty disk image: "+a.Ta)}catch(y){w("Disk image error ("+b+"): "+y.message)}}a.v&&(a.v.call(a.A,a.w,e,a.Ta,a.La),a.v=null)}function Ih(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.ig=b;a.jg=c;a.Wa=a.Ma=0;a.$a=!1;return a}function Mh(a){return a.b.length?[a.b.length,a.b[0].length,a.b[0][0].length,a.b[0][0][0].length]:[0,0,0,0]}
|
||||||
k.seek=function(a,b,c,d,e){d=null;var f=this.w,g=this.b[a];if(g){var h=g[b];if(!h&&f.od&&b<f.ra)for(h=g[b]=Array(f.Hc),g=0;g<h.length;g++)h[g]=Ih(null,a,b,g+1,f.qc,0);if(h){for(g=0;g<h.length;g++)if(h[g]&&h[g].sector==c){d=h[g];break}!d&&f.od&&9==f.lc&&(d=h[g]=Ih(null,a,b,f.lc,f.qc,0))}}e&&e(d,!1);return d};function Lh(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
k.seek=function(a,b,c,d,e){d=null;var f=this.w,g=this.b[a];if(g){var h=g[b];if(!h&&f.pd&&b<f.ra)for(h=g[b]=Array(f.Ic),g=0;g<h.length;g++)h[g]=Ih(null,a,b,g+1,f.rc,0);if(h){for(g=0;g<h.length;g++)if(h[g]&&h[g].sector==c){d=h[g];break}!d&&f.pd&&9==f.mc&&(d=h[g]=Ih(null,a,b,f.mc,f.rc,0))}}e&&e(d,!1);return d};function Lh(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||||
k.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f<a.Wa?(a.Ma+=a.Wa-f,a.Wa=f):f>=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
k.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f<a.Wa?(a.Ma+=a.Wa-f,a.Wa=f):f>=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||||
function Nh(a,b){var c=a.ra*a.ia,d=b/c|0;return d<a.la?(b%=c,a.seek(d,b/a.ia|0,b%a.ia+1)):null}function Oh(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Ph(a){for(var b="",c=0,d;d=Nh(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Oh(a,d,e));return btoa(b)}
|
function Nh(a,b){var c=a.ra*a.ia,d=b/c|0;return d<a.la?(b%=c,a.seek(d,b/a.ia|0,b%a.ia+1)):null}function Oh(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Ph(a){for(var b="",c=0,d;d=Nh(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Oh(a,d,e));return btoa(b)}
|
||||||
k.save=function(){var a=0,b=[];b[a++]=[this.La,this.f,this.la,this.ra,this.ia,this.ya];if(!this.g)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Ma){for(var h=[],l=0,m=g.Wa,n=g.Wa+g.Ma;m<n;)h[l++]=g.data[m++];b[a++]=[d,e,f,g.Wa,h]}}return b};
|
k.save=function(){var a=0,b=[];b[a++]=[this.La,this.f,this.la,this.ra,this.ia,this.ya];if(!this.g)for(var c=this.b,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Ma){for(var h=[],l=0,m=g.Wa,n=g.Wa+g.Ma;m<n;)h[l++]=g.data[m++];b[a++]=[d,e,f,g.Wa,h]}}return b};
|
||||||
k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?Hh(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],l=g[f++],m=g[f++];if(h>=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+
|
k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.b.length&&6<=e.length?Hh(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.f&&e[1]!=this.f&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.f+")",b=-2));for(this.b.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],l=g[f++],m=g[f++];if(h>=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+
|
||||||
b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;l<e;)h.data[l++]=h.pattern;l=0;h.Wa=e;for(h.Ma=f.length;e<g;)h.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ta+": "+c);return b};
|
b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;l<e;)h.data[l++]=h.pattern;l=0;h.Wa=e;for(h.Ma=f.length;e<g;)h.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ta+": "+c);return b};
|
||||||
k.toJSON=function(){var a;a=0;for(var b;b=Nh(this,a++);)Qh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
k.toJSON=function(){var a;a=0;for(var b;b=Nh(this,a++);)Qh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.J=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
function Qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.I=a.autoMount||{};this.F=0;this.g=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype;
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Rh(d,a)},!0;case "loadDrive":return this.D[b]=
|
k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Rh(d,a)},!0;case "loadDrive":return this.D[b]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&Sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.J){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.tc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.J)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&Sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Sh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Sh(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Th(this);this.O=Mc(144,5,65536);Jb(b,this,Uh);Lb(b,this.reset.bind(this));Vh(this,"None","",!0);this.J&&Vh(this,"Local Disk","?");Vh(this,"Remote Disk","??");Wh(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.I[e]=a[e]);Th(this);this.Sb=Mc(144,5,65536);Jb(b,this,Uh);Lb(b,this.reset.bind(this));Vh(this,"None","",!0);this.K&&Vh(this,"Local Disk","?");Vh(this,"Remote Disk","??");Wh(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;a<this.g.length;a++)Xh(this,a,!0);Wh(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Rh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Th(this)};k.save=function(){return(new S(this)).data()};
|
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;a<this.g.length;a++)Xh(this,a,!0);Wh(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Rh(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){Th(this)};k.save=function(){return(new S(this)).data()};
|
||||||
k.restore=function(a){return Th(this,a[0])};function Wh(a,b){b||(a.F=0);for(var c in a.I){var d=a.I[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!Yh(a,g,f,e,!0)&&b&&J(a,!1);continue}a.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.F}
|
k.restore=function(a){return Th(this,a[0])};function Wh(a,b){b||(a.F=0);for(var c in a.I){var d=a.I[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!Yh(a,g,f,e,!0)&&b&&J(a,!1);continue}a.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.F}
|
||||||
function Sh(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Yh(a,e,b,c,!1,d)}else Xh(a,e)}
|
function Sh(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}Yh(a,e,b,c,!1,d)}else Xh(a,e)}
|
||||||
function Yh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Xh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.$c)&&g++));return g}
|
function Yh(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,Xh(a,b,!0),h.yb?a.N("RK11 busy"):(h.yb=!0,e&&(h.xb=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.ad)&&g++));return g}
|
||||||
k.$c=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Rh(this,a.zb)};
|
k.ad=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.F||J(this));Rh(this,a.zb)};
|
||||||
function Vh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function Vh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Rh(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ab?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Xh(a,b,c){var d=a.g[b];if(d.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RK"+b+" unloaded",c),Rh(a,b))}
|
function Rh(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ab?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Xh(a,b,c){var d=a.g[b];if(d.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RK"+b+" unloaded",c),Rh(a,b))}
|
||||||
function Th(a,b){var c=0;b||(b=[]);a.L=b[c++]||2496;a.A=b[c++]||0;a.M=b[c++]||128;a.H=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.R=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.ab=!1;d.name=c.eb;d.la=203;d.ra=2;d.ia=12;d.ya=512;d.ac=!0;d.pd=0;d.nd=0;d.lc=1;d.Hc=d.ia;d.qc=d.ya;d.wd=0;d.Fe=null;d.Z||(d.La="");d.status=2496}return!0}
|
function Th(a,b){var c=0;b||(b=[]);a.L=b[c++]||2496;a.A=b[c++]||0;a.M=b[c++]||128;a.H=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.O=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.ab=!1;d.name=c.eb;d.la=203;d.ra=2;d.ia=12;d.ya=512;d.bc=!0;d.qd=0;d.od=0;d.mc=1;d.Ic=d.ia;d.rc=d.ya;d.xd=0;d.Ge=null;d.Z||(d.La="");d.status=2496}return!0}
|
||||||
k.Zc=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.H=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.ad=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=32;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
|
k.$c=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.H=65536-e&65535;a&&(this.A=this.A|a|32768,this.M|=49152);return!0};k.bd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=4096;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=32;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=1024;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};
|
||||||
k.bd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=32;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.he=function(){return this.L};k.ff=function(){};k.ie=function(){return this.A};k.gf=function(){};k.ee=function(){return this.M&61438};
|
k.cd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=128,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=1024;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=4096;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=32;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=64;break}}return g(h,b,c,d,e,f)};k.ie=function(){return this.L};k.ff=function(){};k.je=function(){return this.A};k.gf=function(){};k.fe=function(){return this.M&61438};
|
||||||
k.cf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.ad;case 2:b||(b=this.bd),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.H&65535,c=b.call(this,d,e,f,g,c,h,this.Zc.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
k.cf=function(a){this.M=this.M&-3968|a&3967;if(this.M&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.g[a],e,f,g,h;this.M&=-129;switch(this.M&14){case 0:this.L=d.status;this.A=0;this.M=128;this.f=0;break;case 4:b=this.bd;case 2:b||(b=this.cd),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.la?(this.A|=32832,this.M|=49152):g>=d.ia?(this.A|=32800,this.M|=49152):(h=(this.M&48)<<12|this.w,c=65536-this.H&65535,c=b.call(this,d,e,f,g,c,h,this.$c.bind(this)))}this.L=d.status|a<<13|this.f%9&15;c&&(this.M&=
|
||||||
-2,this.M|=128,this.M&64&&Kc(this.b,this.O))}};k.je=function(){return this.H};k.hf=function(a){this.H=a};k.de=function(){return this.w};k.bf=function(a){this.w=a};k.fe=function(){return this.f};k.df=function(a){this.f=a};k.ge=function(){return this.R};k.ef=function(a){this.R=a};
|
-2,this.M|=128,this.M&64&&Kc(this.b,this.Sb))}};k.ke=function(){return this.H};k.hf=function(a){this.H=a};k.ee=function(){return this.w};k.bf=function(a){this.w=a};k.ge=function(){return this.f};k.df=function(a){this.f=a};k.he=function(){return this.O};k.ef=function(a){this.O=a};
|
||||||
var Zh={},Uh=(Zh[65280]=[null,null,Q.prototype.he,Q.prototype.ff,"RKDS"],Zh[65282]=[null,null,Q.prototype.ie,Q.prototype.gf,"RKER"],Zh[65284]=[null,null,Q.prototype.ee,Q.prototype.cf,"RKCS"],Zh[65286]=[null,null,Q.prototype.je,Q.prototype.hf,"RKWC"],Zh[65288]=[null,null,Q.prototype.de,Q.prototype.bf,"RKBA"],Zh[65290]=[null,null,Q.prototype.fe,Q.prototype.df,"RKDA"],Zh[65294]=[null,null,Q.prototype.ge,Q.prototype.ef,"RKDB"],Zh);
|
var Zh={},Uh=(Zh[65280]=[null,null,Q.prototype.ie,Q.prototype.ff,"RKDS"],Zh[65282]=[null,null,Q.prototype.je,Q.prototype.gf,"RKER"],Zh[65284]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKCS"],Zh[65286]=[null,null,Q.prototype.ke,Q.prototype.hf,"RKWC"],Zh[65288]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKBA"],Zh[65290]=[null,null,Q.prototype.ge,Q.prototype.df,"RKDA"],Zh[65294]=[null,null,Q.prototype.he,Q.prototype.ef,"RKDB"],Zh);
|
||||||
function P(a){x.call(this,"RL11",a,P,131072);this.J=a.autoMount||{};this.H=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
|
function P(a){x.call(this,"RL11",a,P,131072);this.K=a.autoMount||{};this.H=0;this.g=Array(4);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype;
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&$h(d,a)},!0;case "loadDrive":return this.D[b]=
|
k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&$h(d,a)},!0;case "loadDrive":return this.D[b]=
|
||||||
c,c.onclick=function(){var a=d.D.listDisks;a&&ai(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.tc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.D.listDisks;a&&ai(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Z)?(a=Na(Ph(a),a.uc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ai(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ai(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);bi(this);this.O=Mc(112,5,131072);Jb(b,this,ci);Lb(b,this.reset.bind(this));di(this,"None","",!0);this.L&&di(this,"Local Disk","?");di(this,"Remote Disk","??");ei(this)||J(this)};
|
k.Ha=function(a,b,c,d){this.B=a;this.v=b;this.b=c;this.j=d;if((a=xd(this.B,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);bi(this);this.Sb=Mc(112,5,131072);Jb(b,this,ci);Lb(b,this.reset.bind(this));di(this,"None","",!0);this.L&&di(this,"Local Disk","?");di(this,"Remote Disk","??");ei(this)||J(this)};
|
||||||
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.pc){for(a=0;a<this.g.length;a++)fi(this,a,!0);ei(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";$h(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){bi(this)};k.save=function(){return(new S(this)).data()};
|
k.Ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.qc){for(a=0;a<this.g.length;a++)fi(this,a,!0);ei(this,!0)}}else if(!this.restore(a))return!1;if(a=this.D.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";$h(this,0)}}return!0};k.Ja=function(a){return a?this.save():!0};k.reset=function(){bi(this)};k.save=function(){return(new S(this)).data()};
|
||||||
k.restore=function(a){return bi(this,a[0])};function ei(a,b){b||(a.H=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!gi(a,g,f,e,!0)&&b&&J(a,!1);continue}a.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.H}
|
k.restore=function(a){return bi(this,a[0])};function ei(a,b){b||(a.H=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.value==e){f=h.text;break a}}f=u(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.g.length)){!gi(a,g,f,e,!0)&&b&&J(a,!1);continue}a.N("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.H}
|
||||||
function ai(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}gi(a,e,b,c,!1,d)}else fi(a,e)}
|
function ai(a,b,c,d){var e=a.D.listDrives,e=e&&ma(e.value,10);if(void 0===e||0>e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}gi(a,e,b,c,!1,d)}else fi(a,e)}
|
||||||
function gi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,fi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.dd)&&g++));return g}
|
function gi(a,b,c,d,e,f){var g=-1,h=a.g[b];h.La.toLowerCase()!=d.toLowerCase()&&(g++,fi(a,b,!0),h.yb?a.N("RL11 busy"):(h.yb=!0,e&&(h.xb=!0,a.H++,I(a)&&G(a,"auto-loading disk: "+c)),h.ab=!!f,Jh(new Fh(a,h,"preload"),c,d,f,a.ed)&&g++));return g}
|
||||||
k.dd=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));$h(this,a.zb)};
|
k.ed=function(a,b,c,d,e){var f;a.yb=!1;b&&(f=Mh(b),b&&f[0]>a.la||f[1]>a.ra)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.Z=b,a.Ta=c,a.La=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.xb||e),this.B&&this.B.mb()):a.ab=!1;a.xb&&(a.xb=!1,--this.H||J(this));$h(this,a.zb)};
|
||||||
function di(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function di(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function $h(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ab?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function fi(a,b,c){var d=a.g[b];if(d.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RL"+b+" unloaded",c),$h(a,b))}
|
function $h(a,b){if(0<=b&&b<a.g.length){var c=a.g[b],d=a.D.listDisks;a=a.D.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ab?"?":c.La,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function fi(a,b,c){var d=a.g[b];if(d.Z||!1===c)d.Ta="",d.La="",d.Z=null,d.ab=!1,c||(a.N("Drive RL"+b+" unloaded",c),$h(a,b))}
|
||||||
function bi(a,b){var c=0;b||(b=[]);a.M=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.A=b[c++]||0;a.F=b[c++]||0;a.I=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.ab=!1;d.name=c.eb;d.la=512;d.ra=2;d.ia=40;d.ya=256;d.ac=!0;d.pd=0;d.nd=0;d.lc=1;d.Hc=d.ia;d.qc=d.ya;d.wd=0;d.Fe=null;d.Z||(d.La="");d.status=29|(512==d.la?128:0)}return!0}
|
function bi(a,b){var c=0;b||(b=[]);a.M=b[c++]||0;a.w=b[c++]||0;a.f=b[c++]||0;a.A=b[c++]||0;a.F=b[c++]||0;a.I=b[c]||0;for(b=0;b<a.g.length;b++){var d=a.g[b];void 0===d&&(d=a.g[b]={});c=a;d.zb=b;d.yb=d.ab=!1;d.name=c.eb;d.la=512;d.ra=2;d.ia=40;d.ya=256;d.bc=!0;d.qd=0;d.od=0;d.mc=1;d.Ic=d.ia;d.rc=d.ya;d.xd=0;d.Ge=null;d.Z||(d.La="");d.status=29|(512==d.la?128:0)}return!0}
|
||||||
k.cd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.I=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
|
k.dd=function(a,b,c,d,e,f){this.w=f&65535;this.M=this.M&-49|f>>12&48;this.I=f>>16&63;this.A=this.f=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.M=this.M|a|32768);return!0};
|
||||||
k.ed=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=5120;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
|
k.fd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Z.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Z.read(m,n++))||0>(t=a.Z.read(m,n++))){h=5120;break}this.v.nb(f,r|t<<8);if(Ic(this.v)){h=8192;break}f+=2;if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};
|
||||||
k.fd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=5120;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.me=function(){return this.M&65535};
|
k.gd=function(a,b,c,d,e,f,g){var h=0,l=a.Z,m=null,n;l||(h=5120,e=0);for(;e--;){var r=this.v.Va(f);if(Ic(this.v)){h=8192;break}f+=2;if(!m){m=a.Z.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Z.write(m,n++,r&255)||!a.Z.write(m,n++,r>>8)){h=5120;break}if(n>=l.ya&&(m=null,++d>=l.ia&&(d=0,++c>=l.ra&&(c=0,++b>=l.la)))){h=5120;break}}return g(h,b,c,d,e,f)};k.ne=function(){return this.M&65535};
|
||||||
k.lf=function(a){this.M=this.M&-1023|a&1022;this.R=this.R&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.F=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.F=this.A;break;case 12:b=this.ed;case 10:b||(b=this.fd),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.I&
|
k.lf=function(a){this.M=this.M&-1023|a&1022;this.O=this.O&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.g[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.f&8&&(this.M&=63);this.F=c.status|this.A&64;break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.A=this.f&4?this.A+b:this.A-b,this.f=this.A=this.A&65408|c);break;case 8:this.F=this.A;break;case 12:b=this.fd;case 10:b||(b=this.gd),d=this.f>>7,e=this.f&64?1:0,f=this.f&63,d>=c.la||f>=c.ia?this.M|=37888:(g=(this.I&
|
||||||
63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.cd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.O))}};k.ke=function(){return this.w};k.jf=function(a){this.w=a&65534};k.ne=function(){return this.f};k.mf=function(a){this.f=a};k.oe=function(){return this.F};k.nf=function(a){this.F=a};k.le=function(){return this.I};k.kf=function(a){this.I=a&63};
|
63)<<16|this.w,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.dd.bind(this)))}a&&(this.M|=129,this.M&64&&Kc(this.b,this.Sb))}};k.le=function(){return this.w};k.jf=function(a){this.w=a&65534};k.oe=function(){return this.f};k.mf=function(a){this.f=a};k.pe=function(){return this.F};k.nf=function(a){this.F=a};k.me=function(){return this.I};k.kf=function(a){this.I=a&63};
|
||||||
var hi={},ci=(hi[63744]=[null,null,P.prototype.me,P.prototype.lf,"RLCS"],hi[63746]=[null,null,P.prototype.ke,P.prototype.jf,"RLBA"],hi[63748]=[null,null,P.prototype.ne,P.prototype.mf,"RLDA"],hi[63750]=[null,null,P.prototype.oe,P.prototype.nf,"RLMP"],hi[63752]=[null,null,P.prototype.le,P.prototype.kf,"RLBE"],hi);function ii(a){x.call(this,"Debugger",a,ii);this.ga=a.base||16;this.Ga=!1;this.J=0;this.U=!1;this.A=-1;this.g=[];this.ba={}}B(ii);
|
var hi={},ci=(hi[63744]=[null,null,P.prototype.ne,P.prototype.lf,"RLCS"],hi[63746]=[null,null,P.prototype.le,P.prototype.jf,"RLBA"],hi[63748]=[null,null,P.prototype.oe,P.prototype.mf,"RLDA"],hi[63750]=[null,null,P.prototype.pe,P.prototype.nf,"RLMP"],hi[63752]=[null,null,P.prototype.me,P.prototype.kf,"RLBE"],hi);function ii(a){x.call(this,"Debugger",a,ii);this.oa=a.base||16;this.Ga=!1;this.K=0;this.U=!1;this.A=-1;this.g=[];this.fa={}}B(ii);
|
||||||
var ji={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ii.prototype.Lc=function(){return-1};ii.prototype.Mc=function(){};
|
var ji={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ii.prototype.Mc=function(){return-1};ii.prototype.Nc=function(){};
|
||||||
function ki(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a}
|
function ki(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.U?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a}
|
||||||
function li(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
function li(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
||||||
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
|
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
|
||||||
function mi(a,b,c){var d;if(b){b=ni(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<m.length;){var n=m[e++],r=n.length,n=ya(n);if(!n){f=!0;break}n=oi(a,n,null,!1===c);if(void 0===n){f=!0;c=!1;break}h.push(n);if(e==m.length)break;var n=m[e++],t=n.length;l.length&&ji[n]<ji[l[l.length-1]]&&li(h,l,1);l.push(n);b=b.substr(r+t)}li(h,l)&&1==h.length||(f=!0);f?c&&a.i("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&pi(a,null,
|
function mi(a,b,c){var d;if(b){b=ni(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<m.length;){var n=m[e++],r=n.length,n=ya(n);if(!n){f=!0;break}n=oi(a,n,null,!1===c);if(void 0===n){f=!0;c=!1;break}h.push(n);if(e==m.length)break;var n=m[e++],t=n.length;l.length&&ji[n]<ji[l[l.length-1]]&&li(h,l,1);l.push(n);b=b.substr(r+t)}li(h,l)&&1==h.length||(f=!0);f?c&&a.i("error parsing '"+g+"' at character "+(g.length-b.length)):(d=h.pop(),c&&pi(a,null,
|
||||||
d))}return d}function ni(a,b){for(var c,d=a.Ga?"(":"{",e=a.Ga?")":"}",f=new RegExp(a.Ga?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=mi(a,c[1]);b=b.replace(d+c[1]+e,null!=g?L(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(a=b;b=a.match(/\$([a-z]+)/i);){c=null;switch(b[1].toLowerCase()){case "ops":c=0}if(null==c)break;a=a.replace(b[0],c.toString())}return a}
|
d))}return d}function ni(a,b){for(var c,d=a.Ga?"(":"{",e=a.Ga?")":"}",f=new RegExp(a.Ga?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=mi(a,c[1]);b=b.replace(d+c[1]+e,null!=g?L(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(a=b;b=a.match(/\$([a-z]+)/i);){c=null;switch(b[1].toLowerCase()){case "ops":c=0}if(null==c)break;a=a.replace(b[0],c.toString())}return a}
|
||||||
function oi(a,b,c,d){var e;null!=b?(e=a.Lc(b),0<=e?e=a.Mc(e):(e=a.ba[b],null==e&&(e=ma(b,a.ga))),null!=e||d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return e}
|
function oi(a,b,c,d){var e;null!=b?(e=a.Mc(b),0<=e?e=a.Nc(e):(e=a.fa[b],null==e&&(e=ma(b,a.oa))),null!=e||d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return e}
|
||||||
function pi(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var l=d&255,m=8,n="";m?32<m&&(m=32):m=32;if(null==l||isNaN(l))for(;0<m--;)n="?"+n;else for(;0<m--;)n=(l&1?"1":"0")+n,l>>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function qi(a,b){if(b)return pi(a,b,a.ba[b]);var c=0;for(b in a.ba)pi(a,b,a.ba[b]),c++;return 0<c}
|
function pi(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var h=0;h<f;h++){g&&(g=","+g);var l=d&255,m=8,n="";m?32<m&&(m=32):m=32;if(null==l||isNaN(l))for(;0<m--;)n="?"+n;else for(;0<m--;)n=(l&1?"1":"0")+n,l>>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function qi(a,b){if(b)return pi(a,b,a.fa[b]);var c=0;for(b in a.fa)pi(a,b,a.fa[b]),c++;return 0<c}
|
||||||
function L(a,b,c,d){switch(a.ga){case 8:a=na(b,3*c-(2<c?1:0));break;case 10:a=b.toString();break;default:a=p(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d}
|
function L(a,b,c,d){switch(a.oa){case 8:a=na(b,3*c-(2<c?1:0));break;case 10:a=b.toString();break;default:a=p(b,2*c)}d?d=a.replace(/^0+([0-9A-F]+)$/i,"$1"):d=a;return d}
|
||||||
function ri(a){ii.call(this,a);this.rb=!1;this.Ga=!0;this.L=Y(0);this.qb=Y(0);this.T=Y(0);this.I=[];this.f=this.O=this.F=[];si(this);this.Da=0;ti(this);this.Pa={};ui(this,a.messages);this.Ya=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Bd(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Bd(b,a)})}B(ri,ii);
|
function ri(a){ii.call(this,a);this.rb=!1;this.Ga=!0;this.L=Y(0);this.qb=Y(0);this.T=Y(0);this.I=[];this.f=this.O=this.F=[];si(this);this.Ca=0;ti(this);this.Pa={};ui(this,a.messages);this.Ya=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Bd(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Bd(b,a)})}B(ri,ii);
|
||||||
var vi={"?":"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"},wi=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
|
var vi={"?":"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"},wi=".WORD ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
|
||||||
xi={SP:6,PC:7,PS:20,IR:21,ER:22,SL:23,MMR0:24,MMR1:25,MMR2:26,MMR3:27,AR:28,DR:29,SR:30},yi={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],
|
xi={SP:6,PC:7,PS:20,IR:21,ER:22,SL:23,MMR0:24,MMR1:25,MMR2:26,MMR3:27,AR:28,DR:29,SR:30},yi={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],
|
||||||
768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],
|
768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],
|
||||||
35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],
|
35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],
|
||||||
183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},zi=[0],Ai=[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=ri.prototype;
|
183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},zi=[0],Ai=[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=ri.prototype;
|
||||||
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.w=a.w;(a=xd(a,"messages"))&&ui(this,a);this.ub=yi;this.Nb=1145>this.b.ib?Ai:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Bi(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
|
k.Ha=function(a,b,c,d){this.v=b;this.B=a;this.b=c;this.w=a.w;(a=xd(a,"messages"))&&ui(this,a);this.ub=yi;this.Ob=1145>this.b.ib?Ai:[];Oc(this,16,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.da(Bi(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.v.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Ec[c],n&&d.i(p(n.id,8)+" %"+
|
||||||
p(e<<d.v.na,8)+" %%"+p(n.G,8)+" "+q(n.Yb)+" "+q(n.size)+" "+m),c!=jd&&(c=-1),m=0);a+=d.v.Ia;e++}}});J(this)};
|
p(e<<d.v.na,8)+" %%"+p(n.G,8)+" "+q(n.Zb)+" "+q(n.size)+" "+m),c!=jd&&(c=-1),m=0);a+=d.v.Ia;e++}}});J(this)};
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case "debugInput":return this.xa=this.D[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Bd(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.g.length-1&&(b=d.g[++d.A])):40==a.keyCode&&(0<d.A?b=d.g[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.D[b]=c,Pa(c,function(){if(d.xa){var a=d.xa.value;
|
k.va=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Ea=this.D[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Bd(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.g.length-1&&(b=d.g[++d.A])):40==a.keyCode&&(0<d.A?b=d.g[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.D[b]=c,Pa(c,function(){if(d.Ea){var a=d.Ea.value;
|
||||||
d.xa.value="";Bd(d,a,!0);return!0}return!1}),!0;case "step":return this.D[b]=c,Pa(c,function(a){var b=!1;xb(d,!0)||(pb(d,!0),b=d.pb(a?1:0,null),pb(d,!1));return b}),!0}return!1};k.mb=function(a){if(this.xa){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.xa.focus();!a&&window&&window.scrollTo(b,c)}};k.da=function(a){a=a&&a.G;null==a&&(a=-1);return a};k.cc=function(a,b){var c=255,d=this.da(a,!1,1);-1!==d&&(c=a.$b?this.v.dc(d):this.b.dc(d),b&&Ci(a,b));return c};
|
d.Ea.value="";Bd(d,a,!0);return!0}return!1}),!0;case "step":return this.D[b]=c,Pa(c,function(a){var b=!1;xb(d,!0)||(pb(d,!0),b=d.pb(a?1:0,null),pb(d,!1));return b}),!0}return!1};k.mb=function(a){if(this.Ea){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Ea.focus();!a&&window&&window.scrollTo(b,c)}};k.da=function(a){a=a&&a.G;null==a&&(a=-1);return a};k.dc=function(a,b){var c=255,d=this.da(a,!1,1);-1!==d&&(c=a.ac?this.v.ec(d):this.b.ec(d),b&&Ci(a,b));return c};
|
||||||
k.sa=function(a,b){var c=65535,d=this.da(a,!1,2);-1!==d&&(c=a.$b?this.v.Va(d):this.b.Va(d),b&&Ci(a,b));return c};k.Kb=function(a,b,c){var d=this.da(a,!0,1);-1!==d&&(a.$b?this.v.Cb(d,b):this.b.Cb(d,b),c&&Ci(a,c),this.B.wa(-1))};k.Db=function(a,b,c){var d=this.da(a,!0,2);-1!==d&&(a.$b?this.v.nb(d,b):this.b.nb(d,b),c&&Ci(a,c),this.B.wa(-1))};function Y(a,b){return{G:a,$b:b,Ua:!1}}k.uc=function(a,b){a.G=b;a.Ua=!1;return a};function Di(a){return[a.G,a.Ua]}function Ei(a){return{G:a[0],Ua:a[1]}}
|
k.ta=function(a,b){var c=65535,d=this.da(a,!1,2);-1!==d&&(c=a.ac?this.v.Va(d):this.b.Va(d),b&&Ci(a,b));return c};k.Lb=function(a,b,c){var d=this.da(a,!0,1);-1!==d&&(a.ac?this.v.Cb(d,b):this.b.Cb(d,b),c&&Ci(a,c),this.B.xa(-1))};k.Db=function(a,b,c){var d=this.da(a,!0,2);-1!==d&&(a.ac?this.v.nb(d,b):this.b.nb(d,b),c&&Ci(a,c),this.B.xa(-1))};function Y(a,b){return{G:a,ac:b,Ua:!1}}k.vc=function(a,b){a.G=b;a.Ua=!1;return a};function Di(a){return[a.G,a.Ua]}function Ei(a){return{G:a[0],Ua:a[1]}}
|
||||||
function Bi(a,b,c){var d,e=(c?a.L:a.qb).G;c=!1;if(void 0!==b){b=ni(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.I.length;e++){var g=a.I[e].ja[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Y(d));break}}if(d=f)return d;e=mi(a,b,void 0)}null!=e&&(d=Y(e,c));return d}function Fi(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.kd=ki(a,b.Sc=c[2]))}function Ci(a,b){null!=a.G&&(a.G+=b||1)}
|
function Bi(a,b,c){var d,e=(c?a.L:a.qb).G;c=!1;if(void 0!==b){b=ni(a,b);"%"==b.charAt(0)&&(c=!0,b=b.substr(1));d=b;var f;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),e=0;e<a.I.length;e++){var g=a.I[e].ja[d];if(void 0!==g){d=g.o;void 0!==d&&(f=Y(d));break}}if(d=f)return d;e=mi(a,b,void 0)}null!=e&&(d=Y(e,c));return d}function Fi(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.ld=ki(a,b.Tc=c[2]))}function Ci(a,b){null!=a.G&&(a.G+=b||1)}
|
||||||
function ui(a,b){a.j=a;a.pa=a.qd=536870912;a.oa=null;a.Ea=[];b=ki(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Db){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.pa|=Db[c],a.i(c+" messages enabled"))}}function Oc(a,b,c){for(var d in Db)if(b==Db[d]){a.Pa[d]=c;break}}
|
function ui(a,b){a.j=a;a.pa=a.rd=536870912;a.sa=null;a.ba=[];b=ki(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Db){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.pa|=Db[c],a.i(c+" messages enabled"))}}function Oc(a,b,c){for(var d in Db)if(b==Db[d]){a.Pa[d]=c;break}}
|
||||||
k.Lc=function(a){a=a.toUpperCase();var b=xi[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function Gi(a){return 6>a?"R"+a:6==a?"SP":"PC"}
|
k.Mc=function(a){a=a.toUpperCase();var b=xi[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function Gi(a){return 6>a?"R"+a:6==a?"SP":"PC"}
|
||||||
k.Mc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=cd(this.b);break;case 21:b=c.Wb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Pc(c);break;case 25:b=Zc(c);break;case 26:b=$c(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b};
|
k.Nc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.cb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=cd(this.b);break;case 21:b=c.Kb;break;case 22:b=c.Ba;break;case 23:b=c.lb;break;case 24:b=Pc(c);break;case 25:b=Zc(c);break;case 26:b=$c(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.Bb);break;case 30:d&&nc(d)&&(b=d.bb)}}return b};
|
||||||
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ta&65535).G));if(this.pa&1073741824)this.Ea.push(a);else if(!this.oa||a!=this.oa){this.oa=a;var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||xb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Fd(a),a.Fa=0,a.wa())}};
|
k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).G));if(!this.sa||a!=this.sa)if(this.sa=a,this.pa&1073741824)this.ba.push(a);else{var c;if(this.pa&-2147483648&&this.b&&(c=this.b.C.X)||xb(this,!0))this.ea(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Fd(a),a.Fa=0,a.xa())}};
|
||||||
function ti(a){var b;if(!Ie(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.fa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b<a.H.length;b++)a.H[b]=Y();a.fa=0;a.i("instruction history buffer allocated")}}k.ob=function(a,b){if(!Hi(this,b))return!1;this.b.ob(a);return!0};
|
function ti(a){var b;if(!He(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ga=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b<a.H.length;b++)a.H[b]=Y();a.ga=0;a.i("instruction history buffer allocated")}}k.ob=function(a,b){if(!Hi(this,b))return!1;this.b.ob(a);return!0};
|
||||||
k.pb=function(a,b,c){if(!Hi(this))return!1;null===b&&(b=!this.vb||"tr"==this.vb);this.J=0;a||Ie(this)&&Je(this,this.b.u[7],0);try{a=Gd(this.b,a);var d=this.b.pb(a);0<d&&(Tb(this.b,d),this.J+=d,Ub(this.b,d,!0),Vb(this.b,d),this.Fa++)}catch(e){"number"!=typeof e&&(this.J=0,Ab(this.b,e.stack||e.message))}!1!==c&&(this.w&&this.w.stop&&this.w.stop(),this.B.wa(-1));Ad(this,b||!1);return 0<this.J};k.ea=function(a){this.b&&this.b.ea(a)};
|
k.pb=function(a,b,c){if(!Hi(this))return!1;null===b&&(b=!this.vb||"tr"==this.vb);this.K=0;a||He(this)&&Ie(this,this.b.u[7],0);try{a=Gd(this.b,a);var d=this.b.pb(a);0<d&&(Tb(this.b,d),this.K+=d,Ub(this.b,d,!0),Vb(this.b,d),this.Fa++)}catch(e){"number"!=typeof e&&(this.K=0,Ab(this.b,e.stack||e.message))}!1!==c&&(this.w&&this.w.stop&&this.w.stop(),this.B.xa(-1));Ad(this,b||!1);return 0<this.K};k.ea=function(a){this.b&&this.b.ea(a)};
|
||||||
function Ad(a,b){if(a.rb){void 0===b&&(b=!0);var c;c=a.b;if(c=c.K&8?c.ld|c.Wc<<8:0){var d=c>>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.R?Ii(a):Ji(a)}}function Hi(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
function Ad(a,b){if(a.rb){void 0===b&&(b=!0);var c;c=a.b;if(c=c.J&8?c.md|c.Xc<<8:0){var d=c>>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.S?Ii(a):Ji(a)}}function Hi(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.X?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
||||||
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ti(this);this.Fa=0;this.oa=null;this.J=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ki(this);a||Ad(this)};k.save=function(){var a=new S(this);a.set(0,Di(this.L));a.set(1,Di(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.I);return a.data()};
|
k.Ja=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){ti(this);this.Fa=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.X=!1;Ki(this);a||Ad(this)};k.save=function(){var a=new S(this);a.set(0,Di(this.L));a.set(1,Di(this.T));a.set(2,[this.g,this.U,this.pa]);a.set(3,this.I);return a.data()};
|
||||||
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Ei(a[b++]),this.T=Ei(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.X=!0;this.Ob=a;this.Pb=b};
|
k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Ei(a[b++]),this.T=Ei(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.U=a[b][1],this.pa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.S||this.i("running");this.C.X=!0;this.Pb=a;this.Qb=b};
|
||||||
k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.J=b-this.Pb;if(!this.R){b="stopped";if(this.J){a-=this.Ob;var c=0<a?Math.round(1E3*this.J/a):0;b+=" (";Ie(this)&&(b+=this.Fa+" instructions, ",this.Fa=0);b+=this.J+" cycles, "+a+" ms, "+c+" hz)"}else I(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.i(b)}Ad(this,!0);this.mb();Ki(this,this.b.u[7]);this.oa=null}};function Ie(a){return 1<a.f.length||!!a.Da}
|
k.stop=function(a,b){if(this.C.X){this.C.X=!1;this.K=b-this.Qb;if(!this.S){b="stopped";if(this.K){a-=this.Pb;var c=0<a?Math.round(1E3*this.K/a):0;b+=" (";He(this)&&(b+=this.Fa+" instructions, ",this.Fa=0);b+=this.K+" cycles, "+a+" ms, "+c+" hz)"}else I(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.i(b)}Ad(this,!0);this.mb();Ki(this,this.b.u[7]);this.sa=null}};function He(a){return 1<a.f.length||!!a.Ca}
|
||||||
function Je(a,b,c){var d=-1;c||(d=a.b.Va(b),0==d&&(b=Rd(a.b,2)));if(0<c&&(a.Da&&!--a.Da||sd(a,b,1,a.f)))return!0;0<=c&&a.H.length&&(a.Fa++,0>d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.uc(a.H[a.fa],b),++a.fa==a.H.length&&(a.fa=0)));return!1}function Pf(a){var b=a.b;if(b.C.X)throw T(b,a.b.ta&65535),a.ea(),-1;return!1}
|
function Ie(a,b,c){var d=-1;c||(d=a.b.Va(b),0==d&&(b=Rd(a.b,2)));if(0<c&&(a.Ca&&!--a.Ca||sd(a,b,1,a.f)))return!0;0<=c&&a.H.length&&(a.Fa++,0>d&&(d=a.b.Va(b)),65535!=(d&65535)&&(a.vc(a.H[a.ga],b),++a.ga==a.H.length&&(a.ga=0)));return!1}function Of(a){var b=a.b;if(b.C.X)throw T(b,a.b.ua&65535),a.ea(),-1;return!1}
|
||||||
function si(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b<a.O.length;b++){c=a.O[b];var d=a.v;c=a.da(c);td(d.Y[c>>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b<a.F.length;b++)c=a.F[b],d=a.v,c=a.da(c),td(d.Y[c>>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Li(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Mi(this,a,a.length-1,"set"),ti(this)));return d};
|
function si(a){var b,c;a.f=["bp"];if(a.O)for(b=1;b<a.O.length;b++){c=a.O[b];var d=a.v;c=a.da(c);td(d.Y[c>>>d.na],!1)}a.O=["br"];if(a.F)for(b=1;b<a.F.length;b++)c=a.F[b],d=a.v,c=a.da(c),td(d.Y[c>>>d.na],!0);a.F=["bw"];a.sb=0}k.wb=function(a,b,c){var d=!0;c||Li(this,a,b,!1,!0);if(a!=this.f){var e=this.da(b);if(-1===e)this.i("invalid address: "+L(this,b.G)),d=!1;else{var f=this.v;f.Y[e>>>f.na].wb(e&f.v,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Mi(this,a,a.length-1,"set"),ti(this)));return d};
|
||||||
function Li(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.da(h)&&(!d||h.Ua)){f=!0;h.Ua||e||Mi(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.v,td(d.Y[c>>>d.na],b==a.F));h.Ua||ti(a);break}}return f}function Ni(a,b){for(var c=1;c<b.length;c++)Mi(a,b,c);return b.length-1}function Mi(a,b,c,d){c=b[c];a.i(b[0]+" "+L(a,c.G)+(d?" "+d:c.Sc?' "'+c.Sc+'"':""))}
|
function Li(a,b,c,d,e){var f=!1;c=a.da(c);for(var g=1;g<b.length;g++){var h=b[g];if(c==a.da(h)&&(!d||h.Ua)){f=!0;h.Ua||e||Mi(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.v,td(d.Y[c>>>d.na],b==a.F));h.Ua||ti(a);break}}return f}function Ni(a,b){for(var c=1;c<b.length;c++)Mi(a,b,c);return b.length-1}function Mi(a,b,c,d){c=b[c];a.i(b[0]+" "+L(a,c.G)+(d?" "+d:c.Tc?' "'+c.Tc+'"':""))}
|
||||||
function Ki(a,b){if(void 0!==b)sd(a,b,1,a.f,!0),a.R=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ua){if(!Li(a,a.f,c,!0))break;b=0}}}
|
function Ki(a,b){if(void 0!==b)sd(a,b,1,a.f,!0),a.S=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.Ua){if(!Li(a,a.f,c,!0))break;b=0}}}
|
||||||
function sd(a,b,c,d,e){var f=!1;if(!a.sb++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ua)for(var l=a.da(h)&65535,m=0;m<c;m++)if(b+m==l){var n,f=!0;h.Ua&&(Li(a,d,h,!0),e=!0);if(n=h.kd){for(var f=!1,r=0;r<n.length;r++)if(!Oi(a,n[r],!0)){if(n[r].indexOf("if")){f=!0;break}for(var t=r+1;t<n.length&&n[t].indexOf("else");t++)r++;if(t==n.length){f=!0;break}}a.b.C.X||(f=!0)}if(f){e||Mi(a,d,g,"hit");break}}}a.sb--;return f}
|
function sd(a,b,c,d,e){var f=!1;if(!a.sb++)for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.Ua)for(var l=a.da(h)&65535,m=0;m<c;m++)if(b+m==l){var n,f=!0;h.Ua&&(Li(a,d,h,!0),e=!0);if(n=h.ld){for(var f=!1,r=0;r<n.length;r++)if(!Oi(a,n[r],!0)){if(n[r].indexOf("if")){f=!0;break}for(var t=r+1;t<n.length&&n[t].indexOf("else");t++)r++;if(t==n.length){f=!0;break}}a.b.C.X||(f=!0)}if(f){e||Mi(a,d,g,"hit");break}}}a.sb--;return f}
|
||||||
function Pi(a,b,c,d){var e=Y(b.G),f=a.sa(b,2),g,h;for(h in a.ub)if(g=a.ub[h][f&h])break;g||(g=zi);var l=g[0];0<=a.Nb.indexOf(l)&&(g=zi,l=g[0]);var m=h="",n=wi[l],r=g.length-1;l||r||(h=L(a,f));for(l=1;l<=r;l++){var t=g[l];if(void 0!==t){var v;v=a;var A=t,t=b,y="",C=A&61440;if(4096==C)t=t.G+((f&255)<<24>>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
|
function Pi(a,b,c,d){var e=Y(b.G),f=a.ta(b,2),g,h;for(h in a.ub)if(g=a.ub[h][f&h])break;g||(g=zi);var l=g[0];0<=a.Ob.indexOf(l)&&(g=zi,l=g[0]);var m=h="",n=wi[l],r=g.length-1;l||r||(h=L(a,f));for(l=1;l<=r;l++){var t=g[l];if(void 0!==t){var v;v=a;var A=t,t=b,y="",C=A&61440;if(4096==C)t=t.G+((f&255)<<24>>23)&65535,y=L(v,t);else if(8192==C)t=t.G-((f&63)<<1)&65535,y=L(v,t);else if(12288==C)y=L(v,f&7,1);else if(24576==C)y=L(v,f&63,1);else if(32768==C)y=L(v,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6),
|
||||||
A&63)switch(A=C&7,C&56){case 0:y=Gi(A);break;case 8:y="@"+Gi(A);break;case 16:7>A?y="("+Gi(A)+")+":(C=v.sa(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Gi(A)+")+":(C=v.sa(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Gi(A)+")";break;case 40:y="@-("+Gi(A)+")";break;case 48:C=v.sa(t,2);y=L(v,C,0,!0)+"("+Gi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.sa(t,2),y="@"+L(v,C)+"("+Gi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
|
A&63)switch(A=C&7,C&56){case 0:y=Gi(A);break;case 8:y="@"+Gi(A);break;case 16:7>A?y="("+Gi(A)+")+":(C=v.ta(t,2),y="#"+L(v,C,0,!0));break;case 24:7>A?y="@("+Gi(A)+")+":(C=v.ta(t,2),y="@#"+L(v,C,0,!0));break;case 32:y="-("+Gi(A)+")";break;case 40:y="@-("+Gi(A)+")";break;case 48:C=v.ta(t,2);y=L(v,C,0,!0)+"("+Gi(A)+")";7==A&&(y=L(v,C+t.G&65535));break;case 56:C=v.ta(t,2),y="@"+L(v,C)+"("+Gi(A)+")",7==A&&(y="@"+L(v,C+t.G&65535))}v=y;if(!v||!v.length){h="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);
|
||||||
0<h.length&&(h+=",");h+=v||"???"}}f="";g=L(a,e.G)+":";if(-1!==e.G&&-1!==b.G){do if(f+=" "+L(a,a.sa(e,2)),null==e.G)break;while(e.G!=b.G)}g+=xa(f,24);g+=xa(n,5);h&&(g+=" "+h);if(c||m)g=xa(g,60)+";"+(c||""),g=a.b.C.Fb?g+("cycles="+Cd(a.b).toString()+" cs="+p(a.b.Tb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Qi(a,b){switch(b){case "N":a=Pd(a.b);break;case "Z":a=Od(a.b);break;case "V":a=Nd(a.b);break;case "C":a=Md(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
0<h.length&&(h+=",");h+=v||"???"}}f="";g=L(a,e.G)+":";if(-1!==e.G&&-1!==b.G){do if(f+=" "+L(a,a.ta(e,2)),null==e.G)break;while(e.G!=b.G)}g+=xa(f,24);g+=xa(n,5);h&&(g+=" "+h);if(c||m)g=xa(g,60)+";"+(c||""),g=a.b.C.Fb?g+("cycles="+Cd(a.b).toString()+" cs="+p(a.b.Vb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Qi(a,b){switch(b){case "N":a=Pd(a.b);break;case "Z":a=Od(a.b);break;case "V":a=Nd(a.b);break;case "C":a=Md(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
||||||
function Z(a,b){var c="",d=a.b;if(8>b)c=Gi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,cd(d));break;case 21:c="IR="+L(a,d.Wb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Pc(d));break;case 25:c="MMR1="+L(a,Zc(d));break;case 26:c="MMR2="+L(a,$c(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&&
|
function Z(a,b){var c="",d=a.b;if(8>b)c=Gi(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.cb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,cd(d));break;case 21:c="IR="+L(a,d.Kb);break;case 22:c="ER="+L(a,d.Ba);break;case 23:c="SL="+L(a,d.lb);break;case 24:c="MMR0="+L(a,Pc(d));break;case 25:c="MMR1="+L(a,Zc(d));break;case 26:c="MMR2="+L(a,$c(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.w&&(c="AR="+L(a,a.w.Aa,3));break;case 29:a.w&&
|
||||||
(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Ri(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Qi(a,"T")+Qi(a,"N")+Qi(a,"Z")+Qi(a,"V")+Qi(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Ic=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
(c="DR="+L(a,a.w.Bb));break;case 30:a.w&&nc(a.w)&&(c="SR="+L(a,a.w.bb,3))}c&&(c+=" ");return c}function Ri(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Qi(a,"T")+Qi(a,"N")+Qi(a,"Z")+Qi(a,"V")+Qi(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Jc=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
||||||
function Pg(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=Aa(n,l,a.Ic);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({pg:b,G:c,xd:d,ja:e,Gc:f})}function Si(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.G>>>0,h=f.xd;if(e>=g&&e<g+h){e=Aa(f.Gc,[e-g],a.Ic);0<=e?Ti(a,b,e,d):c&&(e=~e,Ti(a,b,e-1,d),Ti(a,b,e,d));break}}return d}
|
function Og(a,b,c,d,e){var f=[],g;for(g in e){var h=e[g];"number"==typeof h&&(e[g]=h={o:h});var l=h.o,m=h.a;if(void 0!==l){var n=f,l=[l>>>0,g],r=Aa(n,l,a.Jc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({pg:b,G:c,yd:d,ja:e,Hc:f})}function Si(a,b,c){var d=[],e=a.da(b)>>>0;for(b=0;b<a.I.length;b++){var f=a.I[b],g=f.G>>>0,h=f.yd;if(e>=g&&e<g+h){e=Aa(f.Hc,[e-g],a.Jc);0<=e?Ti(a,b,e,d):c&&(e=~e,Ti(a,b,e-1,d),Ti(a,b,e,d));break}}return d}
|
||||||
function Ti(a,b,c,d){var e={},f=a.I[b].Gc,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.I[b].ja[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}function Ui(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return qi(a)||a.i("no variables"),!0;if(!c[2])return qi(a,c[1]);if(!c[3])return delete a.ba[c[1]],!0;b=mi(a,c[3]);return void 0!==b?(a.ba[c[1]]=b,!0):!1}a.i("invalid assignment:"+b);return!1}
|
function Ti(a,b,c,d){var e={},f=a.I[b].Hc,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.I[b].ja[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}function Ui(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return qi(a)||a.i("no variables"),!0;if(!c[2])return qi(a,c[1]);if(!c[3])return delete a.fa[c[1]],!0;b=mi(a,c[3]);return void 0!==b?(a.fa[c[1]]=b,!0):!1}a.i("invalid assignment:"+b);return!1}
|
||||||
function Vi(a,b,c){var d=null;if(b=Bi(a,b,!0)){a.da(b);var e=Si(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.G-e[1])&&(g=" + "+q(f)),f=e[0]+" ("+L(a,e[1])+")"+g,c&&a.i(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.G)&&(g=" - "+q(f)),f=e[4]+" ("+L(a,e[5])+")"+g,c&&a.i(f),d||(d=f))}else c&&a.i("no symbols")}return d}
|
function Vi(a,b,c){var d=null;if(b=Bi(a,b,!0)){a.da(b);var e=Si(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.G-e[1])&&(g=" + "+q(f)),f=e[0]+" ("+L(a,e[1])+")"+g,c&&a.i(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.G)&&(g=" - "+q(f)),f=e[4]+" ("+L(a,e[5])+")"+g,c&&a.i(f),d||(d=f))}else c&&a.i("no symbols")}return d}
|
||||||
function Ii(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trm\tdump misc registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.b;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.i("missing value for "+b[1]);return}g=mi(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.u[6]=g&65535;break;case "PC":case "R7":T(e,
|
function Ii(a,b){var c;if(b&&"?"==b[1])a.i("register commands:"),a.i("\tr\tdump registers"),a.i("\trm\tdump misc registers"),a.i("\trx [#]\tset flag or register x to [#]");else{var d=!1,e=a.b;null==c&&(c=!0);if(b&&1<b.length){var f=b[1];if("m"==f)d=!0;else{var g=f.indexOf("=");if(0<g)b=f.substr(g+1),f=f.substr(0,g);else if(2<b.length)b=b[2];else{a.i("missing value for "+b[1]);return}g=mi(a,b);if(void 0===g)return;b=f.toUpperCase();switch(b){case "SP":case "R6":e.u[6]=g&65535;break;case "PC":case "R7":T(e,
|
||||||
g);a.L=Y(e.u[7]);break;case "N":e.aa=g?32768:0;break;case "Z":e.ca=g?0:1;break;case "V":e.W=g?32768:0;break;case "C":e.V=g?65536:0;break;case "PS":dd(e,g);break;case "IR":bd(e,g);break;case "ER":e.Ba=g;d=!0;break;case "SL":e.lb=g|255;break;case "MMR0":Qc(e,g);d=!0;break;case "MMR3":ad(e,g);d=!0;break;case "AR":a.w&&(d=a.w,Yb(d,d.Aa=g));d=!0;break;case "DR":a.w&&(d=a.w,Xb(d,d.Bb=g));d=!0;break;case "SR":if(a.w&&nc(a.w)){Zb(a.w,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.u[b]=
|
g);a.L=Y(e.u[7]);break;case "N":e.aa=g?32768:0;break;case "Z":e.ca=g?0:1;break;case "V":e.W=g?32768:0;break;case "C":e.V=g?65536:0;break;case "PS":dd(e,g);break;case "IR":bd(e,g);break;case "ER":e.Ba=g;d=!0;break;case "SL":e.lb=g|255;break;case "MMR0":Qc(e,g);d=!0;break;case "MMR3":ad(e,g);d=!0;break;case "AR":a.w&&(d=a.w,Yb(d,d.Aa=g));d=!0;break;case "DR":a.w&&(d=a.w,Xb(d,d.Bb=g));d=!0;break;case "SR":if(a.w&&nc(a.w)){Zb(a.w,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.u[b]=
|
||||||
g&65535;break}a.i("unknown register: "+f);return}a.B.wa();a.i("updated registers:")}}a.i(Ri(a,d));c&&(a.L=Y(e.u[7]),Ji(a,L(a,a.L.G)))}}function Wi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.i(c[2]):pi(a,null,c[2].charCodeAt(0)):mi(a,b,!0)}
|
g&65535;break}a.i("unknown register: "+f);return}a.B.xa();a.i("updated registers:")}}a.i(Ri(a,d));c&&(a.L=Y(e.u[7]),Ji(a,L(a,a.L.G)))}}function Wi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.i(c[2]):pi(a,null,c[2].charCodeAt(0)):mi(a,b,!0)}
|
||||||
function Xi(a,b,c){if("?"==c)a.i("trace commands:"),a.i("\tt [#]\ttrace # instructions"),a.i("\ttr [#]\ttrace # instructions with register updates"),a.i("\ttc [#]\ttrace # cycles"),a.i("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=oi(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);a.vb=b;Oa(c,function(){return pb(a,!0)&&a.pb(e,d,!1)},function(){a.w&&a.w.stop&&a.w.stop();a.B.wa(-1);pb(a,!1)})}}
|
function Xi(a,b,c){if("?"==c)a.i("trace commands:"),a.i("\tt [#]\ttrace # instructions"),a.i("\ttr [#]\ttrace # instructions with register updates"),a.i("\ttc [#]\ttrace # cycles"),a.i("note: bn [#] breaks after # instructions without updates");else{var d="t"!=b;c=oi(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);a.vb=b;Oa(c,function(){return pb(a,!0)&&a.pb(e,d,!1)},function(){a.w&&a.w.stop&&a.w.stop();a.B.xa(-1);pb(a,!1)})}}
|
||||||
function Ji(a,b,c,d){if(b=Bi(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=oi(a,c.substr(1)),null!=c&&(d=c);else{d=Bi(a,c,!0);if(!d||d.G<b.G)return;e=d.G-b.G;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=xb(a,!1)||a.R?a.J:null;var g=null!=f?"cycles":null,h=Si(a,b),l=b.G;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Pi(a,b,g,f);a.i(f);a.L=b;e-=b.G-l;c++}}}
|
function Ji(a,b,c,d){if(b=Bi(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=oi(a,c.substr(1)),null!=c&&(d=c);else{d=Bi(a,c,!0);if(!d||d.G<b.G)return;e=d.G-b.G;if(256<e){a.i("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=xb(a,!1)||a.S?a.K:null;var g=null!=f?"cycles":null,h=Si(a,b),l=b.G;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Pi(a,b,g,f);a.i(f);a.L=b;e-=b.G-l;c++}}}
|
||||||
function Oi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.oa=null;if(yb(a)&&0<b.length){a.U&&(b="a "+L(a,a.T.G)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],l=h.charAt(0),m=1;m<h.length;m++){var n=h.charAt(m);if("?"==l||"r"==l||"a">n||"z"<n){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var r=
|
function Oi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.U&&(a.i("ended assemble at "+L(a,a.T.G)),a.L=a.T,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0<b.length){a.U&&(b="a "+L(a,a.T.G)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");g[0]=g[0].toLowerCase();if(g&&g.length)for(var h=g[0],l=h.charAt(0),m=1;m<h.length;m++){var n=h.charAt(m);if("?"==l||"r"==l||"a">n||"z"<n){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var r=
|
||||||
Bi(a,g[1],!0);if(r)if(a.T=r,void 0===g[2])a.i("begin assemble at "+L(a,r.G)),a.U=!0,a.B.wa();else{var t;a.i("not supported yet");t=[];if(t.length){for(var v=0;v<t.length;v++)a.Kb(r,t[v],1);a.i(Pi(a,a.T))}}break;case "b":a:{var A=g[0],y=g[1],C=b;if("?"==y)a.i("breakpoint commands:"),a.i("\tbp [#]\tset exec breakpoint at addr #"),a.i("\tbr [#]\tset read breakpoint at addr #"),a.i("\tbw [#]\tset write breakpoint at addr #"),a.i("\tbc [#]\tclear breakpoint at addr #"),a.i("\tbl\tlist all breakpoints"),
|
Bi(a,g[1],!0);if(r)if(a.T=r,void 0===g[2])a.i("begin assemble at "+L(a,r.G)),a.U=!0,a.B.xa();else{var t;a.i("not supported yet");t=[];if(t.length){for(var v=0;v<t.length;v++)a.Lb(r,t[v],1);a.i(Pi(a,a.T))}}break;case "b":a:{var A=g[0],y=g[1],C=b;if("?"==y)a.i("breakpoint commands:"),a.i("\tbp [#]\tset exec breakpoint at addr #"),a.i("\tbr [#]\tset read breakpoint at addr #"),a.i("\tbw [#]\tset write breakpoint at addr #"),a.i("\tbc [#]\tclear breakpoint at addr #"),a.i("\tbl\tlist all breakpoints"),
|
||||||
a.i("\tbn [#]\tbreak after # instruction(s)");else{var qa=A.charAt(1);if("l"==qa){var Ra;Ra=0+Ni(a,a.f);Ra+=Ni(a,a.O);(Ra+=Ni(a,a.F))||a.i("no breakpoints")}else if("n"==qa)a.Da=oi(a,y),a.i("break after "+a.Da+" instruction(s)");else if(void 0===y)a.i("missing breakpoint address");else{var R=Y();if("*"!=y&&(R=Bi(a,y,!0),!R))break a;"c"==qa?null==R.G?(si(a),a.i("all breakpoints cleared")):Li(a,a.f,R)||Li(a,a.O,R)||Li(a,a.F,R)||a.i("breakpoint missing: "+L(a,R.G)):null!=R.G&&(Fi(a,R,C),"p"==qa?a.wb(a.f,
|
a.i("\tbn [#]\tbreak after # instruction(s)");else{var qa=A.charAt(1);if("l"==qa){var Ra;Ra=0+Ni(a,a.f);Ra+=Ni(a,a.O);(Ra+=Ni(a,a.F))||a.i("no breakpoints")}else if("n"==qa)a.Ca=oi(a,y),a.i("break after "+a.Ca+" instruction(s)");else if(void 0===y)a.i("missing breakpoint address");else{var R=Y();if("*"!=y&&(R=Bi(a,y,!0),!R))break a;"c"==qa?null==R.G?(si(a),a.i("all breakpoints cleared")):Li(a,a.f,R)||Li(a,a.O,R)||Li(a,a.F,R)||a.i("breakpoint missing: "+L(a,R.G)):null!=R.G&&(Fi(a,R,C),"p"==qa?a.wb(a.f,
|
||||||
R):"r"==qa?a.wb(a.O,R):"w"==qa?a.wb(a.F,R):a.i("unknown breakpoint command: "+qa))}}}break;case "c":a.Za&&(a.Za.value="");break;case "d":a:{var qb,Ta=g[0],ta=g[1],Ua=g[2],pj=g[3];if("?"==ta){var rb="";for(qb in Db)a.Pa[qb]&&(rb&&(rb+=","),rb+=qb);rb+=",state,symbols";a.i("dump memory commands:");a.i("\tdb [a] [n] dump n bytes at address a");a.i("\tdw [a] [n] dump n words at address a");a.i("\tdd [a] [n] dump n dwords at address a");a.i("\tds [a] [n] dump n words at address a as JSON");
|
R):"r"==qa?a.wb(a.O,R):"w"==qa?a.wb(a.F,R):a.i("unknown breakpoint command: "+qa))}}}break;case "c":a.Za&&(a.Za.value="");break;case "d":a:{var qb,Ta=g[0],ta=g[1],Ua=g[2],pj=g[3];if("?"==ta){var rb="";for(qb in Db)a.Pa[qb]&&(rb&&(rb+=","),rb+=qb);rb+=",state,symbols";a.i("dump memory commands:");a.i("\tdb [a] [n] dump n bytes at address a");a.i("\tdw [a] [n] dump n words at address a");a.i("\tdd [a] [n] dump n dwords at address a");a.i("\tds [a] [n] dump n words at address a as JSON");
|
||||||
a.i("\tdh [p] [n] dump n instructions from history position p");rb.length&&a.i("dump extension commands:\n\t"+rb)}else if("state"==ta){var $g=Yi(a.B,!0);"console"==Ua?console.log($g):(a.Za&&(a.Za.value=""),a.i($g))}else if("symbols"==ta)for(var $d=0;$d<a.I.length;$d++){var ae=a.I[$d],sb;for(sb in ae.ja)if("."!=sb.charAt(0)){var ah=ae.ja[sb].o;if(void 0!==ah){var bh=ae.ja[sb].l;bh&&(sb=bh);a.i(L(a,ah)+" "+sb)}}}else{if("d"==Ta){for(qb in Db)if(g[1]==qb){var ch=a.Pa[qb];ch?(g.shift(),g.shift(),ch(g)):
|
a.i("\tdh [p] [n] dump n instructions from history position p");rb.length&&a.i("dump extension commands:\n\t"+rb)}else if("state"==ta){var Zg=Yi(a.B,!0);"console"==Ua?console.log(Zg):(a.Za&&(a.Za.value=""),a.i(Zg))}else if("symbols"==ta)for(var $d=0;$d<a.I.length;$d++){var ae=a.I[$d],sb;for(sb in ae.ja)if("."!=sb.charAt(0)){var $g=ae.ja[sb].o;if(void 0!==$g){var ah=ae.ja[sb].l;ah&&(sb=ah);a.i(L(a,$g)+" "+sb)}}}else{if("d"==Ta){for(qb in Db)if(g[1]==qb){var bh=a.Pa[qb];bh?(g.shift(),g.shift(),bh(g)):
|
||||||
a.i("no dump registered for "+ta);break a}ta||(Ta=a.Qb||"dw")}else a.Qb=Ta;if("dh"==Ta){var dh=ta,eh=Ua,fh="",gh=0,ka=a.fa,ua=a.H;if(ua.length){var ea=+dh||a.tb,ac=+eh||10;isNaN(ea)?ea=ac:fh="more ";ea>ua.length&&(a.i("note: only "+ua.length+" available"),ea=ua.length);ka-=ea;0>ka&&(null==ua[ua.length-1].G?(ea=ka+ea,ka=0):ka+=ua.length);var be=[];"call"==eh&&(ac=1E5,be=["CALL"]);for(void 0!==dh&&a.i(ea+" instructions earlier:");0<ac&&ka!=a.fa;){var hh=ua[ka++];if(null==hh.G)break;var bc=Y(hh.G),qj=
|
a.i("no dump registered for "+ta);break a}ta||(Ta=a.Rb||"dw")}else a.Rb=Ta;if("dh"==Ta){var ch=ta,dh=Ua,eh="",fh=0,ka=a.ga,ua=a.H;if(ua.length){var ea=+ch||a.tb,ac=+dh||10;isNaN(ea)?ea=ac:eh="more ";ea>ua.length&&(a.i("note: only "+ua.length+" available"),ea=ua.length);ka-=ea;0>ka&&(null==ua[ua.length-1].G?(ea=ka+ea,ka=0):ka+=ua.length);var be=[];"call"==dh&&(ac=1E5,be=["CALL"]);for(void 0!==ch&&a.i(ea+" instructions earlier:");0<ac&&ka!=a.ga;){var gh=ua[ka++];if(null==gh.G)break;var bc=Y(gh.G),qj=
|
||||||
ea--,ih=Pi(a,bc,"history",qj);(!be.length||0<=ih.indexOf(be[0]))&&a.i(ih);bc.nc&&(ka+=bc.nc,ac-=bc.nc,ea-=bc.nc);ka>=ua.length&&(ka=0);a.tb=ea;gh++;ac--}}gh||(a.i("no "+fh+"history available"),a.tb=void 0)}else{var tb=Bi(a,ta);if(tb){var cc=0,ce=!1,de="ds"==Ta;Ua&&(ce=!0,"l"==Ua.charAt(0)&&(ce=!1,Ua=Ua.substr(1)||pj),cc=oi(a,Ua)>>>0,65536<cc&&(cc=65536));for(var ub="dd"==Ta?4:"db"==Ta?1:2,Rc=(ce?cc-tb.G:ub*cc)||128,ee=de?16:a.ga,rj=(Rc+ee-1)/ee|0||1,Va="";rj--&&0<Rc;){for(var Wa="",fe="",ta=L(a,tb.G),
|
ea--,hh=Pi(a,bc,"history",qj);(!be.length||0<=hh.indexOf(be[0]))&&a.i(hh);bc.oc&&(ka+=bc.oc,ac-=bc.oc,ea-=bc.oc);ka>=ua.length&&(ka=0);a.tb=ea;fh++;ac--}}fh||(a.i("no "+eh+"history available"),a.tb=void 0)}else{var tb=Bi(a,ta);if(tb){var cc=0,ce=!1,de="ds"==Ta;Ua&&(ce=!0,"l"==Ua.charAt(0)&&(ce=!1,Ua=Ua.substr(1)||pj),cc=oi(a,Ua)>>>0,65536<cc&&(cc=65536));for(var ub="dd"==Ta?4:"db"==Ta?1:2,Rc=(ce?cc-tb.G:ub*cc)||128,ee=de?16:a.oa,rj=(Rc+ee-1)/ee|0||1,Va="";rj--&&0<Rc;){for(var Wa="",fe="",ta=L(a,tb.G),
|
||||||
Sc=ee,dc=0,ec=0;0<Sc&&0<Rc;){var vb=1,Tc=1==ub?a.cc(tb,vb):a.sa(tb,vb=2),dc=dc|Tc<<(ec<<3),ec=ec+vb;ec==ub&&(de?(Wa&&(Wa+=","),Wa+="0x"+p(dc,2*ub)):(Wa+=L(a,dc,ub),Wa+=1==ub?9==Sc?"-":" ":" "),dc=ec=0);Sc-=vb;for(Rc-=vb;vb--;)var ge=Tc&255,fe=fe+(32<=ge&&128>ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Va&&(Va+="\n");Va=de?Va+(Wa+","):Va+(ta+" "+Wa+(0==Sc?" "+fe:""))}Va&&a.i(Va);a.qb=tb}}}}break;case "e":if("else"==g[0])break;var wb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(wb=1,he=255,ie=a.cc,je=a.Kb):"e"==
|
Sc=ee,dc=0,ec=0;0<Sc&&0<Rc;){var vb=1,Tc=1==ub?a.dc(tb,vb):a.ta(tb,vb=2),dc=dc|Tc<<(ec<<3),ec=ec+vb;ec==ub&&(de?(Wa&&(Wa+=","),Wa+="0x"+p(dc,2*ub)):(Wa+=L(a,dc,ub),Wa+=1==ub?9==Sc?"-":" ":" "),dc=ec=0);Sc-=vb;for(Rc-=vb;vb--;)var ge=Tc&255,fe=fe+(32<=ge&&128>ge?String.fromCharCode(ge):"."),Tc=Tc>>8}Va&&(Va+="\n");Va=de?Va+(Wa+","):Va+(ta+" "+Wa+(0==Sc?" "+fe:""))}Va&&a.i(Va);a.qb=tb}}}}break;case "e":if("else"==g[0])break;var wb,he,ie,je,ke=g[0],le=g[1];"eb"==ke?(wb=1,he=255,ie=a.dc,je=a.Lb):"e"==
|
||||||
ke||"ew"==ke?(wb=2,he=65535,ie=a.sa,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Bi(a,le);if(Uc)for(var Vc=2;Vc<g.length;Vc++){var fc=mi(a,g[Vc]);if(void 0===fc){a.i("unrecognized value: "+g[Vc]);break}fc&~he&&a.i("warning: "+p(fc)+" exceeds "+wb+"-byte value");a.i("changing "+L(a,Uc.G)+(I(a,16)?"":" from "+L(a,ie.call(a,Uc),wb))+" to "+L(a,fc,wb));je.call(a,Uc,fc,wb)}}break;case "g":a:{var jh=
|
ke||"ew"==ke?(wb=2,he=65535,ie=a.ta,je=a.Db):le=null;if(null==le)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");else{var Uc=Bi(a,le);if(Uc)for(var Vc=2;Vc<g.length;Vc++){var fc=mi(a,g[Vc]);if(void 0===fc){a.i("unrecognized value: "+g[Vc]);break}fc&~he&&a.i("warning: "+p(fc)+" exceeds "+wb+"-byte value");a.i("changing "+L(a,Uc.G)+(I(a,16)?"":" from "+L(a,ie.call(a,Uc),wb))+" to "+L(a,fc,wb));je.call(a,Uc,fc,wb)}}break;case "g":a:{var ih=
|
||||||
g[1],sj=b;if(void 0!==jh){var me=Bi(a,jh,!0);if(!me)break a;Fi(a,me,sj);a.wb(a.f,me,!0)}a.ob(!0,c)}break;case "h":a.C.X?(c||a.i("halting"),a.ea()):xb(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var ne;var gc=b.substr(2),gc=ya(gc);mi(a,gc)?(c||a.i("true: "+gc),ne=!0):(c||a.i("false: "+gc),ne=!1);ne||(d=!1);break}f=!0;break;case "k":var tj=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var oe=0,pe=Y(),hc=Y(a.b.u[6]);
|
g[1],sj=b;if(void 0!==ih){var me=Bi(a,ih,!0);if(!me)break a;Fi(a,me,sj);a.wb(a.f,me,!0)}a.ob(!0,c)}break;case "h":a.C.X?(c||a.i("halting"),a.ea()):xb(a,!0)||c||a.i("already halted");break;case "i":if("if"==g[0]){var ne;var gc=b.substr(2),gc=ya(gc);mi(a,gc)?(c||a.i("true: "+gc),ne=!0):(c||a.i("false: "+gc),ne=!1);ne||(d=!1);break}f=!0;break;case "k":var tj=g[0];if("?"==g[1])a.i("stack trace commands:"),a.i("\tk\tshow frame addresses"),a.i("\tks\tshow symbol information");else{var oe=0,pe=Y(),hc=Y(a.b.u[6]);
|
||||||
for(a.i("stack trace for "+L(a,hc.G));10>oe;){for(var Xa=null,uj=256;65536>hc.G>>>0;){pe.G=a.sa(hc,2);if(null==hc.G||!uj--)break;if(!(pe.G&1)){for(var vj=a,Wc=pe,kh=null,ic=Wc.G,lh=ic,qe=1;6>=qe&⁣qe++){if(2<qe){Wc.G=ic;var Xc=Pi(vj,Wc);if(0<=Xc.indexOf("JSR")){var mh=Xc.indexOf(" ");if(ic+(Xc.indexOf(" ",mh+1)-mh-1)/2==lh){kh=Xc;break}}}ic-=2}Wc.G=lh;if(Xa=kh)break}}if(!Xa||null==Xa)break;var nh=null;if("ks"==tj){var oh=Xa.match(/[0-9A-F]+$/);oh&&(nh=Vi(a,oh[0]))}Xa=xa(Xa,50)+" ;"+(nh||"stack="+
|
for(a.i("stack trace for "+L(a,hc.G));10>oe;){for(var Xa=null,uj=256;65536>hc.G>>>0;){pe.G=a.ta(hc,2);if(null==hc.G||!uj--)break;if(!(pe.G&1)){for(var vj=a,Wc=pe,jh=null,ic=Wc.G,kh=ic,qe=1;6>=qe&⁣qe++){if(2<qe){Wc.G=ic;var Xc=Pi(vj,Wc);if(0<=Xc.indexOf("JSR")){var lh=Xc.indexOf(" ");if(ic+(Xc.indexOf(" ",lh+1)-lh-1)/2==kh){jh=Xc;break}}}ic-=2}Wc.G=kh;if(Xa=jh)break}}if(!Xa||null==Xa)break;var mh=null;if("ks"==tj){var nh=Xa.match(/[0-9A-F]+$/);nh&&(mh=Vi(a,nh[0]))}Xa=xa(Xa,50)+" ;"+(mh||"stack="+
|
||||||
L(a,hc.G));a.i(Xa);oe++}oe||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){Vi(a,g[1],!0);break}f=!0;break;case "m":a:{var va,wa=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var Ka=0;if("all"==H)Ka=1879046143,H=null;else if("on"==H)wa=!0,H=null;else if("off"==H)wa=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(va in Db)if(H==va){Ka=Db[va];wa=!!(a.pa&Ka);break}if(!Ka){a.i("unknown message category: "+H);break a}}if(Ka)if("on"==g[2])a.pa|=Ka,wa=!0;else if("off"==g[2]&&
|
L(a,hc.G));a.i(Xa);oe++}oe||a.i("no return addresses found")}break;case "l":if("ln"==g[0]){Vi(a,g[1],!0);break}f=!0;break;case "m":a:{var va,wa=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var Ka=0;if("all"==H)Ka=1879046143,H=null;else if("on"==H)wa=!0,H=null;else if("off"==H)wa=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(va in Db)if(H==va){Ka=Db[va];wa=!!(a.pa&Ka);break}if(!Ka){a.i("unknown message category: "+H);break a}}if(Ka)if("on"==g[2])a.pa|=Ka,wa=!0;else if("off"==g[2]&&
|
||||||
(a.pa&=~Ka,wa=!1,1073741824==Ka)){for(var re=0;re<a.Ea.length;re++)a.i(a.Ea[re]);a.Ea=[]}}var wj=0,jc="";for(va in Db)if(!H||H==va){var xj=!!(a.pa&Db[va]);if(null===wa||wa==xj)jc&&(jc+=","),++wj%10||(jc+="\n\t"),"key"==va&&(va="keys"),jc+=va}void 0===H&&a.i("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.i((null!==wa?wa?"messages on: ":"messages off: ":"message categories:\n\t")+(jc||"none"));ti(a)}break;case "p":if("print"==g[0]){Wi(a,b.substr(5));break}var yj=g[0];if("?"==
|
(a.pa&=~Ka,wa=!1,1073741824==Ka)){for(var oh=1E3<=a.ba.length?a.ba.length-1E3:0;oh<a.ba.length;)a.i(a.ba[oh++]);a.ba=[]}}var wj=0,jc="";for(va in Db)if(!H||H==va){var xj=!!(a.pa&Db[va]);if(null===wa||wa==xj)jc&&(jc+=","),++wj%10||(jc+="\n\t"),"key"==va&&(va="keys"),jc+=va}void 0===H&&a.i("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.i((null!==wa?wa?"messages on: ":"messages off: ":"message categories:\n\t")+(jc||"none"));ti(a)}break;case "p":if("print"==g[0]){Wi(a,b.substr(5));
|
||||||
g[1])a.i("step commands:"),a.i("\tp\tstep over instruction"),a.i("\tpr\tstep over instruction with register update");else{var ph="pr"==yj?1:0,qh=1+ph;if(a.R)a.i("step in progress");else{var Yc=Y(a.b.u[7]),kc=a.sa(Yc);3==kc||4==kc||34816==(kc&65280)||35072==(kc&65280)?(a.R=qh,Ci(Yc,2)):2048==(kc&65024)&&(Pi(a,Yc),a.R=qh);a.R?(a.wb(a.f,Yc,!0),a.ob()||(a.B&&a.B.mb(),a.R=0)):Xi(a,ph?"tr":"t")}}break;case "r":if("reset"==b){a.B&&a.B.reset();break}Ii(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var lc=
|
break}var yj=g[0];if("?"==g[1])a.i("step commands:"),a.i("\tp\tstep over instruction"),a.i("\tpr\tstep over instruction with register update");else{var ph="pr"==yj?1:0,qh=1+ph;if(a.S)a.i("step in progress");else{var Yc=Y(a.b.u[7]),kc=a.ta(Yc);3==kc||4==kc||34816==(kc&65280)||35072==(kc&65280)?(a.S=qh,Ci(Yc,2)):2048==(kc&65024)&&(Pi(a,Yc),a.S=qh);a.S?(a.wb(a.f,Yc,!0),a.ob()||(a.B&&a.B.mb(),a.S=0)):Xi(a,ph?"tr":"t")}}break;case "r":if("reset"==b){a.B&&a.B.reset();break}Ii(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var lc=
|
||||||
+g[2];if(8==lc||10==lc||16==lc)a.ga=lc;else{a.i("invalid base: "+lc);break}}a.i("default base: "+a.ga);break;case "cs":var mc;void 0!==g[3]&&(mc=+g[3]);switch(g[2]){case "int":a.b.Gb=mc;break;case "start":a.b.Ub=mc;break;case "stop":a.b.Hb=mc;break;default:a.i("unknown cs option");break a}void 0!==mc&&zd(a.b);a.i("checksums "+(a.b.C.Fb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Dd(a.b,+g[2])||a.i("warning: using 1x multiplier, previous target not reached"));a.i("target speed: "+(a.b.Ab.toFixed(2)+
|
+g[2];if(8==lc||10==lc||16==lc)a.oa=lc;else{a.i("invalid base: "+lc);break}}a.i("default base: "+a.oa);break;case "cs":var mc;void 0!==g[3]&&(mc=+g[3]);switch(g[2]){case "int":a.b.Gb=mc;break;case "start":a.b.Wb=mc;break;case "stop":a.b.Hb=mc;break;default:a.i("unknown cs option");break a}void 0!==mc&&zd(a.b);a.i("checksums "+(a.b.C.Fb?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Dd(a.b,+g[2])||a.i("warning: using 1x multiplier, previous target not reached"));a.i("target speed: "+(a.b.Ab.toFixed(2)+
|
||||||
"Mhz")+" ("+a.b.jb+"x)");break;default:if(g[1]){a.i("unknown option: "+g[1]);break}case "?":a.i("debugger options:"),a.i("\tbase #\t\tset default base to #"),a.i("\tcs int #\tset checksum cycle interval to #"),a.i("\tcs start #\tset checksum cycle start count to #"),a.i("\tcs stop #\tset checksum cycle stop count to #"),a.i("\tsp #\t\tset speed multiplier to #")}break;case "t":Xi(a,g[0],g[1]);break;case "u":Ji(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Ui(a,b.substr(3))||(d=!1);break}if("ver"==
|
"Mhz")+" ("+a.b.jb+"x)");break;default:if(g[1]){a.i("unknown option: "+g[1]);break}case "?":a.i("debugger options:"),a.i("\tbase #\t\tset default base to #"),a.i("\tcs int #\tset checksum cycle interval to #"),a.i("\tcs start #\tset checksum cycle start count to #"),a.i("\tcs stop #\tset checksum cycle stop count to #"),a.i("\tsp #\t\tset speed multiplier to #")}break;case "t":Xi(a,g[0],g[1]);break;case "u":Ji(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Ui(a,b.substr(3))||(d=!1);break}if("ver"==
|
||||||
g[0]){a.i("PDPjs version 1.30.4 ("+a.b.ib+",RELEASE"+(Bb?",TYPEDARRAYS":",LONGARRAYS")+")");a.i(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Wi(a,b.substr(1));break}var se="commands:",te;for(te in vi)se+="\n"+xa(te,9)+vi[te];Ie(a)||(se+="\nnote: history disabled if no exec breakpoints");a.i(se);break;default:f=!0}f&&(a.i("unknown command: "+b),d=!1)}}catch(rh){a.i("debugger error: "+(rh.stack||rh.message)),d=!1}return d}
|
g[0]){a.i("PDPjs version 1.30.4 ("+a.b.ib+",RELEASE"+(Bb?",TYPEDARRAYS":",LONGARRAYS")+")");a.i(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){Wi(a,b.substr(1));break}var re="commands:",se;for(se in vi)re+="\n"+xa(se,9)+vi[se];He(a)||(re+="\nnote: history disabled if no exec breakpoints");a.i(re);break;default:f=!0}f&&(a.i("unknown command: "+b),d=!1)}}catch(rh){a.i("debugger error: "+(rh.stack||rh.message)),d=!1}return d}
|
||||||
function Bd(a,b,c){b=ki(a,b,c);for(var d in b)if(!Oi(a,b[+d]))return!1;return!0}ab(function(){for(var a=F(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new ri(d);E(d,c)}});
|
function Bd(a,b,c){b=ki(a,b,c);for(var d in b)if(!Oi(a,b[+d]))return!1;return!0}ab(function(){for(var a=F(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new ri(d);E(d,c)}});
|
||||||
function Zi(a,b,c){x.call(this,"Computer",a,Zi,33554432);this.C.ma=!1;$i(this,b);this.L=xd(this,"autoPower",a);this.g=0;this.ba=a.busWidth||a.buswidth;this.f=aj;this.I=null;this.F=this.T=!1;this.fa=xd(this,"url")||"";(Math.random()+.1).toString(36);this.B=bj(this);if(this.b=ob("CPU",this.id)){this.j=ob("Debugger",this.id);this.v=new pc({id:this.fb+".bus",busWidth:this.ba},this.b,this.j);var d,e=mb(this.id);if((this.w=ob("Panel",this.id))&&this.w.Za)for(b=0;b<e.length;b++)d=e[b],d.N=this.w.N,d.i=this.w.i,
|
function Zi(a,b,c){x.call(this,"Computer",a,Zi,33554432);this.C.ma=!1;$i(this,b);this.L=xd(this,"autoPower",a);this.g=0;this.ba=a.busWidth||a.buswidth;this.f=aj;this.I=null;this.F=this.T=!1;this.fa=xd(this,"url")||"";(Math.random()+.1).toString(36);this.B=bj(this);if(this.b=ob("CPU",this.id)){this.j=ob("Debugger",this.id);this.v=new pc({id:this.fb+".bus",busWidth:this.ba},this.b,this.j);var d,e=mb(this.id);if((this.w=ob("Panel",this.id))&&this.w.Za)for(b=0;b<e.length;b++)d=e[b],d.N=this.w.N,d.i=this.w.i,
|
||||||
d.Za=this.w.Za;this.i("PDPjs v1.30.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ha&&d.Ha(this,this.v,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=xd(this,"state")||(f=!0,a.state))b=this.O=a,f||(this.F=!0,this.f=aj),this.f&&(this.J=
|
d.Za=this.w.Za;this.i("PDPjs v1.30.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ha&&d.Ha(this,this.v,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=xd(this,"state")||(f=!0,a.state))b=this.O=a,f||(this.F=!0,this.f=aj),this.f&&(this.K=
|
||||||
new S(this,"1.30.4"),cj(this.J)?b=null:delete this.J);!b&&this.f&&(b=dj(this))&&(this.F=!0);if(b){var g=this;Da(b,null,!0,function(a,b,c){c?(g.H=null,g.F=!1,g.N("Unable to load machine state from server (error "+c+(b?": "+ya(b):"")+")")):(g.I=b,g.T=!0);J(g)})}else J(this);this.D.power||(this.L=!0);!c&&this.L&&ej(this,this.Vb)}else w("Unable to find CPU component")}B(Zi);var aj=0;
|
new S(this,"1.30.4"),cj(this.K)?b=null:delete this.K);!b&&this.f&&(b=dj(this))&&(this.F=!0);if(b){var g=this;Da(b,null,!0,function(a,b,c){c?(g.H=null,g.F=!1,g.N("Unable to load machine state from server (error "+c+(b?": "+ya(b):"")+")")):(g.I=b,g.T=!0);J(g)})}else J(this);this.D.power||(this.L=!0);!c&&this.L&&ej(this,this.Xb)}else w("Unable to find CPU component")}B(Zi);var aj=0;
|
||||||
function $i(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.U=b}function xd(a,b,c){var d=b.toLowerCase(),d=fb[b]||fb[d];void 0===d&&a.U&&(d=a.U[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function ej(a,b,c){for(var d=mb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!yb(f)){yb(f,function(){ej(a,b,c)});return}}b.call(a,c)}
|
function $i(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.U=b}function xd(a,b,c){var d=b.toLowerCase(),d=fb[b]||fb[d];void 0===d&&a.U&&(d=a.U[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function ej(a,b,c){for(var d=mb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!yb(f)){yb(f,function(){ej(a,b,c)});return}}b.call(a,c)}
|
||||||
function fj(a,b){var c=new S(a,"1.30.4","validate");if(cj(c)&&gj(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.N("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Zi.prototype;
|
function fj(a,b){var c=new S(a,"1.30.4","validate");if(cj(c)&&gj(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.N("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Zi.prototype;
|
||||||
k.Vb=function(a){void 0===a&&(a=this.f||(this.I?1:aj));if(!this.g){this.g++;var b=!1,c=!1;this.R=!1;var d=this.J||new S(this,"1.30.4");if(-1==a)b=!0;else if(a>aj){if(cj(d,this.I)){this.A=new S(this,"1.30.4","failsafe");cj(this.A)&&(hj(this,d),a=2,ij(this.A));this.A.set("timestamp",Ca());jj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=gj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?cj(d,g):("error"==
|
k.Xb=function(a){void 0===a&&(a=this.f||(this.I?1:aj));if(!this.g){this.g++;var b=!1,c=!1;this.S=!1;var d=this.K||new S(this,"1.30.4");if(-1==a)b=!0;else if(a>aj){if(cj(d,this.I)){this.A=new S(this,"1.30.4","failsafe");cj(this.A)&&(hj(this,d),a=2,ij(this.A));this.A.set("timestamp",Ca());jj(this.A);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=gj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?cj(d,g):("error"==
|
||||||
f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.B=null)):this.i(f+": "+g),ij(d),cj(d)?(c=gj(d),e=!0):c=!1))}e&&fj(this,c?d:null)}else 2==a&&d.clear()}else fj(this);delete this.I;delete this.J}e=mb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=kj(this,g,d,b,c));b=[d,a,c];-1!=a?ej(this,this.Jc,b):this.Jc(b)}};
|
f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.B=null)):this.i(f+": "+g),ij(d),cj(d)?(c=gj(d),e=!0):c=!1))}e&&fj(this,c?d:null)}else 2==a&&d.clear()}else fj(this);delete this.I;delete this.K}e=mb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=kj(this,g,d,b,c));b=[d,a,c];-1!=a?ej(this,this.Kc,b):this.Kc(b)}};
|
||||||
function kj(a,b,c,d,e){if(!b.C.ma){b.C.ma=!0;if(b.Ka){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ka(f,d)&&f&&(w("Unable to restore state for "+b.type),a.O&&!a.T?(c.clear(),a.f=aj,window&&window.location.reload()):a.R=!0,b.Ka(null),e=!1)}if(!d&&b.Bc)for(a=b.Bc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function kj(a,b,c,d,e){if(!b.C.ma){b.C.ma=!0;if(b.Ka){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ka(f,d)&&f&&(w("Unable to restore state for "+b.type),a.O&&!a.T?(c.clear(),a.f=aj,window&&window.location.reload()):a.S=!0,b.Ka(null),e=!1)}if(!d&&b.Cc)for(a=b.Cc.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
k.Jc=function(a){var b=a[0],c=0>a[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(kj(this,this.b,b,c,a),this.wa(),this.b.Eb());this.R&&(hj(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
|
k.Kc=function(a){var b=a[0],c=0>a[1];a=a[2];this.ga=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(kj(this,this.b,b,c,a),this.xa(),this.b.Eb());this.S&&(hj(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.g=0};
|
||||||
function hj(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.4"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function hj(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.4"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||||
function Yi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.4"),g=new S(a,"1.30.4","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l<h.length;l++){var m=h[l];m.C.ma&&(m.Ja&&(d=m.Ja(b,c),"object"===typeof d&&f.set(m.id,
|
function Yi(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.4"),g=new S(a,"1.30.4","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ja&&(c&&a.b.ea(),d=a.b.Ja(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=mb(a.id),l=0;l<h.length;l++){var m=h[l];m.C.ma&&(m.Ja&&(d=m.Ja(b,c),"object"===typeof d&&f.set(m.id,
|
||||||
d)),c&&(m.C.ma=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&lj(a,a.B,f.toString()),jj(g)&&jj(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.C.ma=!1,b=a.D.power)&&(b.textContent="Power");a.g=0;return e}
|
d)),c&&(m.C.ma=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&lj(a,a.B,f.toString()),jj(g)&&jj(f)||(e=null,d=h=!0)):a.f&&(d=!0,h=3==a.f),d&&f.clear(h)):e=f.toString());c&&(a.C.ma=!1,b=a.D.power)&&(b.textContent="Power");a.g=0;return e}
|
||||||
k.reset=function(){this.v&&this.v.reset&&(G(this,"Resetting "+this.v.type),this.v.reset());this.b&&this.b.reset&&(G(this,"Resetting "+this.b.type),this.b.reset());for(var a=mb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.b&&c.reset&&(G(this,"Resetting "+c.type),c.reset())}this.wa(-1)};k.start=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.wa(-1)};
|
k.reset=function(){this.v&&this.v.reset&&(G(this,"Resetting "+this.v.type),this.v.reset());this.b&&this.b.reset&&(G(this,"Resetting "+this.b.type),this.b.reset());for(var a=mb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.v&&c!==this.b&&c.reset&&(G(this,"Resetting "+c.type),c.reset())}this.xa(-1)};k.start=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.xa(-1)};
|
||||||
k.stop=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.wa(-1)};
|
k.stop=function(a,b){for(var c=mb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.xa(-1)};
|
||||||
k.wa=function(a){if(this.b){var b=this.b,c=a||0,d=b.D.speed;d&&(0>=c||30<=(b.Nb+=c))&&(d.textContent=b.C.X?b.Da.toFixed(2)+"Mhz":"Stopped",b.Nb=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.K&4);if(0>=a||60<=(b.A+=a)){for(var e=0;e<b.b.u.length;e++)Rb(b,"R"+e,b.b.u[e]);e=cd(b.b);Rb(b,"PS",e);Rb(b,"NF",e&8?1:0,1);Rb(b,"ZF",e&4?1:0,1);Rb(b,"VF",e&2?1:0,1);Rb(b,"CF",e&1?1:0,1);b.A=0}Yb(b,0<a&&c&&!d?b.b.Rb:b.Aa);Xb(b,b.Bb);a=b.b;a=a.O?a.Xa&16?1:2:4;$b(b,"B22",a&1);$b(b,"B18",a&2);$b(b,"B16",
|
k.xa=function(a){if(this.b){var b=this.b,c=a||0,d=b.D.speed;d&&(0>=c||30<=(b.Ob+=c))&&(d.textContent=b.C.X?b.Ea.toFixed(2)+"Mhz":"Stopped",b.Ob=0)}if(this.w&&(b=this.w,a=a||0,b.F)){c=b.b.C.X;d=!!(b.b.J&4);if(0>=a||60<=(b.A+=a)){for(var e=0;e<b.b.u.length;e++)Rb(b,"R"+e,b.b.u[e]);e=cd(b.b);Rb(b,"PS",e);Rb(b,"NF",e&8?1:0,1);Rb(b,"ZF",e&4?1:0,1);Rb(b,"VF",e&2?1:0,1);Rb(b,"CF",e&1?1:0,1);b.A=0}Yb(b,0<a&&c&&!d?b.b.Tb:b.Aa);Xb(b,b.Bb);a=b.b;a=a.S?a.Xa&16?1:2:4;$b(b,"B22",a&1);$b(b,"B18",a&2);$b(b,"B16",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
k.ua=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?Yi(d,!1,!0):ej(d,d.Vb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Yi(d,a,!0);!a&&d.O?window&&window.location.reload():(a||(d.pc=!0),d.Vb(aj),d.pc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
|
k.va=function(a,b,c){var d=this;switch(b){case "power":return this.D[b]=c,c.onclick=function(){d.g||(d.C.ma?Yi(d,!1,!0):ej(d,d.Xb))},!0;case "reset":return this.D[b]=c,c.onclick=function(){if(d.C.ma&&!d.g)if(d.f&&!d.H){var a=Ga("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Yi(d,a,!0);!a&&d.O?window&&window.location.reload():(a||(d.qc=!0),d.Xb(aj),d.qc=!1)}else d.reset(),d.b&&d.b.Eb()},!0;case "save":if(pa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);else return this.D[b]=
|
||||||
c,c.onclick=function(){var a=bj(d,!0);if(a){var b=!!(d.f&&!d.H||d.O),c=Yi(d,b);b?lj(d,a,c):d.N("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=bj(d,!0);if(a){var b=!!(d.f&&!d.H||d.O),c=Yi(d,b);b?lj(d,a,c):d.N("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function bj(a,b){var c=a.B;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=mj(a,c))||a.N("The user ID is invalid.")):b&&a.N("Browser local storage is not available"));return c}
|
function bj(a,b){var c=a.B;c||((c=Ja("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=mj(a,c))||a.N("The user ID is invalid.")):b&&a.N("Browser local storage is not available"));return c}
|
||||||
function mj(a,b){a.B=null;b=Da(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La("user",b.data),a.B=b.data)}catch(d){w(d.message+" ("+c+")")}return a.B}function dj(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+nj(a,"1.30.4"));return b}
|
function mj(a,b){a.B=null;b=Da(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La("user",b.data),a.B=b.data)}catch(d){w(d.message+" ("+c+")")}return a.B}function dj(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+nj(a,"1.30.4"));return b}
|
||||||
function lj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=nj(a,"1.30.4");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.N("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.N(c),La("user",""),a.B=null)}}
|
function lj(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=nj(a,"1.30.4");d.data=c;b=Da(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.N("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.N(c),La("user",""),a.B=null)}}
|
||||||
function uh(a){var b;a=mb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.mb=function(a){if(this.Za){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Za.focus();!a&&window&&window.scrollTo(b,c)}};ab(function(){for(var a=F(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=D(c),c=F(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=D(f),g=new Zi(g,d,!0);E(g,f);g.L&&ej(g,g.Vb)}});
|
function uh(a){var b;a=mb(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}k.mb=function(a){if(this.Za){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);this.Za.focus();!a&&window&&window.scrollTo(b,c)}};ab(function(){for(var a=F(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=D(c),c=F(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=D(f),g=new Zi(g,d,!0);E(g,f);g.L&&ej(g,g.Xb)}});
|
||||||
Qa.show.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.ga&&!c.C.ma&&c.Vb(-1)}});Qa.exit.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.C.ma&&Yi(c,!(!c.f||c.H),!0)}});function S(a,b,c){this.id=a.id;this.key=nj(a,b,c);this.j=a.j;ij(this,a.jd)}function nj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
Qa.show.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.ga&&!c.C.ma&&c.Xb(-1)}});Qa.exit.push(function(){for(var a=F(document,"pdp11","computer"),b=0;b<a.length;b++){var c=D(a[b]);(c=ob("Computer",c.id))&&c.C.ma&&Yi(c,!(!c.f||c.H),!0)}});function S(a,b,c){this.id=a.id;this.key=nj(a,b,c);this.j=a.j;ij(this,a.kd)}function nj(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
S.prototype={constructor:S,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){ij(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
S.prototype={constructor:S,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){ij(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
||||||
1);c=0}}};function ij(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function jj(a){var b=!0;if(Ia()){var c=JSON.stringify(a[a.id]);La(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function gj(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function cj(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ia()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var oj=0;
|
1);c=0}}};function ij(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function jj(a){var b=!0;if(Ia()){var c=JSON.stringify(a[a.id]);La(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function gj(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function cj(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ia()&&(b=Ja(a.key))?(a[a.id]=b,a.b=!0):!1}var oj=0;
|
||||||
function zj(a,b,c,d,e,f){e("Loading "+a+"...");Da(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Aj(h,a,b,c,d,e,f)})}
|
function zj(a,b,c,d,e,f){e("Loading "+a+"...");Da(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Aj(h,a,b,c,d,e,f)})}
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
*/
|
*/
|
||||||
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var ea=ca[da];ea in ba||(ba[ea]={});ba=ba[ea]}var fa=ca[ca.length-1],ga=ba[fa],ha=ga?ga:function(a){return Math.log(a)/Math.LN2};
|
for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da<ca.length-1;da++){var ea=ca[da];ea in ba||(ba[ea]={});ba=ba[ea]}var fa=ca[ca.length-1],ga=ba[fa],ha=ga?ga:function(a){return Math.log(a)/Math.LN2};
|
||||||
ha!=ga&&null!=ha&&aa(ba,fa,{configurable:!0,writable:!0,value:ha});
|
ha!=ga&&null!=ha&&aa(ba,fa,{configurable:!0,writable:!0,value:ha});
|
||||||
var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},ja={mc:1,Se:3,Te: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,
|
var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},ja={nc:1,Se:3,Te: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,
|
||||||
Sb:65,Qe:66,Re:67,Ue:68,E:69,Ve:70,We:71,Xe:72,Ye:73,Ze:74,$e:75,af:76,bf:77,cf:78,df:79,ef:80,Q:81,ff:82,gf:83,hf:84,jf:85,kf:86,lf:87,mf:88,nf:89,wc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pf:97,qf:98,rf:99,d:100,e:101,sf:102,tf:103,uf:104,vf:105,yf:106,k:107,zf:108,Af:109,n:110,Bf:111,p:112,q:113,r:114,Cf:115,t:116,Df:117,Ef:118,Ff:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,nc:127};
|
Tb:65,Qe:66,Re:67,Ue:68,E:69,Ve:70,We:71,Xe:72,Ye:73,Ze:74,$e:75,af:76,bf:77,cf:78,df:79,ef:80,Q:81,ff:82,gf:83,hf:84,jf:85,kf:86,lf:87,mf:88,nf:89,xc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,pf:97,qf:98,rf:99,d:100,e:101,sf:102,tf:103,uf:104,vf:105,yf:106,k:107,zf:108,Af:109,n:110,Bf:111,p:112,q:113,r:114,Cf:115,t:116,Df:117,Ef:118,Ff:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,oc:127};
|
||||||
function m(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
|
function m(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==
|
||||||
e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ka(a,b){var c="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;)c=String.fromCharCode((a&7)+48)+c,a>>=3;return""+c}function q(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ka(a,b){var c="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;)c=String.fromCharCode((a&7)+48)+c,a>>=3;return""+c}function q(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
||||||
function r(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function la(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ma(a,b){return-1!==a.indexOf(b,a.length-b.length)}var na={"&":"&","<":"<",">":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})}
|
function r(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function la(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function ma(a,b){return-1!==a.indexOf(b,a.length-b.length)}var na={"&":"&","<":"<",">":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})}
|
||||||
|
|
@ -43,219 +43,220 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
|
||||||
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
||||||
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
function t(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
||||||
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
|
||||||
function ta(a,b){var c,d={L:null,ba:null,na:null,ma: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")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.L=e;else if(e=g.words)for(d.L=Array(2*e.length),f=c=0;c<e.length;c++)d.L[f++]=e[c]&255,d.L[f++]=e[c]>>8&255;else if(e=g.data)for(d.L=Array(4*e.length),f=c=0;c<e.length;c++)d.L[f++]=e[c]&
|
function ta(a,b){var c,d={M:null,ba:null,na:null,ma: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")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.M=e;else if(e=g.words)for(d.M=Array(2*e.length),f=c=0;c<e.length;c++)d.M[f++]=e[c]&255,d.M[f++]=e[c]>>8&255;else if(e=g.data)for(d.M=Array(4*e.length),f=c=0;c<e.length;c++)d.M[f++]=e[c]&
|
||||||
255,d.L[f++]=e[c]>>8&255,d.L[f++]=e[c]>>16&255,d.L[f++]=e[c]>>24&255;else d.L=g;d.ba=g.symbols;d.L.length?1==d.L.length&&(w(d.L[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){w("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.L=e)}return d}
|
255,d.M[f++]=e[c]>>8&255,d.M[f++]=e[c]>>16&255,d.M[f++]=e[c]>>24&255;else d.M=g;d.ba=g.symbols;d.M.length?1==d.M.length&&(w(d.M[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;c<b.length;c++){f=parseInt(b[c],16);if(isNaN(f)){w("Resource data error ("+a+"): invalid hex byte ("+b[c]+")");break}e.push(f&255)}c==b.length&&(d.M=e)}return d}
|
||||||
function ua(){return"http://"+(window?window.location.host:"www.pcjs.org")}function w(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}
|
function ua(){return"http://"+(window?window.location.host:"www.pcjs.org")}function w(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}
|
||||||
function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ba(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ca(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}
|
function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ba(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ca(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}
|
||||||
function Da(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}var Ea={init:[],show:[],exit:[]},Fa=!1,Ga=!1,Ha=!0;
|
function Da(a,b){var c=null;a="data:application/octet-stream;base64,"+a;b&&(c=document.createElement("a"),"string"!=typeof c.download&&(c=null));c?(c.href=a,c.download=b,document.body.appendChild(c),c.click(),document.body.removeChild(c),b="Check your Downloads folder for "+b+"."):(window.open(a),b="Check your browser for a new window/tab containing the requested data"+(b?" ("+b+")":"")+".");return b}var Ea={init:[],show:[],exit:[]},Fa=!1,Ga=!1,Ha=!0;
|
||||||
function Ia(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ja(a){Ea.init.push(a)}function Ka(a){if(Ha)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function La(a){!Ha&&a?(Ha=!0,Fa&&Ma("init"),Ga&&Ma("show")):Ha=a}function Ma(a){Ea[a]&&Ka(Ea[a])}Ia("onload",function(){Fa=!0;Ka(Ea.init)});Ia("onpageshow",function(){Ga=!0;Ka(Ea.show)});
|
function Ia(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ja(a){Ea.init.push(a)}function Ka(a){if(Ha)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){w(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function La(a){!Ha&&a?(Ha=!0,Fa&&Ma("init"),Ga&&Ma("show")):Ha=a}function Ma(a){Ea[a]&&Ka(Ea[a])}Ia("onload",function(){Fa=!0;Ka(Ea.init)});Ia("onpageshow",function(){Ga=!0;Ka(Ea.show)});
|
||||||
Ia(Ca("Opera")||Ca("iOS")?"onunload":"onbeforeunload",function(){Ka(Ea.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Xb=b.comment;this.Jc=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Fa:!1,Hb:!1,R:!1,error:!1};this.vb=null;this.o.error=!1;this.j={};this.H=null;this.Hc=d||0;y.push(this)}var Na=void 0,Oa={};
|
Ia(Ca("Opera")||Ca("iOS")?"onunload":"onbeforeunload",function(){Ka(Ea.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Yb=b.comment;this.Kc=b;b=this.id.indexOf(".");0>b?this.Ca=this.id:(this.ua=this.id.substr(0,b),this.Ca=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Fa:!1,Jb:!1,R:!1,error:!1};this.wb=null;this.o.error=!1;this.j={};this.G=null;this.Ic=d||0;y.push(this)}var Na=void 0,Oa={};
|
||||||
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
if(window){Na||(Na=window.location.search.substr(1));for(var Pa,Qa=/\+/g,Ra=/([^&=]+)=?([^&]*)/g;Pa=Ra.exec(Na);)Oa[decodeURIComponent(Pa[1].replace(Qa," "))]=decodeURIComponent(Pa[2].replace(Qa," "))}function Sa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
||||||
function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ta=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ta={},y=[];function Ua(a,b,c){Ta[a]&&b&&(Ta[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<y.length;b++){var d=y[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
function z(a,b){b||(b=x);a.prototype=Sa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ta=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ta={},y=[];function Ua(a,b,c){Ta[a]&&b&&(Ta[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<y.length;b++){var d=y[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
||||||
function Va(a){if(void 0!==a){var b;for(b=0;b<y.length;b++)if(y[b].id===a)return y[b]}return null}function Wa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<y.length;d++)if(c)c==y[d]&&(c=null);else if(!(a!=y[d].type||b&&y[d].id.indexOf(b)))return y[d]}return null}function B(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
function Va(a){if(void 0!==a){var b;for(b=0;b<y.length;b++)if(y[b].id===a)return y[b]}return null}function Wa(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<y.length;d++)if(c)c==y[d]&&(c=null);else if(!(a!=y[d].type||b&&y[d].id.indexOf(b)))return y[d]}return null}function B(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){w(c.message+" ("+a+")")}return b}
|
||||||
function C(a,b){b=D(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var k=g.split(" "),l=0;l<k.length;l++)switch(g=k[l],g){case "pdp11-binding":(g=B(f))&&g.binding&&a.aa(g.type,g.binding,f,g.value),l=k.length}}}}
|
function C(a,b){b=D(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var k=g.split(" "),l=0;l<k.length;l++)switch(g=k[l],g){case "pdp11-binding":(g=B(f))&&g.binding&&a.aa(g.type,g.binding,f,g.value),l=k.length}}}}
|
||||||
function D(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
function D(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
||||||
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},aa:function(a,b,c){switch(b){case "clear":return this.j[b]||(this.j[b]=c,c.onclick=function(a){return function(){a.j.print&&(a.j.print.value="")}}(this)),!0;case "print":return this.j[b]||(this.eb=this.j[b]=c,c.value="",this.X=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},aa:function(a,b,c){switch(b){case "clear":return this.j[b]||(this.j[b]=c,c.onclick=function(a){return function(){a.j.print&&(a.j.print.value="")}}(this)),!0;case "print":return this.j[b]||(this.eb=this.j[b]=c,c.value="",this.X=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
||||||
this.C=function(a){this.X(a,this.Ca)}),!0;default:return!1}},log:function(){},X:function(){},status:function(a){this.X(this.Ca+": "+a)},C:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},ha:function(){return this.o.R=!0},ga:function(a,b){b&&(this.o.R=!1);return!0}};function Xa(a,b){a.o.Hb?(a.o.Fa=!1,a.o.Hb=!1):a.o.error?a.X(a.toString()+" error"):a.o.Fa=b}function E(a,b){a.o.error||(a.o.ready=!1!==b,a.o.ready&&(b=a.vb,a.vb=null,b&&b()))}
|
this.D=function(a){this.X(a,this.Ca)}),!0;default:return!1}},log:function(){},X:function(){},status:function(a){this.X(this.Ca+": "+a)},D:function(a,b,c){c=c||this.type;b||w((c?c+": ":"")+a)},ha:function(){return this.o.R=!0},ga:function(a,b){b&&(this.o.R=!1);return!0}};function Xa(a,b){a.o.Jb?(a.o.Fa=!1,a.o.Jb=!1):a.o.error?a.X(a.toString()+" error"):a.o.Fa=b}function E(a,b){a.o.error||(a.o.ready=!1!==b,a.o.ready&&(b=a.wb,a.wb=null,b&&b()))}
|
||||||
function Ya(a,b){b&&(a.o.ready?b():a.vb=b);return a.o.ready}function Za(a,b){a.o.error=!0;a.C(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
function Ya(a,b){b&&(a.o.ready?b():a.wb=b);return a.o.ready}function Za(a,b){a.o.error=!0;a.D(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
|
||||||
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var $a="undefined"!==typeof ArrayBuffer;
|
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var $a="undefined"!==typeof ArrayBuffer;
|
||||||
function ab(a){x.call(this,"Panel",a,ab,512);this.ia=this.i=this.c=this.m=this.s=this.u=0;this.A=this.D=this.w=!1;this.G=bb;this.h={};this.b={START:[1,1,!0,!1,this.Qc],STEP:[1,1,!1,!1,this.Rc],ENABLE:[1,1,!1,!1,this.Mc],CONT:[1,1,!0,!1,this.Kc],DEP:[0,0,!0,!1,this.Lc],EXAM:[1,1,!0,!1,this.Nc],LOAD:[1,1,!0,!1,this.Pc],TEST:[0,0,!0,!1,this.Oc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Sc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
|
function ab(a){x.call(this,"Panel",a,ab,512);this.ia=this.i=this.c=this.m=this.s=this.v=0;this.w=this.C=this.A=!1;this.H=bb;this.h={};this.b={START:[1,1,!0,!1,this.Rc],STEP:[1,1,!1,!1,this.Sc],ENABLE:[1,1,!1,!1,this.Nc],CONT:[1,1,!0,!1,this.Lc],DEP:[0,0,!0,!1,this.Mc],EXAM:[1,1,!0,!1,this.Oc],LOAD:[1,1,!0,!1,this.Qc],TEST:[0,0,!0,!1,this.Pc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Tc,a]}z(ab);var bb=7;function cb(a,b){return a.b[b]&&a.b[b][1]}h=ab.prototype;h.reset=function(){this.stop()};
|
||||||
h.aa=function(a,b,c,d){if(this.l&&this.l.aa(a,b,c,d)||this.a&&this.a.aa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.u++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.u++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
|
h.aa=function(a,b,c,d){if(this.l&&this.l.aa(a,b,c,d)||this.a&&this.a.aa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.h[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.j[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){db(a,
|
||||||
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.aa.call(this,a,b,c,d)}};h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.H=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ha=function(a,b){b||(kb(),this.reset());return!0};h.ga=function(){return!0};
|
b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){eb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){db(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){eb(a,b)}}(this,b),!0):this.parent.aa.call(this,a,b,c,d)}};h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;fb(b,this,gb);hb(b,this.reset.bind(this));ib(this);jb(this)};h.ha=function(a,b){b||(kb(),this.reset());return!0};h.ga=function(){return!0};
|
||||||
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.H&&a.H.g||8)?ka(c,d):q(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
function lb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function ib(a,b){for(var c in a.h)lb(a,c,null!=b?b:a.h[c])}function mb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function jb(a){for(var b in a.b)mb(a,b,a.b[b][1])}function nb(a,b,c,d){a.j[b]&&(void 0===c&&(Za(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.G&&a.G.g||8)?ka(c,d):q(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))}
|
||||||
function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.D="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Qc=function(a){a||this.a.o.T||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Rc=function(){};h.Mc=function(a){a||F(this.a)};
|
function db(a,b){var c=a.b[b];mb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.w="DEP"==b,a.C="EXAM"==b)}function eb(a,b){var c=a.b[b];c[2]&&c[3]&&(mb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rc=function(a){a||this.a.o.T||(a=this.a,a.g.reset(),ob(a),cb(this,"ENABLE")&&pb(this.a))};h.Sc=function(){};h.Nc=function(a){a||F(this.a)};
|
||||||
h.Kc=function(a){if(!a&&!this.a.o.T)if(cb(this,"ENABLE"))pb(this.a);else{a=this.H;var b;if(b=a)a.o.Fa&&(a.o.Hb=!0),b=!a.o.Fa;if(b)Xa(a,!0),a.xb(0,null),Xa(a,!1);else try{var c=this.a.xb(1);0<c&&(qb(this.a,c),rb(this.a,c,!0),sb(this.a,c))}catch(d){"number"!=typeof d&&Za(this.a,d.stack||d.message)}this.stop();this.l&&this.l.Ba()}};h.Lc=function(a){a&&!this.a.o.T&&(this.A&&tb(this),a=ub(this,this.c),this.G==bb?this.g.Va(this.ia,a):this.a.Va(this.ia,a))};
|
h.Lc=function(a){if(!a&&!this.a.o.T)if(cb(this,"ENABLE"))pb(this.a);else{a=this.G;var b;if(b=a)a.o.Fa&&(a.o.Jb=!0),b=!a.o.Fa;if(b)Xa(a,!0),a.zb(0,null),Xa(a,!1);else try{var c=this.a.zb(1);0<c&&(qb(this.a,c),rb(this.a,c,!0),sb(this.a,c))}catch(d){"number"!=typeof d&&Za(this.a,d.stack||d.message)}this.stop();this.l&&this.l.Ba()}};h.Mc=function(a){a&&!this.a.o.T&&(this.w&&tb(this),a=ub(this,this.c),this.H==bb?this.g.Va(this.ia,a):this.a.Va(this.ia,a))};
|
||||||
h.Nc=function(a){a||this.a.o.T||(this.D&&tb(this),a=this.G==bb?this.g.Qa(this.ia):this.a.Qa(this.ia),ub(this,a))};h.Pc=function(a){a||this.a.o.T||vb(this,this.c)};h.Oc=function(a){if(a)this.w=!0,ib(this,!0);else if(this.w=!1,ib(this),void 0!==this.j.S0){for(a=this.c=0;22>a;a++)this.b["S"+a][1]=0&1<<a?1:0;jb(this)}};h.Sc=function(a,b){this.c=a?this.c|1<<b:this.c&~(1<<b)};
|
h.Oc=function(a){a||this.a.o.T||(this.C&&tb(this),a=this.H==bb?this.g.Qa(this.ia):this.a.Qa(this.ia),ub(this,a))};h.Qc=function(a){a||this.a.o.T||vb(this,this.c)};h.Pc=function(a){if(a)this.A=!0,ib(this,!0);else if(this.A=!1,ib(this),void 0!==this.j.S0){for(a=this.c=0;22>a;a++)this.b["S"+a][1]=0&1<<a?1:0;jb(this)}};h.Tc=function(a,b){this.c=a?this.c|1<<b:this.c&~(1<<b)};
|
||||||
function tb(a){var b=1145>a.a.Ra?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<<c)}function ub(a,b){a.i=b&65535;b=a.i;for(var c=0;16>c;c++)wb(a,"D"+c,b&1<<c);return a.i}function wb(a,b,c){a.h[b]=c;a.w||lb(a,b,c)}h.stop=function(){vb(this,this.a.f[7])};h.setData=function(a,b){b?this.m=a:this.i=a};h.Tc=function(a,b){return(b?this.m:this.c)&65535};h.Vd=function(a){this.m=a};
|
function tb(a){var b=1145>a.a.Ra?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.g.qa;cb(a,"STEP")||(b=-b);vb(a,a.ia&~c|a.ia+b&c)}function vb(a,b){a.ia=b&a.g.qa;b=a.ia;for(var c=0;22>c;c++)wb(a,"A"+c,b&1<<c)}function ub(a,b){a.i=b&65535;b=a.i;for(var c=0;16>c;c++)wb(a,"D"+c,b&1<<c);return a.i}function wb(a,b,c){a.h[b]=c;a.A||lb(a,b,c)}h.stop=function(){vb(this,this.a.f[7])};h.setData=function(a,b){b?this.m=a:this.i=a};h.Uc=function(a,b){return(b?this.m:this.c)&65535};h.Vd=function(a){this.m=a};
|
||||||
var xb={},gb=(xb[65400]=[null,null,ab.prototype.Tc,ab.prototype.Vd,"CNSW"],xb);function kb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=B(d),f=Va(e.id);f||(a=!0,f=new ab(e));C(f,d);a&&E(f)}}Ja(kb);
|
var xb={},gb=(xb[65400]=[null,null,ab.prototype.Uc,ab.prototype.Vd,"CNSW"],xb);function kb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=B(d),f=Va(e.id);f||(a=!0,f=new ab(e));C(f,d);a&&E(f)}}Ja(kb);
|
||||||
function yb(a,b,c){x.call(this,"Bus",a,yb,16);this.a=b;this.H=c;this.K=a.busWidth||16;this.s=0;this.u=[];this.i=null;this.D=1<<this.K;this.qa=this.D-1;this.b=G;this.c=Math.log2(this.b);this.G=this.b>>2;this.l=this.b-1;this.A=this.D/this.b|0;this.Da=[];this.h=0;this.m=!1;this.Ib=0;this.w=[];this.xc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.H);this.g=Array(this.A);for(b=0;b<this.A;b++)this.g[b]=a;E(this)}z(yb);var G=8192,Eb=G-1;
|
function yb(a,b,c){x.call(this,"Bus",a,yb,16);this.a=b;this.G=c;this.K=a.busWidth||16;this.s=0;this.v=[];this.i=null;this.C=1<<this.K;this.qa=this.C-1;this.b=G;this.c=Math.log2(this.b);this.H=this.b>>2;this.l=this.b-1;this.w=this.C/this.b|0;this.Da=[];this.h=0;this.m=!1;this.Kb=0;this.A=[];this.yc=[zb,Ab,Bb,Cb];a=new H(this);Db(a,this.G);this.g=Array(this.w);for(b=0;b<this.w;b++)this.g[b]=a;E(this)}z(yb);var G=8192,Eb=G-1;
|
||||||
function zb(a,b){var c=-1,d=this.controller,e=d.Da[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Da[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
|
function zb(a,b){var c=-1,d=this.controller,e=d.Da[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Da[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255}
|
||||||
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Da[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Da[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Da[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
function Ab(a,b,c){var d=!1,e=this.controller,f=e.Da[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Da[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Bb(a,b){var c=-1,d=this.controller;a=d.Da[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}
|
||||||
function Cb(a,b,c){var d=!1,e=this.controller;a=e.Da[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.s){var c;a.s&&(c=(1<<a.s)-G,Gb(a,c,G,a.u),a.s=0);b&&(a.s=b,c=1<<b,a.qa=c-1,c-=G,a.u=Hb(a,c,G),a.i?Gb(a,c,G,a.i):(Ib(a,c,G,Jb,a),a.i=Hb(a,c,G)))}}h=yb.prototype;h.reset=function(){for(var a=0;a<this.w.length;a++)this.w[a]();Fb(this,16)};h.ha=function(a,b){b||this.reset();return!0};
|
function Cb(a,b,c){var d=!1,e=this.controller;a=e.Da[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Fb(a,b){if(b!=a.s){var c;a.s&&(c=(1<<a.s)-G,Gb(a,c,G,a.v),a.s=0);b&&(a.s=b,c=1<<b,a.qa=c-1,c-=G,a.v=Hb(a,c,G),a.i?Gb(a,c,G,a.i):(Ib(a,c,G,Jb,a),a.i=Hb(a,c,G)))}}h=yb.prototype;h.reset=function(){for(var a=0;a<this.A.length;a++)this.A[a]();Fb(this,16)};h.ha=function(a,b){b||this.reset();return!0};
|
||||||
function Ib(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0<g&&k<a.g.length;){var l=a.g[k],n=k*a.b,p=a.b-(f-n);p>g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.yb+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.yb){p=l.size-(f-n);p>g&&(p=g);l.yb=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.H,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.Ib+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ka(b)),!0):Kb(2,b,c)}
|
function Ib(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0<g&&k<a.g.length;){var l=a.g[k],n=k*a.b,p=a.b-(f-n);p>g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Pa)return l.Ab+=l.Pa-f,l.Pa=f,!0;if(f>=l.Pa+l.Ab){p=l.size-(f-n);p>g&&(p=g);l.Ab=f-l.Pa+p;f=n+a.b;g-=p;k++;continue}}return Kb(1,f,g)}f=new H(a,f,p,a.b,d,e);Db(f,a.G,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Lb&&(a.Kb+=c),a.status((c>>10)+"Kb "+Mb[d]+" at "+ka(b)),!0):Kb(2,b,c)}
|
||||||
function Hb(a,b,c){var d=[];for(b>>>=a.c;0<c&&b<a.g.length;)d.push(a.g[b++]),c-=a.b;return d}function Gb(a,b,c,d){var e=0;for(b>>>=a.c;0<c&&b<a.g.length;){var f=d[e++];if(!f)break;a.g[b++]=f;c-=a.b}}function Nb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Lb(b&a.l,b)}function Pb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}h.Qa=function(a){3932160<=a&&(a=Ob(this.a,a));var b=a&this.l,c=(a&this.qa)>>>this.c;this.m=!1;this.h++;a=this.g[c].ec(b,a);this.h--;return a};
|
function Hb(a,b,c){var d=[];for(b>>>=a.c;0<c&&b<a.g.length;)d.push(a.g[b++]),c-=a.b;return d}function Gb(a,b,c,d){var e=0;for(b>>>=a.c;0<c&&b<a.g.length;){var f=d[e++];if(!f)break;a.g[b++]=f;c-=a.b}}function Nb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Nb(b&a.l,b)}function Pb(a,b){3932160<=b&&(b=Ob(a.a,b));return a.g[(b&a.qa)>>>a.c].Y(b&a.l,b)}h.Qa=function(a){3932160<=a&&(a=Ob(this.a,a));var b=a&this.l,c=(a&this.qa)>>>this.c;this.m=!1;this.h++;a=this.g[c].fc(b,a);this.h--;return a};
|
||||||
function Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Qb(b&a.l,c&255,b)}h.jb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Rb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].zb(b&a.l,c&65535,b)}h.Va=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].kc(c,b&65535,a);this.h--};
|
function Qb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Rb(b&a.l,c&255,b)}h.kb=function(a,b){3932160<=a&&(a=Ob(this.a,a));this.m=!1;this.h++;this.g[(a&this.qa)>>>this.c].Sb(a&this.l,b&255,a);this.h--};function Rb(a,b,c){3932160<=b&&(b=Ob(a.a,b));a.g[(b&a.qa)>>>a.c].Bb(b&a.l,c&65535,b)}h.Va=function(a,b){3932160<=a&&(a=Ob(this.a,a));var c=a&this.l,d=(a&this.qa)>>>this.c;this.m=!1;this.h++;this.g[d].lc(c,b&65535,a);this.h--};
|
||||||
function Sb(a){for(var b=0,c=[],d=0;d<a.A;d++){var e=a.g[d];if(e.za||e.Dc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var n=e[g],p=g+1;p<e.length&&e[p]===n;)p++;l[k++]=p-g;l[k++]=n;g=p}l.length<e.length&&(e=l)}c[f]=e}}return c}function Tb(a,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Eb;if(void 0!==a.Da[n])return w("I/O address already registered: "+q(b,8,!0)),!1;a.Da[n]=[d,e,f,g,l||"unknown",k||16,!1]}return!0}
|
function Sb(a){for(var b=0,c=[],d=0;d<a.w;d++){var e=a.g[d];if(e.za||e.Ec){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var n=e[g],p=g+1;p<e.length&&e[p]===n;)p++;l[k++]=p-g;l[k++]=n;g=p}l.length<e.length&&(e=l)}c[f]=e}}return c}function Tb(a,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Eb;if(void 0!==a.Da[n])return w("I/O address already registered: "+q(b,8,!0)),!1;a.Da[n]=[d,e,f,g,l||"unknown",k||16,!1]}return!0}
|
||||||
function fb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v<u;v++,e+=2)if(p&&1<u&&(p=f[4]+v),!Tb(a,e,e,g,k,l,n,f[7]||b.Hc,p||b.Ca))return!1}}return!0}function hb(a,b){a.w.push(b)}
|
function fb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,v=0;v<u;v++,e+=2)if(p&&1<u&&(p=f[4]+v),!Tb(a,e,e,g,k,l,n,f[7]||b.Ic,p||b.Ca))return!1}}return!0}function hb(a,b){a.A.push(b)}
|
||||||
function I(a,b,c){a.m=!0;a.h||(c&&(a.a.ja|=c),J(a.a,4,0,b))}function Ub(a){var b=a.m;a.m=!1;return b}function Kb(a,b,c){w("Memory block error ("+a+": "+q(b)+","+q(c)+")");return!1}function K(a){x.call(this,"Device",a,K,256);this.b={B:0,Pb:-1}}z(K);h=K.prototype;
|
function I(a,b,c){a.m=!0;a.h||(c&&(a.a.ja|=c),J(a.a,4,0,b))}function Ub(a){var b=a.m;a.m=!1;return b}function Kb(a,b,c){w("Memory block error ("+a+": "+q(b)+","+q(c)+")");return!1}function K(a){x.call(this,"Device",a,K,256);this.b={B:0,Qb:-1}}z(K);h=K.prototype;
|
||||||
h.fa=function(a,b,c,d){this.g=b;this.l=a;this.a=c;this.H=d;var e=this;this.b.Pb=Vb(c,function(){e.b.gb|=128;e.b.gb&64&&Wb(e.a,e.b.Td);e.l&&e.l.Ba(1);Xb(e.a,e.b.Pb,1E3/60)});this.b.Td=Yb(64,6,524288);fb(b,this,Zb);hb(b,this.reset.bind(this));E(this)};h.reset=function(){this.b.gb=128;Xb(this.a,this.b.Pb,1E3/60,!0)};h.$c=function(){return this.b.gb};h.be=function(a){this.b.gb=a&192};h.bd=function(){var a=this.a,b=a.Z;b&57344||(b=b&-3199|a.lb<<5|a.mb<<1);return b};
|
h.fa=function(a,b,c,d){this.g=b;this.l=a;this.a=c;this.G=d;var e=this;this.b.Qb=Vb(c,function(){e.b.hb|=128;e.b.hb&64&&Wb(e.a,e.b.fb);e.l&&e.l.Ba(1);Xb(e.a,e.b.Qb,1E3/60)});this.b.fb=Yb(64,6,524288);fb(b,this,Zb);hb(b,this.reset.bind(this));E(this)};h.reset=function(){this.b.hb=128;Xb(this.a,this.b.Qb,1E3/60,!0)};h.ad=function(){return this.b.hb};h.be=function(a){this.b.hb=a&192};h.cd=function(){var a=this.a,b=a.Z;b&57344||(b=b&-3199|a.mb<<5|a.nb<<1);return b};
|
||||||
h.de=function(a){$b(this.a,a&-129|this.a.Z&128)};h.cd=function(){var a=this.a;a.Z&57344||(a.Eb=a.A>>16&65535);a=a.Eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.dd=function(){var a=this.a;a.Z&57344||(a.Gb=a.A&65535);return a.Gb};h.ed=function(){return this.a.Ea};h.ee=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.Ya=a&16?4194303:262143,ac(b))};h.Nd=function(a){a=a>>1&63;var b=this.a.kb[a>>1];return a&1?b>>16:b&65535};
|
h.de=function(a){$b(this.a,a&-129|this.a.Z&128)};h.dd=function(){var a=this.a;a.Z&57344||(a.Gb=a.w>>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.Z&57344||(a.Ib=a.w&65535);return a.Ib};h.fd=function(){return this.a.Ea};h.ee=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.Ya=a&16?4194303:262143,ac(b))};h.Od=function(a){a=a>>1&63;var b=this.a.lb[a>>1];return a&1?b>>16:b&65535};
|
||||||
h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.kb[c]=b&1?this.a.kb[c]&65535|(a&63)<<16:this.a.kb[c]&-65536|a&65534};h.Gd=function(a){return this.a.I[1][a>>1&7]};h.Fe=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Ed=function(a){return this.a.I[1][(a>>1&7)+8]};h.De=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Fd=function(a){return this.a.ca[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Dd=function(a){return this.a.ca[1][(a>>1&7)+8]};
|
h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.lb[c]=b&1?this.a.lb[c]&65535|(a&63)<<16:this.a.lb[c]&-65536|a&65534};h.Hd=function(a){return this.a.I[1][a>>1&7]};h.Fe=function(a,b){this.a.I[1][b>>1&7]=a&65295};h.Fd=function(a){return this.a.I[1][(a>>1&7)+8]};h.De=function(a,b){this.a.I[1][(b>>1&7)+8]=a&65295};h.Gd=function(a){return this.a.ca[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Ed=function(a){return this.a.ca[1][(a>>1&7)+8]};
|
||||||
h.Ce=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.Zc=function(a){return this.a.I[0][a>>1&7]};h.ae=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.Xc=function(a){return this.a.I[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.a.ca[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};h.Wc=function(a){return this.a.ca[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};
|
h.Ce=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.I[1][b]&=65295};h.$c=function(a){return this.a.I[0][a>>1&7]};h.ae=function(a,b){this.a.I[0][b>>1&7]=a&65295};h.Yc=function(a){return this.a.I[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.I[0][(b>>1&7)+8]=a&65295};h.Zc=function(a){return this.a.ca[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};h.Xc=function(a){return this.a.ca[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.I[0][b]&=65295};
|
||||||
h.Md=function(a){return this.a.I[3][a>>1&7]};h.Le=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Kd=function(a){return this.a.I[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Ld=function(a){return this.a.ca[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Jd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Ta=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]};
|
h.Nd=function(a){return this.a.I[3][a>>1&7]};h.Le=function(a,b){this.a.I[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.I[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.I[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.ca[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Kd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.I[3][b]&=65295};h.Ta=function(a){a&=7;return this.a.F&2048?this.a.Ja[a]:this.a.f[a]};
|
||||||
h.Wa=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.kd=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.nd=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Ua=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Xa=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.ld=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
|
h.Wa=function(a,b){b&=7;this.a.F&2048?this.a.Ja[b]=a:this.a.f[b]=a};h.ld=function(){return this.a.F&49152?this.a.ra[0]:this.a.f[6]};h.je=function(a){this.a.F&49152?this.a.ra[0]=a:this.a.f[6]=a};h.od=function(){return this.a.f[7]};h.me=function(a){this.a.f[7]=a};h.Ua=function(a){a&=7;return this.a.F&2048?this.a.f[a]:this.a.Ja[a]};h.Xa=function(a,b){b&=7;this.a.F&2048?this.a.f[b]=a:this.a.Ja[b]=a};h.md=function(){return 1==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[1]};
|
||||||
h.ke=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.md=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.le=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Vc=function(a){return this.a.hc[a-65504>>1]};h.Xd=function(a,b){this.a.hc[b-65504>>1]=a};h.dc=function(a){if(65520==a){a=0;switch(Lb){case Lb:a=this.g.Ib}a=(a>>6)-1}else a=0;return a};h.jc=function(){};h.Id=function(){return 1};h.He=function(){};h.Uc=function(){return this.a.ja};
|
h.ke=function(a){1==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[1]=a};h.nd=function(){return 3==(this.a.F&49152)>>14?this.a.f[6]:this.a.ra[3]};h.le=function(a){3==(this.a.F&49152)>>14?this.a.f[6]=a:this.a.ra[3]=a};h.Wc=function(a){return this.a.ic[a-65504>>1]};h.Xd=function(a,b){this.a.ic[b-65504>>1]=a};h.ec=function(a){if(65520==a){a=0;switch(Lb){case Lb:a=this.g.Kb}a=(a>>6)-1}else a=0;return a};h.kc=function(){};h.Jd=function(){return 1};h.He=function(){};h.Vc=function(){return this.a.ja};
|
||||||
h.Wd=function(){this.a.ja=0};h.ad=function(){return this.a.gc};h.ce=function(a,b){b&1||(a&=255);this.a.gc=a};h.fd=function(a,b){return b?0:this.a.Mb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Mb=a;b.v|=2};h.Hd=function(a,b){return b?0:this.a.ib&65280};h.Ge=function(a){this.a.ib=a|255};h.jd=function(){return bc(this.a)};h.ie=function(a){cc(this.a,a&-1793|bc(this.a)&1792);this.a.v|=128};h.ic=function(){};
|
h.Wd=function(){this.a.ja=0};h.bd=function(){return this.a.hc};h.ce=function(a,b){b&1||(a&=255);this.a.hc=a};h.gd=function(a,b){return b?0:this.a.yb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=2}b.yb=a};h.Id=function(a,b){return b?0:this.a.jb&65280};h.Ge=function(a){this.a.jb=a|255};h.kd=function(){return bc(this.a)};h.ie=function(a){cc(this.a,a&-1793|bc(this.a)&1792);this.a.u|=128};h.jc=function(){};
|
||||||
var L={},Zb=(L[61568]=[null,null,K.prototype.Nd,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Gd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Ed,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Fd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Dd,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.Zc,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Xc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]=
|
var L={},Zb=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]=
|
||||||
[null,null,K.prototype.Yc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Wc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.ed,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.$c,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.bd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.cd,K.prototype.ic,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.dd,K.prototype.ic,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Md,K.prototype.Le,
|
[null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.jc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.jc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le,
|
||||||
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Kd,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Ld,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Jd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Ta,K.prototype.Wa,"R0SET0"],L[65473]=[null,null,K.prototype.Ta,K.prototype.Wa,"R1SET0"],L[65474]=[null,null,K.prototype.Ta,K.prototype.Wa,"R2SET0"],L[65475]=[null,null,K.prototype.Ta,K.prototype.Wa,"R3SET0"],L[65476]=[null,null,K.prototype.Ta,
|
"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Ta,K.prototype.Wa,"R0SET0"],L[65473]=[null,null,K.prototype.Ta,K.prototype.Wa,"R1SET0"],L[65474]=[null,null,K.prototype.Ta,K.prototype.Wa,"R2SET0"],L[65475]=[null,null,K.prototype.Ta,K.prototype.Wa,"R3SET0"],L[65476]=[null,null,K.prototype.Ta,
|
||||||
K.prototype.Wa,"R4SET0"],L[65477]=[null,null,K.prototype.Ta,K.prototype.Wa,"R5SET0"],L[65478]=[null,null,K.prototype.kd,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.nd,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ua,K.prototype.Xa,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ua,K.prototype.Xa,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ua,K.prototype.Xa,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ua,K.prototype.Xa,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ua,
|
K.prototype.Wa,"R4SET0"],L[65477]=[null,null,K.prototype.Ta,K.prototype.Wa,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ua,K.prototype.Xa,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ua,K.prototype.Xa,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ua,K.prototype.Xa,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ua,K.prototype.Xa,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ua,
|
||||||
K.prototype.Xa,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ua,K.prototype.Xa,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.ld,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.md,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Vc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.dc,K.prototype.jc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.dc,K.prototype.jc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Id,K.prototype.He,"SYSID",1,1170],L[65526]=
|
K.prototype.Xa,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ua,K.prototype.Xa,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.ec,K.prototype.kc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.ec,K.prototype.kc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]=
|
||||||
[null,null,K.prototype.Uc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.ad,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.fd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Hd,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.jd,K.prototype.ie,"PSW"],L);
|
[null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L);
|
||||||
Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=B(d);switch(c.type){case "default":c=new K(c);C(c,d);break;case "pc11":c=new dc(c);C(c,d);break;case "rl11":c=new M(c);C(c,d);break;case "rk11":c=new N(c),C(c,d)}}});var ec;if($a){var fc=new ArrayBuffer(2);(new DataView(fc)).setUint16(0,256,!0);ec=256===(new Uint16Array(fc))[0]}else ec=!1;var gc=ec;
|
Ja(function(){for(var a=D(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=B(d);switch(c.type){case "default":c=new K(c);C(c,d);break;case "pc11":c=new dc(c);C(c,d);break;case "rl11":c=new M(c);C(c,d);break;case "rk11":c=new N(c),C(c,d)}}});var ec;if($a){var fc=new ArrayBuffer(2);(new DataView(fc)).setUint16(0,256,!0);ec=256===(new Uint16Array(fc))[0]}else ec=!1;var gc=ec;
|
||||||
function H(a,b,c,d,e,f){this.g=a;this.id=hc+=2;this.a=null;this.Pa=b;this.yb=c;this.size=d||0;this.type=e||ic;this.l=e==jc;this.controller=null;Db(this);this.za=this.Dc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],kc(this,f.xc);else if($a)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.j=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),kc(this,gc?lc:mc);else{a=this.a=Array(this.size>>
|
function H(a,b,c,d,e,f){this.g=a;this.id=hc+=2;this.a=null;this.Pa=b;this.Ab=c;this.size=d||0;this.type=e||ic;this.l=e==jc;this.controller=null;Db(this);this.za=this.Ec=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],kc(this,f.yc);else if($a)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.j=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),kc(this,gc?lc:mc);else{a=this.a=Array(this.size>>
|
||||||
2);for(f=0;f<a.length;f++)a[f]=0;kc(this,nc)}else kc(this)}var ic=0,Lb=1,jc=2,Jb=4,Mb=["NONE","RAM","ROM","VID","H/W"],hc=0;
|
2);for(f=0;f<a.length;f++)a[f]=0;kc(this,nc)}else kc(this)}var ic=0,Lb=1,jc=2,Jb=4,Mb=["NONE","RAM","ROM","VID","H/W"],hc=0;
|
||||||
H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if($a)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.c.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if($a)for(b=0;b<a.length;b++)this.c.setInt32(b<<2,a[b],!0);else this.a=a;return this.za=!0}return!1},u:function(a,b){I(this.g,b,32);return 255},h:function(a,b,c){I(this.g,c,32)},w:function(a,b){return this.Lb(a++,b++)|
|
H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if($a)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.c.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if($a)for(b=0;b<a.length;b++)this.c.setInt32(b<<2,a[b],!0);else this.a=a;return this.za=!0}return!1},v:function(a,b){I(this.g,b,32);return 255},h:function(a,b,c){I(this.g,c,32)},A:function(a,b){return this.Nb(a++,b++)|
|
||||||
this.Lb(a,b)<<8},A:function(a,b,c){this.Qb(a++,b&255,c++);this.Qb(a,b>>8,c)},P:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.za=!0},ya:function(a,b,c){a&1&&I(this.g,c,64);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|
|
this.Nb(a,b)<<8},w:function(a,b,c){this.Rb(a++,b&255,c++);this.Rb(a,b>>8,c)},P:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<<a)|b<<a;this.za=!0},ya:function(a,b,c){a&1&&I(this.g,c,64);c=a>>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<<a)|b<<a:(this.a[c]=this.a[c]&16777215|b<<24,c++,this.a[c]=this.a[c]&-256|
|
||||||
b>>8);this.za=!0},G:function(a,b){return this.K(a,b)},V:function(a,b){return this.ec(a,b)},ta:function(a,b,c){this.l?this.h(a,b,c):this.Rb(a,b,c)},wa:function(a,b,c){this.l?this.h(a,b,c):this.kc(a,b,c)},D:function(a){return this.j[a]},N:function(a){return this.j[a]},U:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},sa:function(a,b){this.j[a]=b;this.za=!0},Ca:function(a,b){this.j[a]=b;this.za=!0},va:function(a,b,c){a&1&&I(this.g,
|
b>>8);this.za=!0},H:function(a,b){return this.K(a,b)},V:function(a,b){return this.fc(a,b)},ta:function(a,b,c){this.l?this.h(a,b,c):this.Sb(a,b,c)},wa:function(a,b,c){this.l?this.h(a,b,c):this.lc(a,b,c)},C:function(a){return this.j[a]},L:function(a){return this.j[a]},U:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},sa:function(a,b){this.j[a]=b;this.za=!0},Ca:function(a,b){this.j[a]=b;this.za=!0},va:function(a,b,c){a&1&&I(this.g,
|
||||||
c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.H=b;a.i=a.m=0;c&&((a.i=c.i)&&oc(a,pc,!1),(a.m=c.m)&&sc(a,pc,!1))}function sc(a,b,c){c&&a.m||(a.Qb=!a.l&&b[1]||a.h,a.zb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Rb=b[1]||a.h,a.kc=b[3]||a.A}function oc(a,b,c){c&&a.i||(a.Lb=b[0]||a.u,a.Y=b[2]||a.w);if(c||void 0===c)a.K=b[0]||a.u,a.ec=b[2]||a.w}function kc(a,b){b||(b=tc);oc(a,b,void 0);sc(a,b,void 0)}
|
c,64);this.c.setUint16(a,b,!0);this.za=!0},xa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.za=!0}};function Db(a,b,c){a.G=b;a.i=a.m=0;c&&((a.i=c.i)&&oc(a,pc,!1),(a.m=c.m)&&sc(a,pc,!1))}function sc(a,b,c){c&&a.m||(a.Rb=!a.l&&b[1]||a.h,a.Bb=!a.l&&b[3]||a.w);if(c||void 0===c)a.Sb=b[1]||a.h,a.lc=b[3]||a.w}function oc(a,b,c){c&&a.i||(a.Nb=b[0]||a.v,a.Y=b[2]||a.A);if(c||void 0===c)a.K=b[0]||a.v,a.fc=b[2]||a.A}function kc(a,b){b||(b=tc);oc(a,b,void 0);sc(a,b,void 0)}
|
||||||
var tc=[],nc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],pc=[H.prototype.G,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var mc=[H.prototype.D,H.prototype.sa,H.prototype.U,H.prototype.va],lc=[H.prototype.N,H.prototype.Ca,H.prototype.ka,H.prototype.xa];
|
var tc=[],nc=[H.prototype.P,H.prototype.ua,H.prototype.la,H.prototype.ya],pc=[H.prototype.H,H.prototype.ta,H.prototype.V,H.prototype.wa];if($a)var mc=[H.prototype.C,H.prototype.sa,H.prototype.U,H.prototype.va],lc=[H.prototype.L,H.prototype.Ca,H.prototype.ka,H.prototype.xa];
|
||||||
function uc(a,b){x.call(this,"CPU",a,uc,1);b=a.cycles||b;var c=a.multiplier||1;this.Bb=0;this.qb=b;this.xa=c;this.Db=Math.round(this.qb/1E4)/100;this.Ma=this.Db*this.xa;this.o.T=!1;this.o.Ob=!1;this.o.cb=a.autoStart;this.o.tb=!1;this.ob=this.Na=0;this.pb=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.N=[];this.cc=this.Rd.bind(this);E(this)}z(uc);var vc=["power","reset"];h=uc.prototype;
|
function uc(a,b){x.call(this,"CPU",a,uc,1);b=a.cycles||b;var c=a.multiplier||1;this.Db=0;this.rb=b;this.xa=c;this.Fb=Math.round(this.rb/1E4)/100;this.Ma=this.Fb*this.xa;this.o.T=!1;this.o.Pb=!1;this.o.cb=a.autoStart;this.o.ub=!1;this.pb=this.Na=0;this.qb=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.P=[];this.dc=this.Sd.bind(this);E(this)}z(uc);var vc=["power","reset"];h=uc.prototype;
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.H=d;this.w=a.w;for(b=0;b<vc.length;b++)(c=this.j[vc[b]])&&this.l.aa(null,vc[b],c);a=wc(a,"autoStart");null!=a&&(this.o.cb="true"==a?!0:"false"==a?!1:!!a);E(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};h.ha=function(a,b){if(!b){if(a&&this.restore){xc(this);if(!this.restore(a))return!1;yc(this)}else this.reset();this.X("No debugger detected")}return!0};h.ga=function(a){return a?this.save():!0};
|
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.G=d;this.A=a.A;for(b=0;b<vc.length;b++)(c=this.j[vc[b]])&&this.l.aa(null,vc[b],c);a=wc(a,"autoStart");null!=a&&(this.o.cb="true"==a?!0:"false"==a?!1:!!a);E(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};h.ha=function(a,b){if(!b){if(a&&this.restore){xc(this);if(!this.restore(a))return!1;yc(this)}else this.reset();this.X("No debugger detected")}return!0};h.ga=function(a){return a?this.save():!0};
|
||||||
h.cb=function(){return this.o.cb||void 0===this.j.run?(pb(this),!0):!1};h.Zb=function(){return 0};function yc(a){void 0===a.pb&&(a.pb=0);void 0===a.Za&&(a.Za=-1);void 0===a.$a&&(a.$a=-1);a.o.tb=0<=a.pb&&0<a.Za;a.o.tb&&(a.ob=0,a.Na=a.pb-a.ya)}function sb(a,b){if(a.o.tb){var c=!1;a.ob=a.ob+a.Zb()|0;a.Na-=b;0>=a.Na&&(a.Na+=a.Za,c=!0);0<=a.$a&&a.$a<=zc(a)&&(a.Za=a.$a=-1,yc(a),F(a),c=!0);c&&a.X(zc(a)+" cycles: checksum="+q(a.ob))}}
|
h.cb=function(){return this.o.cb||void 0===this.j.run?(pb(this),!0):!1};h.$b=function(){return 0};function yc(a){void 0===a.qb&&(a.qb=0);void 0===a.Za&&(a.Za=-1);void 0===a.$a&&(a.$a=-1);a.o.ub=0<=a.qb&&0<a.Za;a.o.ub&&(a.pb=0,a.Na=a.qb-a.ya)}function sb(a,b){if(a.o.ub){var c=!1;a.pb=a.pb+a.$b()|0;a.Na-=b;0>=a.Na&&(a.Na+=a.Za,c=!0);0<=a.$a&&a.$a<=zc(a)&&(a.Za=a.$a=-1,yc(a),F(a),c=!0);c&&a.X(zc(a)+" cycles: checksum="+q(a.pb))}}
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=A(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.o.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.o.R);c++);c==k.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.o.ready?"powered yet":"ready yet"+(b.vb?" (waiting for notification)":""))+".");a=!1}a&&(d.o.T?F(d):pb(d))},!0;case "speed":return this.j[b]=
|
h.aa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.j[b]=c,!0;case "run":return this.j[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=A(a.id);for(c=0;c<k.length&&(b=k[c],b===a||b.o.ready);c++);if(c==k.length)for(c=0;c<k.length&&(b=k[c],b===a||b.o.R);c++);c==k.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.o.ready?"powered yet":"ready yet"+(b.wb?" (waiting for notification)":""))+".");a=!1}a&&(d.o.T?F(d):pb(d))},!0;case "speed":return this.j[b]=
|
||||||
c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Ac(d,d.xa<<1,!0)},c.textContent=this.Ma.toFixed(2)+"Mhz",!0}return!1};h.Ba=function(a){this.l&&this.l.Ba(a)};function rb(a,b,c){a.ya+=b;c&&(a.wa=a.a=a.K=0)}function Bc(a,b){var c=1;b&&1<a.xa&&a.La&&(c=a.La/a.Db);a.$b=Math.round(1E3/30);a.rb=Math.floor(a.qb/30*c);b||(a.ab=a.rb);a.Ab=0}function zc(a){return a.ya+a.ta+a.wa-a.a}function xc(a){a.La=0;a.ac=0;a.ya=a.ta=a.wa=a.a=a.K=0;yc(a);Ac(a,1)}
|
c,!0;case "setSpeed":return this.j[b]=c,c.onclick=function(){Ac(d,d.xa<<1,!0)},c.textContent=this.Ma.toFixed(2)+"Mhz",!0}return!1};h.Ba=function(a){this.l&&this.l.Ba(a)};function rb(a,b,c){a.ya+=b;c&&(a.wa=a.a=a.K=0)}function Bc(a,b){var c=1;b&&1<a.xa&&a.La&&(c=a.La/a.Fb);a.ac=Math.round(1E3/30);a.sb=Math.floor(a.rb/30*c);b||(a.ab=a.sb);a.Cb=0}function zc(a){return a.ya+a.ta+a.wa-a.a}function xc(a){a.La=0;a.bc=0;a.ya=a.ta=a.wa=a.a=a.K=0;yc(a);Ac(a,1)}
|
||||||
function Ac(a,b,c){if(void 0!==b){.8>a.La/a.Ma&&(b=1);a.xa=b;b=a.Db*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Cc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Bc(a)}function Vb(a,b){var c=a.N.length;a.N.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&b<a.N.length&&(d||0>a.N[b][0])&&(c=a.qb*a.xa/1E3*c|0,a.o.T&&(c+=Dc(a)),a.N[b][0]=c)}
|
function Ac(a,b,c){if(void 0!==b){.8>a.La/a.Ma&&(b=1);a.xa=b;b=a.Fb*a.xa;if(a.Ma!=b){a.Ma=b;b=a.Ma.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.X("target speed: "+b)}c&&a.l&&Cc(a.l)}rb(a,a.ta);a.ta=0;a.la=ra();a.va=0;Bc(a)}function Vb(a,b){var c=a.P.length;a.P.push([-1,b]);return c}function Xb(a,b,c,d){0<=b&&b<a.P.length&&(d||0>a.P[b][0])&&(c=a.rb*a.xa/1E3*c|0,a.o.T&&(c+=Dc(a)),a.P[b][0]=c)}
|
||||||
function qb(a,b){for(var c=a.N.length-1;0<=c;c--){var d=a.N[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Dc(a,b){var c=a.wa-=a.a;a.a=a.K=0;b&&(a.wa=0);return c}
|
function qb(a,b){for(var c=a.P.length-1;0<=c;c--){var d=a.P[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Dc(a,b){var c=a.wa-=a.a;a.a=a.K=0;b&&(a.wa=0);return c}
|
||||||
h.Rd=function(){if(this.o.T){this.Ab>=this.qb&&Bc(this,!0);this.bb=0;this.nb=ra();if(this.va){var a=this.nb-this.va;a>this.$b&&(this.la+=a,this.la>this.nb&&(this.la=this.nb))}try{do{for(var b,c=this.o.tb?1:this.rb,d=this.N.length-1;0<=d;d--){var e=this.N[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.xb(b)}catch(f){if("number"!=typeof f)throw f;}b=Dc(this,!0);this.bb+=b;this.ta+=b;sb(this,b);qb(this,b);this.ab-=b;if(0>=this.ab){this.ab+=this.rb;15<=++this.ac&&(this.Ba(),this.ac=0);break}}while(this.o.T)}catch(f){F(this);
|
h.Sd=function(){if(this.o.T){this.Cb>=this.rb&&Bc(this,!0);this.bb=0;this.ob=ra();if(this.va){var a=this.ob-this.va;a>this.ac&&(this.la+=a,this.la>this.ob&&(this.la=this.ob))}try{do{for(var b,c=this.o.ub?1:this.sb,d=this.P.length-1;0<=d;d--){var e=this.P[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(f){if("number"!=typeof f)throw f;}b=Dc(this,!0);this.bb+=b;this.ta+=b;sb(this,b);qb(this,b);this.ab-=b;if(0>=this.ab){this.ab+=this.sb;15<=++this.bc&&(this.Ba(),this.bc=0);break}}while(this.o.T)}catch(f){F(this);
|
||||||
this.l&&this.l.stop(ra(),zc(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.cc;this.va=ra();c=this.$b;this.bb&&(c=Math.round(c*this.bb/this.rb));c-=this.va-this.nb;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Ac(this));if(0>c||this.La<this.Ma)-1E3>c&&(this.la-=c),c=0;this.Ab+=this.bb;this.va+=c;a(b,c)}}};
|
this.l&&this.l.stop(ra(),zc(this));Za(this,f.stack||f.message);return}if(this.o.T){a=setTimeout;b=this.dc;this.va=ra();c=this.ac;this.bb&&(c=Math.round(c*this.bb/this.sb));c-=this.va-this.ob;if(d=this.va-this.la)this.La=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.ya=0,Ac(this));if(0>c||this.La<this.Ma)-1E3>c&&(this.la-=c),c=0;this.Cb+=this.bb;this.va+=c;a(b,c)}}};
|
||||||
function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Ac(a);a.o.T=!0;a.o.Ob=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,zc(a));setTimeout(a.cc,0)}}h.xb=function(){return 0};function F(a){var b=!1;if(a.o.T){Dc(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),zc(a));b=!0}a.o.complete=void 0;return b}
|
function pb(a){var b;a.o.error?(a.X(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.T)a.X(a.toString()+" busy");else{Ac(a);a.o.T=!0;a.o.Pb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.la,zc(a));setTimeout(a.dc,0)}}h.zb=function(){return 0};function F(a){var b=!1;if(a.o.T){Dc(a);rb(a,a.ta);a.ta=0;a.o.T=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(ra(),zc(a));b=!0}a.o.complete=void 0;return b}
|
||||||
function Ec(a){this.Ra=+a.model||1170;this.Wb=a.addrReset||0;uc.call(this,a,6666667);this.sb=0;this.Yb=255;1120==this.Ra?(this.decode=Fc.bind(this),this.Ka=this.Bc,this.sb=8,this.Yb=-1):(this.decode=Gc.bind(this),this.Ka=this.Cc);Hc(this);this.sa=0;this.U=null;this.o.complete=!1}z(Ec,uc);h=Ec.prototype;h.reset=function(){this.status("model "+this.Ra);this.o.T&&F(this);Hc(this);xc(this);this.o.error=!1;this.parent.reset.call(this)};
|
function Ec(a){this.Ra=+a.model||1170;this.Xb=a.addrReset||0;uc.call(this,a,6666667);this.tb=0;this.Zb=255;1120==this.Ra?(this.decode=Fc.bind(this),this.Ka=this.Cc,this.tb=8,this.Zb=-1):(this.decode=Gc.bind(this),this.Ka=this.Dc);Hc(this);this.sa=0;this.L=null;this.o.complete=!1}z(Ec,uc);h=Ec.prototype;h.reset=function(){this.status("model "+this.Ra);this.o.T&&F(this);Hc(this);xc(this);this.o.error=!1;this.parent.reset.call(this)};
|
||||||
function Hc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Wb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.u=0;a.mb=0;a.Ic=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
function Hc(a){a.m=65536;a.h=32768;a.i=65535;a.s=32768;a.F=15;a.f=[0,0,0,0,0,0,0,a.Xb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.ra=[0,0,0,0];a.v=0;a.nb=0;a.Jc=[4,2,0,1];a.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0]];a.kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.hc=[0,0,0,0,0,0,0,0];a.gc=0;a.v=0;a.D=a.G=0;a.c=a.b=a.Cb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Eb=0;a.Gb=0;a.Ea=0;a.ja=0;a.Mb=0;a.ib=255;a.ka=0;a.lb=0;a.Ya=262143;a.fb=0;a.A=0;a.U=null;a.g&&ac(a)}function ac(a){a.ka?(a.V=65536,a.Ub=a.Ea&16?4186112:253952,a.P=a.Fc,a.Y=a.Od,a.zb=a.Ne,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Ub=57344,a.P=a.Ec,a.Y=a.fc,a.zb=a.lc,Fb(a.g,16))}
|
0,0,0,0,0,0,0,0,0]];a.lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.ic=[0,0,0,0,0,0,0,0];a.hc=0;a.u=0;a.C=a.H=0;a.c=a.b=a.Eb=0;a.Oa=-1;ob(a)}function ob(a){a.Z=0;a.Gb=0;a.Ib=0;a.Ea=0;a.ja=0;a.yb=0;a.jb=255;a.ka=0;a.mb=0;a.Ya=262143;a.gb=0;a.w=0;a.L=null;a.g&&ac(a)}function ac(a){a.ka?(a.V=65536,a.Vb=a.Ea&16?4186112:253952,a.U=a.Gc,a.Y=a.Pd,a.Bb=a.Ne,Fb(a.g,a.Ea&16?22:18)):(a.V=0,a.Vb=57344,a.U=a.Fc,a.Y=a.gc,a.Bb=a.mc,Fb(a.g,16))}
|
||||||
function $b(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Eb=a.A>>16&65535,a.Gb=a.A&65535);a.Z=b;a.lb=b>>5&3;a.mb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,ac(a))}}h.Zb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()};
|
function $b(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Gb=a.w>>16&65535,a.Ib=a.w&65535);a.Z=b;a.mb=b>>5&3;a.nb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.ka!=c&&(a.ka=c,ac(a))}}h.$b=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ya,this.xa]);a.set(2,Sb(this.g));return a.data()};
|
||||||
h.restore=function(a){var b=a[1];this.ya=b[1];Ac(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.G){for(var f=0,g=Array(b.G),k=0;k<e.length-1;)for(var l=e[k++],n=e[k++];l--;)g[f++]=n;e=g}f=b.g[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function P(a){return a.m&65536?1:0}function Ic(a){return a.s&32768?8:0}function Jc(a){var b=a.f[7];a.A=b;var c=a.Y(b);a.f[7]=b+2&65535;return c}
|
h.restore=function(a){var b=a[1];this.ya=b[1];Ac(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.H){for(var f=0,g=Array(b.H),k=0;k<e.length-1;)for(var l=e[k++],n=e[k++];l--;)g[f++]=n;e=g}f=b.g[d];if(!f||!f.restore(e)){w("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function P(a){return a.m&65536?1:0}function Ic(a){return a.s&32768?8:0}function Jc(a){var b=a.f[7];a.w=b;var c=a.Y(b);a.f[7]=b+2&65535;return c}
|
||||||
function Kc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function Q(a,b){a.f[7]=b&65535}function Yb(a,b,c){return{Ud:a,Sa:b,message:c||0,next:null}}function Lc(a,b){var c=a.U;if(c==b)a.U=b.next;else for(;c;){a=c.next;if(a==b){c.next=a.next;break}c=a}}function Wb(a,b){if(b!=a.U){var c=a.U;if(!c||c.Sa<=b.Sa)b.next=c,a.U=b;else{do{var d=c.next;if(!d||d.Sa<=b.Sa){b.next=d;c.next=b;break}c=d}while(c)}}a.v|=1}
|
function Kc(a,b){var c=a.f[7];a.f[7]=c+b&65535;return c}function Q(a,b){a.f[7]=b&65535}function Yb(a,b,c){return{Ud:a,Sa:b,message:c||0,next:null}}function Lc(a,b){var c=a.L;if(c==b)a.L=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.L&&(a.u|=1)}function Wb(a,b){if(b!=a.L){var c=a.L;if(!c||c.Sa<=b.Sa)b.next=c,a.L=b;else{do{var d=c.next;if(!d||d.Sa<=b.Sa){b.next=d;c.next=b;break}c=d}while(c)}}a.u|=1}
|
||||||
function Mc(a){return a.v&64?(J(a,168,64,-5),!0):a.v&32?(J(a,4,32,-4),!0):a.v&16?(J(a,12,16,-6),!0):!1}function bc(a){return a.F=a.F&63728|Ic(a)|(a.i&65535?0:4)|(a.h&32768?2:0)|P(a)}function cc(a,b){a.s=b<<12;a.i=~b&4;a.h=b<<14;a.m=b<<16;if((b^a.F)&2048)for(var c=a.Ja.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ja[c];a.Ja[c]=d}a.u=b>>14&3;c=a.F>>14&3;a.u!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.u]);a.F=b;a.v|=2}function R(a,b){a.v&128||(a.s=a.i=b,a.h=0)}function Nc(a,b,c){a.v&128||(a.s=a.i=a.m=b,a.h=c||0)}
|
function Mc(a){return a.u&64?(J(a,168,64,-5),!0):a.u&32?(J(a,4,32,-4),!0):a.u&16?(J(a,12,16,-6),!0):!1}function bc(a){return a.F=a.F&63728|Ic(a)|(a.i&65535?0:4)|(a.h&32768?2:0)|P(a)}function cc(a,b){a.s=b<<12;a.i=~b&4;a.h=b<<14;a.m=b<<16;if((b^a.F)&2048)for(var c=a.Ja.length;0<=--c;){var d=a.f[c];a.f[c]=a.Ja[c];a.Ja[c]=d}a.v=b>>14&3;c=a.F>>14&3;a.v!=c&&(a.ra[c]=a.f[6],a.f[6]=a.ra[a.v]);a.F=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.h=0)}function Nc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.h=c||0)}
|
||||||
function Oc(a,b,c,d){a.v&128||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Pc(a,b){a.v&128||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Qc(a,b,c,d){a.v&128||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=bc(a):a.u||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.A=b|4143316992;a.u=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);cc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.v&=~(c|18);a.v|=9;a.Oa=-1;if(-3<=d)throw b;}}
|
function Oc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.h=(c^b)&(d^b))}function Pc(a,b){a.u&128||(a.s=a.i=a.m=b,a.h=a.s^a.m>>1)}function Qc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.h=(c^d)&(d^b))}function J(a,b,c,d){if(!a.sa){0>a.Oa?a.Oa=bc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.ja|=4,a.f[6]=4,e=!0);a.w=b|4143316992;a.v=0;var f=a.Y(b|a.V),g=a.Y(b+2&65535|a.V);cc(a,g&-12289|a.Oa>>2&12288);Rc(a,a.Oa,e);Rc(a,a.f[7],e);Q(a,f);a.u&=~(c|18);a.u|=9;a.Oa=-1;if(-3<=d)throw b;}}
|
||||||
function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);cc(a,c);a.v&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.kb[c]+(b&8190)&4194302:b&-3932161);return b}
|
function Sc(a){var b=Tc(a),c=Tc(a)&-1793;a.F&49152&&(c=c&-225|a.F&63712);Q(a,b);cc(a,c);a.u&=-17}function Ob(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.lb[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||||
function Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Ub),f;d=b>>13;a.Ea&a.Ic[a.u]||(d&=7);e=a.I[a.u][d];f=(a.ca[a.u][d]<<6)+(b&8191)&a.Ya;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.I[a.u][d]=e;if(f!=(4194170&a.Ya)||a.u)a.lb=
|
function Uc(a,b,c){var d,e,f;if(!(c&a.ka))return f=b&65535,57344<=f&&(f|=a.Vb),f;d=b>>13;a.Ea&a.Jc[a.v]||(d&=7);e=a.I[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.Ya;if(a.sa)return f;f&1&&!(c&1)&&(a.ja|=64,J(a,4,0,f));var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.I[a.v][d]=e;if(f!=(4194170&a.Ya)||a.v)a.mb=
|
||||||
a.u,a.mb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.lb<<5|a.mb<<1,$b(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.Ya)||f>(4194239&a.Ya))||(a.Z|=4096,a.Z&512&&(a.v|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.A=a.A&65535|(a.A&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.zb(d,b)}
|
a.v,a.nb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.mb<<5|a.nb<<1,$b(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.Ya)||f>(4194239&a.Ya))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Tc(a){var b=a.Y(a.f[6]|a.V);a.f[6]=a.f[6]+2&65535;return b}function Rc(a,b,c){var d=a.f[6]-2&65535;a.f[6]=d;a.w=a.w&65535|(a.w&-65536)<<8|16121856;c||a.Ka(4,-2,d);a.Bb(d,b)}
|
||||||
function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0,
|
function Vc(a,b,c,d){var e,f,g=d&8?0:a.V;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Ka(d,0,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];6==c&&a.Ka(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;6==c&&a.Ka(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,6==c&&a.Ka(d,0,
|
||||||
e),a.a-=6,e|g;case 7:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;return e}h.Bc=function(a,b,c){!this.u&&0>=b&&c<=this.ib&&(this.v|=32)};h.Cc=function(a,b,c){this.u||(65534<=c&&(c|=-65536),a&4&&c<=this.ib&&(c<=this.ib-32?J(this,4,0,-3):(this.ja|=8,this.v|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.fc(Uc(this,a,2));this.sa--;return a};
|
e),a.a-=6,e|g;case 7:return e=a.Y(Kc(a,2)),e=e+a.f[c]&65535,e=a.Y(e|a.V),a.a-=10,e|g}a.f[c]=a.f[c]+f&65535;a.w=a.w&65535|(a.w&-65536)<<8|(f<<3&248|c)<<16;return e}h.Cc=function(a,b,c){!this.v&&0>=b&&c<=this.jb&&(this.u|=32)};h.Dc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.jb&&(c<=this.jb-32?J(this,4,0,-3):(this.ja|=8,this.u|=32)))};h.Qa=function(a){if(!this.ka)return this.g.Qa(a);this.sa++;a=this.gc(Uc(this,a,2));this.sa--;return a};
|
||||||
h.jb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.jb(a,b)};h.Va=function(a,b){this.ka?(this.sa++,this.lc(Uc(this,a,4),b),this.sa--):this.g.Va(a,b)};h.Ec=function(a,b,c){return Vc(this,a,b,c)};h.Fc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.fc=function(a){return Pb(this.g,this.fb=a)};h.Od=function(a){return Pb(this.g,this.fb=Uc(this,a,2))};h.lc=function(a,b){Rb(this.g,this.fb=a,b&65535)};h.Ne=function(a,b){Rb(this.g,this.fb=Uc(this,a,4),b)};
|
h.kb=function(a,b){this.ka?(this.sa++,a=Uc(this,a,5),a&1&&this.a--,Qb(this.g,a,b),this.sa--):this.g.kb(a,b)};h.Va=function(a,b){this.ka?(this.sa++,this.mc(Uc(this,a,4),b),this.sa--):this.g.Va(a,b)};h.Fc=function(a,b,c){return Vc(this,a,b,c)};h.Gc=function(a,b,c){return Uc(this,Vc(this,a,b,c),c)};h.gc=function(a){return Pb(this.g,this.gb=a)};h.Pd=function(a){return Pb(this.g,this.gb=Uc(this,a,2))};h.mc=function(a,b){Rb(this.g,this.gb=a,b&65535)};h.Ne=function(a,b){Rb(this.g,this.gb=Uc(this,a,4),b)};
|
||||||
function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Vc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.u=a.F>>12&3,c=a.Y(d|c&a.V),a.u=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Xc(a,b,c,d){a.A=a.A&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Vc(a,b,e,4),c&65536||(e&=65535),a.u=a.F>>12&3,e=Uc(a,e|c&65536,4),a.u=a.F>>14&3,Rb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
|
function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Vc(a,b,d,2),c&65536||61440!==(a.F&61440)&&(d&=65535),a.v=a.F>>12&3,c=a.Y(d|c&a.V),a.v=a.F>>14&3):c=6!=d||(a.F>>2&12288)===(a.F&12288)?a.f[d]:a.ra[a.F>>12&3];return c}function Xc(a,b,c,d){a.w=a.w&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Vc(a,b,e,4),c&65536||(e&=65535),a.v=a.F>>12&3,e=Uc(a,e|c&65536,4),a.v=a.F>>14&3,Rb(a.g,e,d)):6!=e||(a.F>>2&12288)===(a.F&12288)?a.f[e]=d:a.ra[a.F>>12&3]=d}
|
||||||
function Yc(a,b){b>>=6;var c=a.G=b&7;(b=a.D=(b&56)>>3)?(c=a.P(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.sb]&a.Yb;return a}function Zc(a,b){b>>=6;var c=a.G=b&7;return(b=a.D=(b&56)>>3)?Pb(a.g,a.P(b,c,2)):a.f[c+a.sb]}function $c(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Vc(a,b,c,8)}function ad(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.P(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function bd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Pb(a.g,a.P(b,c,2)):a.f[c]}
|
function Yc(a,b){b>>=6;var c=a.H=b&7;(b=a.C=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c+a.tb]&a.Zb;return a}function Zc(a,b){b>>=6;var c=a.H=b&7;return(b=a.C=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c+a.tb]}function $c(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Vc(a,b,c,8)}function ad(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.U(b,c,3),a=Nb(a.g,c)):a=a.f[c]&255;return a}function bd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Pb(a.g,a.U(b,c,2)):a.f[c]}
|
||||||
function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Cb=a.P(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Qb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.P(b,e,6),Rb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Pb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
|
function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Eb=a.U(b,e,7),c=0>c?a.f[-c-1]&255:c,c=d.call(a,c,Nb(a.g,e)),e&1&&a.a--,Qb(a.g,e,c)):(b=a.f[e],c=0>c?a.f[-c-1]&255:c,a.f[e]=b&65280|d.call(a,c,b&255))}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.U(b,e,6),Rb(a.g,e,d.call(a,0>c?a.f[-c-1]:c,Pb(a.g,e)))):a.f[e]=d.call(a,0>c?a.f[-c-1]:c,a.f[e])}
|
||||||
function cd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.P(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Qb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function dd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.P(b,d,4),Rb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
function cd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,e,5),e=c=0>c?a.f[-c-1]&255:c,d&1&&a.a--,Qb(a.g,d,e)):c?(c=0>c?a.f[-c-1]&255:c,a.f[e]=a.f[e]&~d|c<<24>>24&d):a.f[e]&=~d;return c}function dd(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.U(b,d,4),Rb(a.g,d,c=0>c?a.f[-c-1]:c)):a.f[d]=c=0>c?a.f[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3}
|
||||||
h.xb=function(a){this.o.complete=!0;var b=a?this.o.Ob?0:1:-1;this.o.Ob=!1;this.wa=this.a=a;do{if(this.v){if(a=this.v&7){a=!1;if(this.v&2){this.v&=-3;var c=160,d=(this.Mb&224)>>5,e=this.U&&this.U.Sa>d?this.U:null;e&&(c=e.Ud,d=e.Sa);d>(this.F&224)>>5?(this.v&4&&(Kc(this,2),this.v&=-5),J(this,c,0,-9),d=!0):d=!1;d&&(e&&Lc(this,e),a=!0)}else this.v&1&&this.v++;a=a&&0>b}if(a)break;if(this.v&112&&Mc(this)&&0>b)break}this.v=this.v&7|this.F&16;this.decode(Jc(this))}while(0<this.a);return this.o.complete?this.wa-
|
h.zb=function(a){this.o.complete=!0;var b=a?this.o.Pb?0:1:-1;this.o.Pb=!1;this.wa=this.a=a;do{if(this.u){if(a=this.u&7){a=!1;if(this.u&2){var c=160,d=(this.yb&224)>>5,e=this.L&&this.L.Sa>d?this.L:null;e&&(c=e.Ud,d=e.Sa);d>(this.F&224)>>5?(this.u&4&&(Kc(this,2),this.u&=-5),J(this,c,0,-9),d=!0):d=!1;d&&(e&&Lc(this,e),a=!0);this.L||this.yb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Mc(this)&&0>b)break}this.u=this.u&7|this.F&16;this.decode(Jc(this))}while(0<this.a);return this.o.complete?
|
||||||
this.a:void 0===this.o.complete?0:-1};Ja(function(){for(var a=D(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Ec(d);C(d,c)}});function ed(a,b){var c=b+a;Oc(this,c,a,b);return c&65535}function fd(a,b){var c=b+a;Oc(this,c<<8,a<<8,b<<8);return c&255}function gd(a,b){a=b<<1;Pc(this,a);return a&65535}function hd(a,b){a=b<<1;Pc(this,a<<8);return a&255}function id(a,b){a=b&32768|b>>1|b<<16;Pc(this,a);return a&65535}function jd(a,b){a=b&128|b>>1|b<<8;Pc(this,a<<8);return a&255}
|
this.wa-this.a:void 0===this.o.complete?0:-1};Ja(function(){for(var a=D(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Ec(d);C(d,c)}});function ed(a,b){var c=b+a;Oc(this,c,a,b);return c&65535}function fd(a,b){var c=b+a;Oc(this,c<<8,a<<8,b<<8);return c&255}function gd(a,b){a=b<<1;Pc(this,a);return a&65535}function hd(a,b){a=b<<1;Pc(this,a<<8);return a&255}function id(a,b){a=b&32768|b>>1|b<<16;Pc(this,a);return a&65535}
|
||||||
function kd(a,b){a=b&~a;R(this,a);return a}function ld(a,b){a=b&~a;R(this,a<<8);return a}function md(a,b){a|=b;R(this,a);return a}function nd(a,b){a|=b;R(this,a<<8);return a}function od(a,b){a=~b|65536;Nc(this,a);return a&65535}function pd(a,b){a=~b|256;Nc(this,a<<8);return a&255}function qd(a,b){a=b-a;this.v&128||(this.s=this.i=a,this.h=b&(b^a));return a&65535}function rd(a,b){a=b-a;var c=a<<8;b<<=8;this.v&128||(this.s=this.i=c,this.h=b&(b^c));return a&255}
|
function jd(a,b){a=b&128|b>>1|b<<8;Pc(this,a<<8);return a&255}function kd(a,b){a=b&~a;R(this,a);return a}function ld(a,b){a=b&~a;R(this,a<<8);return a}function md(a,b){a|=b;R(this,a);return a}function nd(a,b){a|=b;R(this,a<<8);return a}function od(a,b){a=~b|65536;Nc(this,a);return a&65535}function pd(a,b){a=~b|256;Nc(this,a<<8);return a&255}function qd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.h=b&(b^a));return a&65535}
|
||||||
function sd(a,b){a=b+a;this.v&128||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function td(a,b){a=b+a;var c=a<<8;this.v&128||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function ud(a,b){a=-b;Nc(this,a,a&b&32768);return a&65535}function vd(a,b){a=-b;Nc(this,a<<8,(a&b&128)<<8);return a&255}function wd(a,b){a=b<<1|this.m>>16&1;Pc(this,a);return a&65535}function xd(a,b){a=b<<1|this.m>>16&1;Pc(this,a<<8);return a&255}function yd(a,b){a=(this.m&65536|b)>>1|b<<16;Pc(this,a);return a&65535}
|
function rd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.h=b&(b^c));return a&255}function sd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.h=a&(b^a));return a&65535}function td(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.h=c&(b<<8^c));return a&255}function ud(a,b){a=-b;Nc(this,a,a&b&32768);return a&65535}function vd(a,b){a=-b;Nc(this,a<<8,(a&b&128)<<8);return a&255}function wd(a,b){a=b<<1|this.m>>16&1;Pc(this,a);return a&65535}
|
||||||
function zd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Pc(this,a<<8);return a&255}function Ad(a,b){var c=b-a;Qc(this,c,a,b);return c&65535}function Bd(a,b){var c=b-a;Qc(this,c<<8,a<<8,b<<8);return c&255}function Cd(a,b){this.v&128||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Dd(a,b){a^=b;R(this,a);return a&65535}function Ed(a){T(this,a,Zc(this,a),ed);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}
|
function xd(a,b){a=b<<1|this.m>>16&1;Pc(this,a<<8);return a&255}function yd(a,b){a=(this.m&65536|b)>>1|b<<16;Pc(this,a);return a&65535}function zd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Pc(this,a<<8);return a&255}function Ad(a,b){var c=b-a;Qc(this,c,a,b);return c&65535}function Bd(a,b){var c=b-a;Qc(this,c<<8,a<<8,b<<8);return c&255}function Cd(a,b){this.u&128||(this.s=this.i=b&65280,this.h=this.m=0);return(b<<8|b>>8)&65535}function Dd(a,b){a^=b;R(this,a);return a&65535}
|
||||||
function Fd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.m=c<<17-b,c>>=b;else if(b)if(16<b)this.h=c,c=0;else{this.m=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
|
function Ed(a){T(this,a,Zc(this,a),ed);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Fd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.h=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.m=c<<17-b,c>>=b;else if(b)if(16<b)this.h=c,c=0;else{this.m=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.h=32768)}this.f[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b}
|
||||||
function Gd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.m=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.h=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Hd(a){V(this,a,!P(this))}function Id(a){V(this,a,P(this))}
|
function Gd(a){var b=bd(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.m=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.h=32768)):d=c;this.f[a]=d>>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Hd(a){V(this,a,!P(this))}function Id(a){V(this,a,P(this))}
|
||||||
function Jd(a){T(this,a,Zc(this,a),kd);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Kd(a){S(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Ld(a){T(this,a,Zc(this,a),md);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,Yc(this,a),nd);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}
|
function Jd(a){T(this,a,Zc(this,a),kd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Kd(a){S(this,a,Yc(this,a),ld);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Ld(a){T(this,a,Zc(this,a),md);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Md(a){S(this,a,Yc(this,a),nd);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}
|
||||||
function Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Ic(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Ic(this)==!(this.h&32768))}
|
function Nd(a){var b=Zc(this,a);a=bd(this,a);R(this,(0>b?this.f[-b-1]:b)&a);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Od(a){var b=Yc(this,a);a=ad(this,a);R(this,((0>b?this.f[-b-1]&255:b)&a)<<8);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Pd(a){V(this,a,this.i&65535?0:4)}function Qd(a){V(this,a,!Ic(this)==!(this.h&32768))}function Rd(a){V(this,a,!!(this.i&65535)&&!Ic(this)==!(this.h&32768))}
|
||||||
function Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Ic(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Ic(this)!=!(this.h&32768))}function Wd(a){V(this,a,Ic(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Ic(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)}
|
function Sd(a){V(this,a,!P(this)&&!!(this.i&65535))}function Td(a){V(this,a,(this.i&65535?0:4)||!Ic(this)!=!(this.h&32768))}function Ud(a){V(this,a,P(this)||(this.i&65535?0:4))}function Vd(a){V(this,a,!Ic(this)!=!(this.h&32768))}function Wd(a){V(this,a,Ic(this))}function Xd(a){V(this,a,!!(this.i&65535))}function Yd(a){V(this,a,!Ic(this))}function Zd(){J(this,12,0,-8);this.a-=5}function $d(a){V(this,a,!0)}function ae(a){V(this,a,!(this.h&32768))}function be(a){V(this,a,this.h&32768?2:0)}
|
||||||
function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ce(a){var b=Zc(this,a);a=bd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Qc(this,c,a,b);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}function de(a){var b=Yc(this,a);a=ad(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Qc(this,c,a,b);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.D?4:3)+(7==this.b?2:0)}
|
function W(a){a&1&&(this.m=0);a&2&&(this.h=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function ce(a){var b=Zc(this,a);a=bd(this,a);var c=(b=0>b?this.f[-b-1]:b)-a;Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function de(a){var b=Yc(this,a);a=ad(this,a);var c=(b=(0>b?this.f[-b-1]&255:b)<<8)-(a<<=8);Qc(this,c,a,b);this.a-=this.c?4+(this.H&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}
|
||||||
function ee(a){var b=bd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function fe(){J(this,24,0,-8);this.a-=25}
|
function ee(a){var b=bd(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.h=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.h=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.i=this.s=0,this.h=32768,this.m=65536,this.a-=7}function fe(){J(this,24,0,-8);this.a-=25}
|
||||||
function ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.w&&1120==this.Ra&&this.w.setData(this.f[0],!0),this.H?this.H.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.K=this.a;Q(this,$c(this,a));this.a=this.K-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.K=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.K-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
|
function ge(){this.F&49152?(this.ja|=128,J(this,4,0,-7)):(this.A&&1120==this.Ra&&this.A.setData(this.f[0],!0),this.G?this.G.b():F(this));this.a-=7}function he(){J(this,16,0,-8);this.a-=25}var ie=[0,7,7,10,7,11,9,13];function je(a){this.K=this.a;Q(this,$c(this,a));this.a=this.K-ie[this.c]}var ke=[0,14,14,17,14,18,16,20];function le(a){this.K=this.a;var b=$c(this,a);a=a>>6&7;Rc(this,this.f[a]);this.f[a]=this.f[7];Q(this,b);this.a=this.K-ke[this.c]}var me=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];
|
||||||
function ne(a){var b=Zc(this,a);this.K=this.a;R(this,dd(this,a,b));this.a=this.K-me[(this.D?8:0)+this.c]+(7!=this.b||this.c?0:2)}function oe(a){var b=Yc(this,a);R(this,cd(this,a,b,65535)<<8);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}var pe=[7,13,13,17,14,18,17,21];
|
function ne(a){var b=Zc(this,a);this.K=this.a;R(this,dd(this,a,b));this.a=this.K-me[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function oe(a){var b=Yc(this,a);R(this,cd(this,a,b,65535)<<8);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var pe=[7,13,13,17,14,18,17,21];
|
||||||
function qe(a){var b=bd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.v&128||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767<b?65536:0);this.a-=23}function re(){this.a-=5}function se(){this.F&49152||(this.g.reset(),ob(this),this.w&&this.w.setData(this.f[0],!0));this.a-=667}function te(a){if(a&8)J(this,8,0,-8);else{var b=Tc(this);a&=7;7==a?Q(this,b):(Q(this,this.f[a]),this.f[a]=b);this.a-=9}}
|
function qe(a){var b=bd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.h=0,this.m=-32768>b||32767<b?65536:0);this.a-=23}function re(){this.a-=5}function se(){this.F&49152||(this.g.reset(),ob(this),this.A&&this.A.setData(this.f[0],!0));this.a-=667}function te(a){if(a&8)J(this,8,0,-8);else{var b=Tc(this);a&=7;7==a?Q(this,b):(Q(this,this.f[a]),this.f[a]=b);this.a-=9}}
|
||||||
function ue(){Sc(this);this.a-=13}function X(a){a&1&&(this.m=65536);a&2&&(this.h=32768);a&4&&(this.i=0);a&8&&(this.s=32768);this.a-=5}function ve(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function we(a){T(this,a,Zc(this,a),Ad);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.D?5:3)+(7==this.b?2:0)}function xe(a){T(this,a,0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function ye(){J(this,28,0,-8);this.a-=5}
|
function ue(){Sc(this);this.a-=13}function X(a){a&1&&(this.m=65536);a&2&&(this.h=32768);a&4&&(this.i=0);a&8&&(this.s=32768);this.a-=5}function ve(a){var b=(a&448)>>6;if(this.f[b]=this.f[b]-1&65535)Q(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function we(a){T(this,a,Zc(this,a),Ad);this.a-=this.c?9+(this.H&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function xe(a){T(this,a,0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)}function ye(){J(this,28,0,-8);this.a-=5}
|
||||||
function ze(){this.w&&(this.w.ia=this.f[7],this.w.setData(this.f[0],!0));this.v|=4;Kc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.sb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Fc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}
|
function ze(){this.A&&(this.A.ia=this.f[7],this.A.setData(this.f[0],!0));this.u|=4;Kc(this,-2);this.a-=3}function Ae(a){T(this,a,this.f[(a>>6&7)+this.tb],Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Fc(a){Be[a>>12].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a&15].call(this,a)}function Ke(a){Le[a&15].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}
|
||||||
function Oe(a){Pe[a>>6&3].call(this,a)}function Qe(a){Re[a>>6&3].call(this,a)}
|
function Oe(a){Pe[a>>6&3].call(this,a)}function Qe(a){Re[a>>6&3].call(this,a)}
|
||||||
var Be=[function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,Y,function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Se=[function(a){Ue[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Nc(this,dd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,
|
var Be=[function(a){Se[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,Y,function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Se=[function(a){Ue[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Nc(this,dd(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,qd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,
|
||||||
ud);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],
|
ud);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,Ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],
|
||||||
Ue=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,Y,Ie,Ke,xe,xe,xe,xe],Ve=[ge,ze,ue,Zd,he,se,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Je=[re,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Le=[re,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Te=[Yd,Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,Y,Y,Y],Ne=[function(a){Nc(this,
|
Ue=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,Y,Ie,Ke,xe,xe,xe,xe],Ve=[ge,ze,ue,Zd,he,se,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Je=[re,function(){this.m=0;this.a-=5},function(){this.h=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Le=[re,function(){this.m=65536;this.a-=5},function(){this.h=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Te=[Yd,Wd,Sd,Ud,ae,be,Hd,Id,fe,ye,Me,Oe,Qe,Y,Y,Y],Ne=[function(a){Nc(this,
|
||||||
cd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){S(this,a,0,vd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Nc(this,a<<8);this.a-=this.c?4:3+(7==
|
cd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){S(this,a,0,vd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=ad(this,a);Nc(this,a<<8);this.a-=this.c?4:3+(7==
|
||||||
this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Gc(a){We[a>>12].call(this,a)}
|
this.b?2:0)}],Re=[function(a){S(this,a,0,zd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9+(this.Eb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Gc(a){We[a>>12].call(this,a)}
|
||||||
var We=[function(a){Xe[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,function(a){Ye[a>>8&15].call(this,a)},function(a){Ze[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Xe=[function(a){$e[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,function(a){af[a>>6&3].call(this,a)},Y,Y],af=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Wc(this,a,0);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.K=
|
var We=[function(a){Xe[a>>8&15].call(this,a)},ne,ce,Nd,Jd,Ld,Ed,function(a){Ye[a>>8&15].call(this,a)},function(a){Ze[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,we,Y],Xe=[function(a){$e[a>>4&15].call(this,a)},$d,Xd,Pd,Qd,Vd,Rd,Td,le,le,Ce,Ee,Ge,function(a){af[a>>6&3].call(this,a)},Y,Y],af=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.Y(a|this.V);Q(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=Wc(this,a,0);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.K=
|
||||||
this.a;Xc(this,a,0,b);R(this,b);this.a=this.K-pe[this.c]},function(a){R(this,dd(this,a,Ic(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.v|=1),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.v|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd,Wd,Sd,Ud,
|
this.a;Xc(this,a,0,b);R(this,b);this.a=this.K-pe[this.c]},function(a){R(this,dd(this,a,Ic(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],$e=[function(a){bf[a&15].call(this,a)},Y,Y,Y,je,je,je,je,te,function(a){a&8?(this.F&49152||(this.F=this.F&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,0,-8)},Ie,Ke,xe,xe,xe,xe],bf=[ge,ze,function(){Sc(this);this.u|=this.F&16;this.a-=13},Zd,he,se,ue,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ye=[qe,qe,ee,ee,Fd,Fd,Gd,Gd,Ae,Ae,Y,Y,Y,Y,ve,ve],Ze=[Yd,Wd,Sd,Ud,
|
||||||
ae,be,Hd,Id,fe,ye,Me,Oe,Qe,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[Y,function(a){a=Wc(this,a,65536);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.K=this.a;Xc(this,a,65536,b);R(this,b);this.a=this.K-pe[this.c]},Y];
|
ae,be,Hd,Id,fe,ye,Me,Oe,Qe,function(a){cf[a>>6&3].call(this,a)},Y,Y],cf=[Y,function(a){a=Wc(this,a,65536);Rc(this,a);R(this,a);this.a-=11},function(a){var b=Tc(this);this.K=this.a;Xc(this,a,65536,b);R(this,b);this.a=this.K-pe[this.c]},Y];
|
||||||
function df(a){x.call(this,"ROM",a,df,128);this.ba=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.C("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.L,c.ba=a.ba):c.l=null);ef(c)})}}z(df);h=df.prototype;
|
function df(a){x.call(this,"ROM",a,df,128);this.ba=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.h=a.alias;this.l=a.file;this.s=r(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.M,c.ba=a.ba):c.l=null);ef(c)})}}z(df);h=df.prototype;
|
||||||
h.fa=function(a,b,c,d){this.g=b;this.a=c;this.H=d;ef(this)};h.ha=function(){this.ba&&(this.H&&this.H.a(this.id,this.i,this.b,this.ba),delete this.ba);return!0};h.ga=function(){return!0};
|
h.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;ef(this)};h.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.i,this.b,this.ba),delete this.ba);return!0};h.ga=function(){return!0};
|
||||||
function ef(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+q(a.c.length,8,!0)+") does not match specified size ("+q(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[df.prototype.Cd,df.prototype.Be,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,jc)){for(c=0;c<a.c.length;c++)a.g.jb(b+c,a.c[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.h?b.push(a.h):
|
function ef(a){if(!Ya(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Za(a,"ROM size ("+q(a.c.length,8,!0)+") does not match specified size ("+q(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[df.prototype.Dd,df.prototype.Be,null,null,null,a.b>>1],c);if(fb(a.g,a,b)){b=a.m=!0;break a}}else if(Ib(a.g,b,a.b,jc)){for(c=0;c<a.c.length;c++)a.g.kb(b+c,a.c[c]);b=!0;break a}b=!1}if(b){b=[];"number"==typeof a.h?b.push(a.h):
|
||||||
null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Hb(d.g,d.i,d.b);Gb(d.g,e,d.b,f)}a.m||delete a.c}}}E(a)}}h.Cd=function(a){return this.c[a-this.i]};h.Be=function(){};Ja(function(){for(var a=D(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new df(d);C(d,c)}});
|
null!=a.h&&a.h.length&&(b=a.h);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Hb(d.g,d.i,d.b);Gb(d.g,e,d.b,f)}a.m||delete a.c}}}E(a)}}h.Dd=function(a){return this.c[a-this.i]};h.Be=function(){};Ja(function(){for(var a=D(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new df(d);C(d,c)}});
|
||||||
function ff(a){x.call(this,"RAM",a,ff);this.ba=this.c=null;this.l=a.addr;this.i=a.size;this.na=a.load;this.ma=a.exec;this.h=!1;this.b=a.file;this.m=r(this.b);if(this.b){a=this.b;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.C("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.L,c.ba=a.ba,null==c.na&&(c.na=a.na),null==c.ma&&(c.ma=a.ma)):c.b=null);gf(c)})}}
|
function ff(a){x.call(this,"RAM",a,ff);this.ba=this.c=null;this.l=a.addr;this.i=a.size;this.na=a.load;this.ma=a.exec;this.h=!1;this.b=a.file;this.m=r(this.b);if(this.b){a=this.b;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.b+"&format=bytes&decimal=true");var c=this;t(a,null,!0,function(a,b,f){f?(c.D("Unable to load RAM resource (error "+f+": "+a+")"),c.b=null):(Ua(c.ua,a,b),(a=ta(a,b))?(c.c=a.M,c.ba=a.ba,null==c.na&&(c.na=a.na),null==c.ma&&(c.ma=a.ma)):c.b=null);gf(c)})}}
|
||||||
z(ff);ff.prototype.fa=function(a,b,c,d){this.g=b;this.a=c;this.H=d;gf(this)};ff.prototype.ha=function(){this.ba&&(this.H&&this.H.a(this.id,this.l,this.i,this.ba),delete this.ba);return!0};ff.prototype.ga=function(){return!0};function gf(a){if(a.g&&(!a.h&&a.i&&Ib(a.g,a.l,a.i,Lb)&&(a.h=!0),!Ya(a))){if(!a.h)w("No RAM allocated");else if(a.b){if(!a.c||!a.g)return;hf(a,a.c,a.na,a.ma,a.l)}E(a)}}
|
z(ff);ff.prototype.fa=function(a,b,c,d){this.g=b;this.a=c;this.G=d;gf(this)};ff.prototype.ha=function(){this.ba&&(this.G&&this.G.a(this.id,this.l,this.i,this.ba),delete this.ba);return!0};ff.prototype.ga=function(){return!0};function gf(a){if(a.g&&(!a.h&&a.i&&Ib(a.g,a.l,a.i,Lb)&&(a.h=!0),!Ya(a))){if(!a.h)w("No RAM allocated");else if(a.b){if(!a.c||!a.g)return;hf(a,a.c,a.na,a.ma,a.l)}E(a)}}
|
||||||
ff.prototype.reset=function(){if(this.h){for(var a=this.g,b=this.l,c=this.i,d=b&a.l,b=b>>>a.c;0<c&&b<a.g.length;){var e=a.g[b];if(e.controller&&a.i&&a.i.length==a.u.length){var f=a.i.indexOf(e);0<=f&&(e=a.u[f])}if(e){var f=c,g=0,k,d=d||0,g=g&255;void 0===f&&(f=e.size);if($a&&e.j)for(k=d;f--&&k<e.j.length;k++)e.j[k]=g;else for(k=d;f--&&k<e.size;k++)e.Rb(d,g,e.Pa+d)}c-=a.b;b++;d=0}this.c&&hf(this,this.c,this.na,this.ma,this.l,!0)}};
|
ff.prototype.reset=function(){if(this.h){for(var a=this.g,b=this.l,c=this.i,d=b&a.l,b=b>>>a.c;0<c&&b<a.g.length;){var e=a.g[b];if(e.controller&&a.i&&a.i.length==a.v.length){var f=a.i.indexOf(e);0<=f&&(e=a.v[f])}if(e){var f=c,g=0,k,d=d||0,g=g&255;void 0===f&&(f=e.size);if($a&&e.j)for(k=d;f--&&k<e.j.length;k++)e.j[k]=g;else for(k=d;f--&&k<e.size;k++)e.Sb(d,g,e.Pa+d)}c-=a.b;b++;d=0}this.c&&hf(this,this.c,this.na,this.ma,this.l,!0)}};
|
||||||
function hf(a,b,c,d,e,f){var g=!1;if(null==c)for(var k=0;k<b.length-1;){var l=b[k]&255|(b[k+1]&255)<<8;if(l)if(l&255){if(1!=l)break;if(k+6>=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0<n&&k<b.length;)l+=b[k++]&255,n--;if(n||k>=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.jb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.a.jb(c+
|
function hf(a,b,c,d,e,f){var g=!1;if(null==c)for(var k=0;k<b.length-1;){var l=b[k]&255|(b[k+1]&255)<<8;if(l)if(l&255){if(1!=l)break;if(k+6>=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,v=n-=6;0<n&&k<b.length;)l+=b[k++]&255,n--;if(n||k>=b.length)break;l+=b[k++]&255;if(l&255)break;if(v)for(;v--;)a.a.kb(p++,b[u++]&255);else p&1?F(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g<b.length;g++)a.a.kb(c+
|
||||||
g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Wb=d,a.g.reset(),ob(a),Q(a,d),cc(a,0),!f&&a.H&&(F(a)||a.H.c()));return g}Ja(function(){for(var a=D(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new ff(d);C(d,c)}});function jf(a){x.call(this,"Keyboard",a,jf,1024);E(this)}z(jf);jf.prototype.aa=function(){return!1};jf.prototype.fa=function(a,b,c,d){this.l=a;this.a=c;this.H=d};Ja(function(){for(var a=D(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new jf(d);C(d,c)}});
|
g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Xb=d,a.g.reset(),ob(a),Q(a,d),cc(a,0),!f&&a.G&&(F(a)||a.G.c()));return g}Ja(function(){for(var a=D(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new ff(d);C(d,c)}});function jf(a){x.call(this,"Keyboard",a,jf,1024);E(this)}z(jf);jf.prototype.aa=function(){return!1};jf.prototype.fa=function(a,b,c,d){this.l=a;this.a=c;this.G=d};Ja(function(){for(var a=D(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new jf(d);C(d,c)}});
|
||||||
function Z(a){this.G=a.baudReceive||9600;this.V=a.baudTransmit||9600;this.U=a.upperCase;this.h=this.m=null;this.N=a.tabSize;this.K=a.charBOL;this.s=0;x.call(this,"SerialPort",a,Z,262144);var b=a.binding;if("console"==b)this.m="";else{var c;a=kf;b&&(void 0===c&&(c="Panel"),(c=Wa(c,this.id))&&(b=c.j[b])&&this.aa(null,a,b))}this.u=this.A=null;this.exports={connect:this.bc,receiveData:this.wb}}z(Z);var kf="buffer";h=Z.prototype;
|
function Z(a){this.H=a.baudReceive||9600;this.ka=a.baudTransmit||9600;this.U=a.upperCase;this.h=this.i=null;this.L=a.tabSize;this.K=a.charBOL;this.m=0;x.call(this,"SerialPort",a,Z,262144);var b=a.binding;if("console"==b)this.i="";else{var c;a=kf;b&&(void 0===c&&(c="Panel"),(c=Wa(c,this.id))&&(b=c.j[b])&&this.aa(null,a,b))}this.v=this.w=null;this.exports={connect:this.cc,receiveData:this.xb}}z(Z);var kf="buffer";h=Z.prototype;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case kf:return this.j[b]=this.h=c,c.onkeydown=function(a){a=a||window.event;var b=!1,c=a.keyCode;8==c?(b=!0,c=ja.nc):a.ctrlKey&&c>=ja.Sb&&c<=ja.wc&&(b=!0,c-=ja.Sb-ja.mc);b&&(a.preventDefault&&a.preventDefault(),d.wb(c));return!0},c.onkeypress=function(a){a=a||window.event;d.wb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData||
|
h.aa=function(a,b,c){var d=this;switch(b){case kf:return this.j[b]=this.h=c,c.onkeydown=function(a){a=a||window.event;var b=!1,c=a.keyCode;8==c?(b=!0,c=ja.oc):a.ctrlKey&&c>=ja.Tb&&c<=ja.xc&&(b=!0,c-=ja.Tb-ja.nc);b&&(a.preventDefault&&a.preventDefault(),d.xb(c));return!0},c.onkeypress=function(a){a=a||window.event;d.xb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();(a=a.clipboardData||
|
||||||
window.clipboardData)&&d.wb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.H=d;var e=this;this.la=Yb(48,4,262144);this.P=Vb(this.a,function(){e.b&128||!e.i.length||(e.w=e.i.shift()&255,e.U&&97<=e.w&&122>e.w&&(e.w-=32),e.b|=128,e.b&64&&Wb(e.a,e.la))});this.D=Yb(52,4,262144);this.ka=Vb(this.a,function(){e.c|=128;e.c&64&&Wb(e.a,e.D)});fb(b,this,lf);hb(b,this.reset.bind(this));E(this)};
|
window.clipboardData)&&d.xb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};
|
||||||
h.bc=function(){if(!this.u){var a=wc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.u=Va(b)){var d=this.u.exports;if(d){var e=d.connect;e&&e.call(this.u);if(this.A=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.bc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;var e=this;this.V=Yb(48,4,262144);this.P=Vb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.U&&97<=a&&122>a&&(a-=32),Xb(e.a,e.P,1E3/Math.round(e.H/10)));0<=a&&(e.A=a,e.b&128?e.A|=49152:e.b|=128,e.b&64&&Wb(c,e.V))});this.C=Yb(52,4,262144);this.la=Vb(this.a,function(){e.c|=128;e.c&64&&Wb(c,e.C)});fb(b,this,lf);hb(b,this.reset.bind(this));E(this)};
|
||||||
h.ga=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.wb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.i.push(b)}else this.i=this.i.concat(a);Xb(this.a,this.P,1E3/Math.round(this.G/10));return!0};
|
h.cc=function(){if(!this.v){var a=wc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Ca)return;b=pa(b[1]);if(this.v=Va(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.w=d.receiveData){this.status(this.ua+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
||||||
h.pd=function(){return this.b&65534};h.oe=function(a){this.b=this.b&-112|a&111};h.od=function(){this.b&=-129;0<this.i.length&&Xb(this.a,this.P,1E3/Math.round(this.G/10));return this.w};h.ne=function(){};h.Qd=function(){return this.c};h.Pe=function(a){this.c&128&&(a&64?Wb(this.a,this.D):Lc(this.a,this.D));this.c=this.c&-70|a&69};h.Pd=function(){return 0};
|
h.ga=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.A=0;a.b=0;a.c=128;a.s=[];return!0}h.xb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.s.push(b)}else this.s=this.s.concat(a);Xb(this.a,this.P,1E3/Math.round(this.H/10));return!0};
|
||||||
h.Oe=function(a){a&=255;this.A&&this.A.call(this.u,a);a&=127;if(this.h)if(13==a)this.s=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.s&&this.s--;else{if(a){var b;b=(b=qa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.N||8,c=a-this.s%a,this.N&&(b=" ".slice(0,c)));this.K&&!this.s&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.s+=c}}else if(null!=this.m){if(10==a||
|
h.qd=function(){return this.b&65534};h.oe=function(a){this.b=this.b&-112|a&111};h.pd=function(){this.b&=-129;return this.A};h.ne=function(){};h.Rd=function(){return this.c};h.Pe=function(a){this.c&128&&(a&64?Wb(this.a,this.C):Lc(this.a,this.C));this.c=this.c&-70|a&69};h.Qd=function(){return 0};
|
||||||
1024<=this.m.length)this.X(this.m),this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Xb(this.a,this.ka,1E3/Math.round(this.V/10))};var nf={},lf=(nf[65392]=[null,null,Z.prototype.pd,Z.prototype.oe,"RCSR"],nf[65394]=[null,null,Z.prototype.od,Z.prototype.ne,"RBUF"],nf[65396]=[null,null,Z.prototype.Qd,Z.prototype.Pe,"XCSR"],nf[65398]=[null,null,Z.prototype.Pd,Z.prototype.Oe,"XBUF"],nf);
|
h.Oe=function(a){a&=255;this.w&&this.w.call(this.v,a);a&=127;if(this.h)if(13==a)this.m=0;else if(8==a)this.h.value=this.h.value.slice(0,-1),0<this.m&&this.m--;else{if(a){var b;b=(b=qa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.L||8,c=a-this.m%a,this.L&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.h.value+=b;this.h.scrollTop=this.h.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a||
|
||||||
Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Z(d);C(d,c)}});function dc(a){x.call(this,"PC11",a,dc);this.c=a.autoMount||null;this.m=0;this.U=a.baudReceive||3600;this.w=this.A=this.b=0;this.u=[];this.s=of;this.h=pf;this.D=this.i="";this.L=this.na=this.ma=null;this.K=-1;this.G=!Ca("Mobi")&&window&&"FileReader"in window}z(dc);var of="",pf=0;h=dc.prototype;
|
1024<=this.i.length)this.X(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Xb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var nf={},lf=(nf[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],nf[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],nf[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],nf[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],nf);
|
||||||
|
Ja(function(){for(var a=D(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new Z(d);C(d,c)}});function dc(a){x.call(this,"PC11",a,dc);this.c=a.autoMount||null;this.m=0;this.U=a.baudReceive||3600;this.A=this.w=this.b=0;this.v=[];this.s=of;this.h=pf;this.C=this.i="";this.M=this.na=this.ma=null;this.L=-1;this.H=!Ca("Mobi")&&window&&"FileReader"in window}z(dc);var of="",pf=0;h=dc.prototype;
|
||||||
h.aa=function(a,b,c){var d=this,e=pf;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
|
h.aa=function(a,b,c){var d=this,e=pf;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){w("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick=
|
||||||
function(){var a=d.j.listTapes;a&&qf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;qf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
function(){var a=d.j.listTapes;a&&qf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.H){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;qf(d,r(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.H=d;this.N=rf(a);var e=this;if((this.c=wc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.P=Yb(56,4,4096);this.V=Vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.w<e.u.length&&(e.A=e.u[e.w++]&255,sf(e,e.w/e.u.length*100),e.b|=128,e.b&=-2049,e.b&64&&Wb(e.a,e.P))});fb(b,this,tf);hb(b,this.reset.bind(this));uf(this,"None",of,!0);
|
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;this.P=rf(a);var e=this;if((this.c=wc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.K=Yb(56,4,4096);this.V=Vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.A<e.v.length&&(e.w=e.v[e.A++]&255,sf(e,e.A/e.v.length*100),e.b|=128,e.b&=-2049,e.b&64&&Wb(e.a,e.K))});fb(b,this,tf);hb(b,this.reset.bind(this));uf(this,"None",of,!0);
|
||||||
this.G&&uf(this,"Local Tape","?");uf(this,"Remote Tape","??");vf(this)||E(this)};h.ha=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){this.b&=-2241;this.A=0};
|
this.H&&uf(this,"Local Tape","?");uf(this,"Remote Tape","??");vf(this)||E(this)};h.ha=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){this.b&=-2241;this.w=0};
|
||||||
function vf(a){a.m=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.j.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=r(b,!0)}b&&c?wf(a,c,b,1,!0):xf(a)}return!!a.m}
|
function vf(a){a.m=0;if(a.c){var b=a.c.path||"",c;if(!(c=a.c.name))a:{if((c=a.j.listTapes)&&c.options)for(var d=0;d<c.options.length;d++){var e=c.options[d];if(e.value==b){c=e.text;break a}}c=r(b,!0)}b&&c?wf(a,c,b,1,!0):xf(a)}return!!a.m}
|
||||||
function qf(a,b,c,d,e){if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;wf(a,b,c,d,!1,e)}else yf(a,!1)}function wf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.h!=d)g++,yf(a,!0),a.o.Fa?a.C("PC11 busy"):(e&&a.m++,zf(a,b,c,d,f)?g++:a.o.Fa=!0);g&&Af(a,a.D,a.i,a.h,a.L,a.na,a.ma)}
|
function qf(a,b,c,d,e){if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;wf(a,b,c,d,!1,e)}else yf(a,!1)}function wf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.h!=d)g++,yf(a,!0),a.o.Fa?a.D("PC11 busy"):(e&&a.m++,zf(a,b,c,d,f)?g++:a.o.Fa=!0);g&&Af(a,a.C,a.i,a.h,a.M,a.na,a.ma)}
|
||||||
function zf(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Af(a,b,c,d,e),a.s="?");xf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!t(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.R;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Af(a,b,c,d,e.L,e.na,e.ma));
|
function zf(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Af(a,b,c,d,e),a.s="?");xf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!t(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.R;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ua(a.ua,e,f),(e=ta(e,f))&&Af(a,b,c,d,e.M,e.na,e.ma));
|
||||||
a.o.Fa=!1;a.m&&(a.m--,a.m||E(a));xf(a)})}function uf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function xf(a){var b=a.j.listTapes;if(b&&b.options){a=a.s||a.i;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}
|
a.o.Fa=!1;a.m&&(a.m--,a.m||E(a));xf(a)})}function uf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function xf(a){var b=a.j.listTapes;if(b&&b.options){a=a.s||a.i;for(var c=0;c<b.options.length;c++)if(b.options[c].value==a){b.selectedIndex!=c&&(b.selectedIndex=c);break}c==b.options.length&&(b.selectedIndex=0)}}
|
||||||
function sf(a,b){b|=0;if(b!==a.K){var c=a.j.readProgress;c&&(c=(c=D(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.K=b}}function Af(a,b,c,d,e,f,g){a.D=b;a.i=c;a.h=d;a.L=e;a.na=f;a.ma=g;2==d?a.N&&hf(a.N,e,f,g)?a.status("tape loaded: "+b):(a.D="",a.i="",a.s=of,a.h=pf,a.C("No load address available for tape: "+b)):(a.w=0,a.u=e,a.status("tape attached: "+b),sf(a,0))}
|
function sf(a,b){b|=0;if(b!==a.L){var c=a.j.readProgress;c&&(c=(c=D(c,"pcjs-progress-bar"))&&c[0])&&c.style&&(c.style.width=b+"%");a.L=b}}function Af(a,b,c,d,e,f,g){a.C=b;a.i=c;a.h=d;a.M=e;a.na=f;a.ma=g;2==d?a.P&&hf(a.P,e,f,g)?a.status("tape loaded: "+b):(a.C="",a.i="",a.s=of,a.h=pf,a.D("No load address available for tape: "+b)):(a.A=0,a.v=e,a.status("tape attached: "+b),sf(a,0))}
|
||||||
function yf(a,b){if(a.i||!1===b)a.D="",a.i="",b||(a.h&&a.status(1==a.h?"tape detached":"tape unloaded"),a.s=of,a.h=pf,xf(a))}h.save=function(){return(new O(this)).data()};h.restore=function(){return!0};h.hd=function(){return this.b&65534};h.he=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&Wb(this.a,this.P)):(this.b&=-129,this.b|=2048,this.A=0,Xb(this.a,this.V,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.gd=function(){this.b&=-129;this.b|=2048;return this.A};h.ge=function(){};
|
function yf(a,b){if(a.i||!1===b)a.C="",a.i="",b||(a.h&&a.status(1==a.h?"tape detached":"tape unloaded"),a.s=of,a.h=pf,xf(a))}h.save=function(){return(new O(this)).data()};h.restore=function(){return!0};h.jd=function(){return this.b&65534};h.he=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&Wb(this.a,this.K)):(this.b&=-129,this.b|=2048,this.w=0,Xb(this.a,this.V,1E3/Math.round(this.U/10))));this.b=this.b&-66|a&65};h.hd=function(){this.b&=-129;this.b|=2048;return this.w};h.ge=function(){};
|
||||||
var Bf={},tf=(Bf[65384]=[null,null,dc.prototype.hd,dc.prototype.he,"PRS"],Bf[65386]=[null,null,dc.prototype.gd,dc.prototype.ge,"PRB"],Bf);function Cf(a,b,c){x.call(this,"Disk",{id:a.ua+".disk"+q(++Df,4)},Cf,8192);this.controller=a;this.l=a.l;this.H=a.H;this.h=b;this.oa=b.name;this.ub=b.ub;Ef(this,c,b.O,b.S,b.M,b.W);E(this)}var Df=0;z(Cf);h=Cf.prototype;h.fa=function(a,b,c,d){this.H=d};
|
var Bf={},tf=(Bf[65384]=[null,null,dc.prototype.jd,dc.prototype.he,"PRS"],Bf[65386]=[null,null,dc.prototype.hd,dc.prototype.ge,"PRB"],Bf);function Cf(a,b,c){x.call(this,"Disk",{id:a.ua+".disk"+q(++Df,4)},Cf,8192);this.controller=a;this.l=a.l;this.G=a.G;this.h=b;this.oa=b.name;this.vb=b.vb;Ef(this,c,b.O,b.S,b.N,b.W);E(this)}var Df=0;z(Cf);h=Cf.prototype;h.fa=function(a,b,c,d){this.G=d};
|
||||||
function Ef(a,b,c,d,e,f){a.mode=b;a.O=c;a.S=d;a.M=e;a.W=f;a.a=[];if("preload"!=a.mode){b=Array(a.O);for(c=0;c<b.length;c++){d=Array(a.S);for(e=0;e<d.length;e++){f=Array(a.M);for(var g=1;g<=f.length;g++)f[g-1]=Ff(null,c,e,g,a.W,0);d[e]=f}b[c]=d}a.a=b}a.b=null}
|
function Ef(a,b,c,d,e,f){a.mode=b;a.O=c;a.S=d;a.N=e;a.W=f;a.a=[];if("preload"!=a.mode){b=Array(a.O);for(c=0;c<b.length;c++){d=Array(a.S);for(e=0;e<d.length;e++){f=Array(a.N);for(var g=1;g<=f.length;g++)f[g-1]=Ff(null,c,e,g,a.W,0);d[e]=f}b[c]=d}a.a=b}a.b=null}
|
||||||
function Gf(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.da=c;a.Nb=r(c);a.g=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.O=e[0];a.S=e[1];a.M=e[2];a.W=e[3]||512;c=a.W>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.O);for(d=0;d<a.a.length;d++)for(var v=a.a[d]=Array(a.S),U=0;U<v.length;U++)for(var za=v[U]=Array(a.M),Aa=0;Aa<za.length;Aa++){for(var qc=Ff(null,d,U,Aa+1,a.W,0),rg=qc.data,rc=0;rc<c;rc++,f+=4)var sg=rg[rc]=b.getInt32(f,
|
function Gf(a,b,c,d,e){var f=c;if(a.g)return!0;a.oa=b;a.da=c;a.Ob=r(c);a.g=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.O=e[0];a.S=e[1];a.N=e[2];a.W=e[3]||512;c=a.W>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.O);for(d=0;d<a.a.length;d++)for(var v=a.a[d]=Array(a.S),U=0;U<v.length;U++)for(var za=v[U]=Array(a.N),Aa=0;Aa<za.length;Aa++){for(var qc=Ff(null,d,U,Aa+1,a.W,0),rg=qc.data,rc=0;rc<c;rc++,f+=4)var sg=rg[rc]=b.getInt32(f,
|
||||||
!0),e=e+sg&-1;qc.ea=c;za[Aa]=qc}a.b=e;c=a}else a.C("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.h,c,a.oa,a.da),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!t(f,
|
!0),e=e+sg&-1;qc.ea=c;za[Aa]=qc}a.b=e;c=a}else a.D("Unrecognized disk format ("+d+" bytes)");a.g&&(a.g.call(a.controller,a.h,c,a.oa,a.da),a.g=null)};g.readAsArrayBuffer(d);return!0}0>c.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.vb?"":e)+"&format=json"));return!!t(f,
|
||||||
null,!0,function(b,c,d){Hf(a,b,c,d)})}
|
null,!0,function(b,c,d){Hf(a,b,c,d)})}
|
||||||
function Hf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(0<r(a.Nb,!0).toLowerCase().indexOf("-readonly"))a.c=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.c=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.oa]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
function Hf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.D('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ua(a.controller.ua,b,c);try{if(0<r(a.Ob,!0).toLowerCase().indexOf("-readonly"))a.c=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.c=!0)}var k;"<"==c.substr(0,1)?k=["Missing disk image: "+a.oa]:k=0>c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
|
||||||
c+")");if(k.length)if(1==k.length)w(k[0]);else{a.O=k.length;a.S=k[0].length;a.M=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d<a.O;d++)for(f=0;f<a.S;f++)for(g=0;g<a.M;g++)if(l=k[d][f][g]){var n=l.length;void 0===n&&(n=l.length=512);var n=n>>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,za=v.length;za<U;za++)v[za]=p;If(l,v)}else u=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=u;delete l.bytes}Ff(l,d,f);for(U=
|
c+")");if(k.length)if(1==k.length)w(k[0]);else{a.O=k.length;a.S=k[0].length;a.N=k[0][0].length;var l=k[0][0][0];a.W=l&&l.length||512;for(d=c=0;d<a.O;d++)for(f=0;f<a.S;f++)for(g=0;g<a.N;g++)if(l=k[d][f][g]){var n=l.length;void 0===n&&(n=l.length=512);var n=n>>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var v=l.bytes;if(void 0!==v&&v.length){for(var U=n<<2,za=v.length;za<U;za++)v[za]=p;If(l,v)}else u=[],p=l.pattern=p|p<<8|p<<16|p<<24,l.data=u;delete l.bytes}Ff(l,d,f);for(U=
|
||||||
0;U<u.length;U++)c=c+u[U]&-1}a.a=k;a.b=c;e=a}else w("Empty disk image: "+a.oa)}catch(Aa){w("Disk image error ("+b+"): "+Aa.message)}}a.g&&(a.g.call(a.i,a.h,e,a.oa,a.da),a.g=null)}function Ff(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.wf=b;a.xf=c;a.pa=a.ea=0;a.za=!1;return a}function Jf(a){return a.a.length?[a.a.length,a.a[0].length,a.a[0][0].length,a.a[0][0][0].length]:[0,0,0,0]}
|
0;U<u.length;U++)c=c+u[U]&-1}a.a=k;a.b=c;e=a}else w("Empty disk image: "+a.oa)}catch(Aa){w("Disk image error ("+b+"): "+Aa.message)}}a.g&&(a.g.call(a.i,a.h,e,a.oa,a.da),a.g=null)}function Ff(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.wf=b;a.xf=c;a.pa=a.ea=0;a.za=!1;return a}function Jf(a){return a.a.length?[a.a.length,a.a[0].length,a.a[0][0].length,a.a[0][0][0].length]:[0,0,0,0]}
|
||||||
h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!k&&f.zc&&b<f.S)for(k=g[b]=Array(f.Tb),g=0;g<k.length;g++)k[g]=Ff(null,a,b,g+1,f.Kb,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.zc&&9==f.Fb&&(d=k[g]=Ff(null,a,b,f.Fb,f.Kb,0))}}e&&e(d,!1);return d};function If(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
h.seek=function(a,b,c,d,e){d=null;var f=this.h,g=this.a[a];if(g){var k=g[b];if(!k&&f.Ac&&b<f.S)for(k=g[b]=Array(f.Ub),g=0;g<k.length;g++)k[g]=Ff(null,a,b,g+1,f.Mb,0);if(k){for(g=0;g<k.length;g++)if(k[g]&&k[g].sector==c){d=k[g];break}!d&&f.Ac&&9==f.Hb&&(d=k[g]=Ff(null,a,b,f.Hb,f.Mb,0))}}e&&e(d,!1);return d};function If(a,b){for(var c=0,d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}
|
||||||
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ea?f<a.pa?(a.ea+=a.pa-f,a.pa=f):f>=a.pa+a.ea&&(a.ea+=f-(a.pa+a.ea)+1):(a.pa=f,a.ea=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
h.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ea?f<a.pa?(a.ea+=a.pa-f,a.pa=f):f>=a.pa+a.ea&&(a.ea+=f-(a.pa+a.ea)+1):(a.pa=f,a.ea=1);d[f]=d[f]&~(255<<b)|c<<b}return!0}return null};
|
||||||
function Kf(a,b){var c=a.S*a.M,d=b/c|0;return d<a.O?(b%=c,a.seek(d,b/a.M|0,b%a.M+1)):null}function Lf(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Mf(a){for(var b="",c=0,d;d=Kf(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Lf(a,d,e));return btoa(b)}
|
function Kf(a,b){var c=a.S*a.N,d=b/c|0;return d<a.O?(b%=c,a.seek(d,b/a.N|0,b%a.N+1)):null}function Lf(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Mf(a){for(var b="",c=0,d;d=Kf(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Lf(a,d,e));return btoa(b)}
|
||||||
h.save=function(){var a=0,b=[];b[a++]=[this.da,this.b,this.O,this.S,this.M,this.W];if(!this.c)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.ea){for(var k=[],l=0,n=g.pa,p=g.pa+g.ea;n<p;)k[l++]=g.data[n++];b[a++]=[d,e,f,g.pa,k]}}return b};
|
h.save=function(){var a=0,b=[];b[a++]=[this.da,this.b,this.O,this.S,this.N,this.W];if(!this.c)for(var c=this.a,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.ea){for(var k=[],l=0,n=g.pa,p=g.pa+g.ea;n<p;)k[l++]=g.data[n++];b[a++]=[d,e,f,g.pa,k]}}return b};
|
||||||
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.a.length&&6<=e.length?Ef(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.b&&e[1]!=this.b&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.b+")",b=-2));for(this.a.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],n=g[f++];if(k>=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+
|
h.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.a.length&&6<=e.length?Ef(this,"local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.b&&e[1]!=this.b&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.b+")",b=-2));for(this.a.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],k=g[f++],l=g[f++],n=g[f++];if(k>=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+
|
||||||
b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.pa=e;for(k.ea=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.C("Unable to restore disk '"+this.oa+": "+c);return b};
|
b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;l<e;)k.data[l++]=k.pattern;l=0;k.pa=e;for(k.ea=f.length;e<g;)k.data[e++]=f[l++];b++}}}0>b&&-2!=b&&this.controller.D("Unable to restore disk '"+this.oa+": "+c);return b};
|
||||||
h.toJSON=function(){var a;a=0;for(var b;b=Kf(this,a++);)Nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
h.toJSON=function(){var a;a=0;for(var b;b=Kf(this,a++);)Nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
|
||||||
function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.u=a.autoMount||{};this.m=0;this.c=Array(8);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
|
function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.m=0;this.c=Array(8);this.A=!Ca("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]=
|
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Nb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.H=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.u[e]=a[e]);Qf(this);this.D=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.w&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)};
|
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.fb=Yb(144,5,65536);fb(b,this,Rf);hb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||E(this)};
|
||||||
h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Jb){for(a=0;a<this.c.length;a++)Uf(this,a,!0);Tf(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()};
|
h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)Uf(this,a,!0);Tf(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;8>b;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()};
|
||||||
h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.u){var d=a.u[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!Vf(a,g,f,e,!0)&&b&&E(a,!1);continue}a.C("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.m}
|
h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!Vf(a,g,f,e,!0)&&b&&E(a,!1);continue}a.D("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.m}
|
||||||
function Pf(a,b,c,d){var e=a.j.listDrives,e=e&&m(e.value);if(void 0===e||0>e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)}
|
function Pf(a,b,c,d){var e=a.j.listDrives,e=e&&m(e.value);if(void 0===e||0>e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)}
|
||||||
function Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.C("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.pc)&&g++));return g}
|
function Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.D("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.qc)&&g++));return g}
|
||||||
h.pc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.C('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.C('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)};
|
h.qc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.m||E(this));Of(this,a.Ia)};
|
||||||
function Sf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function Sf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Of(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=m(a.value),c=c.Aa?"?":c.da,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Uf(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.C("Drive RK"+b+" unloaded",c),Of(a,b))}
|
function Of(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=m(a.value),c=c.Aa?"?":c.da,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Uf(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.D("Drive RK"+b+" unloaded",c),Of(a,b))}
|
||||||
function Qf(a,b){var c=0;b||(b=[]);a.A=b[c++]||2496;a.i=b[c++]||0;a.B=b[c++]||128;a.s=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.G=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.Aa=!1;d.name=c.Ca;d.O=203;d.S=2;d.M=12;d.W=512;d.ub=!0;d.Ac=0;d.yc=0;d.Fb=1;d.Tb=d.M;d.Kb=d.W;d.Gc=0;d.Sd=null;d.J||(d.da="");d.status=2496}return!0}h.oc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.B|=49152);return!0};
|
function Qf(a,b){var c=0;b||(b=[]);a.w=b[c++]||2496;a.i=b[c++]||0;a.B=b[c++]||128;a.s=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.C=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.Aa=!1;d.name=c.Ca;d.O=203;d.S=2;d.N=12;d.W=512;d.vb=!0;d.Bc=0;d.zc=0;d.Hb=1;d.Ub=d.N;d.Mb=d.W;d.Hc=0;d.Td=null;d.J||(d.da="");d.status=2496}return!0}h.pc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.s=65536-e&65535;a&&(this.i=this.i|a|32768,this.B|=49152);return!0};
|
||||||
h.qc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.M&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};
|
h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=4096;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=32;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=1024;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};
|
||||||
h.rc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=1024;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.M&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};h.ud=function(){return this.A};h.te=function(){};h.vd=function(){return this.i};h.ue=function(){};h.rd=function(){return this.B&61438};
|
h.sc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=128,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=1024;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=4096;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=32;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=64;break}}return g(k,b,c,d,e,f)};h.vd=function(){return this.w};h.te=function(){};h.wd=function(){return this.i};h.ue=function(){};h.sd=function(){return this.B&61438};
|
||||||
h.qe=function(a){this.B=this.B&-3968|a&3967;if(this.B&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.B&=-129;switch(this.B&14){case 0:this.A=d.status;this.i=0;this.B=128;this.b=0;break;case 4:b=this.qc;case 2:b||(b=this.rc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.O?(this.i|=32832,this.B|=49152):g>=d.M?(this.i|=32800,this.B|=49152):(k=(this.B&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.oc.bind(this)))}this.A=d.status|a<<13|this.b%9&15;c&&(this.B&=
|
h.qe=function(a){this.B=this.B&-3968|a&3967;if(this.B&1){var b,c=!0;a=(this.b&57344)>>13;var d=this.c[a],e,f,g,k;this.B&=-129;switch(this.B&14){case 0:this.w=d.status;this.i=0;this.B=128;this.b=0;break;case 4:b=this.rc;case 2:b||(b=this.sc),e=(this.b&8160)>>5,f=(this.b&16)>>4,g=this.b&15,e>=d.O?(this.i|=32832,this.B|=49152):g>=d.N?(this.i|=32800,this.B|=49152):(k=(this.B&48)<<12|this.h,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.pc.bind(this)))}this.w=d.status|a<<13|this.b%9&15;c&&(this.B&=
|
||||||
-2,this.B|=128,this.B&64&&Wb(this.a,this.D))}};h.wd=function(){return this.s};h.ve=function(a){this.s=a};h.qd=function(){return this.h};h.pe=function(a){this.h=a};h.sd=function(){return this.b};h.re=function(a){this.b=a};h.td=function(){return this.G};h.se=function(a){this.G=a};
|
-2,this.B|=128,this.B&64&&Wb(this.a,this.fb))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.h};h.pe=function(a){this.h=a};h.td=function(){return this.b};h.re=function(a){this.b=a};h.ud=function(){return this.C};h.se=function(a){this.C=a};
|
||||||
var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.ud,N.prototype.te,"RKDS"],Wf[65282]=[null,null,N.prototype.vd,N.prototype.ue,"RKER"],Wf[65284]=[null,null,N.prototype.rd,N.prototype.qe,"RKCS"],Wf[65286]=[null,null,N.prototype.wd,N.prototype.ve,"RKWC"],Wf[65288]=[null,null,N.prototype.qd,N.prototype.pe,"RKBA"],Wf[65290]=[null,null,N.prototype.sd,N.prototype.re,"RKDA"],Wf[65294]=[null,null,N.prototype.td,N.prototype.se,"RKDB"],Wf);
|
var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Wf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Wf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Wf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Wf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Wf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Wf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Wf);
|
||||||
function M(a){x.call(this,"RL11",a,M,131072);this.w=a.autoMount||{};this.s=0;this.c=Array(4);this.A=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
|
function M(a){x.call(this,"RL11",a,M,131072);this.A=a.autoMount||{};this.s=0;this.c=Array(4);this.w=!Ca("Mobi")&&window&&"FileReader"in window}z(M);h=M.prototype;
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]=
|
h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=m(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]=
|
||||||
c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Nb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[m(a.value)||0])?(a=a.J)?(a=Da(Mf(a),a.Ob.replace(".json",".img")),w(a)):d.D("No disk loaded in drive."):d.D("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=
|
||||||
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yf(d,r(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
|
||||||
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.H=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.w[e]=a[e]);Zf(this);this.D=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.A&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)};
|
h.fa=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.G=d;if((a=wc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.fb=Yb(112,5,131072);fb(b,this,$f);hb(b,this.reset.bind(this));ag(this,"None","",!0);this.w&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||E(this)};
|
||||||
h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Jb){for(a=0;a<this.c.length;a++)cg(this,a,!0);bg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()};
|
h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Lb){for(a=0;a<this.c.length;a++)cg(this,a,!0);bg(this,!0)}}else if(!this.restore(a))return!1;if(a=this.j.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;4>b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()};
|
||||||
h.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.s=0);for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!dg(a,g,f,e,!0)&&b&&E(a,!1);continue}a.C("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.s}
|
h.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.s=0);for(var c in a.A){var d=a.A[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;g<f.options.length;g++){var k=f.options[g];if(k.value==e){f=k.text;break a}}f=r(e,!0)}if(e&&f&&(g=-1,c&&(g=c.charCodeAt(c.length-1)-48,0>g||9<g)&&(g=-1),0<=g&&g<a.c.length)){!dg(a,g,f,e,!0)&&b&&E(a,!1);continue}a.D("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")")}return!!a.s}
|
||||||
function Yf(a,b,c,d){var e=a.j.listDrives,e=e&&m(e.value);if(void 0===e||0>e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)}
|
function Yf(a,b,c,d){var e=a.j.listDrives,e=e&&m(e.value);if(void 0===e||0>e||e>=a.c.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=r(c);a.status("Attempting to load "+c+' as "'+b+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)}
|
||||||
function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.C("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.s++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.tc)&&g++));return g}
|
function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.D("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.s++),k.Aa=!!f,Gf(new Cf(a,k,"preload"),c,d,f,a.uc)&&g++));return g}
|
||||||
h.tc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)};
|
h.uc=function(a,b,c,d,e){var f;a.Ha=!1;b&&(f=Jf(b),b&&f[0]>a.O||f[1]>a.S)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.J=b,a.oa=c,a.da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Cc(this.l)):a.Aa=!1;a.Ga&&(a.Ga=!1,--this.s||E(this));Xf(this,a.Ia)};
|
||||||
function ag(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
function ag(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}
|
||||||
function Xf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=m(a.value),c=c.Aa?"?":c.da,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function cg(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.C("Drive RL"+b+" unloaded",c),Xf(a,b))}
|
function Xf(a,b){if(0<=b&&b<a.c.length){var c=a.c[b],d=a.j.listDisks;a=a.j.listDrives;if(d&&a&&d.options&&a.options&&(a=m(a.value),c=c.Aa?"?":c.da,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function cg(a,b,c){var d=a.c[b];if(d.J||!1===c)d.oa="",d.da="",d.J=null,d.Aa=!1,c||(a.D("Drive RL"+b+" unloaded",c),Xf(a,b))}
|
||||||
function Zf(a,b){var c=0;b||(b=[]);a.B=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.i=b[c++]||0;a.m=b[c++]||0;a.u=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.Aa=!1;d.name=c.Ca;d.O=512;d.S=2;d.M=40;d.W=256;d.ub=!0;d.Ac=0;d.yc=0;d.Fb=1;d.Tb=d.M;d.Kb=d.W;d.Gc=0;d.Sd=null;d.J||(d.da="");d.status=29|(512==d.O?128:0)}return!0}
|
function Zf(a,b){var c=0;b||(b=[]);a.B=b[c++]||0;a.h=b[c++]||0;a.b=b[c++]||0;a.i=b[c++]||0;a.m=b[c++]||0;a.v=b[c]||0;for(b=0;b<a.c.length;b++){var d=a.c[b];void 0===d&&(d=a.c[b]={});c=a;d.Ia=b;d.Ha=d.Aa=!1;d.name=c.Ca;d.O=512;d.S=2;d.N=40;d.W=256;d.vb=!0;d.Bc=0;d.zc=0;d.Hb=1;d.Ub=d.N;d.Mb=d.W;d.Hc=0;d.Td=null;d.J||(d.da="");d.status=29|(512==d.O?128:0)}return!0}
|
||||||
h.sc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.u=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.B=this.B|a|32768);return!0};
|
h.tc=function(a,b,c,d,e,f){this.h=f&65535;this.B=this.B&-49|f>>12&48;this.v=f>>16&63;this.i=this.b=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.B=this.B|a|32768);return!0};
|
||||||
h.uc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.M&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};
|
h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.J.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,v;if(0>(u=a.J.read(n,p++))||0>(v=a.J.read(n,p++))){k=5120;break}this.g.Va(f,u|v<<8);if(Ub(this.g)){k=8192;break}f+=2;if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};
|
||||||
h.vc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=8192;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.M&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};h.zd=function(){return this.B&65535};
|
h.wc=function(a,b,c,d,e,f,g){var k=0,l=a.J,n=null,p;l||(k=5120,e=0);for(;e--;){var u=this.g.Qa(f);if(Ub(this.g)){k=8192;break}f+=2;if(!n){n=a.J.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.J.write(n,p++,u&255)||!a.J.write(n,p++,u>>8)){k=5120;break}if(p>=l.W&&(n=null,++d>=l.N&&(d=0,++c>=l.S&&(c=0,++b>=l.O)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Ad=function(){return this.B&65535};
|
||||||
h.ye=function(a){this.B=this.B&-1023|a&1022;this.G=this.G&-4|(a&48)>>4;if(!(this.B&128)){var b;a=!0;var c=this.c[(this.B&768)>>8],d,e,f,g;this.B&=-2;switch(this.B&14){case 4:this.b&8&&(this.B&=63);this.m=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.uc;case 10:b||(b=this.vc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.O||f>=c.M?this.B|=37888:(g=(this.u&
|
h.ye=function(a){this.B=this.B&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.B&128)){var b;a=!0;var c=this.c[(this.B&768)>>8],d,e,f,g;this.B&=-2;switch(this.B&14){case 4:this.b&8&&(this.B&=63);this.m=c.status|this.i&64;break;case 6:1==(this.b&3)&&(b=this.b&65408,c=(this.b&16)<<2,this.i=this.b&4?this.i+b:this.i-b,this.b=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.vc;case 10:b||(b=this.wc),d=this.b>>7,e=this.b&64?1:0,f=this.b&63,d>=c.O||f>=c.N?this.B|=37888:(g=(this.v&
|
||||||
63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.sc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.D))}};h.xd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Ad=function(){return this.b};h.ze=function(a){this.b=a};h.Bd=function(){return this.m};h.Ae=function(a){this.m=a};h.yd=function(){return this.u};h.xe=function(a){this.u=a&63};
|
63)<<16|this.h,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.tc.bind(this)))}a&&(this.B|=129,this.B&64&&Wb(this.a,this.fb))}};h.yd=function(){return this.h};h.we=function(a){this.h=a&65534};h.Bd=function(){return this.b};h.ze=function(a){this.b=a};h.Cd=function(){return this.m};h.Ae=function(a){this.m=a};h.zd=function(){return this.v};h.xe=function(a){this.v=a&63};
|
||||||
var eg={},$f=(eg[63744]=[null,null,M.prototype.zd,M.prototype.ye,"RLCS"],eg[63746]=[null,null,M.prototype.xd,M.prototype.we,"RLBA"],eg[63748]=[null,null,M.prototype.Ad,M.prototype.ze,"RLDA"],eg[63750]=[null,null,M.prototype.Bd,M.prototype.Ae,"RLMP"],eg[63752]=[null,null,M.prototype.yd,M.prototype.xe,"RLBE"],eg);
|
var eg={},$f=(eg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],eg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],eg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],eg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],eg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],eg);
|
||||||
function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.A=wc(this,"autoPower",a);this.l=0;this.P=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.K=!1;this.U=wc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Wa("CPU",this.id)){this.H=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.P},this.a,this.H);var d,e=A(this.id);if((this.w=Wa("Panel",this.id))&&this.w.eb)for(b=0;b<e.length;b++)d=e[b],d.C=this.w.C,d.X=this.w.X,
|
function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.w=wc(this,"autoPower",a);this.l=0;this.P=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.K=!1;this.U=wc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Wa("CPU",this.id)){this.G=Wa("Debugger",this.id);this.g=new yb({id:this.ua+".bus",busWidth:this.P},this.a,this.G);var d,e=A(this.id);if((this.A=Wa("Panel",this.id))&&this.A.eb)for(b=0;b<e.length;b++)d=e[b],d.D=this.A.D,d.X=this.A.X,
|
||||||
d.eb=this.w.eb;this.X("PDPjs v1.30.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.fa&&d.fa(this,this.g,this.a,this.H);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.m=d:this.b=parseInt(d,10));var f;if(a=wc(this,"state")||(f=!0,a.state))b=this.D=a,f||(this.i=!0,this.b=hg),this.b&&(this.u=
|
d.eb=this.A.eb;this.X("PDPjs v1.30.4\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.X("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.fa&&d.fa(this,this.g,this.a,this.G);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.m=d:this.b=parseInt(d,10));var f;if(a=wc(this,"state")||(f=!0,a.state))b=this.C=a,f||(this.i=!0,this.b=hg),this.b&&(this.v=
|
||||||
new O(this,"1.30.4"),jg(this.u)?b=null:delete this.u);!b&&this.b&&(b=kg(this))&&(this.i=!0);if(b){var g=this;t(b,null,!0,function(a,b,c){c?(g.m=null,g.i=!1,g.C("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(g.s=b,g.K=!0);E(g)})}else E(this);this.j.power||(this.A=!0);!c&&this.A&&lg(this,this.hb)}else w("Unable to find CPU component")}z(fg);var hg=0;
|
new O(this,"1.30.4"),jg(this.v)?b=null:delete this.v);!b&&this.b&&(b=kg(this))&&(this.i=!0);if(b){var g=this;t(b,null,!0,function(a,b,c){c?(g.m=null,g.i=!1,g.D("Unable to load machine state from server (error "+c+(b?": "+pa(b):"")+")")):(g.s=b,g.K=!0);E(g)})}else E(this);this.j.power||(this.w=!0);!c&&this.w&&lg(this,this.ib)}else w("Unable to find CPU component")}z(fg);var hg=0;
|
||||||
function gg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.N=b}function wc(a,b,c){var d=b.toLowerCase(),d=Oa[b]||Oa[d];void 0===d&&a.N&&(d=a.N[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function lg(a,b,c){for(var d=A(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ya(f)){Ya(f,function(){lg(a,b,c)});return}}b.call(a,c)}
|
function gg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){w(d.message+" ("+c+")")}}a.L=b}function wc(a,b,c){var d=b.toLowerCase(),d=Oa[b]||Oa[d];void 0===d&&a.L&&(d=a.L[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function lg(a,b,c){for(var d=A(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Ya(f)){Ya(f,function(){lg(a,b,c)});return}}b.call(a,c)}
|
||||||
function mg(a,b){var c=new O(a,"1.30.4","validate");if(jg(c)&&ng(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.C("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=fg.prototype;
|
function mg(a,b){var c=new O(a,"1.30.4","validate");if(jg(c)&&ng(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.D("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=fg.prototype;
|
||||||
h.hb=function(a){void 0===a&&(a=this.b||(this.s?1:hg));if(!this.l){this.l++;var b=!1,c=!1;this.G=!1;var d=this.u||new O(this,"1.30.4");if(-1==a)b=!0;else if(a>hg){if(jg(d,this.s)){this.h=new O(this,"1.30.4","failsafe");jg(this.h)&&(og(this,d),a=2,pg(this.h));this.h.set("timestamp",sa());qg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"==
|
h.ib=function(a){void 0===a&&(a=this.b||(this.s?1:hg));if(!this.l){this.l++;var b=!1,c=!1;this.H=!1;var d=this.v||new O(this,"1.30.4");if(-1==a)b=!0;else if(a>hg){if(jg(d,this.s)){this.h=new O(this,"1.30.4","failsafe");jg(this.h)&&(og(this,d),a=2,pg(this.h));this.h.set("timestamp",sa());qg(this.h);var e=this.b&&!this.i;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"==
|
||||||
f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Ba("user",""),this.c=null)):this.X(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.u}e=A(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.a&&(c=tg(this,g,d,b,c));b=[d,a,c];-1!=a?lg(this,this.Vb,b):this.Vb(b)}};
|
f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(Ba("user",""),this.c=null)):this.X(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=A(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.a&&(c=tg(this,g,d,b,c));b=[d,a,c];-1!=a?lg(this,this.Wb,b):this.Wb(b)}};
|
||||||
function tg(a,b,c,d,e){if(!b.o.R){b.o.R=!0;if(b.ha){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ha(f,d)&&f&&(w("Unable to restore state for "+b.type),a.D&&!a.K?(c.clear(),a.b=hg,window&&window.location.reload()):a.G=!0,b.ha(null),e=!1)}if(!d&&b.Xb)for(a=b.Xb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
function tg(a,b,c,d,e){if(!b.o.R){b.o.R=!0;if(b.ha){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ha(f,d)&&f&&(w("Unable to restore state for "+b.type),a.C&&!a.K?(c.clear(),a.b=hg,window&&window.location.reload()):a.H=!0,b.ha(null),e=!1)}if(!d&&b.Yb)for(a=b.Yb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||||
h.Vb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.cb());this.G&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
|
h.Wb=function(a){var b=a[0],c=0>a[1];a=a[2];this.V=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.Ba(),this.a.cb());this.H&&(og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.l=0};
|
||||||
function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.4"};d.url=a.U;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
|
function og(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.4"};d.url=a.U;d.user=c;d.type="bug";d.data=b;t("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||||
function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.4"),g=new O(a,"1.30.4","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&F(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l<k.length;l++){var n=k[l];n.o.R&&(n.ga&&(d=n.ga(b,c),"object"===typeof d&&f.set(n.id,
|
function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.4"),g=new O(a,"1.30.4","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.4");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&F(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l<k.length;l++){var n=k[l];n.o.R&&(n.ga&&(d=n.ga(b,c),"object"===typeof d&&f.set(n.id,
|
||||||
d)),c&&(n.o.R=!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.c&&vg(a,a.c,f.toString()),qg(g)&&qg(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=3==a.b),d&&f.clear(k)):e=f.toString());c&&(a.o.R=!1,b=a.j.power)&&(b.textContent="Power");a.l=0;return e}h.reset=function(){this.g&&this.g.reset&&this.g.reset();this.a&&this.a.reset&&this.a.reset();for(var a=A(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.g&&c!==this.a&&c.reset&&c.reset()}this.Ba(-1)};
|
d)),c&&(n.o.R=!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.c&&vg(a,a.c,f.toString()),qg(g)&&qg(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=3==a.b),d&&f.clear(k)):e=f.toString());c&&(a.o.R=!1,b=a.j.power)&&(b.textContent="Power");a.l=0;return e}h.reset=function(){this.g&&this.g.reset&&this.g.reset();this.a&&this.a.reset&&this.a.reset();for(var a=A(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.g&&c!==this.a&&c.reset&&c.reset()}this.Ba(-1)};
|
||||||
h.start=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.Ba(-1)};h.stop=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.Ba(-1)};
|
h.start=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.Ba(-1)};h.stop=function(a,b){for(var c=A(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.Ba(-1)};
|
||||||
h.Ba=function(a){if(this.a){var b=this.a,c=a||0,d=b.j.speed;d&&(0>=c||30<=(b.Bb+=c))&&(d.textContent=b.o.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Bb=0)}if(this.w&&(b=this.w,a=a||0,b.u)){c=b.a.o.T;d=!!(b.a.v&4);if(0>=a||60<=(b.s+=a)){for(var e=0;e<b.a.f.length;e++)nb(b,"R"+e,b.a.f[e]);e=bc(b.a);nb(b,"PS",e);nb(b,"NF",e&8?1:0,1);nb(b,"ZF",e&4?1:0,1);nb(b,"VF",e&2?1:0,1);nb(b,"CF",e&1?1:0,1);b.s=0}vb(b,0<a&&c&&!d?b.a.fb:b.ia);ub(b,b.m);a=b.a;a=a.ka?a.Ea&16?1:2:4;wb(b,"B22",a&1);wb(b,"B18",a&2);wb(b,"B16",
|
h.Ba=function(a){if(this.a){var b=this.a,c=a||0,d=b.j.speed;d&&(0>=c||30<=(b.Db+=c))&&(d.textContent=b.o.T?b.La.toFixed(2)+"Mhz":"Stopped",b.Db=0)}if(this.A&&(b=this.A,a=a||0,b.v)){c=b.a.o.T;d=!!(b.a.u&4);if(0>=a||60<=(b.s+=a)){for(var e=0;e<b.a.f.length;e++)nb(b,"R"+e,b.a.f[e]);e=bc(b.a);nb(b,"PS",e);nb(b,"NF",e&8?1:0,1);nb(b,"ZF",e&4?1:0,1);nb(b,"VF",e&2?1:0,1);nb(b,"CF",e&1?1:0,1);b.s=0}vb(b,0<a&&c&&!d?b.a.gb:b.ia);ub(b,b.m);a=b.a;a=a.ka?a.Ea&16?1:2:4;wb(b,"B22",a&1);wb(b,"B18",a&2);wb(b,"B16",
|
||||||
a&4)}};
|
a&4)}};
|
||||||
h.aa=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.l||(d.o.R?ug(d,!1,!0):lg(d,d.hb))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.R&&!d.l)if(d.b&&!d.m){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");ug(d,a,!0);!a&&d.D?window&&window.location.reload():(a||(d.Jb=!0),d.hb(hg),d.Jb=!1)}else d.reset(),d.a&&d.a.cb()},!0;case "save":if(ma(ua(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
|
h.aa=function(a,b,c){var d=this;switch(b){case "power":return this.j[b]=c,c.onclick=function(){d.l||(d.o.R?ug(d,!1,!0):lg(d,d.ib))},!0;case "reset":return this.j[b]=c,c.onclick=function(){if(d.o.R&&!d.l)if(d.b&&!d.m){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");ug(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Lb=!0),d.ib(hg),d.Lb=!1)}else d.reset(),d.a&&d.a.cb()},!0;case "save":if(ma(ua(),"pcjs.org"))c.parentNode.removeChild(c);else return this.j[b]=
|
||||||
c,c.onclick=function(){var a=ig(d,!0);if(a){var b=!!(d.b&&!d.m||d.D),c=ug(d,b);b?vg(d,a,c):d.C("Resume disabled, machine state not saved")}},!0}return!1};
|
c,c.onclick=function(){var a=ig(d,!0);if(a){var b=!!(d.b&&!d.m||d.C),c=ug(d,b);b?vg(d,a,c):d.D("Resume disabled, machine state not saved")}},!0}return!1};
|
||||||
function ig(a,b){var c=a.c;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=wg(a,c))||a.C("The user ID is invalid.")):b&&a.C("Browser local storage is not available"));return c}
|
function ig(a,b){var c=a.c;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=wg(a,c))||a.D("The user ID is invalid.")):b&&a.D("Browser local storage is not available"));return c}
|
||||||
function wg(a,b){a.c=null;b=t(ua()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ba("user",b.data),a.c=b.data)}catch(d){w(d.message+" ("+c+")")}return a.c}function kg(a){var b=null;a.c&&(b=ua()+"/api/v1/user?req=load&user="+a.c+"&state="+xg(a,"1.30.4"));return b}
|
function wg(a,b){a.c=null;b=t(ua()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ba("user",b.data),a.c=b.data)}catch(d){w(d.message+" ("+c+")")}return a.c}function kg(a){var b=null;a.c&&(b=ua()+"/api/v1/user?req=load&user="+a.c+"&state="+xg(a,"1.30.4"));return b}
|
||||||
function vg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=xg(a,"1.30.4");d.data=c;b=t(ua()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.C("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.C(c),Ba("user",""),a.c=null)}}
|
function vg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=xg(a,"1.30.4");d.data=c;b=t(ua()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.D("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.D(c),Ba("user",""),a.c=null)}}
|
||||||
function rf(a){var b;a=A(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}function Cc(a){if(a.eb){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.eb.focus();window&&window.scrollTo(b,c)}}Ja(function(){for(var a=D(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=B(c),c=D(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=B(f),g=new fg(g,d,!0);C(g,f);g.A&&lg(g,g.hb)}});
|
function rf(a){var b;a=A(a.id);for(var c=0;c<a.length;c++){var d=a[c];if(b)b==d&&(b=null);else if("RAM"==d.type)return d}return null}function Cc(a){if(a.eb){var b=0,c=0;window&&(b=window.scrollX,c=window.scrollY);a.eb.focus();window&&window.scrollTo(b,c)}}Ja(function(){for(var a=D(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=B(c),c=D(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=B(f),g=new fg(g,d,!0);C(g,f);g.w&&lg(g,g.ib)}});
|
||||||
Ea.show.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.V&&!c.o.R&&c.hb(-1)}});Ea.exit.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.o.R&&ug(c,!(!c.b||c.m),!0)}});function O(a,b,c){this.id=a.id;this.key=xg(a,b,c);this.H=a.H;pg(this,a.Jc)}function xg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
Ea.show.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.V&&!c.o.R&&c.ib(-1)}});Ea.exit.push(function(){for(var a=D(document,"pdp11","computer"),b=0;b<a.length;b++){var c=B(a[b]);(c=Wa("Computer",c.id))&&c.o.R&&ug(c,!(!c.b||c.m),!0)}});function O(a,b,c){this.id=a.id;this.key=xg(a,b,c);this.G=a.G;pg(this,a.Kc)}function xg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
||||||
O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){pg(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
O.prototype={constructor:O,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){pg(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
||||||
1);c=0}}};function pg(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function qg(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);Ba(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function ng(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function jg(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.a=!0):!1}var yg=0;
|
1);c=0}}};function pg(a,b){a[a.id]={};b&&a.set("parms",b);a.a=!1}function qg(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);Ba(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function ng(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function jg(a,b){return b?(a[a.id]=b,a.a=!0):a.a?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.a=!0):!1}var yg=0;
|
||||||
function zg(a,b,c,d,e,f){e("Loading "+a+"...");t(a,null,!0,function(g,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),f(k,null)):Ag(k,a,b,c,d,e,f)})}
|
function zg(a,b,c,d,e,f){e("Loading "+a+"...");t(a,null,!0,function(g,k,l){l?(k||(k="unable to load "+a+" ("+l+")"),f(k,null)):Ag(k,a,b,c,d,e,f)})}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue