diff --git a/apps/README.md b/apps/README.md index 7c53e3da85..2e00e9101b 100644 --- a/apps/README.md +++ b/apps/README.md @@ -19,6 +19,7 @@ PCjs also includes a small collection of disk images in the [Disk Libraries](/di * [IBM PC](/disks/pcx86/) * [Challenger 1P](/disks/c1p/) +* [DEC](/disks/dec/) --- diff --git a/devices/pdp11/README.md b/devices/pdp11/README.md index f02fc4eb3a..e273d1d63a 100644 --- a/devices/pdp11/README.md +++ b/devices/pdp11/README.md @@ -10,8 +10,9 @@ PDP-11 Device Configurations [PDP-11 Machines](/devices/pdp11/machine/) rely on a variety of machine configuration files and resources, including: * [Control Panels](panel/) -* [Serial Interface for Display Terminals (DL11)](dl11/) -* [High-Speed Paper Tape Reader/Punch (PC11)](pc11/) +* Serial Interface for Display Terminals [(DL11)](dl11/) +* High-Speed Paper Tape Reader/Punch [(PC11)](pc11/) +* Disk Controllers ([RL11](rl11/)) * [ROM Images](rom/) Sample machines include a diff --git a/devices/pdp11/machine/1120/README.md b/devices/pdp11/machine/1120/README.md index 5a9fb92001..6020283d21 100644 --- a/devices/pdp11/machine/1120/README.md +++ b/devices/pdp11/machine/1120/README.md @@ -13,5 +13,5 @@ PDPjs is currently being tested with the following PDP-11/20 machine configurati * [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) (with [Debugger](/devices/pdp11/machine/1120/bootstrap/debugger/)) * [PDP-11/20 BASIC Demo](/devices/pdp11/machine/1120/basic/) (with [Debugger](/devices/pdp11/machine/1120/basic/debugger/)) -The "Demo" machines come with 16Kb of RAM and a [PC11 Paper Tape Reader](/devices/pdp11/pc11/). The "Boot Test" machine +The "Demo" machines come with 16Kb of RAM and a [PC11 Paper Tape Reader](/devices/pdp11/pc11/). The "Boot Monitor" machine has 56Kb of RAM. diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md index fb4de628b2..279007e60b 100644 --- a/devices/pdp11/machine/1170/panel/README.md +++ b/devices/pdp11/machine/1170/panel/README.md @@ -10,85 +10,3 @@ machines: {% include machine.html id="test1170" %} This machine is also available with our built-in [Debugger](debugger/). - -Front Panel Basics ------------------- - -From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, -p. 325: - -> ### CONSOLE OPERATION - -> The PDP-11/70 console allows direct control of the computer system. It contains a power switch for the CPU, -which is also usually used as the Master Switch for the system. The console is used for starting, stopping, resetting, -and debugging. Lights and switches provide the facilities for monitoring operation, system control, and maintenance. -Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or -single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches. - -The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Console. The switches, which -PDPjs displays as green to make them stand out from the rest of the traditional pink-and-magenta controls, are summarized -below. - -### 0..21 - -Switches 0 to 21 control bits 0 to 21 of the SWITCH register. The UP position represents a 1, and the DOWN position -represents a 0. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the -ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS -register (where it will become the DATA displayed by the second row of LEDs). - -The SWITCH, ADDRESS, and DATA (aka DISPLAY) registers are all internal to the Front Panel hardware, and should not be -confused with CPU registers. - -### TEST - -This is a momentary switch that is normally in the DOWN position. When held in the UP position, it turns on all LEDs. -This "lamp test" was more important in the days when the lights were produced by bulbs with filaments that could burn out, -and if you didn't realize that a particular light was "burned out", you could mistake it for a zero. - -While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch: -pressing it also returns all the SWITCH register switches (0-21) to their DOWN position. - -### LOAD [ADRS] - -This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the -ADDRESS register. - -### EXAM - -This is a momentary switch that is normally in the UP position. When pressed DOWN, it reads the memory location referenced -by the ADDRESS register and displays it in the DATA register. If pressed repeatedly, each repetition also automatically -adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being -examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2. - -Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM or DEP -operations will decrease the ADDRESS register instead of increasing it. - -### DEP - -This is a momentary switch that is normally in the DOWN position. When pressed UP, it writes the contents of the SWITCH -register to the memory location referenced by the ADDRESS register, and displays the result in the DATA register. Like the -EXAM switch, if DEP is pressed repeatedly, each repetition also automatically adds 2 to the ADDRESS register, making it easier -to deposit the same value to a series of words. - -### CONT - -This is a momentary switch that is normally in the UP position. When pressed DOWN, it will start the CPU if it's currently -halted. If the CPU is already running, CONT has no effect. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, -then the CPU will continue for only ONE instruction and then stop again. - -### ENABLE/HALT - -This switch is a toggle that is normally in the UP (ENABLE) position. If it pressed DOWN while the CPU is running, the CPU will -stop. Once the CPU is stopped, this switch has no effect, other than determining what CONT will do when pressed. - -### STEP - -On a real PDP-11, this would select between cycle-stepping vs. instruction-stepping. Since PDPjs doesn't support cycle-stepping, -this switch has no effect (except as described above when the EXAM or DEP switches are pressed repeatedly). - -### START - -The START switch is similar to CONT, but it also performs the equivalent a RESET instruction before starting the CPU, so -unless you're starting execution at the beginning of a program, using START instead of CONT to continue execution is probably -not a good idea. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, START will still reset the machine but not -execute anything. diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 8b5471f083..4b89bcfc8b 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -19,7 +19,7 @@ Toggle-Ins As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. If you're -not sure how to "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics). +not sure how to "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/panel/1170/#front-panel-basics). However, since the above machine also includes the PDPjs Debugger, you'll find that it's much easier to use the Debugger commands described below to load and execute these "toggle-ins". diff --git a/devices/pdp11/machine/README.md b/devices/pdp11/machine/README.md index 698d0bac49..a752bab15e 100644 --- a/devices/pdp11/machine/README.md +++ b/devices/pdp11/machine/README.md @@ -7,7 +7,7 @@ permalink: /devices/pdp11/machine/ PDP-11 Machine Configurations ----------------------------- -[PDPjs](/modules/pdp11/), our PDP-11 emulation module, supports the following PDP-11 machines: +[PDP-11 Devices](/devices/pdp11/) are used to build a variety of PDP-11 machines: * [PDP-11/20](/devices/pdp11/machine/1120/) * PDP-11/45 diff --git a/devices/pdp11/panel/1170/README.md b/devices/pdp11/panel/1170/README.md index 62094298e5..0a6187cf85 100644 --- a/devices/pdp11/panel/1170/README.md +++ b/devices/pdp11/panel/1170/README.md @@ -7,4 +7,90 @@ permalink: /devices/pdp11/panel/1170/ PDP-11/70 Control Panels ------------------------ +The following Control Panel configurations are available: + * [PDP-11/70 Front Panel](front.xml) (with [Debugger](debugger/front.xml)) + +Use this [PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) to see the [PDP-11/70 Front Panel](debugger/front.xml) in action. + +Front Panel Basics +------------------ + +From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, +p. 325: + +> ### CONSOLE OPERATION + +> The PDP-11/70 console allows direct control of the computer system. It contains a power switch for the CPU, +which is also usually used as the Master Switch for the system. The console is used for starting, stopping, resetting, +and debugging. Lights and switches provide the facilities for monitoring operation, system control, and maintenance. +Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or +single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches. + +The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Console. The switches, which +PDPjs displays as green to make them stand out from the rest of the traditional pink-and-magenta controls, are summarized +below. + +### 0..21 + +Switches 0 to 21 control bits 0 to 21 of the SWITCH register. The UP position represents a 1, and the DOWN position +represents a 0. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the +ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS +register (where it will become the DATA displayed by the second row of LEDs). + +The SWITCH, ADDRESS, and DATA (aka DISPLAY) registers are all internal to the Front Panel hardware, and should not be +confused with CPU registers. + +### TEST + +This is a momentary switch that is normally in the DOWN position. When held in the UP position, it turns on all LEDs. +This "lamp test" was more important in the days when the lights were produced by bulbs with filaments that could burn out, +and if you didn't realize that a particular light was "burned out", you could mistake it for a zero. + +While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch: +pressing it also returns all the SWITCH register switches (0-21) to their DOWN position. + +### LOAD [ADRS] + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the +ADDRESS register. + +### EXAM + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it reads the memory location referenced +by the ADDRESS register and displays it in the DATA register. If pressed repeatedly, each repetition also automatically +adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being +examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2. + +Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM or DEP +operations will decrease the ADDRESS register instead of increasing it. + +### DEP + +This is a momentary switch that is normally in the DOWN position. When pressed UP, it writes the contents of the SWITCH +register to the memory location referenced by the ADDRESS register, and displays the result in the DATA register. Like the +EXAM switch, if DEP is pressed repeatedly, each repetition also automatically adds 2 to the ADDRESS register, making it easier +to deposit the same value to a series of words. + +### CONT + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it will start the CPU if it's currently +halted. If the CPU is already running, CONT has no effect. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, +then the CPU will continue for only ONE instruction and then stop again. + +### ENABLE/HALT + +This switch is a toggle that is normally in the UP (ENABLE) position. If it pressed DOWN while the CPU is running, the CPU will +stop. Once the CPU is stopped, this switch has no effect, other than determining what CONT will do when pressed. + +### STEP + +On a real PDP-11, this would select between cycle-stepping vs. instruction-stepping. Since PDPjs doesn't support cycle-stepping, +this switch has no effect (except as described above when the EXAM or DEP switches are pressed repeatedly). + +### START + +The START switch is similar to CONT, but it also performs the equivalent a RESET instruction before starting the CPU, so +unless you're starting execution at the beginning of a program, using START instead of CONT to continue execution is probably +not a good idea. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, START will still reset the machine but not +execute anything. diff --git a/devices/pdp11/rl11/README.md b/devices/pdp11/rl11/README.md index 742167fb57..2ae4476afc 100644 --- a/devices/pdp11/rl11/README.md +++ b/devices/pdp11/rl11/README.md @@ -7,12 +7,15 @@ permalink: /devices/pdp11/rl11/ RL11 Disk Controller -------------------- +The RL11 Disk Controller controls up to four RL01 or RL02 disk drives, which in turn read/write RL01K or +[RL02K](/disks/dec/rl02k/) disk cartridges. + Machines containing the [RL11 Component](/modules/pdp11/lib/pc11.js) include: - [PDP-11/70 Boot Monitor](/devices/pdp11/machine/1170/monitor/) (with [Debugger](/devices/pdp11/machine/1170/monitor/debugger/)) - [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) (with [Debugger](/devices/pdp11/machine/1170/panel/debugger/)) -PCjs has archived a selection of [RL02K Disk Images](/disks/dec/rl02k/) for use by those machines, most of which are +PCjs has archived a selection of [RL02K Disk Images](/disks/dec/rl02k/) for use by those machines, which are listed in the following RL11 Device XML file: - [Default](/devices/pdp11/rl11/default.xml) @@ -25,18 +28,15 @@ Device XML files not only configure a device, but also list all the resource the used to control the device, such as choosing which disks should be "auto-mounted" by the RL11 device. For example: - - Paper Tape Controls + + Disk Drive Controls - - - - + + + - Attach - Load - - - Tape Progress + Load + + diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml index 2af18e40dc..70c06c0acf 100644 --- a/devices/pdp11/rl11/default.xml +++ b/devices/pdp11/rl11/default.xml @@ -4,7 +4,7 @@ - + Load diff --git a/disks/README.md b/disks/README.md index 235deb4bd2..0a37946c6d 100644 --- a/disks/README.md +++ b/disks/README.md @@ -11,6 +11,7 @@ Browse these PCjs Disk Libraries: * [IBM PC](pcx86/) * [Challenger 1P](c1p/) +* [DEC](dec/) Additional selected software is available in the PCjs [Software Archives](/apps/). diff --git a/disks/dec/README.md b/disks/dec/README.md new file mode 100644 index 0000000000..8799b4ed6a --- /dev/null +++ b/disks/dec/README.md @@ -0,0 +1,16 @@ +--- +layout: page +title: DEC Disk Images +permalink: /disks/dec/ +--- + +DEC Disk Images +--------------- + +The DEC disk images we have archived are organized by type: + +* RL01K +* [RL02K](rl02k/) + +RL01K and RL02K disks are both single-platter cartridges with capacities of 5Mb and 10Mb, respectively, +and are designed to be used with an [RL11 Disk Controller](/devices/pdp11/rl11/). diff --git a/disks/dec/rl02k/README.md b/disks/dec/rl02k/README.md new file mode 100644 index 0000000000..caab476ac6 --- /dev/null +++ b/disks/dec/rl02k/README.md @@ -0,0 +1,13 @@ +--- +layout: page +title: DEC RL02K Disk Images +permalink: /disks/dec/rl02k/ +--- + +DEC RL02K Disk Images +--------------------- + +RL02K disks are single-platter cartridges with 512 tracks per side, 40 sectors per track, and a sector size of 256 bytes, +for a total capacity of 10Mb. They are used with an [RL11 Disk Controller](/devices/pdp11/rl11/). + +* XXDP+ Diagnostics [[source](http://skn.noip.me/pdp11/)] diff --git a/modules/pdp11/README.md b/modules/pdp11/README.md index fc297cdf9f..7e0745bc7f 100644 --- a/modules/pdp11/README.md +++ b/modules/pdp11/README.md @@ -10,7 +10,7 @@ PDP-11 Machine Emulation Module (PDPjs) Overview --- PDPjs, our PDP-11 machine emulation module, is adapted from -the JavaScript [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by +the [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by [Paul Nankervis](mailto:paulnank@hotmail.com). See the list of available [PDP-11 Machines](/devices/pdp11/machine/), which includes a @@ -33,5 +33,7 @@ PDPjs is currently comprised of the following non-shared components, as listed i * [keyboard.js](/modules/pdp11/lib/keyboard.js) * [serialport.js](/modules/pdp11/lib/serialport.js) * [pc11.js](/modules/pdp11/lib/pc11.js) +* [disk.js](/modules/pdp11/lib/disk.js) +* [rl11.js](/modules/pdp11/lib/rl11.js) * [debugger.js](/modules/pdp11/lib/debugger.js) * [computer.js](/modules/pdp11/lib/computer.js) diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 458c936b71..a05f136e78 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -579,7 +579,8 @@ var PDP11 = { DELAY: 0, LKS: { IE: 0x0040, // Interrupt Enable - MON: 0x0080 // Monitor + MON: 0x0080, // Monitor + MASK: 0x00C0 // these are the only bits that can read or written } }, PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit) diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index fa3fd19b9b..1fe7c6fb58 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -140,7 +140,7 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) */ DevicePDP11.prototype.reset = function() { - this.kw11.lks = 0; + this.kw11.lks = PDP11.KW11.LKS.MON; this.cpu.setTimer(this.kw11.timer, 1000/60, true); }; @@ -148,10 +148,9 @@ DevicePDP11.prototype.reset = function() * interruptKW11() * * We used to call this function only when the the KW11's "Interrupt Enable" bit was set, - * but now we call it at 60Hz regardless. In part, this was so we could piggy-back on - * it to drive display updates, but more importantly, the KW11's "Monitor" bit is supposed - * to be set at the "line frequency" independent of whether KW11 interrupts are enabled. - * So we should actually be more compatible now. + * but now we call it at 60Hz regardless. In part, this was so we could piggy-back on it + * to drive display updates, but more importantly, the KW11's "Monitor" bit is supposed to + * be set at the "line frequency" independent of whether KW11 interrupts are enabled or not. * * @this {DevicePDP11} */ @@ -174,9 +173,12 @@ DevicePDP11.prototype.interruptKW11 = function() */ DevicePDP11.prototype.readLKS = function(addr) { - var result = this.kw11.lks; - this.kw11.lks &= ~PDP11.KW11.LKS.MON; - return result; + /* + * NOTE: The original code always cleared LKS.MON (bit 7) after snapping the value for the read, + * but based on DEC's "Non-Interrupt Mode" programming examples, it's clear that's not how LKS.MON + * operates; if the caller wants to clear it, they must explicitly clear it with a write. + */ + return this.kw11.lks; }; /** @@ -188,7 +190,12 @@ DevicePDP11.prototype.readLKS = function(addr) */ DevicePDP11.prototype.writeLKS = function(data, addr) { - this.kw11.lks = data & ~PDP11.KW11.LKS.MON; + /* + * NOTE: The original code always cleared LKS.MON (bit 7) as part of any write, but based on DEC's + * "Non-Interrupt Mode" programming examples, which explicitly CLRB after TSTB reveals LKS.MON is set, + * I think that was wrong, and that all a write should do is mask off all the other (non-writable) bits. + */ + this.kw11.lks = data & PDP11.KW11.LKS.MASK; }; /** diff --git a/pubs/dec/README.md b/pubs/dec/README.md index bb655c69ff..ff17db28cb 100644 --- a/pubs/dec/README.md +++ b/pubs/dec/README.md @@ -7,4 +7,5 @@ permalink: /pubs/dec/ Digital Equipment Corporation (DEC) Publications ------------------------------------------------ +* [PDP-11](pdp11/) * [VT100](vt100/) diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 7c0bc41666..0126defbe6 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -63,9 +63,9 @@ k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d) b){return function(){Ab(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Bb(a,b)}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Xb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Xb(a,b,a.g[b][1])}function Yb(a,b,c,d){a.G[b]&&(void 0===c&&(ub(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?qa(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} function Ab(a,b){var c=a.g[b];Xb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}function Bb(a,b){var c=a.g[b];c[2]&&c[3]&&(Xb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.cd=function(a){a||this.b.A.Y||(this.w.reset(),Zb(this.b),zb(this,"ENABLE")&&this.b.ib())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()}; -k.Xc=function(a){if(!a&&!this.b.A.Y)if(zb(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!rb(a,!0))qb(a,!0),a.jb(0),qb(a,!1);else try{var b=this.b.jb(1);0c;c++)gc(a,"A"+c,b&1<a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Ma;zb(a,"STEP")||(b=-b);ec(a,a.f&~c|a.f+b&c)}function dc(a,b){a.v=b&65535;b=a.v;for(var c=0;16>c;c++)gc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<a.b.ob?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Ma;zb(a,"STEP")||(b=-b);ec(a,a.f&~c|a.f+b&c)}function dc(a,b){a.v=b&65535;b=a.v;for(var c=0;16>c;c++)gc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.cc=0;this.C=[];this.Jc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} @@ -74,25 +74,25 @@ b),!0,!e.la))}function nc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&6553 function oc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} function rc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d==xc&&(a.cc+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} -function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Ma)>>>this.ka].hc(a&this.w,a);this.la--;return a}; -k.pa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Ma)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Zb(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Ma)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; -k.hb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.w,d=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Ma)>>>this.ka].hc(a&this.w,a);this.la--;return a}; +k.pa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Ma)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Ma)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; +k.hb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Ma)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Cb=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.w,d=(a&this.Ma)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; function Ac(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;ya.b.ob)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Rb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.i=d;var e=this;this.f.lc=Lc(c,function(){e.f.Gb|=128;e.f.Gb&64&&Mc(e.b,e.f.Zd);e.B&&e.B.qa(1);Nc(e.b,e.f.lc,1E3/60)});this.f.Zd=Oc(64,6);Cb(b,this,Pc);Eb(b,this.reset.bind(this));H(this)};k.reset=function(){this.f.Gb=128;Nc(this.b,this.f.lc,1E3/60,!0)};k.od=function(){return this.f.Gb};k.ie=function(a){this.f.Gb=a&192};k.qd=function(){var a=this.b;return a.C&62337|a.Ia<<5|a.Na<<1}; +k.ke=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ia=a>>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.pb};k.le=function(a){var b=this.b;1170>b.ob&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; k.Me=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ha[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ha[1]}; +k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Db=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ha[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ha[1]}; k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.w.cc}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.fb&65280:0};k.Ge=function(a){this.b.fb=a|255};k.xd=function(){return Rc(this.b)};k.pe=function(a){Sc(this.b,a&-1809|Rc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; var L={},Pc=(L[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.md, K.prototype.ge,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],L[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],L[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],L[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Rd, -K.prototype.Je,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],L[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],L[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],L[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],L[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],L[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],L[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],L[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],L[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],L[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",8,1170],L[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],L[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],L[65528]= +K.prototype.Je,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],L[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],L[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],L[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],L[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],L[65477]=[null,null,K.prototype.Ab,K.prototype.Db, +"R5SET0"],L[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],L[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],L[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Bb, +K.prototype.Eb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],L[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",8,1170],L[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],L[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],L[65528]= [null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],L[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],L[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],L);Wa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),$c(this,Wc?ad:bd);else{a=this.b=Array(this.size>> @@ -104,35 +104,35 @@ b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},na:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ia:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&fd(a,ed,!1),(a.B=c.B)&&dd(a,ed,!1))}function hd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.mc):--a.g||(a.Wb=a.hc,a.sa=a.ic)}function dd(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.mc=b[3]||a.H}function fd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function $c(a,b){b||(b=id);fd(a,b,void 0);dd(a,b,void 0)} var id=[],cd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],ed=[I.prototype.P,I.prototype.Ya,I.prototype.Z,I.prototype.Aa];if(vb)var bd=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],ad=[I.prototype.R,I.prototype.na,I.prototype.$,I.prototype.Ia]; -function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.cb=c;this.vb=Math.round(this.lb/1E4)/100;this.ob=this.vb*this.cb;this.A.Y=!1;this.A.Yb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=qd(a)&&(a.yb=a.zb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} +function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.cb=c;this.ub=Math.round(this.lb/1E4)/100;this.nb=this.ub*this.cb;this.A.Y=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.xb,c=!0);0<=a.yb&&a.yb<=qd(a)&&(a.xb=a.yb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Z/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}ac(a,a.S);a.S=0;a.R=Aa();a.$=0;sd(a);return d}function Lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&ba.K[b][0])&&(c=a.lb*a.cb/1E3*c|0,a.K[b][0]=c+td(a))} +!0;case "speed":return this.G[b]=c,!0;case "setSpeed":return this.G[b]=c,c.onclick=function(){rd(d,d.cb<<1,!0)},c.textContent=this.nb.toFixed(2)+"Mhz",!0}return!1};k.qa=function(a){this.B&&this.B.qa(a)};function ac(a,b,c){a.ja+=b;c&&(a.ca=a.b=a.J=0)}function sd(a,b){var c=1;b&&1a.Z/a.nb?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.rb()}ac(a,a.S);a.S=0;a.R=Aa();a.$=0;sd(a);return d}function Lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Nc(a,b,c,d){0<=b&&ba.K[b][0])&&(c=a.lb*a.cb/1E3*c|0,a.K[b][0]=c+td(a))} function ud(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function $b(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function td(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Yd=function(){if(this.A.Y){this.wb>=this.lb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Tb&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Y)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); -return}if(this.A.Y){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Z=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Zc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(tb(this))return!1;if(this.A.Y)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Y=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Y){td(this);ac(this,this.S);this.S=0;this.A.Y=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; -function vd(a){this.pb=+a.model||1170;this.Ob=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.pb?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Y&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; +k.Yd=function(){if(this.A.Y){this.vb>=this.lb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Tb&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Y)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); +return}if(this.A.Y){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Z=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Zc&&(this.R-=c),c=0;this.vb+=this.Aa;this.$+=c;a(b,c)}}}; +k.ib=function(a){if(tb(this))return!1;if(this.A.Y)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Y=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Y){td(this);ac(this,this.S);this.S=0;this.A.Y=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; +function vd(a){this.ob=+a.model||1170;this.Ob=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.ob?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.ob);this.A.Y&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Zb(a)}function Zb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ia=0;a.Rb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Ob=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; +0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Zb(a)}function Zb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ia=0;a.Rb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.pb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Ob=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,Ac(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];rd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.N=b;a.I|=2}function Q(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} function Yd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.ma=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Rc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Sc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.wa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; -function ae(a){var b=be(a),c=be(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);N(a,b);Sc(a,c);a.I&=-17}function zc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.ma(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=de(this,ce(this,a,3));this.L--;return a}; -k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.pa(a)};k.Vd=function(a){return this.w.pa(ce(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; +k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.qb(a,b)};k.Cb=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.pa(a)};k.Vd=function(a){return this.w.pa(ce(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; k.Ne=function(a,b){this.w.hb(ce(this,a,4),b)};function ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=fe(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ha[a.N>>12&3];return c}function he(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=fe(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ce(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ha[a.N>>12&3]=d} function ie(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]} -function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.ma(168,28):this.I&64?this.ma(4,30):this.I&16&&this.ma(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.ma(d, +k.jb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.ma(168,28):this.I&64?this.ma(4,30):this.I&16&&this.ma(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.zb>e?this.M:null;f&&(d=f.$d,e=f.zb);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.ma(d, 26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Dd(this))}while(0>1|b<<16;Yd(this,a);return a&65535}function we(a,b){a=b&2048|b>>1|b<<8;Yd(this,a<<8);return a&255}function xe(a,b){a=b&~a;Q(this,a);return a}function ye(a,b){a=b&~a;Q(this,a<<8);return a}function ze(a,b){a|=b;Q(this,a);return a}function Ae(a,b){a|=b;Q(this,a<<8);return a} function Be(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ce(a,b){a=~b|256;Fd(this,a<<8);return a&255}function De(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ee(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Fe(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ge(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} @@ -155,18 +155,18 @@ var Qf=[function(a){gg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,V,function(a){hg He);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=me(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){S(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)}], ig=[function(a){jg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,V,Xf,Zf,Mf,Mf,Mf,Mf],jg=[uf,Of,If,mf,wf,Hf,V,V,V,V,V,V,V,V,V,V],Yf=[Gf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],$f=[Gf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],hg=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,V,V,V],bg=[function(a){Fd(this, ne(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)}],dg=[function(a){R(this,a,0,Ie);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=le(this,a);Fd(this,a<<8);this.b-=this.g?4:3+ -(7==this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} +(7==this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} var kg=[function(a){lg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],lg=[function(a){og[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ge(this,a,0);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J= this.b;he(this,a,0,b);Q(this,b);this.b=this.J-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},function(){this.ma(8,6)},V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag, cg,eg,function(a){rg[a>>6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J=this.b;he(this,a,65536,b);Q(this,b);this.b=this.J-Ef[this.g]},V]; function sg(a){t.call(this,"ROM",a,sg);this.ha=this.g=null;this.C=a.addr;this.f=a.size;this.D=!1;this.v=a.alias;this.B=a.file;this.H=ra(this.B);if(this.B){a=this.B;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(mb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);tg(c)})}}z(sg);k=sg.prototype; k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)};k.Ga=function(){this.ha&&(this.i&&ug(this.i,this.id,this.C,this.f,this.ha),delete this.ha);return!0};k.Fa=function(){return!0}; -function tg(a){if(!sb(a)){if(a.B){if(!a.g||!a.w)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)ub(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.C;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+kc){var c={};b=(c[b]=[sg.prototype.Jd,sg.prototype.Be,null,null,null,a.f>>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.w,b,a.f,Zc)){for(c=0;c>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.w,b,a.f,Zc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.qb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64g||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ah(a,e,b,c,!1,d)}else zh(a,e)} function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Pb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.rb()):a.Pb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; function xh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;ethis.b.pb?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ +k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.f=a.f;(a=ld(a,"messages"))&&Oh(this,a);this.vb=Rh;this.Ob=1145>this.b.ob?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=Rc(this.b):21==a&&this.f&&hc(this.f)&&(b=this.f.Va));return b}; @@ -251,15 +251,15 @@ k.ib=function(a,b){if(!ai(this,b))return!1;this.b.ib(a);return!0};k.jb=function( function od(a,b){if(a.kb){void 0===b&&(b=!0);var c;c=a.b;if(c=c.I&8?c.Wc|c.Uc<<8:0){var d=c>>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?bi(a):ci(a)}}function ai(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Y?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Nh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.Y=!1;di(this);a||od(this)};k.save=function(){var a=new O(this);a.set(0,Xh(this.L));a.set(1,Xh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Yh(a[b++]),this.P=Yh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Y=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.Y){this.A.Y=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function vf(a){var b=a.b;if(b.A.Y)throw N(b,a.b.Kb),a.ga(),-1;return!1} -function Mh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.mb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; +function Mh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.sb=0}k.mb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; function ei(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Nh(a);break}}return f}function gi(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +function gd(a,b,c,d,e){var f=!1;if(!a.sb++)for(var g=1;!f&&g>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), y&63)switch(y=A&7,A&56){case 0:x=$h(y);break;case 8:x="@"+$h(y);break;case 16:7>y?x="("+$h(y)+")+":(A=w.pa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+$h(y)+")+":(A=w.pa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+$h(y)+")";break;case 40:x="@-("+$h(y)+")";break;case 48:A=w.pa(r,2);x=J(w,A,0,!0)+"("+$h(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.pa(r,2),x="@"+J(w,A)+"("+$h(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=$h(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,Rc(d)):21==b&&a.f&&hc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function li(a){var b,c="";for(b=0;6>b;b++)c+=ki(a,b);c=c+"\n"+(ki(a,6)+ki(a,7));c+=ki(a,20)+ki(a,21);return c+=ji(a,"T")+ji(a,"N")+ji(a,"Z")+ji(a,"V")+ji(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function mi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&ema.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Jd=[];"call"==Bg&&(Jb=1E5,Jd=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.vb=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.vb=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Kd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.lb=Lb}}}}break;case "e":if("else"==g[0])break;var jb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(jb=1,Ld=255,Md=a.Gb,Nd=a.Xb):"e"==Od||"ew"==Od?(jb=2,Ld=65535,Md=a.pa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Pd);if(Fc)for(var Gc=2;Gcma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Jd=[];"call"==Bg&&(Jb=1E5,Jd=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.ub=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.ub=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Kd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.lb=Lb}}}}break;case "e":if("else"==g[0])break;var jb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(jb=1,Ld=255,Md=a.Fb,Nd=a.Xb):"e"==Od||"ew"==Od?(jb=2,Ld=65535,Md=a.pa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Pd);if(Fc)for(var Gc=2;GcSd;){for(var Ma=null,Pi=256;65536>Sb.F>>>0;){Td.F=a.pa(Sb,2);if(null==Sb.F||!Pi--)break;if(!(Td.F&1)){for(var Qi=a,Hc=Td,Ig=null,Tb=Hc.F,Jg=Tb,Ud=1;6>=Ud&&Tb;Ud++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvi){if(xi(d,this.J)){this.C=new O(this,"1.30.3","failsafe");xi(this.C)&&(Ci(this,d),a=2,Di(this.C));this.C.set("timestamp",Ba());Ei(this.C);var e=this.g&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xi(d,g):("error"== f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.B=null)):this.j(f+": "+g),Di(d),xi(d)?(c=Bi(d),e=!0):c=!1))}e&&Ai(this,c?d:null)}else 2==a&&d.clear()}else Ai(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Fi(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(Ci(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +k.qc=function(a){var b=a[0],c=0>a[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Fi(this,this.b,b,c,a),this.qa(),this.b.tb());this.P&&(Ci(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; function Ci(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} function si(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ga(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;l(b.J+=a))){for(var d=0;d(b.J+=a))){for(var d=0;d>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.ya[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} function zb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.nb+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.qb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Fb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.qb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.la)>>>a.c].W(b&a.l,b)}h.kb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.la)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a}; h.Ya=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.h[(a&this.la)>>>this.c].Fb(a&this.l,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.la)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.la)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; function Ob(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Aa!=c&&(b.Aa=c,Xb(b))}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; -h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Xb(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +function J(a,b,c){a.m=!0;a.f||(c&&(a.a.M|=c),K(a.a,4,b))}function Qb(a){var b=a.m;a.m=!1;return b}function Hb(a,b,c){t("Memory block error ("+a+": "+m(b)+","+m(c)+")");return!1}function L(a){x.call(this,"Device",a,L);this.b={L:0,Db:-1}}z(L);h=L.prototype;h.ha=function(a,b,c,d){this.h=b;this.l=a;this.a=c;this.D=d;var e=this;this.b.Db=Rb(c,function(){e.b.Va|=128;e.b.Va&64&&Sb(e.a,e.b.nd);e.l&&e.l.va(1);Tb(e.a,e.b.Db,1E3/60)});this.b.nd=Ub(64,6);cb(b,this,Wb);eb(b,this.reset.bind(this));F(this)}; +h.reset=function(){this.b.Va=128;Tb(this.a,this.b.Db,1E3/60,!0)};h.Cc=function(){return this.b.Va};h.xd=function(a){this.b.Va=a&192};h.Ec=function(){var a=this.a;return a.w&62337|a.ab<<5|a.bb<<1};h.zd=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.ab=a>>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Aa!=c&&(b.Aa=c,Xb(b))}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Fa}; +h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Fa!=a&&(b.Fa=a,b.Nb=a&16?4194303:262143,Xb(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.$c=function(a){return this.a.Y[1][a>>1&7]};h.Td=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Yc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Rd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.wd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Ma=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Id=function(a){this.a.g[7]=a}; -h.Na=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ga[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ga[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Id=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ga[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ga[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.qb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; h.bd=function(a){return a?this.a.Ca&65280:0};h.Vd=function(a){this.a.Ca=a|255};h.Lc=function(){return Yb(this.a)};h.Ed=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; var M={},Wb=(M[61568]=[null,null,L.prototype.hd,L.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.ad,L.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.Zc,L.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.$c,L.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.Yc,L.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Bc,L.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.zc,L.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Ac, L.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.yc,L.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Hc,L.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Cc,L.prototype.xd,"LKS"],M[65402]=[null,null,L.prototype.Ec,L.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,L.prototype.gd,L.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.ed, -L.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.fd,L.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.dd,L.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET0"],M[65473]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET0"],M[65474]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET0"],M[65475]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET0"],M[65476]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET0"],M[65477]=[null,null,L.prototype.Ma,L.prototype.Oa, -"R5SET0"],M[65478]=[null,null,L.prototype.Mc,L.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,L.prototype.Pc,L.prototype.Id,"R7KERNEL"],M[65480]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Na,L.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Na, -L.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Nc,L.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.wc,L.prototype.rd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.cd,L.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.vc,L.prototype.qd,"CPUERR",1,1170],M[65528]= +L.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.fd,L.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.dd,L.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],M[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],M[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],M[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],M[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],M[65477]=[null,null,L.prototype.La,L.prototype.Na, +"R5SET0"],M[65478]=[null,null,L.prototype.Mc,L.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,L.prototype.Pc,L.prototype.Id,"R7KERNEL"],M[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Ma, +L.prototype.Oa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Nc,L.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.wc,L.prototype.rd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.cd,L.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.vc,L.prototype.qd,"CPUERR",1,1170],M[65528]= [null,null,L.prototype.Dc,L.prototype.yd,"MB",1,1170],M[65530]=[null,null,L.prototype.Ic,L.prototype.Bd,"PIR"],M[65532]=[null,null,L.prototype.bd,L.prototype.Vd,"SL"],M[65534]=[null,null,L.prototype.Lc,L.prototype.Ed,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> +function I(a,b,c,d,e,f){this.h=a;this.id=dc+=2;this.a=null;this.Ja=b;this.nb=c;this.size=d||0;this.type=e||ec;this.l=e==fc;this.controller=null;Ab(this);this.ta=this.gc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],gc(this,f.bc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Eb=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} var oc=[],kc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],mc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Xa)var ic=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],hc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.j.S=!1;this.j.Cb=!1;this.j.Ua=a.autoStart;this.j.gb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; -h.ha=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=uc(a)&&(a.Qa=a.Ra=-1,tc(a),G(a),c=!0);c&&a.U(uc(a)+" cycles: checksum="+m(a.cb))}} +function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.j.S=!1;this.j.Cb=!1;this.j.Ta=a.autoStart;this.j.gb=!1;this.cb=this.Ha=0;this.eb=a.csStart;this.Pa=a.csInterval;this.Qa=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; +h.ha=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.Ha&&(a.Ha+=a.Pa,c=!0);0<=a.Qa&&a.Qa<=uc(a)&&(a.Pa=a.Qa=-1,tc(a),G(a),c=!0);c&&a.U(uc(a)+" cycles: checksum="+m(a.cb))}} h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.l&&xc(a.l)}ob(a,a.aa);a.aa=0;a.R=ra();a.oa=0;wc(a)}function Rb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Tb(a,b,c,d){0<=b&&ba.I[b][0])&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+yc(a))} function nb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function yc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.md=function(){if(this.j.S){this.wb>=this.fb&&wc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.j.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ta+=b;this.aa+=b;pb(this,b);nb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.j.S)}catch(f){G(this); -this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.S){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +h.md=function(){if(this.j.S){this.wb>=this.fb&&wc(this,!0);this.Sa=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.j.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Sa+=b;this.aa+=b;pb(this,b);nb(this,b);this.Ra-=b;if(0>=this.Ra){this.Ra+=this.hb;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.j.S)}catch(f){G(this); +this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.S){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Sa&&(c=Math.round(c*this.Sa/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Sa;this.oa+=c;a(b,c)}}}; function mb(a){var b;a.j.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.S)a.U(a.toString()+" busy");else{vc(a);a.j.S=!0;a.j.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,uc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.S){yc(a);ob(a,a.aa);a.aa=0;a.j.S=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),uc(a));b=!0}a.j.complete=void 0;return b} function zc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Wa?Ac.bind(this):Bc.bind(this);Cc(this);this.ra=0;this.N=null;this.j.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Wa);this.j.S&&G(this);Cc(this);sc(this);this.j.error=!1;this.parent.reset.call(this)}; -function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;lb(a)}function lb(a){a.Ca=255;a.M=0;a.Bb=0;a.w=0;a.Ba=0;a.Ab=0;a.Ga=0;a.Aa=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Xb(a)}function Xb(a){a.Aa?(a.P=65536,a.J=a.ic,a.W=a.jd,a.ob=a.be,Cb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.ob=a.ac,Cb(a.h,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; +function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ga=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;lb(a)}function lb(a){a.Ca=255;a.M=0;a.Bb=0;a.w=0;a.Ba=0;a.Ab=0;a.Fa=0;a.Aa=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Xb(a)}function Xb(a){a.Aa?(a.P=65536,a.J=a.ic,a.W=a.jd,a.ob=a.be,Cb(a.h,a.Fa&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.ob=a.ac,Cb(a.h,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Ob(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];vc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Zb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.g[6]=4);Kc(a,a.Ja);Kc(a,a.g[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} -function Lb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Nc(a,b,c){var d,e,f;if(!(c&a.Aa))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +h.za=function(){return this.s&32768?8:0};function Ec(a){var b=a.g[7];a.w&57344||(a.Ba=0,a.Ab=b);a.g[7]=b+2&65535;return a.W(b)}function Fc(a,b){var c=a.g[7];a.g[7]=c+b&65535;return c}function O(a,b){a.g[7]=b&65535}function Ub(a,b){return{od:a,Ka:b,next:null}}function Sb(a,b){if(b!=a.N){var c=a.N;if(!c||c.Ka<=b.Ka)b.next=c,a.N=b;else{do{var d=c.next;if(!d||d.Ka<=b.Ka){b.next=d;c.next=b;break}c=d}while(c)}}a.u|=2}function Yb(a){return a.B=a.B&63728|a.za()|(a.i&65535?0:4)|(a.f&32768?2:0)|Q(a)} +function Zb(a,b){a.s=b<<12;a.i=~b&4;a.f=b<<14;a.m=b<<16;if((b^a.B)&2048)for(var c=a.Ga.length;0<=--c;){var d=a.g[c];a.g[c]=a.Ga[c];a.Ga[c]=d}a.v=b>>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Zb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Kc(a,a.Ia);Kc(a,a.g[7]);O(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} +function Lb(a,b){var c=b>>13&31;31>c&&a.Fa&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Nc(a,b,c){var d,e,f;if(!(c&a.Aa))return b;d=b>>13;a.Fa&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.l,c&255,b)}function Mc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Kc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= 8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Aa)return this.h.kb(a);this.ra++;a=this.Ub(Nc(this,a,2));this.ra--;return a}; @@ -123,7 +123,7 @@ function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440 function Sc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.h,a.J(b,c,2)):a.g[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)}function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,c,2)):a.g[c]} function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Oc(a,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Nb(a.h,e,d.call(a,c,Mb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.J(b,e,5),c):a.g[e]=c?a.g[e]&~d|c<<24>>24&d:a.g[e]&~d;return c}function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c} function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +h.mb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.od,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ec(this))}while(0>1|b<<16;Ic(this,a);return a&65535}function dd(a,b){a=b&2048|b>>1|b<<8;Ic(this,a<<8);return a&255}function ed(a,b){a=b&~a;R(this,a);return a}function fd(a,b){a=b&~a;R(this,a<<8);return a}function gd(a,b){a|=b;R(this,a);return a}function hd(a,b){a|=b;R(this,a<<8);return a}function id(a,b){a=~b|65536;Gc(this,a);return a&65535}function jd(a,b){a=~b|256;Gc(this,a<<8);return a&255} function kd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function ld(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function md(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function nd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function od(a,b){a=-b;Gc(this,a,a&b&32768);return a&65535}function pd(a,b){a=-b;Gc(this,a<<8,(a&b&128)<<8);return a&255} @@ -155,7 +155,7 @@ function $e(a){if(!Va(a)){if(a.l){if(!a.c||!a.h)return;a.b||(a.b=a.c.length);if( b.push(a.f):null!=a.f&&a.f.length&&(b=a.f);for(c=0;c>>a.c;0>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[u++]&255);else p&1?G(a.a):Dc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.V||f>=c.T?this.L|=37888:(g=(this.w& 63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Pf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Pf[63748]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Pf[63750]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Pf[63752]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Pf); -function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.j.O=!1;Rf(this,b);this.A=rc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Sf;this.v=null;this.m=this.I=!1;this.P=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.h=new vb({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bSf){if(Uf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Uf(this.i)&&(Zf(this,d),a=2,$f(this.i));this.i.set("timestamp",sa());ag(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Yf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uf(d,g):("error"== f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.U(f+": "+g),$f(d),Uf(d)?(c=Yf(d),e=!0):c=!1))}e&&Xf(this,c?d:null)}else 2==a&&d.clear()}else Xf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Zf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +h.Hb=function(a){var b=a[0],c=0>a[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.va(),this.a.Ta());this.F&&(Zf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; function Zf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} function dg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(var d=0;d(b.w+=a))){for(var d=0;d