|
|
|
|
@ -164,7 +164,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -214,7 +214,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -310,7 +310,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -337,7 +337,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -364,7 +364,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -391,7 +391,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -418,7 +418,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -445,7 +445,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -472,7 +472,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -499,7 +499,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -526,7 +526,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -553,7 +553,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -580,7 +580,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -607,7 +607,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -634,7 +634,7 @@
|
|
|
|
|
|
|
|
|
|
This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
|
|
|
|
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
|
|
|
|
It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
|
|
|
|
(paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
|
|
|
|
may be used freely provided the original author name is acknowledged in any modified source code.
|
|
|
|
|
|
|
|
|
|
@ -683,217 +683,215 @@
|
|
|
|
|
*/
|
|
|
|
|
var h;
|
|
|
|
|
function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0<a.indexOf(",");e&&(a=a.replace(/,/g,""));"#"==d?(b=8,d=null):"$"==d&&(b=16,d=null);null==d?a=a.substr(1):("0"==d&&(d=a.charAt(1),"b"==d&&e&&(b=2,d=null),"o"==d?(b=8,d=null):"x"==d&&(b=16,d=null)),null==d?a=a.substr(2):(d=a.charAt(a.length-1).toLowerCase(),"y"==d?(b=2,d=null):"."==d?(b=10,d=null):"h"==d&&(b=16,d=null),null==d&&(a=a.substr(0,a.length-1))));var f,d=a;((e=b)&&10!=e?16==e?d.match(/^[0-9a-f]+$/i):8==e?d.match(/^[0-7]+$/):2==e&&
|
|
|
|
|
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ba(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
|
|
|
|
function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function ea(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function fa(){var a=ga();return-1!==a.indexOf("pcjs.org",a.length-8)}var ha={"&":"&","<":"<",">":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return ha[a]})}function na(a,b){return(a+" ").slice(0,b)}
|
|
|
|
|
d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ca(a,b,c){var d="";b?11<b&&(b=11):b=a&-65536?11:6;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;)d=String.fromCharCode((a&7)+48)+d,a>>=3;return(c?"0o":"")+d}function k(a,b,c){var d="";b?8<b&&(b=8):b=a&-65536?8:4;if(null==a||isNaN(a))for(;0<b--;)d="?"+d;else for(;0<b--;){var e=a&15,e=e+(0<=e&&9>=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}
|
|
|
|
|
function da(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0<c&&(b=b.substr(0,c));return b}function ea(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function fa(){var a=ga();return-1!==a.indexOf("pcjs.org",a.length-8)}var la={"&":"&","<":"<",">":">",'"':""","'":"'"};function ma(a){return a.replace(/[&<>"']/g,function(a){return la[a]})}function na(a,b){return(a+" ").slice(0,b)}
|
|
|
|
|
function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var pa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};
|
|
|
|
|
function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,l;l=c(b,a[g]);0<l?d=g+1:(e=g,f=!l)}return f?d:~d}var ra=Date.now||function(){return+new Date};function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
|
|
|
|
function qa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1,l;l=c(b,a[g]);0<l?d=g+1:(e=g,f=!l)}return f?d:~d}var ra=Date.now||function(){return+new Date};function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}
|
|
|
|
|
function ua(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"==
|
|
|
|
|
typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g}function ga(){return"http://"+(window?window.location.host:"www.pcjs.org")}
|
|
|
|
|
function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function ya(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
|
|
|
|
|
function n(a){window&&window.alert(a)}function va(a){var b=!1;window&&(b=window.confirm(a));return b}var wa=null;function xa(){if(null==wa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}wa=a}return wa}function Ba(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}
|
|
|
|
|
function Ca(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Da(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ea(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
|
|
|
|
|
function Fa(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}var Ga={init:[],show:[],exit:[]},Ha=!1,Ia=!1,Ja=!0;function Ka(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function La(a){Ga.init.push(a)}
|
|
|
|
|
function Ma(a){if(Ja)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){n(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Na(a){!Ja&&a?(Ja=!0,Ha&&Oa("init"),Ia&&Oa("show")):Ja=a}function Oa(a){Ga[a]&&Ma(Ga[a])}Ka("onload",function(){Ha=!0;Ma(Ga.init)});Ka("onpageshow",function(){Ia=!0;Ma(Ga.show)});Ka(Da("Opera")||Da("iOS")?"onunload":"onbeforeunload",function(){Ma(Ga.exit)});
|
|
|
|
|
function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Mb=b.comment;this.pc=b;b=this.id.indexOf(".");0>b?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,fa:!1,error:!1};this.qb=null;this.v.error=!1;this.J={};this.j=null;this.ha=d||0;t.push(this)}var Va=void 0,Wa={};
|
|
|
|
|
function Ma(a){if(Ja)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){n(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Na(a){!Ja&&a?(Ja=!0,Ha&&Ua("init"),Ia&&Ua("show")):Ja=a}function Ua(a){Ga[a]&&Ma(Ga[a])}Ka("onload",function(){Ha=!0;Ma(Ga.init)});Ka("onpageshow",function(){Ia=!0;Ma(Ga.show)});Ka(Da("Opera")||Da("iOS")?"onunload":"onbeforeunload",function(){Ma(Ga.exit)});
|
|
|
|
|
function r(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Mb=b.comment;this.nc=b;b=this.id.indexOf(".");0>b?this.Ta=this.id:(this.vb=this.id.substr(0,b),this.Ta=this.id.substr(b+1));this[a]=c;this.v={ready:!1,gb:!1,wb:!1,ga:!1,error:!1};this.pb=null;this.v.error=!1;this.J={};this.j=null;this.ia=d||0;t.push(this)}var Va=void 0,Wa={};
|
|
|
|
|
if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,Za=/([^&=]+)=?([^&]*)/g;Xa=Za.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function $a(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
|
|
|
|
|
function y(a,b){b||(b=r);a.prototype=$a(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ab=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ab={},t=[];function bb(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function cb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<t.length;b++){var d=t[b];a&&d.id.indexOf(a)||c.push(d)}return c}
|
|
|
|
|
function db(a){if(void 0!==a){var b;for(b=0;b<t.length;b++)if(t[b].id===a)return t[b]}return null}function eb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<t.length;d++)if(c)c==t[d]&&(c=null);else if(!(a!=t[d].type||b&&t[d].id.indexOf(b)))return t[d]}return null}function z(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){n(c.message+" ("+a+")")}return b}
|
|
|
|
|
function fb(a,b){b=A(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var l=g.split(" "),m=0;m<l.length;m++)switch(g=l[m],g){case "pdp11-binding":(g=z(f))&&g.binding&&a.ja(g.type,g.binding,f,g.value),m=l.length}}}}
|
|
|
|
|
function fb(a,b){b=A(b.parentNode,"pdp11-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var l=g.split(" "),m=0;m<l.length;m++)switch(g=l[m],g){case "pdp11-binding":(g=z(f))&&g.binding&&a.pa(g.type,g.binding,f,g.value),m=l.length}}}}
|
|
|
|
|
function A(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
|
|
|
|
|
r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},ja:function(a,b,c){switch(b){case "clear":return this.J[b]||(this.J[b]=c,c.onclick=function(a){return function(){a.J.print&&(a.J.print.value="")}}(this)),!0;case "print":return this.J[b]||(this.Pa=this.J[b]=c,c.value="",this.g=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
|
|
|
|
this.na=function(a){this.g(a,this.Ta)}),!0;default:return!1}},log:function(){},g:function(){},status:function(a){this.g(this.Ta+": "+a)},na:function(a,b,c){c=c||this.type;b||n((c?c+": ":"")+a)},ya:function(){return this.v.fa=!0},xa:function(a,b){b&&(this.v.fa=!1);return!0}};function B(a,b,c,d){a.j&&(!0===c||E(a,c|0))&&a.j.message(b,d)}function E(a,b){if(a.j){a===a.j?b|=0:b=b||a.ha;var c=a.j.ha&b;return!!b&&c===b||!!(c&a.j.ic)}return!1}
|
|
|
|
|
function gb(a,b){if(a.v.wb)return a.v.gb=!1,a.v.wb=!1;if(a.v.error)return a.g(a.toString()+" error"),!1;a.v.gb=b;return a.v.gb}function hb(a,b){a.v.gb&&(b?a.v.wb=!0:void 0===b&&a.g(a.toString()+" busy"));return a.v.gb}function G(a){if(!a.v.error&&(a.v.ready=!0,a.v.ready)){var b=a.qb;a.qb=null;b&&b()}}function ib(a,b){b&&(a.v.ready?b():a.qb=b);return a.v.ready}function jb(a){return a.v.error?(a.g(a.toString()+" error"),!0):!1}function kb(a,b){a.v.error=!0;a.na(b)}
|
|
|
|
|
r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},pa:function(a,b,c){switch(b){case "clear":return this.J[b]||(this.J[b]=c,c.onclick=function(a){return function(){a.J.print&&(a.J.print.value="")}}(this)),!0;case "print":return this.J[b]||(this.Pa=this.J[b]=c,c.value="",this.g=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
|
|
|
|
|
this.na=function(a){this.g(a,this.Ta)}),!0;default:return!1}},log:function(){},g:function(){},status:function(a){this.g(this.Ta+": "+a)},na:function(a,b,c){c=c||this.type;b||n((c?c+": ":"")+a)},ya:function(){return this.v.ga=!0},xa:function(a,b){b&&(this.v.ga=!1);return!0}};function B(a,b,c,d){a.j&&(!0===c||E(a,c|0))&&a.j.message(b,d)}function E(a,b){if(a.j){a===a.j?b|=0:b=b||a.ia;var c=a.j.ia&b;return!!b&&c===b||!!(c&a.j.hc)}return!1}
|
|
|
|
|
function gb(a,b){if(a.v.wb)return a.v.gb=!1,a.v.wb=!1;if(a.v.error)return a.g(a.toString()+" error"),!1;a.v.gb=b;return a.v.gb}function hb(a,b){a.v.gb&&(b?a.v.wb=!0:void 0===b&&a.g(a.toString()+" busy"));return a.v.gb}function G(a){if(!a.v.error&&(a.v.ready=!0,a.v.ready)){var b=a.pb;a.pb=null;b&&b()}}function ib(a,b){b&&(a.v.ready?b():a.pb=b);return a.v.ready}function jb(a){return a.v.error?(a.g(a.toString()+" error"),!0):!1}function kb(a,b){a.v.error=!0;a.na(b)}
|
|
|
|
|
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
|
|
|
|
|
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
|
|
|
|
|
var lb="undefined"!==typeof ArrayBuffer,mb={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function Ab(a){r.call(this,"Panel",a,Ab)}y(Ab);h=Ab.prototype;h.ja=function(a,b,c,d){return this.F&&this.F.ja(a,b,c,d)||this.b&&this.b.ja(a,b,c,d)||this.j&&this.j.ja(a,b,c,d)?!0:this.parent.ja.call(this,a,b,c,d)};
|
|
|
|
|
h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.b=c;this.j=d};h.ya=function(a,b){b||Bb();return!0};h.xa=function(){return!0};h.ua=function(){};function Bb(){for(var a=!1,b=A(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=db(e.id);f||(a=!0,f=new Ab(e));fb(f,d);a&&G(f)}}La(Bb);
|
|
|
|
|
function Cb(a,b,c){r.call(this,"Bus",a,Cb,64);this.b=b;this.j=c;this.H=a.busWidth||16;this.F=0;this.M=[];this.G=null;this.I=Math.pow(2,this.H);this.i=this.I-1|0;this.Y=(this.H>>1)+2;10>this.Y&&(this.Y=10);15<this.Y&&(this.Y=15);this.ta=1<<this.Y;this.K=this.ta>>2;this.f=this.ta-1;this.C=this.I/this.ta|0;this.Fa=[];this.w=0;this.B=[];this.hc=[Db,Eb,Fb,Gb];a=new H(this);Hb(a,this.j);this.W=Array(this.C);for(b=0;b<this.C;b++)this.W[b]=a;G(this)}y(Cb);
|
|
|
|
|
function Db(a,b){var c=-1,d=this.controller,e=d.Fa[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c}
|
|
|
|
|
function Eb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+I(this.j,c)+": "+I(this.j,b),!0,!0))}
|
|
|
|
|
function Fb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+I(this.j,b)+"): "+I(this.j,c),!0,!0),c;c=Ib(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+I(this.j,b)+": "+I(this.j,c),!0,!0);return c}
|
|
|
|
|
function Gb(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0,!0):(Ib(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+I(this.j,c)+": "+I(this.j,b),!0,!0))}
|
|
|
|
|
function Jb(a,b){if(b!=a.F){var c;a.F&&(c=(1<<a.F)-8192,Kb(a,c,8192,a.M),a.F=0);b&&(a.F=b,c=(1<<b)-8192,a.M=Lb(a,c,8192),a.G?Kb(a,c,8192,a.G):(Mb(a,c,8192,Nb,a),a.G=Lb(a,c,8192)))}}h=Cb.prototype;h.reset=function(){for(var a=0;a<this.B.length;a++)this.B[a]();Jb(this,16)};function Ib(a,b,c,d){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"warning: unrecognized I/O access("+I(a.j,b)+","+I(a.j,c)+","+d+")",!0,!0),a.b.$(4,b));return 0}h.ya=function(a,b){b||this.reset();return!0};
|
|
|
|
|
function Mb(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.Y;0<g&&l<a.W.length;){var m=a.W[l],p=l*a.ta,q=a.ta-(f-p);q>g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ta;g-=q;l++;continue}}return Ob(1,f,g)}f=new H(a,f,q,a.ta,d,e);Hb(f,a.j,m);a.W[l++]=f;f=p+a.ta;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Pb[d]+" at "+k(b,8,!0)),!0):Ob(2,b,c)}
|
|
|
|
|
function Lb(a,b,c){var d=[];for(b>>>=a.Y;0<c&&b<a.W.length;)d.push(a.W[b++]),c-=a.ta;return d}function Kb(a,b,c,d){var e=0;for(b>>>=a.Y;0<c&&b<a.W.length;){var f=d[e++];if(!f)break;a.W[b++]=f;c-=a.ta}}h.Qa=function(a){return this.W[(a&this.i)>>>this.Y].tb(a&this.f,a)};h.ia=function(a){return this.W[(a&this.i)>>>this.Y].Yb(a&this.f,a)};function Qb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)};
|
|
|
|
|
function Rb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].fc(a&this.f,b&65535,a)};function Sb(a){for(var b=0,c=[],d=0;d<a.C;d++){var e=a.W[d];if(e.Ga||e.kc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,l=0,m=[];g<e.length;){for(var p=e[g],q=g+1;q<e.length&&e[q]===p;)q++;m[l++]=q-g;m[l++]=p;g=q}m.length<e.length&&(e=m)}c[f]=e}}return c}
|
|
|
|
|
function Tb(a,b,c,d,e,f,g,l){for(;b<=c;b+=2){var m=b&8191;void 0!==a.Fa[m]?n("I/O address already registered: "+k(b,8,!0)):a.Fa[m]=[d,e,f,g,l||"unknown",!1]}}
|
|
|
|
|
function Ub(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Vb)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Tb(a,e,e,g,l,m,p,f[4])}}}function Vb(a,b){a.B.push(b)}
|
|
|
|
|
function Wb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+I(a.j,b),!0,!0),a.b.$(4,b))}function Ob(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function J(a){r.call(this,"Device",a,J,256);this.i={data:0,Gd:0,rb:20,Jd:0};this.f={Hd:0,Fb:-1}}y(J);h=J.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=Xb(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(Yb(e.b,0,6,64),Zb(e.b,e.f.Fb,1E3/60))});Ub(b,this,K);Vb(b,this.reset.bind(this));G(this)};
|
|
|
|
|
h.yc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.fd=function(a){this.f.Ha=a;a&64&&Zb(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.Ac=function(){var a=this.b;return a.G&62337|a.ra<<5|a.sa<<1};h.hd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.ra=a>>5&3;b.sa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,hc(b))}ic(this)};h.Bc=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Cc=function(){return this.b.Cb};h.Dc=function(){return this.b.Ka};
|
|
|
|
|
h.jd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),hc(b));ic(this)};function ic(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Pc=function(a){return this.b.R[1][a>>1&7]};h.vd=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Nc=function(a){return this.b.R[1][(a>>1&7)+8]};h.td=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Oc=function(a){return this.b.oa[1][a>>1&7]};h.ud=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};
|
|
|
|
|
h.Mc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.xc=function(a){return this.b.R[0][a>>1&7]};h.ed=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.vc=function(a){return this.b.R[0][(a>>1&7)+8]};h.cd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.wc=function(a){return this.b.oa[0][a>>1&7]};h.dd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.uc=function(a){return this.b.oa[0][(a>>1&7)+8]};
|
|
|
|
|
h.bd=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Vc=function(a){return this.b.R[3][a>>1&7]};h.Bd=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Tc=function(a){return this.b.R[3][(a>>1&7)+8]};h.zd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Uc=function(a){return this.b.oa[3][a>>1&7]};h.Ad=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Sc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.yd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};
|
|
|
|
|
h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Gc=function(){return this.b.L&49152?this.b.qa[0]:this.b.u[6]};h.md=function(a){this.b.L&49152?this.b.qa[0]=a:this.b.u[6]=a};h.Jc=function(){return this.b.u[7]};h.pd=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a};
|
|
|
|
|
h.Hc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[1]};h.nd=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[1]=a};h.Ic=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.qa[3]};h.od=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.qa[3]=a};h.tc=function(a){return this.b.ac[a-65504>>1]};h.ad=function(a,b){this.b.ac[b-65504>>1]=a};h.Xb=function(a){return 65520==a?61183:0};h.ec=function(){};h.Rc=function(){return 1};h.xd=function(){};h.sc=function(){return this.b.Z};
|
|
|
|
|
h.$c=function(){this.b.Z=0};h.zc=function(){return this.b.$b};h.gd=function(a,b){b&1||(a&=255);this.b.$b=a};h.Ec=function(){return this.b.Db};h.kd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.D|=2};h.Qc=function(){return this.b.La&65280};h.wd=function(a){this.b.La=a|255};h.Fc=function(){return jc(this.b)};h.ld=function(a){kc(this.b,a&-1809|jc(this.b)&1808);this.b.D|=128};h.dc=function(a,b){E(this)&&B(this,"writeIgnored("+ba(b)+"): "+ba(a),!0,!0)};
|
|
|
|
|
var lb="undefined"!==typeof ArrayBuffer,H={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function zb(a){r.call(this,"Panel",a,zb);this.f=0;this.v.Kb=!0}y(zb);h=zb.prototype;
|
|
|
|
|
h.pa=function(a,b,c,d){if(this.C&&this.C.pa(a,b,c,d)||this.b&&this.b.pa(a,b,c,d)||this.j&&this.j.pa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.J[b]=c,this.f++,!0;default:return"rled"==a?(this.J[b]=c,this.f++,!0):this.parent.pa.call(this,a,b,c,d)}};h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.j=d};h.ya=function(a,b){b||Ab();return!0};h.xa=function(){return!0};
|
|
|
|
|
function Bb(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.b.fa());var e=a.j&&a.j.ha||8;c=!a.b.v.ba||a.v.Kb?8==e?ca(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}function Cb(a,b,c,d){for(var e=0;e<d;e++){var f=a.J[b+e];f&&(f.style.backgroundColor=c&1<<e?"#ff0000":"#000000")}}
|
|
|
|
|
h.aa=function(a){if(this.f&&(a||!this.b.v.ba||this.v.Kb)){for(a=0;a<this.b.u.length;a++)Bb(this,"R"+a,this.b.u[a]);a=Db(this.b);Bb(this,"PS",a);Bb(this,"NF",a&8?1:0,1);Bb(this,"ZF",a&4?1:0,1);Bb(this,"VF",a&2?1:0,1);Bb(this,"CF",a&1?1:0,1);Cb(this,"D",this.b.u[0],16);Cb(this,"A",this.b.u[7],22)}};function Ab(){for(var a=!1,b=A(document,"pdp11","panel"),c=0;c<b.length;c++){var d=b[c],e=z(d),f=db(e.id);f||(a=!0,f=new zb(e));fb(f,d);a&&G(f)}}La(Ab);
|
|
|
|
|
function Eb(a,b,c){r.call(this,"Bus",a,Eb,64);this.b=b;this.j=c;this.H=a.busWidth||16;this.C=0;this.M=[];this.G=null;this.I=Math.pow(2,this.H);this.i=this.I-1|0;this.Y=(this.H>>1)+2;10>this.Y&&(this.Y=10);15<this.Y&&(this.Y=15);this.ua=1<<this.Y;this.K=this.ua>>2;this.f=this.ua-1;this.D=this.I/this.ua|0;this.Fa=[];this.w=0;this.B=[];this.gc=[Fb,Gb,Hb,Ib];a=new I(this);Jb(a,this.j);this.W=Array(this.D);for(b=0;b<this.D;b++)this.W[b]=a;G(this)}y(Eb);
|
|
|
|
|
function Fb(a,b){var c=-1,d=this.controller,e=d.Fa[a];e?e[0]?c=e[0](b):e[2]&&(c=b&1?e[2](b&-2)>>8:e[2](b)&255):b&1&&(e=d.Fa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.j&&E(this.j,64)&&B(this.j,e[4]+".readByte("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,1);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to byte @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c}
|
|
|
|
|
function Gb(a,b,c){var d=!1,e=this.controller,f=e.Fa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](c):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Fa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](c):0,f[3](a&255|b<<8,c),d=!0);d?this.j&&E(this.j,64)&&B(this.j,f[4]+".writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,1),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to byte @"+J(this.j,c)+": "+J(this.j,b),!0,!0))}
|
|
|
|
|
function Hb(a,b){var c=-1,d=this.controller;(a=d.Fa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.j&&E(this.j,64)&&B(this.j,a[4]+".readWord("+J(this.j,b)+"): "+J(this.j,c),!0,!0),c;c=Kb(d,b|4186112,-1,0);this.j&&E(this.j,64)&&B(this.j,"warning: unconverted read access to word @"+J(this.j,b)+": "+J(this.j,c),!0,!0);return c}
|
|
|
|
|
function Ib(a,b,c){var d=!1,e=this.controller;if(a=e.Fa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.j&&E(this.j,64)&&B(this.j,a[4]+".writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0,!0):(Kb(e,c|4186112,b,0),this.j&&E(this.j,64)&&B(this.j,"warning: unconverted write access to word @"+J(this.j,c)+": "+J(this.j,b),!0,!0))}
|
|
|
|
|
function Lb(a,b){if(b!=a.C){var c;a.C&&(c=(1<<a.C)-8192,Mb(a,c,8192,a.M),a.C=0);b&&(a.C=b,c=(1<<b)-8192,a.M=Nb(a,c,8192),a.G?Mb(a,c,8192,a.G):(Ob(a,c,8192,Pb,a),a.G=Nb(a,c,8192)))}}h=Eb.prototype;h.reset=function(){for(var a=0;a<this.B.length;a++)this.B[a]();Lb(this,16)};function Kb(a,b,c,d){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"warning: unrecognized I/O access("+J(a.j,b)+","+J(a.j,c)+","+d+")",!0,!0),a.b.$(4,b));return 0}h.ya=function(a,b){b||this.reset();return!0};
|
|
|
|
|
function Ob(a,b,c,d,e){for(var f=b,g=c,l=f>>>a.Y;0<g&&l<a.W.length;){var m=a.W[l],p=l*a.ua,q=a.ua-(f-p);q>g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.A)return m.ob+=m.A-f,m.A=f,!0;if(f>=m.A+m.ob){q=m.size-(f-p);q>g&&(q=g);m.ob=f-m.A+q;f=p+a.ua;g-=q;l++;continue}}return Qb(1,f,g)}f=new I(a,f,q,a.ua,d,e);Jb(f,a.j,m);a.W[l++]=f;f=p+a.ua;g-=q}return 0>=g?(a.status(Math.floor(c/1024)+"Kb "+Rb[d]+" at "+k(b,8,!0)),!0):Qb(2,b,c)}
|
|
|
|
|
function Nb(a,b,c){var d=[];for(b>>>=a.Y;0<c&&b<a.W.length;)d.push(a.W[b++]),c-=a.ua;return d}function Mb(a,b,c,d){var e=0;for(b>>>=a.Y;0<c&&b<a.W.length;){var f=d[e++];if(!f)break;a.W[b++]=f;c-=a.ua}}h.Qa=function(a){return this.W[(a&this.i)>>>this.Y].tb(a&this.f,a)};h.ja=function(a){return this.W[(a&this.i)>>>this.Y].Xb(a&this.f,a)};function Sb(a,b){var c=b&a.f,d=(b&a.i)>>>a.Y;a.w++;b=a.W[d].Ab(c,b);a.w--;return b}h.mb=function(a,b){this.W[(a&this.i)>>>this.Y].ub(a&this.f,b&255,a)};
|
|
|
|
|
function Tb(a,b,c){a.w++;a.W[(b&a.i)>>>a.Y].Gb(b&a.f,c&255,b);a.w--}h.Sa=function(a,b){this.W[(a&this.i)>>>this.Y].ec(a&this.f,b&65535,a)};function Ub(a){for(var b=0,c=[],d=0;d<a.D;d++){var e=a.W[d];if(e.Ga||e.jc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,l=0,m=[];g<e.length;){for(var p=e[g],q=g+1;q<e.length&&e[q]===p;)q++;m[l++]=q-g;m[l++]=p;g=q}m.length<e.length&&(e=m)}c[f]=e}}return c}
|
|
|
|
|
function Vb(a,b,c,d,e,f,g,l){for(;b<=c;b+=2){var m=b&8191;void 0!==a.Fa[m]?n("I/O address already registered: "+k(b,8,!0)):a.Fa[m]=[d,e,f,g,l||"unknown",!1]}}
|
|
|
|
|
function Wb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[5]&&f[5]>a.b.Ub)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));Vb(a,e,e,g,l,m,p,f[4])}}}function Xb(a,b){a.B.push(b)}
|
|
|
|
|
function Yb(a,b){a.w||(a.j&&E(a.j,536870912)&&B(a.j,"memory fault on address "+J(a.j,b),!0,!0),a.b.$(4,b))}function Qb(a,b,c){n("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.i={data:0,Fd:0,rb:20,Id:0};this.f={Gd:0,Fb:-1}}y(K);h=K.prototype;h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;var e=this;this.f.Fb=gc(this.b,function(){e.f.Ha|=128;e.f.Ha&64&&(hc(e.b,0,6,64),ic(e.b,e.f.Fb,1E3/60))});Wb(b,this,L);Xb(b,this.reset.bind(this));G(this)};
|
|
|
|
|
h.xc=function(){var a=this.f.Ha;this.f.Ha&=-129;return a};h.ed=function(a){this.f.Ha=a;a&64&&ic(this.b,this.f.Fb,1E3/60);this.f.Ha=a&-129};h.zc=function(){var a=this.b;return a.G&62337|a.sa<<5|a.ta<<1};h.gd=function(a){var b=this.b;a&=62337;if(b.G!=a){b.G=a;b.sa=a>>5&3;b.ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.sb!=c&&(b.sb=c,jc(b))}kc(this)};h.Ac=function(){var a=this.b.Ja;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Bc=function(){return this.b.Cb};h.Cc=function(){return this.b.Ka};
|
|
|
|
|
h.hd=function(a){var b=this.b;b.Ka!=a&&(b.Ka=a,a&16?(b.hb=4194303,b.va=3915776):(b.hb=262143,b.va=253952),jc(b));kc(this)};function kc(a){a.i.rb=a.i.rb&-8|(a.b.sb?a.b.Ka&16?1:2:4)}h.Oc=function(a){return this.b.R[1][a>>1&7]};h.ud=function(a,b){this.b.R[1][b>>1&7]=a&65295};h.Mc=function(a){return this.b.R[1][(a>>1&7)+8]};h.sd=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};h.Nc=function(a){return this.b.oa[1][a>>1&7]};h.td=function(a,b){b=b>>1&7;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};
|
|
|
|
|
h.Lc=function(a){return this.b.oa[1][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.b.oa[1][b]=a;this.b.R[1][b]&=65295};h.wc=function(a){return this.b.R[0][a>>1&7]};h.dd=function(a,b){this.b.R[0][b>>1&7]=a&65295};h.uc=function(a){return this.b.R[0][(a>>1&7)+8]};h.bd=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295};h.vc=function(a){return this.b.oa[0][a>>1&7]};h.cd=function(a,b){b=b>>1&7;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.tc=function(a){return this.b.oa[0][(a>>1&7)+8]};
|
|
|
|
|
h.ad=function(a,b){b=(b>>1&7)+8;this.b.oa[0][b]=a;this.b.R[0][b]&=65295};h.Uc=function(a){return this.b.R[3][a>>1&7]};h.Ad=function(a,b){this.b.R[3][b>>1&7]=a&65295};h.Sc=function(a){return this.b.R[3][(a>>1&7)+8]};h.yd=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};h.Tc=function(a){return this.b.oa[3][a>>1&7]};h.zd=function(a,b){b=b>>1&7;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};h.Rc=function(a){return this.b.oa[3][(a>>1&7)+8]};h.xd=function(a,b){b=(b>>1&7)+8;this.b.oa[3][b]=a;this.b.R[3][b]&=65295};
|
|
|
|
|
h.Za=function(a){a&=7;return this.b.L&2048?this.b.Da[a]:this.b.u[a]};h.cb=function(a,b){b&=7;this.b.L&2048?this.b.Da[b]=a:this.b.u[b]=a};h.Fc=function(){return this.b.L&49152?this.b.ra[0]:this.b.u[6]};h.ld=function(a){this.b.L&49152?this.b.ra[0]=a:this.b.u[6]=a};h.Ic=function(){return this.b.u[7]};h.od=function(a){this.b.u[7]=a};h.$a=function(a){a&=7;return this.b.L&2048?this.b.u[a]:this.b.Da[a]};h.eb=function(a,b){b&=7;this.b.L&2048?this.b.u[b]=a:this.b.Da[b]=a};
|
|
|
|
|
h.Gc=function(){return 1==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[1]};h.md=function(a){1==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[1]=a};h.Hc=function(){return 3==(this.b.L&49152)>>14?this.b.u[6]:this.b.ra[3]};h.nd=function(a){3==(this.b.L&49152)>>14?this.b.u[6]=a:this.b.ra[3]=a};h.sc=function(a){return this.b.$b[a-65504>>1]};h.$c=function(a,b){this.b.$b[b-65504>>1]=a};h.Wb=function(a){return 65520==a?61183:0};h.dc=function(){};h.Qc=function(){return 1};h.wd=function(){};h.rc=function(){return this.b.Z};
|
|
|
|
|
h.Zc=function(){this.b.Z=0};h.yc=function(){return this.b.Zb};h.fd=function(a,b){b&1||(a&=255);this.b.Zb=a};h.Dc=function(){return this.b.Db};h.jd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.F|=2};h.Pc=function(){return this.b.La&65280};h.vd=function(a){this.b.La=a|255};h.Ec=function(){return Db(this.b)};h.kd=function(a){lc(this.b,a&-1809|Db(this.b)&1808);this.b.F|=128};h.cc=function(a,b){E(this)&&B(this,"writeIgnored("+ca(b)+"): "+ca(a),!0,!0)};
|
|
|
|
|
h.reset=function(){this.i.rb=this.i.rb&-120|20;this.f.Ha=0};
|
|
|
|
|
var L={},K=(L[62592]=[null,null,J.prototype.Pc,J.prototype.vd,"SISDR"],L[62608]=[null,null,J.prototype.Nc,J.prototype.td,"SDSDR"],L[62624]=[null,null,J.prototype.Oc,J.prototype.ud,"SISAR"],L[62640]=[null,null,J.prototype.Mc,J.prototype.sd,"SDSAR"],L[62656]=[null,null,J.prototype.xc,J.prototype.ed,"KISDR"],L[62672]=[null,null,J.prototype.vc,J.prototype.cd,"KDSDR"],L[62688]=[null,null,J.prototype.wc,J.prototype.dd,"KISAR"],L[62704]=[null,null,J.prototype.uc,J.prototype.bd,"KDSAR"],L[62798]=[null,null,
|
|
|
|
|
J.prototype.Dc,J.prototype.jd,"MMR3"],L[65382]=[null,null,J.prototype.yc,J.prototype.fd,"LKS"],L[65402]=[null,null,J.prototype.Ac,J.prototype.hd,"MMR0"],L[65404]=[null,null,J.prototype.Bc,J.prototype.dc,"MMR1"],L[65406]=[null,null,J.prototype.Cc,J.prototype.dc,"MMR2"],L[65408]=[null,null,J.prototype.Vc,J.prototype.Bd,"UISDR"],L[65424]=[null,null,J.prototype.Tc,J.prototype.zd,"UDSDR"],L[65440]=[null,null,J.prototype.Uc,J.prototype.Ad,"UISAR"],L[65456]=[null,null,J.prototype.Sc,J.prototype.yd,"UDSAR"],
|
|
|
|
|
L[65472]=[null,null,J.prototype.Za,J.prototype.cb,"R0SET0"],L[65473]=[null,null,J.prototype.Za,J.prototype.cb,"R1SET0"],L[65474]=[null,null,J.prototype.Za,J.prototype.cb,"R2SET0"],L[65475]=[null,null,J.prototype.Za,J.prototype.cb,"R3SET0"],L[65476]=[null,null,J.prototype.Za,J.prototype.cb,"R4SET0"],L[65477]=[null,null,J.prototype.Za,J.prototype.cb,"R5SET0"],L[65478]=[null,null,J.prototype.Gc,J.prototype.md,"R6KERNEL"],L[65479]=[null,null,J.prototype.Jc,J.prototype.pd,"R7KERNEL"],L[65480]=[null,null,
|
|
|
|
|
J.prototype.$a,J.prototype.eb,"R0SET1"],L[65481]=[null,null,J.prototype.$a,J.prototype.eb,"R1SET1"],L[65482]=[null,null,J.prototype.$a,J.prototype.eb,"R2SET1"],L[65483]=[null,null,J.prototype.$a,J.prototype.eb,"R3SET1"],L[65484]=[null,null,J.prototype.$a,J.prototype.eb,"R4SET1"],L[65485]=[null,null,J.prototype.$a,J.prototype.eb,"R5SET1"],L[65486]=[null,null,J.prototype.Hc,J.prototype.nd,"R6SUPER"],L[65487]=[null,null,J.prototype.Ic,J.prototype.od,"R6USER"],L[65504]=[null,null,J.prototype.tc,J.prototype.ad,
|
|
|
|
|
"CTRL",1170],L[65520]=[null,null,J.prototype.Xb,J.prototype.ec,"LSIZE",1170],L[65522]=[null,null,J.prototype.Xb,J.prototype.ec,"HSIZE",1170],L[65524]=[null,null,J.prototype.Rc,J.prototype.xd,"SYSID",1170],L[65526]=[null,null,J.prototype.sc,J.prototype.$c,"CPUERR",1170],L[65528]=[null,null,J.prototype.zc,J.prototype.gd,"MB",1170],L[65530]=[null,null,J.prototype.Ec,J.prototype.kd,"PIR"],L[65532]=[null,null,J.prototype.Qc,J.prototype.wd,"SL"],L[65534]=[null,null,J.prototype.Fc,J.prototype.ld,"PSW"],
|
|
|
|
|
L);K[62594]=K[62592];K[62596]=K[62592];K[62598]=K[62592];K[62600]=K[62592];K[62602]=K[62592];K[62604]=K[62592];K[62606]=K[62592];K[62610]=K[62608];K[62612]=K[62608];K[62614]=K[62608];K[62616]=K[62608];K[62618]=K[62608];K[62620]=K[62608];K[62622]=K[62608];K[62626]=K[62624];K[62628]=K[62624];K[62630]=K[62624];K[62632]=K[62624];K[62634]=K[62624];K[62636]=K[62624];K[62638]=K[62624];K[62642]=K[62640];K[62644]=K[62640];K[62646]=K[62640];K[62648]=K[62640];K[62650]=K[62640];K[62652]=K[62640];K[62654]=K[62640];
|
|
|
|
|
K[62658]=K[62656];K[62660]=K[62656];K[62662]=K[62656];K[62664]=K[62656];K[62666]=K[62656];K[62668]=K[62656];K[62670]=K[62656];K[62674]=K[62672];K[62676]=K[62672];K[62678]=K[62672];K[62680]=K[62672];K[62682]=K[62672];K[62684]=K[62672];K[62686]=K[62672];K[62690]=K[62688];K[62692]=K[62688];K[62694]=K[62688];K[62696]=K[62688];K[62698]=K[62688];K[62700]=K[62688];K[62702]=K[62688];K[62706]=K[62704];K[62708]=K[62704];K[62710]=K[62704];K[62712]=K[62704];K[62714]=K[62704];K[62716]=K[62704];K[62718]=K[62704];
|
|
|
|
|
K[65410]=K[65408];K[65412]=K[65408];K[65414]=K[65408];K[65416]=K[65408];K[65418]=K[65408];K[65420]=K[65408];K[65422]=K[65408];K[65426]=K[65424];K[65428]=K[65424];K[65430]=K[65424];K[65432]=K[65424];K[65434]=K[65424];K[65436]=K[65424];K[65438]=K[65424];K[65442]=K[65440];K[65444]=K[65440];K[65446]=K[65440];K[65448]=K[65440];K[65450]=K[65440];K[65452]=K[65440];K[65454]=K[65440];K[65458]=K[65456];K[65460]=K[65456];K[65462]=K[65456];K[65464]=K[65456];K[65466]=K[65456];K[65468]=K[65456];K[65470]=K[65456];
|
|
|
|
|
K[65506]=K[65504];K[65508]=K[65504];K[65510]=K[65504];K[65512]=K[65504];K[65514]=K[65504];K[65516]=K[65504];K[65518]=K[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b<a.length;b++){var c=a[b],d=z(c);switch(d.name){case "default":d=new J(d),fb(d,c)}}});var lc;if(lb){var mc=new ArrayBuffer(2);(new DataView(mc)).setUint16(0,256,!0);lc=256===(new Uint16Array(mc))[0]}else lc=!1;var nc=lc;
|
|
|
|
|
function H(a,b,c,d,e,f){this.w=a;this.id=oc+=2;this.b=null;this.A=b;this.ob=c;this.size=d||0;this.type=e||pc;this.f=e==qc;this.controller=null;Hb(this);this.Ga=this.kc=!1;if(d)if(f)this.controller=f,this.b=null,rc(this,f.hc);else if(lb)this.B=new ArrayBuffer(d),this.G=new DataView(this.B,0,d),this.C=new Uint8Array(this.B,0,d),this.I=new Uint16Array(this.B,0,d>>1),this.b=new Int32Array(this.B,0,d>>2),rc(this,nc?sc:tc);else{this.b=Array(d>>2);for(a=0;a<this.b.length;a++)this.b[a]=0;rc(this,uc)}else rc(this)}
|
|
|
|
|
var pc=0,qc=2,Nb=4,Pb=["NONE","RAM","ROM","VID","H/W"],oc=0;
|
|
|
|
|
H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(lb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.G.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(lb)for(b=0;b<a.length;b++)this.G.setInt32(b<<2,a[b],!0);else this.b=a;return this.Ga=!0}return!1},Oa:function(a,b){b?this.J++||vc(this,wc,!1):this.i++||xc(this,wc,!1)},K:function(){this.j&&E(this.j,128)&&(B(this.j,"attempt to read invalid block %"+
|
|
|
|
|
k(this.A),!0),this.j.ea());return 255},F:function(a,b){this.j&&E(this.j,128)&&(B(this.j,"attempt to write "+k(b,4,!0)+" to invalid block %"+k(this.A),!0),this.j.ea())},M:function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8},H:function(a,b,c){this.ub(a++,b&255,c++);this.ub(a,b>>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ga:function(a,b){a&1&&Wb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=
|
|
|
|
|
this.b[c]&~(255<<a)|b<<a;this.Ga=!0},va:function(a,b,c){a&1&&Wb(this.w,c);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,1,c.M)&&c.ea(!0)}return this.zb(a,b)},ca:function(a,b){if(this.j&&null!=this.A){var c=this.j;yc(c,this.A+a,2,c.M)&&c.ea(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,
|
|
|
|
|
1,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Gb(a,b,c)},sa:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;yc(d,this.A+a,2,d.C)&&d.ea(!0)}this.f?this.F(a,b,c):this.Hb(a,b,c)},N:function(a){return this.C[a]},U:function(a,b){a=this.C[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+I(this.j,b)+"): "+I(this.j,a),!0);return a},ba:function(a,b){a&1&&Wb(this.w,b);return this.G.getUint16(a,!0)},da:function(a,b){a&1&&Wb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+
|
|
|
|
|
I(this.j,b)+"): "+I(this.j,a),!0);return a},ka:function(a,b){this.C[a]=b;this.Ga=!0},ma:function(a,b,c){this.C[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+I(this.j,c)+","+I(this.j,b)+")",!0)},ra:function(a,b,c){a&1&&Wb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Wb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+I(this.j,c)+","+I(this.j,b)+")",!0)}};
|
|
|
|
|
function Hb(a,b,c){a.j=b;a.i=a.J=0;c&&((a.i=c.i)&&xc(a,wc,!1),(a.J=c.J)&&vc(a,wc,!1))}function zc(a,b){b?--a.J||(a.ub=a.f?a.F:a.Gb,a.fc=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Yb=a.Ab)}function vc(a,b,c){c&&a.J||(a.ub=!a.f&&b[1]||a.F,a.fc=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.F,a.Hb=b[3]||a.H}function xc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Yb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function rc(a,b){b||(b=Ac);xc(a,b,void 0);vc(a,b,void 0)}
|
|
|
|
|
var Ac=[],uc=[H.prototype.V,H.prototype.pa,H.prototype.ga,H.prototype.va],wc=[H.prototype.S,H.prototype.la,H.prototype.ca,H.prototype.sa];if(lb)var tc=[H.prototype.N,H.prototype.ka,H.prototype.ba,H.prototype.ra],sc=[H.prototype.U,H.prototype.ma,H.prototype.da,H.prototype.Ta];
|
|
|
|
|
function Bc(a,b){r.call(this,"CPU",a,Bc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.aa=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Kb=!1;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Tb=this.Zc.bind(this);G(this)}y(Bc);var Cc=["power","reset"];h=Bc.prototype;
|
|
|
|
|
h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.j=d;for(b=0;b<Cc.length;b++)(c=this.J[Cc[b]])&&this.F.ja(null,Cc[b],c);a=Dc(a,"autoStart");null!=a&&(this.v.fb="true"==a?!0:"false"==a?!1:!!a);G(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
|
|
|
|
|
h.ya=function(a,b){if(!b){if(a&&this.restore){Ec(this);if(!this.restore(a))return!1;Fc(this)}else this.reset();this.j?(a=this.j,a.g("Type ? for help with PDP11 Debugger commands"),a.ua(),a.Ea&&(b=a.Ea,a.Ea=null,Gc(a,b))):this.g("No debugger detected")}M(this);return!0};h.xa=function(a){return a?this.save():!0};h.fb=function(){return this.v.fb||!this.j&&void 0===this.J.run?(this.ab(!0),!0):!1};h.Nb=function(){return 0};
|
|
|
|
|
function Fc(a){void 0===a.kb&&(a.kb=0);void 0===a.Xa&&(a.Xa=-1);void 0===a.Ya&&(a.Ya=-1);a.v.Wa=0<=a.kb&&0<a.Xa;a.v.Wa&&(a.jb=0,a.ka=a.kb-a.ga)}function Hc(a,b){if(a.v.Wa){var c=!1;a.jb=a.jb+a.Nb()|0;a.ka-=b;0>=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Ic(a)&&(a.Xa=a.Ya=-1,Fc(a),a.ea(),c=!0);c&&a.g(Ic(a)+" cycles: checksum="+k(a.jb))}}
|
|
|
|
|
function Jc(a,b,c,d){if(a.J[b]){void 0===c&&(kb(a,"Value for "+b+" is invalid"),a.ea());var e=a.j&&a.j.ga||8;c=!a.v.aa||a.v.Kb?8==e?ba(c,d):k(c,d):"--------".substr(0,d||4);a.J[b].textContent!=c&&(a.J[b].textContent=c)}}
|
|
|
|
|
h.ja=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.J[b]=c;a=!0;break;case "run":this.J[b]=c;c.onclick=function(){var a;if(a=d.F)if(a=d.F,a.v.fa)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;c<l.length&&(b=l[c],b===a||b.v.ready);c++);if(c==l.length)for(c=0;c<l.length&&(b=l[c],b===a||b.v.fa);c++);c==l.length&&(b=a);n("The "+b.type+" component ("+b.id+") is not "+(b.v.ready?"powered yet":"ready yet"+(b.qb?" (waiting for notification)":""))+".");a=!1}a&&(d.v.aa?d.ea():d.ab())};
|
|
|
|
|
a=!0;break;case "speed":this.J[b]=c;a=!0;break;case "setSpeed":this.J[b]=c,c.onclick=function(){Kc(d,d.Ia<<1,!0)},c.textContent=this.Ra.toFixed(2)+"Mhz",a=!0}return a};function Lc(a,b,c){a.ga+=b;c&&(a.N=a.b=0)}function Mc(a,b){var c=1;b&&1<a.Ia&&a.ca&&(c=a.ca/a.Va);a.Qb=Math.round(1E3/30);a.Ma=Math.floor(a.Na/30*c);b||(a.la=a.Ma);a.ib=0}function Ic(a){return a.ga+a.V+a.N-a.b}function Ec(a){a.ca=0;a.Rb=0;a.ga=a.V=a.N=a.b=0;Fc(a);Kc(a,1)}
|
|
|
|
|
function Kc(a,b,c){var d=!1;if(void 0!==b){.8>a.ca/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.F&&a.F.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.da=0;Mc(a);return d}function Xb(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Zb(a,b,c){0<=b&&b<a.K.length&&0>a.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)}function Nc(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 Oc(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]()))}}
|
|
|
|
|
h.Zc=function(){if(this.v.aa){this.ib>=this.Na&&Mc(this,!0);this.pa=0;this.Ea=ra();if(this.da){var a=this.Ea-this.da;a>this.Qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;Oc(this,c);this.pa+=c;this.V+=c;Lc(this,0,!0);Hc(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Rb&&(this.F&&this.F.ua(),this.Rb=0);break}}while(this.v.aa)}catch(e){this.ea();M(this);this.F&&this.F.stop(ra(),
|
|
|
|
|
Ic(this));kb(this,e.stack||e.message);return}if(this.v.aa){a=setTimeout;b=this.Tb;this.da=ra();c=this.Qb;this.pa&&(c=Math.round(c*this.pa/this.Ma));var c=c-(this.da-this.Ea),d=this.da-this.U;d&&(this.ca=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ga=0,Kc(this)));if(0>c||this.ca<this.Ra)-1E3>c&&(this.U-=c),c=0;this.ib+=this.pa;this.da+=c;a(b,c)}}};
|
|
|
|
|
h.ab=function(a){if(jb(this))return!1;if(this.v.aa)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.aa=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.F&&(a&&this.F.nb(!0),this.F.start(this.U,Ic(this)));M(this,!0);setTimeout(this.Tb,0);return!0};h.bb=function(){return 0};h.ea=function(a){if(this.v.aa){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.aa=!1;var b=this.J.run;b&&(b.textContent="Run");this.F&&this.F.stop(ra(),Ic(this));M(this)}this.v.complete=a};
|
|
|
|
|
function M(a,b){a.F&&a.F.ua(b)}
|
|
|
|
|
function hd(a){this.Vb=+a.model||1170;this.qc=a.resetAddr||0;Bc.call(this,a,6666667);this.pb=0;this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.qc];this.Da=[0,0,0,0,0,0];this.qa=[0,0,0,0];this.sa=this.C=0;this.nc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,
|
|
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.rc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.ac=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.D=this.$b=0;this.ma=-1;jd(this);this.v.complete=this.v.jc=!1}y(hd,Bc);h=hd.prototype;h.reset=function(){this.v.aa&&this.ea();jd(this);Ec(this);this.v.error=!1;this.parent.reset.call(this)};
|
|
|
|
|
function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.ra=0;a.hb=262143;a.va=253952;a.B=[];a.D|=2;a.w&&hc(a)}function hc(a){a.sb?(a.ba=65536,a.M=a.mc,a.S=a.Zb,a.Ub=a.Dd,Jb(a.w,a.Ka&16?22:18)):(a.ba=0,a.M=a.lc,a.S=a.Wc,a.Ub=a.Cd,Jb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ga,this.Ia]);a.set(2,Sb(this.w));return a.data()};
|
|
|
|
|
h.restore=function(a){var b=a[1];this.ga=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.K){for(var f=0,g=Array(b.K),l=0;l<e.length-1;)for(var m=e[l++],p=e[l++];m--;)g[f++]=p;e=g}f=b.W[d];if(!f||!f.restore(e)){n("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};
|
|
|
|
|
h.ja=function(a,b,c){switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":this.J[b]=c;this.pb++;a=!0;break;default:a=this.parent.ja.call(this,a,b,c)}return a};
|
|
|
|
|
h.ua=function(a){if(this.pb&&(a||!this.v.aa||this.v.Kb)){for(a=0;a<this.u.length;a++)Jc(this,"R"+a,this.u[a]);a=jc(this);Jc(this,"PS",a);Jc(this,"NF",a&8?1:0,1);Jc(this,"ZF",a&4?1:0,1);Jc(this,"VF",a&2?1:0,1);Jc(this,"CF",a&1?1:0,1)}if(a=this.J.speed)a.textContent=this.v.aa&&this.ca?this.ca.toFixed(2)+"Mhz":"Stopped"};function kd(a){return a.O&65536?1:0}function ld(a){return a.P&32768?2:0}function md(a){return a.X&65535?0:4}h.Ba=function(){return this.T&32768?8:0};
|
|
|
|
|
function nd(a){var b=a.S(a.u[7]);a.u[7]=a.u[7]+2&65535;return b}function od(a,b){a.u[7]=b&65535}function Yb(a,b,c,d,e){for(var f=a.B.length;0<f--;)if(a.B[f].cc===d){0<f&&(a.B[f-1].Aa+=a.B[f].Aa);a.B.splice(f,1);break}if(0<=b){for(f=a.B.length;0<f--;){if(a.B[f].Aa>b){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Wb:c<<5&224,cc:d,yb:e})}a.D|=2}function jc(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)}
|
|
|
|
|
function kc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.C=b>>14&3;c=a.L>>14&3;a.C!=c&&(a.qa[c]=a.u[6],a.u[6]=a.qa[a.C]);a.D|=2;a.L=b}function O(a,b){a.D&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.D&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.D&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.D&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))}
|
|
|
|
|
h.$=function(a){var b=!1;0>this.ma?this.ma=jc(this):this.C||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.C=0;var c=this.S(a|this.ba),d=this.S(a+2&65535|this.ba);kc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.D&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);kc(a,c);a.D&=-17}
|
|
|
|
|
function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.nc[a.C]||(d&=7);e=a.R[a.C][d];f=(a.oa[a.C][d]<<6)+(b&8191)&a.hb;if(f<a.va)f&1&&!(c&1)&&(a.Z|=64,a.$(4,10));else if(a.Ka&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.rc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:
|
|
|
|
|
128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.C][d]=e;if(4194170!==f||a.C)a.ra=a.C,a.sa=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.ra<<5|a.sa<<1),a.$(168,16)),a.G&61440||!(4191360>f||4194239<f)||(a.G|=4096,a.G&512&&(a.D|=32)));return f}function vd(a){var b=a.S(a.u[6]|a.ba);a.u[6]=a.u[6]+2&65535;return b}
|
|
|
|
|
function td(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.G&57344||(a.Ja=a.Ja<<8|246);!a.C&&c<=a.La&&4<c&&(c<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,18)):(a.Z|=8,a.D|=4));a.Ub(c,b)}
|
|
|
|
|
function xd(a,b,c,d){var e,f,g=d&8?0:a.ba;switch(b){case 0:return a.$(4,20),0;case 1:return 6===c&&!a.C&&d&4&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32||65534<=a.u[6]?(a.Z|=4,a.u[6]=4,a.$(4,22)):(a.Z|=8,a.D|=64)),a.b-=3,7===c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];7!==c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.S(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.S(e)|g;a.b-=
|
|
|
|
|
8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ba)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.C&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.D|=64));return e}h.lc=function(a,b,c){return xd(this,a,b,c)};h.mc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Wc=function(a){return this.w.ia(a)};h.Zb=function(a){return this.w.ia(wd(this,a,2))};
|
|
|
|
|
h.Cd=function(a,b){this.w.Sa(a,b&65535)};h.Dd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.C=a.L>>12&3,c=a.S(d|c&a.ba),a.C=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.qa[a.L>>12&3];return c}
|
|
|
|
|
function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.C=a.L>>12&3,e=wd(a,e|c&65536,4),a.C=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.qa[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)}
|
|
|
|
|
function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ia(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ia(e)))):a.u[e]=d.call(a,c,a.u[e])}
|
|
|
|
|
var M={},L=(M[62592]=[null,null,K.prototype.Oc,K.prototype.ud,"SISDR"],M[62608]=[null,null,K.prototype.Mc,K.prototype.sd,"SDSDR"],M[62624]=[null,null,K.prototype.Nc,K.prototype.td,"SISAR"],M[62640]=[null,null,K.prototype.Lc,K.prototype.rd,"SDSAR"],M[62656]=[null,null,K.prototype.wc,K.prototype.dd,"KISDR"],M[62672]=[null,null,K.prototype.uc,K.prototype.bd,"KDSDR"],M[62688]=[null,null,K.prototype.vc,K.prototype.cd,"KISAR"],M[62704]=[null,null,K.prototype.tc,K.prototype.ad,"KDSAR"],M[62798]=[null,null,
|
|
|
|
|
K.prototype.Cc,K.prototype.hd,"MMR3"],M[65382]=[null,null,K.prototype.xc,K.prototype.ed,"LKS"],M[65402]=[null,null,K.prototype.zc,K.prototype.gd,"MMR0"],M[65404]=[null,null,K.prototype.Ac,K.prototype.cc,"MMR1"],M[65406]=[null,null,K.prototype.Bc,K.prototype.cc,"MMR2"],M[65408]=[null,null,K.prototype.Uc,K.prototype.Ad,"UISDR"],M[65424]=[null,null,K.prototype.Sc,K.prototype.yd,"UDSDR"],M[65440]=[null,null,K.prototype.Tc,K.prototype.zd,"UISAR"],M[65456]=[null,null,K.prototype.Rc,K.prototype.xd,"UDSAR"],
|
|
|
|
|
M[65472]=[null,null,K.prototype.Za,K.prototype.cb,"R0SET0"],M[65473]=[null,null,K.prototype.Za,K.prototype.cb,"R1SET0"],M[65474]=[null,null,K.prototype.Za,K.prototype.cb,"R2SET0"],M[65475]=[null,null,K.prototype.Za,K.prototype.cb,"R3SET0"],M[65476]=[null,null,K.prototype.Za,K.prototype.cb,"R4SET0"],M[65477]=[null,null,K.prototype.Za,K.prototype.cb,"R5SET0"],M[65478]=[null,null,K.prototype.Fc,K.prototype.ld,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ic,K.prototype.od,"R7KERNEL"],M[65480]=[null,null,
|
|
|
|
|
K.prototype.$a,K.prototype.eb,"R0SET1"],M[65481]=[null,null,K.prototype.$a,K.prototype.eb,"R1SET1"],M[65482]=[null,null,K.prototype.$a,K.prototype.eb,"R2SET1"],M[65483]=[null,null,K.prototype.$a,K.prototype.eb,"R3SET1"],M[65484]=[null,null,K.prototype.$a,K.prototype.eb,"R4SET1"],M[65485]=[null,null,K.prototype.$a,K.prototype.eb,"R5SET1"],M[65486]=[null,null,K.prototype.Gc,K.prototype.md,"R6SUPER"],M[65487]=[null,null,K.prototype.Hc,K.prototype.nd,"R6USER"],M[65504]=[null,null,K.prototype.sc,K.prototype.$c,
|
|
|
|
|
"CTRL",1170],M[65520]=[null,null,K.prototype.Wb,K.prototype.dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.Wb,K.prototype.dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Qc,K.prototype.wd,"SYSID",1170],M[65526]=[null,null,K.prototype.rc,K.prototype.Zc,"CPUERR",1170],M[65528]=[null,null,K.prototype.yc,K.prototype.fd,"MB",1170],M[65530]=[null,null,K.prototype.Dc,K.prototype.jd,"PIR"],M[65532]=[null,null,K.prototype.Pc,K.prototype.vd,"SL"],M[65534]=[null,null,K.prototype.Ec,K.prototype.kd,"PSW"],
|
|
|
|
|
M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624];L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];
|
|
|
|
|
L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688];L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];
|
|
|
|
|
L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440];L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];
|
|
|
|
|
L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];La(function(){for(var a=A(document,"pdp11","device"),b=0;b<a.length;b++){var c=a[b],d=z(c);switch(d.name){case "default":d=new K(d),fb(d,c)}}});var mc;if(lb){var nc=new ArrayBuffer(2);(new DataView(nc)).setUint16(0,256,!0);mc=256===(new Uint16Array(nc))[0]}else mc=!1;var oc=mc;
|
|
|
|
|
function I(a,b,c,d,e,f){this.w=a;this.id=pc+=2;this.b=null;this.A=b;this.ob=c;this.size=d||0;this.type=e||qc;this.f=e==rc;this.controller=null;Jb(this);this.Ga=this.jc=!1;if(d)if(f)this.controller=f,this.b=null,sc(this,f.gc);else if(lb)this.B=new ArrayBuffer(d),this.G=new DataView(this.B,0,d),this.D=new Uint8Array(this.B,0,d),this.I=new Uint16Array(this.B,0,d>>1),this.b=new Int32Array(this.B,0,d>>2),sc(this,oc?tc:uc);else{this.b=Array(d>>2);for(a=0;a<this.b.length;a++)this.b[a]=0;sc(this,vc)}else sc(this)}
|
|
|
|
|
var qc=0,rc=2,Pb=4,Rb=["NONE","RAM","ROM","VID","H/W"],pc=0;
|
|
|
|
|
I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(lb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.G.getInt32(b<<2,!0);else a=this.b;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(lb)for(b=0;b<a.length;b++)this.G.setInt32(b<<2,a[b],!0);else this.b=a;return this.Ga=!0}return!1},Oa:function(a,b){b?this.C++||wc(this,xc,!1):this.i++||yc(this,xc,!1)},K:function(){this.j&&E(this.j,128)&&(B(this.j,"attempt to read invalid block %"+
|
|
|
|
|
k(this.A),!0),this.j.fa());return 255},J:function(a,b){this.j&&E(this.j,128)&&(B(this.j,"attempt to write "+k(b,4,!0)+" to invalid block %"+k(this.A),!0),this.j.fa())},M:function(a,b){return this.tb(a++,b++)|this.tb(a,b)<<8},H:function(a,b,c){this.ub(a++,b&255,c++);this.ub(a,b>>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ha:function(a,b){a&1&&Yb(this.w,b);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=
|
|
|
|
|
this.b[c]&~(255<<a)|b<<a;this.Ga=!0},va:function(a,b,c){a&1&&Yb(this.w,c);c=a>>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<<a)|b<<a:(this.b[c]=this.b[c]&16777215|b<<24,c++,this.b[c]=this.b[c]&-256|b>>8);this.Ga=!0},S:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,1,c.M)&&c.fa(!0)}return this.zb(a,b)},da:function(a,b){if(this.j&&null!=this.A){var c=this.j;zc(c,this.A+a,2,c.M)&&c.fa(!0)}return this.Ab(a,b)},la:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,
|
|
|
|
|
1,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Gb(a,b,c)},ta:function(a,b,c){if(this.j&&null!=this.A){var d=this.j;zc(d,this.A+a,2,d.D)&&d.fa(!0)}this.f?this.J(a,b,c):this.Hb(a,b,c)},N:function(a){return this.D[a]},U:function(a,b){a=this.D[a];this.j&&E(this.j,128)&&B(this.j,"Memory.readByte("+J(this.j,b)+"): "+J(this.j,a),!0);return a},ca:function(a,b){a&1&&Yb(this.w,b);return this.G.getUint16(a,!0)},ea:function(a,b){a&1&&Yb(this.w,b);a=this.I[a>>1];this.j&&E(this.j,128)&&B(this.j,"Memory.readWord("+
|
|
|
|
|
J(this.j,b)+"): "+J(this.j,a),!0);return a},ka:function(a,b){this.D[a]=b;this.Ga=!0},ma:function(a,b,c){this.D[a]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeByte("+J(this.j,c)+","+J(this.j,b)+")",!0)},sa:function(a,b,c){a&1&&Yb(this.w,c);this.G.setUint16(a,b,!0);this.Ga=!0},Ta:function(a,b,c){a&1&&Yb(this.w,c);this.I[a>>1]=b;this.Ga=!0;this.j&&E(this.j,128)&&B(this.j,"Memory.writeWord("+J(this.j,c)+","+J(this.j,b)+")",!0)}};
|
|
|
|
|
function Jb(a,b,c){a.j=b;a.i=a.C=0;c&&((a.i=c.i)&&yc(a,xc,!1),(a.C=c.C)&&wc(a,xc,!1))}function Ac(a,b){b?--a.C||(a.ub=a.f?a.J:a.Gb,a.ec=a.f?a.H:a.Hb):--a.i||(a.tb=a.zb,a.Xb=a.Ab)}function wc(a,b,c){c&&a.C||(a.ub=!a.f&&b[1]||a.J,a.ec=!a.f&&b[3]||a.H);if(c||void 0===c)a.Gb=b[1]||a.J,a.Hb=b[3]||a.H}function yc(a,b,c){c&&a.i||(a.tb=b[0]||a.K,a.Xb=b[2]||a.M);if(c||void 0===c)a.zb=b[0]||a.K,a.Ab=b[2]||a.M}function sc(a,b){b||(b=Bc);yc(a,b,void 0);wc(a,b,void 0)}
|
|
|
|
|
var Bc=[],vc=[I.prototype.V,I.prototype.qa,I.prototype.ha,I.prototype.va],xc=[I.prototype.S,I.prototype.la,I.prototype.da,I.prototype.ta];if(lb)var uc=[I.prototype.N,I.prototype.ka,I.prototype.ca,I.prototype.sa],tc=[I.prototype.U,I.prototype.ma,I.prototype.ea,I.prototype.Ta];
|
|
|
|
|
function Cc(a,b){r.call(this,"CPU",a,Cc,1);var c=a.multiplier||1;this.Na=a.cycles||b;this.Ia=c;this.Va=Math.round(this.Na/1E4)/100;this.Ra=this.Va*this.Ia;this.v.ba=!1;this.v.Eb=!1;this.v.fb=a.autoStart;this.v.Wa=!1;this.jb=this.ka=0;this.kb=a.csStart;this.Xa=a.csInterval;this.Ya=a.csStop;this.K=[];this.Rb=this.Yc.bind(this);G(this)}y(Cc);var Dc=["power","reset"];h=Cc.prototype;
|
|
|
|
|
h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.j=d;for(b=0;b<Dc.length;b++)(c=this.J[Dc[b]])&&this.C.pa(null,Dc[b],c);a=Ec(a,"autoStart");null!=a&&(this.v.fb="true"==a?!0:"false"==a?!1:!!a);G(this)};h.reset=function(){};h.save=function(){return null};h.restore=function(){return!1};
|
|
|
|
|
h.ya=function(a,b){if(!b){if(a&&this.restore){Fc(this);if(!this.restore(a))return!1;Gc(this)}else this.reset();this.j?(a=this.j,a.g("Type ? for help with PDP11 Debugger commands"),a.aa(),a.Ea&&(b=a.Ea,a.Ea=null,Hc(a,b))):this.g("No debugger detected")}this.C.aa();return!0};h.xa=function(a){return a?this.save():!0};h.fb=function(){return this.v.fb||!this.j&&void 0===this.J.run?(this.ab(!0),!0):!1};h.Nb=function(){return 0};
|
|
|
|
|
function Gc(a){void 0===a.kb&&(a.kb=0);void 0===a.Xa&&(a.Xa=-1);void 0===a.Ya&&(a.Ya=-1);a.v.Wa=0<=a.kb&&0<a.Xa;a.v.Wa&&(a.jb=0,a.ka=a.kb-a.ha)}function Ic(a,b){if(a.v.Wa){var c=!1;a.jb=a.jb+a.Nb()|0;a.ka-=b;0>=a.ka&&(a.ka+=a.Xa,c=!0);0<=a.Ya&&a.Ya<=Jc(a)&&(a.Xa=a.Ya=-1,Gc(a),a.fa(),c=!0);c&&a.g(Jc(a)+" cycles: checksum="+k(a.jb))}}
|
|
|
|
|
h.pa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.v.ga)a=!0;else{var b=null,c,l=cb(a.id);for(c=0;c<l.length&&(b=l[c],b===a||b.v.ready);c++);if(c==l.length)for(c=0;c<l.length&&(b=l[c],b===a||b.v.ga);c++);c==l.length&&(b=a);n("The "+b.type+" component ("+b.id+") is not "+(b.v.ready?"powered yet":"ready yet"+(b.pb?" (waiting for notification)":""))+".");a=!1}a&&(d.v.ba?d.fa():d.ab())},
|
|
|
|
|
!0;case "speed":return this.J[b]=c,!0;case "setSpeed":return this.J[b]=c,c.onclick=function(){Kc(d,d.Ia<<1,!0)},c.textContent=this.Ra.toFixed(2)+"Mhz",!0}return!1};h.aa=function(){var a=this.J.speed;a&&(a.textContent=this.v.ba&&this.da?this.da.toFixed(2)+"Mhz":"Stopped")};function Lc(a,b,c){a.ha+=b;c&&(a.N=a.b=0)}function Mc(a,b){var c=1;b&&1<a.Ia&&a.da&&(c=a.da/a.Va);a.qb=Math.round(1E3/30);a.Ma=Math.floor(a.Na/30*c);b||(a.la=a.Ma);a.ib=0}function Jc(a){return a.ha+a.V+a.N-a.b}
|
|
|
|
|
function Fc(a){a.da=0;a.Qb=0;a.ha=a.V=a.N=a.b=0;Gc(a);Kc(a,1)}function Kc(a,b,c){var d=!1;if(void 0!==b){.8>a.da/a.Ra?b=1:d=!0;a.Ia=b;b=a.Va*a.Ia;if(a.Ra!=b){a.Ra=b;b=a.Ra.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.C&&a.C.nb()}Lc(a,a.V);a.V=0;a.U=ra();a.ea=0;Mc(a);return d}function gc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function ic(a,b,c){0<=b&&b<a.K.length&&0>a.K[b][0]&&(c*=a.Na*a.Ia/1E3,a.K[b][0]=c)}
|
|
|
|
|
function Nc(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 gd(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]()))}}
|
|
|
|
|
h.Yc=function(){if(this.v.ba){this.ib>=this.Na&&Mc(this,!0);this.qa=0;this.Ea=ra();if(this.ea){var a=this.Ea-this.ea;a>this.qb&&(this.U+=a,this.U>this.Ea&&(this.U=this.Ea))}try{do{var b=Nc(this,this.v.Wa?1:this.Ma);try{this.bb(b)}catch(e){if("number"!=typeof e)throw e;}var c=this.N-this.b;gd(this,c);this.qa+=c;this.V+=c;Lc(this,0,!0);Ic(this,c);this.la-=c;if(0>=this.la){this.la+=this.Ma;15<=++this.Qb&&(this.C&&this.C.aa(),this.Qb=0);break}}while(this.v.ba)}catch(e){this.fa();this.C&&this.C.stop(ra(),
|
|
|
|
|
Jc(this));kb(this,e.stack||e.message);return}if(this.v.ba){a=setTimeout;b=this.Rb;this.ea=ra();c=this.qb;this.qa&&(c=Math.round(c*this.qa/this.Ma));var c=c-(this.ea-this.Ea),d=this.ea-this.U;d&&(this.da=Math.round(this.V/(10*d))/100,864E5<=d&&(this.ha=0,Kc(this)));if(0>c||this.da<this.Ra)-1E3>c&&(this.U-=c),c=0;this.ib+=this.qa;this.ea+=c;a(b,c)}}};
|
|
|
|
|
h.ab=function(a){if(jb(this))return!1;if(this.v.ba)return this.g(this.toString()+" busy"),!1;Kc(this);this.v.ba=!0;this.v.Eb=!0;var b=this.J.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.nb(!0),this.C.start(this.U,Jc(this)));setTimeout(this.Rb,0);return!0};h.bb=function(){return 0};h.fa=function(a){if(this.v.ba){this.N-=this.b;this.b=0;Lc(this,this.V);this.V=0;this.v.ba=!1;var b=this.J.run;b&&(b.textContent="Run");this.C&&this.C.stop(ra(),Jc(this))}this.v.complete=a};
|
|
|
|
|
function hd(a){this.Ub=+a.model||1170;this.pc=a.resetAddr||0;Cc.call(this,a,6666667);this.decode=id.bind(this);this.O=65536;this.P=32768;this.X=65535;this.T=32768;this.L=15;this.u=[0,0,0,0,0,0,0,this.pc];this.Da=[0,0,0,0,0,0];this.ra=[0,0,0,0];this.ta=this.D=0;this.mc=[4,2,0,1];this.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,
|
|
|
|
|
0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.qc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.$b=[0,0,0,0,0,0,0,0];this.i=this.f=this.Ua=this.H=this.I=this.F=this.Zb=0;this.ma=-1;jd(this);this.v.complete=this.v.ic=!1}y(hd,Cc);h=hd.prototype;h.reset=function(){this.v.ba&&this.fa();jd(this);Fc(this);this.v.error=!1;this.parent.reset.call(this)};
|
|
|
|
|
function jd(a){a.La=255;a.Z=0;a.Db=0;a.G=0;a.Ja=0;a.Cb=0;a.Ka=0;a.sb=0;a.sa=0;a.hb=262143;a.va=253952;a.B=[];a.F|=2;a.w&&jc(a)}function jc(a){a.sb?(a.ca=65536,a.M=a.lc,a.S=a.Yb,a.Tb=a.Cd,Lb(a.w,a.Ka&16?22:18)):(a.ca=0,a.M=a.kc,a.S=a.Vc,a.Tb=a.Bd,Lb(a.w,16))}h.Nb=function(){return 0};h.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ha,this.Ia]);a.set(2,Ub(this.w));return a.data()};
|
|
|
|
|
h.restore=function(a){var b=a[1];this.ha=b[1];Kc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.K){for(var f=0,g=Array(b.K),l=0;l<e.length-1;)for(var m=e[l++],p=e[l++];m--;)g[f++]=p;e=g}f=b.W[d];if(!f||!f.restore(e)){n("Unable to restore memory block "+d);b=!1;break a}}b=!0}return b};function kd(a){return a.O&65536?1:0}function ld(a){return a.P&32768?2:0}function md(a){return a.X&65535?0:4}h.Ba=function(){return this.T&32768?8:0};
|
|
|
|
|
function nd(a){var b=a.S(a.u[7]);a.u[7]=a.u[7]+2&65535;return b}function od(a,b){a.u[7]=b&65535}function hc(a,b,c,d,e){for(var f=a.B.length;0<f--;)if(a.B[f].bc===d){0<f&&(a.B[f-1].Aa+=a.B[f].Aa);a.B.splice(f,1);break}if(0<=b){for(f=a.B.length;0<f--;){if(a.B[f].Aa>b){a.B[f].Aa-=b;break}b-=a.B[f].Aa}a.B.splice(f+1,0,{Aa:b,Vb:c<<5&224,bc:d,yb:e})}a.F|=2}function Db(a){return a.L=a.L&63728|a.Ba()|md(a)|ld(a)|kd(a)}
|
|
|
|
|
function lc(a,b){a.T=b<<12;a.X=~b&4;a.P=b<<14;a.O=b<<16;if((b^a.L)&2048)for(var c=a.Da.length;0<=--c;){var d=a.u[c];a.u[c]=a.Da[c];a.Da[c]=d}a.D=b>>14&3;c=a.L>>14&3;a.D!=c&&(a.ra[c]=a.u[6],a.u[6]=a.ra[a.D]);a.F|=2;a.L=b}function O(a,b){a.F&128||(a.T=a.X=b,a.P=0)}function pd(a,b,c){a.F&128||(a.T=a.X=a.O=b,a.P=c||0)}function qd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^b)&(d^b))}function rd(a,b){a.F&128||(a.T=a.X=a.O=b,a.P=a.T^a.O>>1)}function sd(a,b,c,d){a.F&128||(a.T=a.X=a.O=b,a.P=(c^d)&(d^b))}
|
|
|
|
|
h.$=function(a){var b=!1;0>this.ma?this.ma=Db(this):this.D||(a=4,b=!0);this.G&57344||(this.Ja=63222,this.Cb=a);this.D=0;var c=this.S(a|this.ca),d=this.S(a+2&65535|this.ca);lc(this,d&-12289|this.ma>>2&12288);b&&(this.Z|=4,this.u[6]=4);td(this,this.ma);td(this,this.u[7]);od(this,c);this.F&=-113;this.ma=-1;throw a;};function ud(a){var b=vd(a),c=vd(a)&-1793;a.L&49152&&(c=c&-225|a.L&63712);od(a,b);lc(a,c);a.F&=-17}
|
|
|
|
|
function wd(a,b,c){var d,e,f,g=0;d=b>>13;a.Ka&a.mc[a.D]||(d&=7);e=a.R[a.D][d];f=(a.oa[a.D][d]<<6)+(b&8191)&a.hb;if(f<a.va)f&1&&!(c&1)&&(a.Z|=64,a.$(4,10));else if(a.Ka&16||253952<=f&&(f|=4186112),4186112>f){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.Ka&32&&(f=a.qc[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.va&&4186112>f&&(a.Z|=32,a.$(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:
|
|
|
|
|
128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.R[a.D][d]=e;if(4194170!==f||a.D)a.sa=a.D,a.ta=d;g&&(g&57344&&(0<=a.ma&&(g|=128),a.G&57344||(a.G=a.G|g|a.sa<<5|a.ta<<1),a.$(168,16)),a.G&61440||!(4191360>f||4194239<f)||(a.G|=4096,a.G&512&&(a.F|=32)));return f}function vd(a){var b=a.S(a.u[6]|a.ca);a.u[6]=a.u[6]+2&65535;return b}
|
|
|
|
|
function td(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.G&57344||(a.Ja=a.Ja<<8|246);!a.D&&c<=a.La&&4<c&&(c<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,18)):(a.Z|=8,a.F|=4));a.Tb(c,b)}
|
|
|
|
|
function xd(a,b,c,d){var e,f,g=d&8?0:a.ca;switch(b){case 0:return a.$(4,20),0;case 1:return 6===c&&!a.D&&d&4&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32||65534<=a.u[6]?(a.Z|=4,a.u[6]=4,a.$(4,22)):(a.Z|=8,a.F|=64)),a.b-=3,7===c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];7!==c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.S(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.S(e)|g;a.b-=
|
|
|
|
|
8;break;case 6:return e=nd(a),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=nd(a),e=e+a.u[c]&65535,e=a.S(e|a.ca)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.G&57344||(a.Ja=a.Ja<<8|f<<3&248|c);6==c&&!a.D&&d&4&&0>=f&&(a.u[6]<=a.La||65534<=a.u[6])&&(a.u[6]<=a.La-32?(a.Z|=4,a.u[6]=4,a.$(4,24)):(a.Z|=8,a.F|=64));return e}h.kc=function(a,b,c){return xd(this,a,b,c)};h.lc=function(a,b,c){return wd(this,xd(this,a,b,c),c)};h.Vc=function(a){return this.w.ja(a)};h.Yb=function(a){return this.w.ja(wd(this,a,2))};
|
|
|
|
|
h.Bd=function(a,b){this.w.Sa(a,b&65535)};h.Cd=function(a,b){this.w.Sa(wd(this,a,4),b)};function yd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?(d=xd(a,b,d,2),c&65536||61440!==(a.L&61440)&&(d&=65535),a.D=a.L>>12&3,c=a.S(d|c&a.ca),a.D=a.L>>14&3):c=6!=d||(a.L>>2&12288)===(a.L&12288)?a.u[d]:a.ra[a.L>>12&3];return c}
|
|
|
|
|
function zd(a,b,c,d){a.G&57344||(a.Ja=22);var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=xd(a,b,e,4),c&65536||(e&=65535),a.D=a.L>>12&3,e=wd(a,e|c&65536,4),a.D=a.L>>14&3,a.w.Sa(e,d)):6!=e||(a.L>>2&12288)===(a.L&12288)?a.u[e]=d:a.ra[a.L>>12&3]=d}function Ad(a,b){b>>=6;var c=a.I=b&7;(b=a.H=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Bd(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function Cd(a,b){var c=a.f=b&7;b=a.i=(b&56)>>3;return xd(a,b,c,8)}
|
|
|
|
|
function Dd(a,b){var c=a.f=b&7;(b=a.i=(b&56)>>3)?(c=a.M(b,c,3),a=a.w.Qa(c)):a=a.u[c]&255;return a}function Ed(a,b){var c=a.f=b&7;return(b=a.i=(b&56)>>3)?a.w.ja(a.M(b,c,2)):a.u[c]}function P(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.Ua=a.M(b,e,7),c=d.call(a,c,a.w.Qa(e)),e&1&&a.b--,a.w.mb(e,c&255)):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function Q(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(e=a.M(b,e,6),a.w.Sa(e,d.call(a,c,a.w.ja(e)))):a.u[e]=d.call(a,c,a.u[e])}
|
|
|
|
|
function Fd(a,b,c,d){var e=a.f=b&7;(b=a.i=(b&56)>>3)?(d=a.M(b,e,5),d&1&&a.b--,a.w.mb(d,c&255)):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Gd(a,b,c){var d=a.f=b&7;(b=a.i=(b&56)>>3)?a.w.Sa(a.M(b,d,4),c):a.u[d]=c&65535;return c}function R(a,b,c){c&&(od(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3}
|
|
|
|
|
h.bb=function(a){this.v.complete=!0;var b=this.v.jc=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.ea();break}c=1}if(this.D&&(this.D&112&&(this.D&32?this.$(168,28):this.D&64?this.$(4,30):this.D&16&&this.$(12,32),this.D&=-113),this.D&7))if(this.D&2){this.D&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0<this.B[e].Aa){this.B[e].Aa--;this.D|=2;break}if(this.B[e].yb){if(!this.B[e].yb()){this.B.splice(e,1);continue}this.B[e].yb=
|
|
|
|
|
null}this.B[e].Wb>d&&(d=this.B[e].Wb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.D&4&&(this.u[7]=this.u[7]+2&65535,this.D&=-5),a?this.$(a.cc,26):this.$(160,26))}else this.D&1&&this.D++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.D=this.D&7|this.L&16;this.decode(nd(this))}while(0<this.b);return this.v.complete?this.N-this.b:void 0===this.v.complete?0:-1};La(function(){for(var a=A(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hd(d);fb(d,c)}});
|
|
|
|
|
h.bb=function(a){this.v.complete=!0;var b=this.v.ic=this.j&&Hd(this.j),c=a?this.v.Eb?0:1:-1;this.v.Eb=!1;this.N=this.b=a;do{if(b){if(Id(this.j,this.u[7],c)){this.fa();break}c=1}if(this.F&&(this.F&112&&(this.F&32?this.$(168,28):this.F&64?this.$(4,30):this.F&16&&this.$(12,32),this.F&=-113),this.F&7))if(this.F&2){this.F&=-3;a=null;for(var d=this.Db&224,e=this.B.length;0<=--e;){if(0<this.B[e].Aa){this.B[e].Aa--;this.F|=2;break}if(this.B[e].yb){if(!this.B[e].yb()){this.B.splice(e,1);continue}this.B[e].yb=
|
|
|
|
|
null}this.B[e].Vb>d&&(d=this.B[e].Vb,a=this.B[e],this.B.splice(e,1))}d>(this.L&224)&&(this.F&4&&(this.u[7]=this.u[7]+2&65535,this.F&=-5),a?this.$(a.bc,26):this.$(160,26))}else this.F&1&&this.F++;this.G&57344||(this.Ja=0,this.Cb=this.u[7]);this.F=this.F&7|this.L&16;this.decode(nd(this))}while(0<this.b);return this.v.complete?this.N-this.b:void 0===this.v.complete?0:-1};La(function(){for(var a=A(document,"pdp11","cpu"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hd(d);fb(d,c)}});
|
|
|
|
|
function Jd(a,b){var c=b+a;qd(this,c,a,b);return c&65535}function Kd(a,b){var c=b+a;qd(this,c<<8,a<<8,b<<8);return c&255}function Ld(a,b){a=b<<1;rd(this,a);return a&65535}function Md(a,b){a=b<<1;rd(this,a<<8);return a&255}function Nd(a,b){a=b&32768|b>>1|b<<16;rd(this,a);return a&65535}function Od(a,b){a=b&2048|b>>1|b<<8;rd(this,a<<8);return a&255}function Pd(a,b){a=b&~a;O(this,a);return a}function Qd(a,b){a=b&~a;O(this,a<<8);return a}function Rd(a,b){a|=b;O(this,a);return a}
|
|
|
|
|
function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.D&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.D&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.D&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535}
|
|
|
|
|
function Yd(a,b){a=b+a;var c=a<<8;this.D&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255}
|
|
|
|
|
function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.D&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535}
|
|
|
|
|
function Sd(a,b){a|=b;O(this,a<<8);return a}function Td(a,b){a=~b|65536;pd(this,a);return a&65535}function Ud(a,b){a=~b|256;pd(this,a<<8);return a&255}function Vd(a,b){a=b-a;this.F&128||(this.T=this.X=a,this.P=b&(b^a));return a&65535}function Wd(a,b){a=b-a;var c=a<<8;b<<=8;this.F&128||(this.T=this.X=c,this.P=b&(b^c));return a&255}function Xd(a,b){a=b+a;this.F&128||(this.T=this.X=a,this.P=a&(b^a));return a&65535}
|
|
|
|
|
function Yd(a,b){a=b+a;var c=a<<8;this.F&128||(this.T=this.X=c,this.P=c&(b<<8^c));return a&255}function Zd(a,b){a=-b;pd(this,a,a&b&32768);return a&65535}function $d(a,b){a=-b;pd(this,a<<8,(a&b&128)<<8);return a&255}function ae(a,b){a=b<<1|this.O>>16&1;rd(this,a);return a&65535}function be(a,b){a=b<<1|this.O>>16&1;rd(this,a<<8);return a&255}function ce(a,b){a=(this.O&65536|b)>>1|b<<16;rd(this,a);return a&65535}function de(a,b){a=((this.O&65536)>>8|b)>>1|b<<8;rd(this,a<<8);return a&255}
|
|
|
|
|
function ee(a,b){var c=b-a;sd(this,c,a,b);return c&65535}function fe(a,b){var c=b-a;sd(this,c<<8,a<<8,b<<8);return c&255}function ge(a,b){this.F&128||(this.T=this.X=b&65280,this.P=this.O=0);return(b<<8|b>>8)&65535}function he(a,b){a^=b;O(this,a);return a&65535}
|
|
|
|
|
function ie(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.O=this.P=0;b&=63;if(b&32)b=64-b,16<b&&(b=16),this.O=c<<17-b,c>>=b;else if(b)if(16<b)this.P=c,c=0;else{this.O=c<<=b;var d=c>>15&65535;d&&65535!==d&&(this.P=32768)}this.u[a]=c&65535;this.T=this.X=c;this.b-=(this.i?6:7)+b}
|
|
|
|
|
function je(a){var b=Ed(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&=63;if(b&32){b=64-b;32<b&&(b=32);var d=c>>b-1;this.O=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<<b-1,this.O=d>>15,d<<=1,32<b&&(b=32),(c>>=32-b)&&4294967295!==(c|4294967295<<b&4294967295)&&(this.P=32768)):d=c;this.u[a]=d>>16&65535;this.u[a|1]=d&65535;this.T=d>>16;this.X=d>>16|d;this.b-=(this.i?6:7)+b}function S(a){a&1&&(this.O=0);a&2&&(this.P=0);a&4&&(this.X=1);a&8&&(this.T=0);this.b-=5}
|
|
|
|
|
function ke(a){var b=Ed(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.O=this.P=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.X=d>>16|d,this.T=d>>16):(this.P=32768,this.X=d>>15|d,this.T=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.X=this.T=0,this.P=32768,this.O=65536,this.b-=7}var le=[0,7,7,10,7,11,9,13];function me(a){var b=this.b;od(this,Cd(this,a));this.b=b-le[this.i]}
|
|
|
|
|
var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.D&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767<b?65536:0);this.b-=23}
|
|
|
|
|
var ne=[0,14,14,17,14,18,16,20];function oe(a){var b=this.b,c=Cd(this,a);a=a>>6&7;td(this,this.u[a]);this.u[a]=this.u[7];od(this,c);this.b=b-ne[this.i]}var pe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17],qe=[7,13,13,17,14,18,17,21];function re(a){var b=Ed(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.F&128||(this.T=b>>16,this.X=this.T|b,this.P=0,this.O=-32768>b||32767<b?65536:0);this.b-=23}
|
|
|
|
|
function se(){this.b-=5}function T(a){a&1&&(this.O=65536);a&2&&(this.P=32768);a&4&&(this.X=0);a&8&&(this.T=32768);this.b-=5}function te(a){var b=(a&448)>>6;if(this.u[b]=this.u[b]-1&65535)od(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ue(a){Q(this,a,0,ge);this.b-=this.i?9:3+(7==this.f?2:0)}function ve(a){Q(this,a,Bd(this,a),he);this.b-=this.i?9:3+(7==this.f?2:0)}function V(){this.$(8,6)}function id(a){we[a>>12].call(this,a)}
|
|
|
|
|
var we=[function(a){xe[a>>8&15].call(this,a)},function(a){var b=Bd(this,a),c=this.b;O(this,Gd(this,a,b));this.b=c-pe[(this.H?8:0)+this.i]+(7!=this.f||this.i?0:2)},function(a){var b=Bd(this,a);a=Ed(this,a);sd(this,b-a,a,b);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,Bd(this,a)&Ed(this,a));this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Pd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?
|
|
|
|
|
2:0)},function(a){Q(this,a,Bd(this,a),Rd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),Jd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},function(a){var b=Ad(this,a);O(this,Fd(this,a,b,1)<<8);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){var b=Ad(this,a)<<8;a=Dd(this,a)<<8;sd(this,b-a,a,b);this.b-=this.i?
|
|
|
|
|
4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){O(this,(Ad(this,a)&Dd(this,a))<<8);this.b-=this.i?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Qd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){P(this,a,Ad(this,a),Sd);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},function(a){Q(this,a,Bd(this,a),ee);this.b-=this.i?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)},V],xe=
|
|
|
|
|
[function(a){Te[a>>4&15].call(this,a)},function(a){R(this,a,!0)},function(a){R(this,a,!md(this))},function(a){R(this,a,md(this))},function(a){R(this,a,!this.Ba()==!ld(this))},function(a){R(this,a,!this.Ba()!=!ld(this))},function(a){R(this,a,!md(this)&&!this.Ba()==!ld(this))},function(a){R(this,a,md(this)||!this.Ba()!=!ld(this))},oe,oe,function(a){Ue[a>>6&3].call(this,a)},function(a){Ve[a>>6&3].call(this,a)},function(a){We[a>>6&3].call(this,a)},function(a){Xe[a>>6&3].call(this,a)},V,V],Ue=[function(a){pd(this,
|
|
|
|
|
Gd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Td);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Xd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,Vd);this.b-=this.i?9:3+(7==this.f?2:0)}],Ve=[function(a){Q(this,a,0,Zd);this.b-=this.i?11:6},function(a){Q(this,a,kd(this)?1:0,Jd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,kd(this)?1:0,ee);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Ed(this,a);pd(this,a);this.b-=this.i?4:3+(7==this.f?
|
|
|
|
|
2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Zb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,
|
|
|
|
|
0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.D|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4,
|
|
|
|
|
3)):this.ea();this.b-=7},function(){this.D|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.D|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O=
|
|
|
|
|
2:0)}],We=[function(a){Q(this,a,0,ce);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ae);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Nd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,Ld);this.b-=this.i?9:3+(7==this.f?2:0)}],Xe=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.Yb(a|65536);od(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=yd(this,a,0);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,
|
|
|
|
|
0,b);O(this,b);this.b=c-qe[this.i]},function(a){O(this,Gd(this,a,this.Ba?65535:0));this.b-=this.i?9:3+(7==this.f?2:0)}],Te=[function(a){Ye[a&15].call(this,a)},V,V,V,me,me,me,me,function(a){if(a&8)this.$(8,6);else{var b=vd(this);a&=7;od(this,this.u[a]);this.u[a]=b;this.b-=9}},function(a){a&8?(this.L&49152||(this.L=this.L&-2017|(a&7)<<5,this.F|=1),this.b-=5):this.$(8,6)},function(a){Ze[a&15].call(this,a)},function(a){$e[a&15].call(this,a)},ue,ue,ue,ue],Ye=[function(){this.L&49152?(this.Z|=128,this.$(4,
|
|
|
|
|
3)):this.fa();this.b-=7},function(){this.F|=4;this.u[7]=this.u[7]+-2&65535;this.b-=3},function(){ud(this);this.F|=this.L&16;this.b-=13},function(){this.$(12,1);this.b-=5},function(){this.$(16,4);this.b-=25},function(){this.L&49152||(jd(this),this.w.reset());this.b-=667},function(){ud(this);this.b-=13},V,V,V,V,V,V,V,V,V],Ze=[se,function(){this.O=0;this.b-=5},function(){this.P=0;this.b-=5},S,function(){this.X=1;this.b-=5},S,S,S,function(){this.T=0;this.b-=5},S,S,S,S,S,S,S],$e=[se,function(){this.O=
|
|
|
|
|
65536;this.b-=5},function(){this.P=32768;this.b-=5},T,function(){this.X=0;this.b-=5},T,T,T,function(){this.T=32768;this.b-=5},T,T,T,T,T,T,T],Re=[re,re,ke,ke,ie,ie,je,je,ve,ve,V,V,V,V,te,te],Se=[function(a){R(this,a,!this.Ba())},function(a){R(this,a,this.Ba())},function(a){R(this,a,!kd(this)&&!md(this))},function(a){R(this,a,kd(this)||md(this))},function(a){R(this,a,!ld(this))},function(a){R(this,a,ld(this))},function(a){R(this,a,!kd(this))},function(a){R(this,a,kd(this))},function(){this.$(24,2);
|
|
|
|
|
this.b-=25},function(){this.$(28,5);this.b-=5},function(a){af[a>>6&3].call(this,a)},function(a){bf[a>>6&3].call(this,a)},function(a){cf[a>>6&3].call(this,a)},function(a){df[a>>6&3].call(this,a)},V,V],af=[function(a){pd(this,Fd(this,a,0));this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Ud);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Yd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,1,Wd);this.b-=this.i?9:3+(7==this.f?2:0)}],bf=[function(a){P(this,a,0,$d);this.b-=
|
|
|
|
|
this.i?11:6},function(a){P(this,a,kd(this)?1:0,Kd);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,kd(this)?1:0,fe);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){a=Dd(this,a);pd(this,a<<8);this.b-=this.i?4:3+(7==this.f?2:0)}],cf=[function(a){P(this,a,0,de);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,be);this.b-=this.i?9:3+(7==this.f?2:0)},function(a){P(this,a,0,Od);this.b-=this.i?9+(this.Ua&1):3+(7==this.f?2:0)},function(a){P(this,a,0,Md);this.b-=this.i?9:3+(7==
|
|
|
|
|
this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.C=a.addr;this.i=a.size;this.G=a.writable;this.F=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef);
|
|
|
|
|
ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.C,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Id:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0};
|
|
|
|
|
this.f?2:0)}],df=[V,function(a){a=yd(this,a,65536);td(this,a);O(this,a);this.b-=11},function(a){var b=vd(this),c=this.b;zd(this,a,65536,b);O(this,b);this.b=c-qe[this.i]},V];function ef(a){r.call(this,"ROM",a,ef);this.f=null;this.D=a.addr;this.i=a.size;this.G=a.writable;this.C=a.alias;this.B=a.file;this.H=da(this.B);if(this.B){a=this.B;var b=ea(this.H);"json"!=b&&"hex"!=b&&(a=ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;ua(a,null,!0,function(a,b,f){ff(c,a,b,f)})}}y(ef);
|
|
|
|
|
ef.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;gf(this)};ef.prototype.ya=function(){if(this.za){if(this.j){var a=this.j,b=this.id,c=this.D,d=this.i,e=this.za,f=[],g;for(g in e){var l=e[g];"number"==typeof l&&(e[g]=l={o:l});var m=l.o,p=l.a;if(void 0!==m){var q=f,m=[m>>>0,g],w=qa(q,m,a.Jb);0>w&&q.splice(-(w+1),0,m)}p&&(l.a=p.replace(/''/g,'"'))}a.G.push({Hd:b,A:c,oc:d,za:e,Ib:f})}delete this.za}return!0};ef.prototype.xa=function(){return!0};
|
|
|
|
|
function ff(a,b,c,d){if(d)a.na("Unable to load system ROM (error "+d+": "+b+")");else{bb(a.vb,b,c);var e;if("["==c.charAt(0)||"{"==c.charAt(0))try{var f,g,l=eval("("+c+")");if(f=l.bytes)a.f=f;else if(f=l.words)for(a.f=Array(2*f.length),g=e=0;e<f.length;e++)a.f[g++]=f[e]&255,a.f[g++]=f[e]>>8&255;else if(f=l.data)for(a.f=Array(4*f.length),g=e=0;e<f.length;e++)a.f[g++]=f[e]&255,a.f[g++]=f[e]>>8&255,a.f[g++]=f[e]>>16&255,a.f[g++]=f[e]>>24&255;else a.f=l;a.za=l.symbols;if(!a.f.length){n("Empty ROM: "+
|
|
|
|
|
b);return}if(1==a.f.length){n(a.f[0]);return}}catch(m){a.na("ROM data error: "+m.message);return}else for(b=c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.f=Array(b.length),e=0;e<b.length;e++)a.f[e]=aa(b[e],16);gf(a)}}
|
|
|
|
|
function gf(a){if(!ib(a))if(!a.B)G(a);else if(a.f&&a.w){a.i||(a.i=a.f.length);if(a.f.length!=a.i)kb(a,"ROM size ("+k(a.f.length,8,!0)+") does not match specified size ("+k(a.i,8,!0)+")");else{var b;b=a.C;if(Mb(a.w,b,a.i,a.G?1:qc)){var c;for(c=0;c<a.f.length;c++)Rb(a.w,b+c,a.f[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Lb(d.w,d.C,d.i);Kb(d.w,e,d.i,f)}delete a.f}}G(a)}}
|
|
|
|
|
La(function(){for(var a=A(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ef(d);fb(d,c)}});function hf(a){r.call(this,"RAM",a,hf);this.F=a.addr;this.i=a.size;this.f=!1}y(hf);hf.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;!this.f&&this.i&&Mb(this.w,this.F,this.i,1)&&(this.f=!0);this.f||n("No RAM allocated");G(this)};hf.prototype.ya=function(){return!0};hf.prototype.xa=function(){return!0};hf.prototype.reset=function(){};
|
|
|
|
|
La(function(){for(var a=A(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hf(d);fb(d,c)}});function jf(a){r.call(this,"Keyboard",a,jf,65536);G(this)}y(jf);jf.prototype.ja=function(){return!1};jf.prototype.Ca=function(a,b,c,d){this.F=a;this.b=c;this.j=d};La(function(){for(var a=A(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new jf(d);fb(d,c)}});
|
|
|
|
|
function W(a){this.B=this.G=null;this.U=a.tabSize;this.M=a.charBOL;this.H=0;r.call(this,"SerialPort",a,W,8388608);var b=a.binding;if("console"==b)this.G="";else{var c;a=kf;b&&(void 0===c&&(c="Panel"),(c=eb(c,this.id))&&(b=c.J[b])&&this.ja(null,a,b))}this.I=this.K=null;this.exports={connect:this.Sb,receiveData:this.Bb}}y(W);var kf="buffer";h=W.prototype;
|
|
|
|
|
h.ja=function(a,b,c){var d=this;switch(b){case kf:return this.J[b]=this.B=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Bb(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Bb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
|
|
|
|
|
h.Ca=function(a,b,c,d){this.F=a;this.w=b;this.b=c;this.j=d;var e=this;this.V=Xb(this.b,function(){e.f&128||!e.C.length||(e.S=e.C.shift(),e.f|=128,e.f&64&&Yb(e.b,40,4,48))});this.N=function(){e.i|=128;return!!(e.i&64)};Ub(b,this,lf);G(this)};
|
|
|
|
|
h.Sb=function(){if(!this.I){var a=Dc(this.F,"connection");if(a){var b=a.split("->");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
|
|
|
|
h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.C=[];return!0}h.Bb=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.C.push(a.charCodeAt(b));else this.C=this.C.concat(a);Zb(this.b,this.V,50);return!0};h.Lc=function(){return this.f&65535};h.rd=function(a){this.f=this.f&-112|a&111};
|
|
|
|
|
h.Kc=function(){this.f&=-129;0<this.C.length&&Zb(this.b,this.V,50);return this.S};h.qd=function(){};h.Yc=function(){return this.i};h.Fd=function(a){128==(this.i&192)&&a&64&&Yb(this.b,8,4,52,this.N);this.i=this.i&-70|a&69};h.Xc=function(){return 0};
|
|
|
|
|
h.Ed=function(a){if(a&=255){B(this,"transmitByte("+k(a,2,!0)+")");this.K&&this.K.call(this.I,a);if(this.B)if(13==a)this.H=0;else if(8==a)this.B.value=this.B.value.slice(0,-1),0<this.H&&this.H--;else{var b;b=(b=pa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G),
|
|
|
|
|
this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;Yb(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Lc,W.prototype.rd,"RCSR"],nf[65394]=[null,null,W.prototype.Kc,W.prototype.qd,"RBUF"],nf[65396]=[null,null,W.prototype.Yc,W.prototype.Fd,"XCSR"],nf[65398]=[null,null,W.prototype.Xc,W.prototype.Ed,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new W(d);fb(d,c)}});
|
|
|
|
|
function of(a){r.call(this,"Debugger",a,of);this.ga=a.base||16;this.sa=!1;this.N=this.ra=this.H=0;this.U=!1;this.B=-1;this.i=[];this.ba={}}y(of);var pf={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){};
|
|
|
|
|
function gf(a){if(!ib(a))if(!a.B)G(a);else if(a.f&&a.w){a.i||(a.i=a.f.length);if(a.f.length!=a.i)kb(a,"ROM size ("+k(a.f.length,8,!0)+") does not match specified size ("+k(a.i,8,!0)+")");else{var b;b=a.D;if(Ob(a.w,b,a.i,a.G?1:rc)){var c;for(c=0;c<a.f.length;c++)Tb(a.w,b+c,a.f[c]);b=!0}else b=!1;if(b){b=[];"number"==typeof a.C?b.push(a.C):null!=a.C&&a.C.length&&(b=a.C);for(c=0;c<b.length;c++){var d=a,e=b[c],f=Nb(d.w,d.D,d.i);Mb(d.w,e,d.i,f)}delete a.f}}G(a)}}
|
|
|
|
|
La(function(){for(var a=A(document,"pdp11","rom"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new ef(d);fb(d,c)}});function hf(a){r.call(this,"RAM",a,hf);this.C=a.addr;this.i=a.size;this.f=!1}y(hf);hf.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.j=d;!this.f&&this.i&&Ob(this.w,this.C,this.i,1)&&(this.f=!0);this.f||n("No RAM allocated");G(this)};hf.prototype.ya=function(){return!0};hf.prototype.xa=function(){return!0};hf.prototype.reset=function(){};
|
|
|
|
|
La(function(){for(var a=A(document,"pdp11","ram"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new hf(d);fb(d,c)}});function jf(a){r.call(this,"Keyboard",a,jf,65536);G(this)}y(jf);jf.prototype.pa=function(){return!1};jf.prototype.Ca=function(a,b,c,d){this.C=a;this.b=c;this.j=d};La(function(){for(var a=A(document,"pdp11","keyboard"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new jf(d);fb(d,c)}});
|
|
|
|
|
function W(a){this.B=this.G=null;this.U=a.tabSize;this.M=a.charBOL;this.H=0;r.call(this,"SerialPort",a,W,8388608);var b=a.binding;if("console"==b)this.G="";else{var c;a=kf;b&&(void 0===c&&(c="Panel"),(c=eb(c,this.id))&&(b=c.J[b])&&this.pa(null,a,b))}this.I=this.K=null;this.exports={connect:this.Sb,receiveData:this.Bb}}y(W);var kf="buffer";h=W.prototype;
|
|
|
|
|
h.pa=function(a,b,c){var d=this;switch(b){case kf:return this.J[b]=this.B=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Bb(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Bb(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
|
|
|
|
|
h.Ca=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.j=d;var e=this;this.V=gc(this.b,function(){e.f&128||!e.D.length||(e.S=e.D.shift(),e.f|=128,e.f&64&&hc(e.b,40,4,48))});this.N=function(){e.i|=128;return!!(e.i&64)};Wb(b,this,lf);G(this)};
|
|
|
|
|
h.Sb=function(){if(!this.I){var a=Ec(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=oa(b[0]);if(c!=this.Ta)return;b=oa(b[1]);if(this.I=db(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.K=d.receiveData){this.status(this.vb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ya=function(a,b){if(!b)if(this.Sb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
|
|
|
|
|
h.xa=function(a){return a?this.save():!0};h.reset=function(){mf(this)};h.save=function(){var a=new N(this);a.set(0,[]);return a.data()};h.restore=function(){return mf(this)};function mf(a){a.S=0;a.f=0;a.i=128;a.D=[];return!0}h.Bb=function(a){if("number"==typeof a)this.D.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.D.push(a.charCodeAt(b));else this.D=this.D.concat(a);ic(this.b,this.V,50);return!0};h.Kc=function(){return this.f&65535};h.qd=function(a){this.f=this.f&-112|a&111};
|
|
|
|
|
h.Jc=function(){this.f&=-129;0<this.D.length&&ic(this.b,this.V,50);return this.S};h.pd=function(){};h.Xc=function(){return this.i};h.Ed=function(a){128==(this.i&192)&&a&64&&hc(this.b,8,4,52,this.N);this.i=this.i&-70|a&69};h.Wc=function(){return 0};
|
|
|
|
|
h.Dd=function(a){if(a&=255){B(this,"transmitByte("+k(a,2,!0)+")");this.K&&this.K.call(this.I,a);if(this.B)if(13==a)this.H=0;else if(8==a)this.B.value=this.B.value.slice(0,-1),0<this.H&&this.H--;else{var b;b=(b=pa[a])?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.U||8,c=a-this.H%a,this.U&&(b=na("",c)));this.M&&!this.H&&c&&(b=String.fromCharCode(this.M)+b);this.B.value+=b;this.B.scrollTop=this.B.scrollHeight;this.H+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.g(this.G),
|
|
|
|
|
this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.i&=-129;hc(this.b,100,4,52,this.N)}};var nf={},lf=(nf[65392]=[null,null,W.prototype.Kc,W.prototype.qd,"RCSR"],nf[65394]=[null,null,W.prototype.Jc,W.prototype.pd,"RBUF"],nf[65396]=[null,null,W.prototype.Xc,W.prototype.Ed,"XCSR"],nf[65398]=[null,null,W.prototype.Wc,W.prototype.Dd,"XBUF"],nf);La(function(){for(var a=A(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new W(d);fb(d,c)}});
|
|
|
|
|
function of(a){r.call(this,"Debugger",a,of);this.ha=a.base||16;this.ta=!1;this.N=this.sa=this.H=0;this.U=!1;this.B=-1;this.i=[];this.ca={}}y(of);var pf={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};of.prototype.Ob=function(){return-1};of.prototype.Pb=function(){};
|
|
|
|
|
function qf(a,b,c,d){if(c)if(b){0>a.B&&a.i.length&&(a.B=0);if(0>a.B||b!=a.i[a.B])a.i.splice(0,0,b),a.B=0;a.B--}else a.U?b="end":b=a.i[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(oa(b.substring(c,f))),c=f+1}}return a}
|
|
|
|
|
function rf(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<<e;break;case ">>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f<e?1:0;break;case "<=":d=f<=e?1:0;break;case ">":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break;
|
|
|
|
|
case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0}
|
|
|
|
|
function sf(a,b,c){var d;if(b){b=tf(a,b);for(var e=0,f=!1,g=b,l=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e<p.length;){var q=p[e++],w=q.length,q=oa(q);if(!q){f=!0;break}q=uf(a,q,null,!1===c);if(void 0===q){f=!0;c=!1;break}l.push(q);if(e==p.length)break;var q=p[e++],u=q.length;m.length&&pf[q]<pf[m[m.length-1]]&&rf(l,m,1);m.push(q);b=b.substr(w+u)}rf(l,m)&&1==l.length||(f=!0);f?c&&a.g("error parsing '"+g+"' at character "+(g.length-b.length)):(d=l.pop(),c&&vf(a,null,
|
|
|
|
|
d))}return d}function tf(a,b){for(var c,d=a.sa?"(":"{",e=a.sa?")":"}",f=new RegExp(a.sa?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=sf(a,c[1]);b=b.replace(d+c[1]+e,null!=g?I(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.N-a.ra}if(null==d)break;b=b.replace(c[0],d.toString())}return b}
|
|
|
|
|
function uf(a,b,c,d){var e;null!=b?(e=a.Ob(b),0<=e?e=a.Pb(e):(e=a.ba[b],null==e&&(e=aa(b,a.ga))),null!=e||d||a.g("invalid "+(c?c:"value")+": "+b)):d||a.g("missing "+(c||"value"));return e}
|
|
|
|
|
function vf(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var l=0;l<f;l++){g&&(g=","+g);var m=d&255,p=8,q="";p?32<p&&(p=32):p=32;if(null==m||isNaN(m))for(;0<p--;)q="?"+q;else for(;0<p--;)q=(m&1?"1":"0")+q,m>>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ba[b]);var c=0;for(b in a.ba)vf(a,b,a.ba[b]),c++;return 0<c}
|
|
|
|
|
function I(a,b,c,d){switch(a.ga){case 8:a=ba(b,3*c);break;case 10:a=b.toString();break;default:a=k(b,2*c)}d&&"0"==a.charAt(0)&&(a=a.replace(/^0+([0-9A-F]+)$/i,"$1"));return a}
|
|
|
|
|
function xf(a){of.call(this,a);this.sa=!0;this.K=X(0);this.Na=X(0);this.S=X(0);this.G=[];this.f=this.M=this.C=[];yf(this);this.la=0;zf(this);this.va={};Af(this,a.messages);this.Ea=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Gc(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Gc(b,a)})}y(xf,of);
|
|
|
|
|
d))}return d}function tf(a,b){for(var c,d=a.ta?"(":"{",e=a.ta?")":"}",f=new RegExp(a.ta?"\\((.*?)\\)":"\\{(.*?)\\}");(c=b.match(f))&&!(0<=c[1].indexOf(d));){var g=sf(a,c[1]);b=b.replace(d+c[1]+e,null!=g?J(a,g):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.N-a.sa}if(null==d)break;b=b.replace(c[0],d.toString())}return b}
|
|
|
|
|
function uf(a,b,c,d){var e;null!=b?(e=a.Ob(b),0<=e?e=a.Pb(e):(e=a.ca[b],null==e&&(e=aa(b,a.ha))),null!=e||d||a.g("invalid "+(c?c:"value")+": "+b)):d||a.g("missing "+(c||"value"));return e}
|
|
|
|
|
function vf(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4<f)f=4;for(var l=0;l<f;l++){g&&(g=","+g);var m=d&255,p=8,q="";p?32<p&&(p=32):p=32;if(null==m||isNaN(m))for(;0<p--;)q="?"+q;else for(;0<p--;)q=(m&1?"1":"0")+q,m>>=1;g=q+g;d>>=8}d=k(c,0,!0)+" "+c+". "+ca(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function wf(a,b){if(b)return vf(a,b,a.ca[b]);var c=0;for(b in a.ca)vf(a,b,a.ca[b]),c++;return 0<c}
|
|
|
|
|
function J(a,b,c,d){switch(a.ha){case 8:a=ca(b,3*c);break;case 10:a=b.toString();break;default:a=k(b,2*c)}d&&"0"==a.charAt(0)&&(a=a.replace(/^0+([0-9A-F]+)$/i,"$1"));return a}
|
|
|
|
|
function xf(a){of.call(this,a);this.ta=!0;this.K=X(0);this.Na=X(0);this.S=X(0);this.G=[];this.f=this.M=this.D=[];yf(this);this.la=0;zf(this);this.va={};Af(this,a.messages);this.Ea=a.commands;var b=this;window?void 0===window.pdp11&&(window.pdp11=function(a){return Hc(b,a)}):void 0===global.pdp11&&(global.pdp11=function(a){return Hc(b,a)})}y(xf,of);
|
|
|
|
|
var Bf={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Cf="NONE ADC ADCB ADD ASL ASLB ASR ASRB BCC BCS BEQ BGE BGT BHI BIC BICB BIS BISB BIT BITB BLE BLOS BLT BMI BNE BPL BPT BR BVC BVS CCC CLC CLCN CLCV CLCVN CLCVZ CLCZ CLCZN CLN CLR CLRB CLV CLVN CLVZ CLVZN CLZ CLZN CMP CMPB COM COMB DEC DECB INC INCB HALT JMP JSR MARK MFPD MFPI MFPS MOV MOVB MTPD MTPI MTPS NEG NEGB NOP RESET ROL ROLB ROR RORB RTI RTS SBC SBCB SCC SEC SECN SECV SECVN SECVZ SECZ SECZN SEN SEV SEVN SEVZ SEVZN SEZ SEZN SUB SWAB SXT TST TSTB WAIT MUL DIV ASH ASHC XOR SOB EMT TRAP SPL IOT RTT MFPT".split(" "),
|
|
|
|
|
Df={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032,63],20480:[16,4032,63],24576:[3,4032,63],36864:[63,4032,63],40960:[48,4032,63],45056:[19,4032,63],49152:[15,4032,63],53248:[17,4032,63],57344:[94,4032,63]},65024:{2048:[57,448,63],28672:[100,63,448],29184:[101,63,448],29696:[102,63,448],30208:[103,63,448],30720:[104,448,63],32256:[105,448,8192]},65280:{256:[27,4096],512:[24,4096],768:[10,4096],1024:[11,4096],1280:[22,4096],1536:[12,4096],1792:[20,4096],32768:[25,4096],
|
|
|
|
|
33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106],35072:[107]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74,63],35904:[72,
|
|
|
|
|
63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}};h=xf.prototype;
|
|
|
|
|
h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.F=a;(a=Dc(a,"messages"))&&Af(this,a);this.Va=Df;Ef(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=Y(Ff(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Pb[c],q&&d.g(k(q.id,8)+" %"+k(e<<d.w.Y,8)+" %%"+k(q.A,8)+" "+k(q.ob,4,
|
|
|
|
|
!0)+" "+k(q.size,4,!0)+" "+p),c!=pc&&(c=-1),p=0);a+=d.w.ta;e++}}});G(this)};
|
|
|
|
|
h.ja=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ka=this.J[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Gc(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.B<d.i.length-1&&(b=d.i[++d.B])):40==a.keyCode&&(0<d.B?b=d.i[--d.B]:(b="",d.B=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.J[b]=c,Fa(c,function(){if(d.ka){var a=d.ka.value;
|
|
|
|
|
d.ka.value="";Gc(d,a,!0);return!0}return!1}),!0;case "step":return this.J[b]=c,Fa(c,function(a){var b=!1;hb(d,!0)||(gb(d,!0),b=d.bb(a?1:0),gb(d,!1));return b}),!0}return!1};h.nb=function(){this.ka&&this.ka.focus()};function Y(a){a=a&&a.A;null==a&&(a=-1);return a}h.Qa=function(a,b){var c=255,d=Y(a);-1!==d&&(c=this.w,c.w++,d=c.W[(d&c.i)>>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ia=function(a,b){var c=65535,d=Y(a);-1!==d&&(c=Qb(this.w,d),b&&Gf(a,b));return c};
|
|
|
|
|
h.mb=function(a,b,c){var d=Y(a);-1!==d&&(Rb(this.w,d,b),c&&Gf(a,c),M(this.b,!0))};h.Sa=function(a,b,c){var d=Y(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);M(this.b,!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}}
|
|
|
|
|
function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;c<a.G.length;c++){var f=a.G[c].za[d];if(void 0!==f){d=f.o;void 0!==d&&(e=X(d));break}}if(d=e)return d;c=sf(a,b,void 0)}null!=c&&(d=X(c));return d}function Jf(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.gc=qf(a,b.bc=c[2]))}function Gf(a,b){null!=a.A&&(a.A+=b||1)}
|
|
|
|
|
function Af(a,b){a.j=a;a.ha=a.ic=536870912;a.ma=null;a.pa=[];b=qf(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in mb){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ha|=mb[c],a.g(c+" messages enabled"))}}function Ef(a,b){for(var c in mb)if(64==mb[c]){a.va[c]=b;break}}
|
|
|
|
|
h.Ob=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b)&&(b=-1)}return b};function Kf(a){return 6>a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.qa[a-16]:20==a&&(b=jc(this.b)));return b};
|
|
|
|
|
h.message=function(a,b){b&&(a+=" @"+I(this,X(this.b.u[7]).A));this.ha&1073741824?this.pa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ha&-2147483648&&(this.ea(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,M(a)))};
|
|
|
|
|
function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b<a.I.length;b++)a.I[b]=X();a.da=0;a.g("instruction history buffer allocated")}if(!a.ca||!a.ca.length)for(a.ca=Array(256),b=0;b<a.ca.length;b++)a.ca[b]=[b,0]}else a.I&&a.I.length&&a.g("instruction history buffer freed"),a.da=0,a.I=[],a.ca=[]}h.ab=function(a){if(!Lf(this))return!1;this.b.ab(a);return!0};
|
|
|
|
|
h.bb=function(a,b,c){if(!Lf(this))return!1;this.H=0;a||Hd(this)&&Id(this,this.b.u[7],0);try{a=Nc(this.b,a);var d=this.b.bb(a);0<d&&(Oc(this.b,a),this.H+=d,Lc(this.b,d,!0),Hc(this.b,d),this.N++)}catch(e){"number"!=typeof e&&(this.H=0,kb(this.b,e.stack||e.message))}!1!==c&&M(this.b);this.ua(b||!1);return 0<this.H};h.ea=function(a){this.b&&this.b.ea(a)};h.ua=function(a){void 0===a&&(a=!0);this.K=X(this.b.u[7]);a&&1!=this.V?Mf(this):Nf(this)};
|
|
|
|
|
function Lf(a){var b;if(b=a.b&&ib(a.b))b=a.b,b.v.fa?b=!0:(b.g(b.toString()+" not powered"),b=!1);return b&&!a.b.v.aa?!jb(a.b):!1}h.ya=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};h.xa=function(a,b){b&&this.g(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){zf(this);this.N=this.ra=0;this.ma=null;this.H=0;this.K=X(this.b.u[7]);this.v.aa=!1;Of(this);a||this.ua()};
|
|
|
|
|
h.save=function(){var a=new N(this);a.set(0,Hf(this.K));a.set(1,Hf(this.S));a.set(2,[this.i,this.U,this.ha]);a.set(3,this.G);return a.data()};h.restore=function(a){var b=0;void 0!==a[2]&&(this.K=If(a[b++]),this.S=If(a[b++]),this.i=a[b][0],"string"==typeof this.i&&(this.i=[this.i]),this.U=a[b][1],this.ha|=a[b][2]);a[3]&&(this.G=a[3]);return!0};h.start=function(a,b){this.V||this.g("running");this.v.aa=!0;this.hb=a;this.ib=b};
|
|
|
|
|
h.stop=function(a,b){if(this.v.aa){this.v.aa=!1;this.H=b-this.ib;if(!this.V){b="stopped";if(this.H){a-=this.hb;var c=0<a?Math.round(1E3*this.H/a):0;b+=" (";Hd(this)&&(b+=this.N+" opcodes, ",this.ra-=this.N,this.N=0);b+=this.H+" cycles, "+a+" ms, "+c+" hz)"}else E(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.g(b)}this.ua(!0);this.nb();Of(this,this.b.u[7])}};function Hd(a){return 1<a.f.length||!!a.la}
|
|
|
|
|
function Id(a,b,c){var d=a.b;if(0<c&&(a.la&&!--a.la||yc(a,b,1,a.f)))return!0;0<=c&&a.ca.length&&(a.N++,null!=Qb(a.w,b)&&(b=a.I[a.da],b.A=d.u[7],b.wa=!1,++a.da==a.I.length&&(a.da=0)));return!1}function yf(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b<a.M.length;b++){c=a.M[b];var d=a.w;zc(d.W[Y(c)>>>d.Y],!1)}a.M=["br"];if(a.C)for(b=1;b<a.C.length;b++)c=a.C[b],d=a.w,zc(d.W[Y(c)>>>d.Y],!0);a.C=["bw"];a.Ma=0}
|
|
|
|
|
h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Y(b);if(-1===e)this.g("invalid address: "+I(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.C)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Y(c);for(var g=1;g<b.length;g++){var l=b[g];if(c==Y(l)&&(!d||l.wa)){f=!0;l.wa||e||Qf(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.w,zc(d.W[c>>>d.Y],b==a.C));l.wa||zf(a);break}}return f}
|
|
|
|
|
function Rf(a,b){for(var c=1;c<b.length;c++)Qf(a,b,c);return b.length-1}function Qf(a,b,c,d){c=b[c];a.g(b[0]+" "+I(a,c.A)+(d?" "+d:c.bc?' "'+c.bc+'"':""))}function Of(a,b){if(void 0!==b)yc(a,b,1,a.f,!0),a.V=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.wa){if(!Pf(a,a.f,c,!0))break;b=0}}}
|
|
|
|
|
function yc(a,b,c,d,e){var f=!1;if(!a.Ma++)for(var g=1;!f&&g<d.length;g++){var l=d[g];if(!e||l.wa)for(var m=Y(l),p=0;p<c;p++)if(b+p==m){var q,f=!0;l.wa&&(Pf(a,d,l,!0),e=!0);if(q=l.gc){for(var f=!1,w=0;w<q.length;w++)if(!Sf(a,q[w],!0)){if(q[w].indexOf("if")){f=!0;break}for(var u=w+1;u<q.length&&q[u].indexOf("else");u++)w++;if(u==q.length){f=!0;break}}a.b.v.aa||(f=!0)}if(f){e||Qf(a,d,g,"hit");break}}}a.Ma--;return f}
|
|
|
|
|
function Tf(a,b,c,d){var e=X(b.A),f=a.ia(b,2),g,l;for(l in a.Va)if(g=a.Va[l][f&l])break;g||(g=[0]);for(var m=l="",p=Cf[g[0]],q=g.length-1,w=1;w<=q;w++){var u=g[w];if(void 0!==u){var v;v=a;var C=u,u=b,x="",D=C&61440;if(4096==D)u=u.A+((f&255)<<24>>23)&65535,x=I(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=I(v,u);else if(12288==D)x=I(v,f&7,1);else if(24576==D)x=I(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+
|
|
|
|
|
")+":(D=v.ia(u,2),x="#"+I(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ia(u,2),x="@#"+I(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ia(u,2);x=I(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,I(v,D+u.A&65535)]);break;case 56:D=v.ia(u,2),x="@"+I(v,D)+"("+Kf(C)+")",7==C&&(x=[x,I(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0<l.length&&(l+=",");l+=v||"???"}}f="";g=I(a,e.A)+":";if(-1!==e.A&&-1!==b.A){do if(f+=" "+
|
|
|
|
|
I(a,a.ia(e,2)),null==e.A)break;while(e.A!=b.A)}g+=na(f,24);g+=na(p,5);l&&(g+=" "+l);if(c||m)g=na(g,60)+";"+(c||""),g=a.b.v.Wa?g+("cycles="+Ic(a.b).toString()+" cs="+k(a.b.jb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Uf(a,b){switch(b){case "N":a=a.b.Ba();break;case "Z":a=md(a.b);break;case "V":a=ld(a.b);break;case "C":a=kd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
|
|
|
|
function Vf(a,b){var c="",d=a.b;8>b?(c=Kf(b),c+="="+I(a,d.u[b])):13>b?c="A"+(b-8)+"="+I(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+I(a,d.qa[b-16]):20==b&&(c="PS="+I(a,jc(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
|
|
|
|
function Xf(a,b,c){var d=[],e=Y(b)>>>0;for(b=0;b<a.G.length;b++){var f=a.G[b],g=f.A>>>0,l=f.oc;if(e>=g&&e<g+l){e=qa(f.Ib,[e-g],a.Jb);0<=e?Yf(a,b,e,d):c&&(e=~e,Yf(a,b,e-1,d),Yf(a,b,e,d));break}}return d}function Yf(a,b,c,d){var e={},f=a.G[b].Ib,g=0,l=null;0<=c&&c<f.length&&(g=f[c][0],l=f[c][1]);l&&(e=a.G[b].za[l],l="."==l.charAt(0)?null:e.l||l);d.push(l);d.push(g);d.push(e.a);d.push(e.c)}
|
|
|
|
|
function Zf(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return wf(a)||a.g("no variables"),!0;if(!c[2])return wf(a,c[1]);if(!c[3])return delete a.ba[c[1]],!0;b=sf(a,c[3]);return void 0!==b?(a.ba[c[1]]=b,!0):!1}a.g("invalid assignment:"+b);return!1}
|
|
|
|
|
function $f(a,b,c){var d=null;if(b=Ff(a,b,!0)){var e=Xf(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.A-e[1])&&(g=" + "+k(f,4,!0)),f=e[0]+" ("+I(a,e[1])+")"+g,c&&a.g(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.A)&&(g=" - "+k(f,4,!0)),f=e[4]+" ("+I(a,e[5])+")"+g,c&&a.g(f),d||(d=f))}else c&&a.g("no symbols")}return d}
|
|
|
|
|
h.Ca=function(a,b,c,d){this.w=b;this.b=c;this.C=a;(a=Ec(a,"messages"))&&Af(this,a);this.Va=Df;Ef(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=Z(Ff(d,c));if(-1===a){d.g("invalid address: "+c);break a}e=a>>>d.w.Y;m=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.g("..."):(c=q.type,p=Rb[c],q&&d.g(k(q.id,8)+" %"+k(e<<d.w.Y,8)+" %%"+k(q.A,8)+" "+k(q.ob,4,
|
|
|
|
|
!0)+" "+k(q.size,4,!0)+" "+p),c!=qc&&(c=-1),p=0);a+=d.w.ua;e++}}});G(this)};
|
|
|
|
|
h.pa=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ka=this.J[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Hc(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.B<d.i.length-1&&(b=d.i[++d.B])):40==a.keyCode&&(0<d.B?b=d.i[--d.B]:(b="",d.B=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.J[b]=c,Fa(c,function(){if(d.ka){var a=d.ka.value;
|
|
|
|
|
d.ka.value="";Hc(d,a,!0);return!0}return!1}),!0;case "step":return this.J[b]=c,Fa(c,function(a){var b=!1;hb(d,!0)||(gb(d,!0),b=d.bb(a?1:0),gb(d,!1));return b}),!0}return!1};h.nb=function(){this.ka&&this.ka.focus()};function Z(a){a=a&&a.A;null==a&&(a=-1);return a}h.Qa=function(a,b){var c=255,d=Z(a);-1!==d&&(c=this.w,c.w++,d=c.W[(d&c.i)>>>c.Y].zb(d&c.f,d),c.w--,c=d,b&&Gf(a,b));return c};h.ja=function(a,b){var c=65535,d=Z(a);-1!==d&&(c=Sb(this.w,d),b&&Gf(a,b));return c};
|
|
|
|
|
h.mb=function(a,b,c){var d=Z(a);-1!==d&&(Tb(this.w,d,b),c&&Gf(a,c),this.C.aa(!0))};h.Sa=function(a,b,c){var d=Z(a);if(-1!==d){var e=this.w,f=d&e.f,g=(d&e.i)>>>e.Y;e.w++;e.W[g].Hb(f,b&65535,d);e.w--;c&&Gf(a,c);this.C.aa(!0)}};function X(a){return{A:a,wa:!1}}function Hf(a){return[a.A,a.wa]}function If(a){return{A:a[0],wa:a[1]}}
|
|
|
|
|
function Ff(a,b,c){var d;c=(c?a.K:a.Na).A;if(void 0!==b){d=b=tf(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;c<a.G.length;c++){var f=a.G[c].za[d];if(void 0!==f){d=f.o;void 0!==d&&(e=X(d));break}}if(d=e)return d;c=sf(a,b,void 0)}null!=c&&(d=X(c));return d}function Jf(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.fc=qf(a,b.ac=c[2]))}function Gf(a,b){null!=a.A&&(a.A+=b||1)}
|
|
|
|
|
function Af(a,b){a.j=a;a.ia=a.hc=536870912;a.ma=null;a.qa=[];b=qf(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in H){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d<e;d++)if(d in b&&b[d]===c)break a;d=-1}0<=d&&(a.ia|=H[c],a.g(c+" messages enabled"))}}function Ef(a,b){for(var c in H)if(64==H[c]){a.va[c]=b;break}}
|
|
|
|
|
h.Ob=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b)&&(b=-1)}return b};function Kf(a){return 6>a?"R"+a:6==a?"SP":"PC"}h.Pb=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Da[a-8]:20>a?b=this.b.ra[a-16]:20==a&&(b=Db(this.b)));return b};
|
|
|
|
|
h.message=function(a,b){b&&(a+=" @"+J(this,X(this.b.u[7]).A));this.ia&1073741824?this.qa.push(a):this.ma&&a==this.ma||(this.ma=a,this.ia&-2147483648&&(this.fa(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,a.N-=a.b,a.b=0,a.la=0,a.C.aa()))};
|
|
|
|
|
function zf(a){var b;if(Hd(a)){if(!a.I||!a.I.length){a.I=Array(1E3);for(b=0;b<a.I.length;b++)a.I[b]=X();a.ea=0;a.g("instruction history buffer allocated")}if(!a.da||!a.da.length)for(a.da=Array(256),b=0;b<a.da.length;b++)a.da[b]=[b,0]}else a.I&&a.I.length&&a.g("instruction history buffer freed"),a.ea=0,a.I=[],a.da=[]}h.ab=function(a){if(!Lf(this))return!1;this.b.ab(a);return!0};
|
|
|
|
|
h.bb=function(a,b,c){if(!Lf(this))return!1;this.H=0;a||Hd(this)&&Id(this,this.b.u[7],0);try{a=Nc(this.b,a);var d=this.b.bb(a);0<d&&(gd(this.b,a),this.H+=d,Lc(this.b,d,!0),Ic(this.b,d),this.N++)}catch(e){"number"!=typeof e&&(this.H=0,kb(this.b,e.stack||e.message))}!1!==c&&this.C.aa();this.aa(b||!1);return 0<this.H};h.fa=function(a){this.b&&this.b.fa(a)};h.aa=function(a){void 0===a&&(a=!0);this.K=X(this.b.u[7]);a&&1!=this.V?Mf(this):Nf(this)};
|
|
|
|
|
function Lf(a){var b;if(b=a.b&&ib(a.b))b=a.b,b.v.ga?b=!0:(b.g(b.toString()+" not powered"),b=!1);return b&&!a.b.v.ba?!jb(a.b):!1}h.ya=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};h.xa=function(a,b){b&&this.g(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){zf(this);this.N=this.sa=0;this.ma=null;this.H=0;this.K=X(this.b.u[7]);this.v.ba=!1;Of(this);a||this.aa()};
|
|
|
|
|
h.save=function(){var a=new N(this);a.set(0,Hf(this.K));a.set(1,Hf(this.S));a.set(2,[this.i,this.U,this.ia]);a.set(3,this.G);return a.data()};h.restore=function(a){var b=0;void 0!==a[2]&&(this.K=If(a[b++]),this.S=If(a[b++]),this.i=a[b][0],"string"==typeof this.i&&(this.i=[this.i]),this.U=a[b][1],this.ia|=a[b][2]);a[3]&&(this.G=a[3]);return!0};h.start=function(a,b){this.V||this.g("running");this.v.ba=!0;this.hb=a;this.ib=b};
|
|
|
|
|
h.stop=function(a,b){if(this.v.ba){this.v.ba=!1;this.H=b-this.ib;if(!this.V){b="stopped";if(this.H){a-=this.hb;var c=0<a?Math.round(1E3*this.H/a):0;b+=" (";Hd(this)&&(b+=this.N+" opcodes, ",this.sa-=this.N,this.N=0);b+=this.H+" cycles, "+a+" ms, "+c+" hz)"}else E(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.g(b)}this.aa(!0);this.nb();Of(this,this.b.u[7])}};function Hd(a){return 1<a.f.length||!!a.la}
|
|
|
|
|
function Id(a,b,c){var d=a.b;if(0<c&&(a.la&&!--a.la||zc(a,b,1,a.f)))return!0;0<=c&&a.da.length&&(a.N++,null!=Sb(a.w,b)&&(b=a.I[a.ea],b.A=d.u[7],b.wa=!1,++a.ea==a.I.length&&(a.ea=0)));return!1}function yf(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b<a.M.length;b++){c=a.M[b];var d=a.w;Ac(d.W[Z(c)>>>d.Y],!1)}a.M=["br"];if(a.D)for(b=1;b<a.D.length;b++)c=a.D[b],d=a.w,Ac(d.W[Z(c)>>>d.Y],!0);a.D=["bw"];a.Ma=0}
|
|
|
|
|
h.Oa=function(a,b,c){var d=!0;c||Pf(this,a,b,!1,!0);if(a!=this.f){var e=Z(b);if(-1===e)this.g("invalid address: "+J(this,b.A)),d=!1;else{var f=this.w;f.W[e>>>f.Y].Oa(e&f.f,a==this.D)}}d&&(a.push(b),c?b.wa=!0:(Qf(this,a,a.length-1,"set"),zf(this)));return d};function Pf(a,b,c,d,e){var f=!1;c=Z(c);for(var g=1;g<b.length;g++){var l=b[g];if(c==Z(l)&&(!d||l.wa)){f=!0;l.wa||e||Qf(a,b,g,"cleared");b.splice(g,1);b!=a.f&&(d=a.w,Ac(d.W[c>>>d.Y],b==a.D));l.wa||zf(a);break}}return f}
|
|
|
|
|
function Rf(a,b){for(var c=1;c<b.length;c++)Qf(a,b,c);return b.length-1}function Qf(a,b,c,d){c=b[c];a.g(b[0]+" "+J(a,c.A)+(d?" "+d:c.ac?' "'+c.ac+'"':""))}function Of(a,b){if(void 0!==b)zc(a,b,1,a.f,!0),a.V=0;else for(b=1;b<a.f.length;b++){var c=a.f[b];if(c.wa){if(!Pf(a,a.f,c,!0))break;b=0}}}
|
|
|
|
|
function zc(a,b,c,d,e){var f=!1;if(!a.Ma++)for(var g=1;!f&&g<d.length;g++){var l=d[g];if(!e||l.wa)for(var m=Z(l),p=0;p<c;p++)if(b+p==m){var q,f=!0;l.wa&&(Pf(a,d,l,!0),e=!0);if(q=l.fc){for(var f=!1,w=0;w<q.length;w++)if(!Sf(a,q[w],!0)){if(q[w].indexOf("if")){f=!0;break}for(var u=w+1;u<q.length&&q[u].indexOf("else");u++)w++;if(u==q.length){f=!0;break}}a.b.v.ba||(f=!0)}if(f){e||Qf(a,d,g,"hit");break}}}a.Ma--;return f}
|
|
|
|
|
function Tf(a,b,c,d){var e=X(b.A),f=a.ja(b,2),g,l;for(l in a.Va)if(g=a.Va[l][f&l])break;g||(g=[0]);for(var m=l="",p=Cf[g[0]],q=g.length-1,w=1;w<=q;w++){var u=g[w];if(void 0!==u){var v;v=a;var C=u,u=b,x="",D=C&61440;if(4096==D)u=u.A+((f&255)<<24>>23)&65535,x=J(v,u);else if(8192==D)u=u.A-((f&63)<<1)&65535,x=J(v,u);else if(12288==D)x=J(v,f&7,1);else if(24576==D)x=J(v,f&63,1);else if(D=f&C,C&4032&&(D>>=6,C>>=6),C&63)switch(C=D&7,D&56){case 0:x=Kf(C);break;case 8:x="@"+Kf(C);break;case 16:7>C?x="("+Kf(C)+
|
|
|
|
|
")+":(D=v.ja(u,2),x="#"+J(v,D,0,!0));break;case 24:7>C?x="@("+Kf(C)+")+":(D=v.ja(u,2),x="@#"+J(v,D,0,!0));break;case 32:x="-("+Kf(C)+")";break;case 40:x="@-("+Kf(C)+")";break;case 48:D=v.ja(u,2);x=J(v,D,0,!0)+"("+Kf(C)+")";7==C&&(x=[x,J(v,D+u.A&65535)]);break;case 56:D=v.ja(u,2),x="@"+J(v,D)+"("+Kf(C)+")",7==C&&(x=[x,J(v,D+u.A&65535)])}v=x;if(!v||!v.length){l="INVALID";break}"string"!=typeof v&&(m=v[1],v=v[0]);0<l.length&&(l+=",");l+=v||"???"}}f="";g=J(a,e.A)+":";if(-1!==e.A&&-1!==b.A){do if(f+=" "+
|
|
|
|
|
J(a,a.ja(e,2)),null==e.A)break;while(e.A!=b.A)}g+=na(f,24);g+=na(p,5);l&&(g+=" "+l);if(c||m)g=na(g,60)+";"+(c||""),g=a.b.v.Wa?g+("cycles="+Jc(a.b).toString()+" cs="+k(a.b.jb)):g+(null!=d?"="+d.toString():""),m&&(g+=" @"+m);return g}function Uf(a,b){switch(b){case "N":a=a.b.Ba();break;case "Z":a=md(a.b);break;case "V":a=ld(a.b);break;case "C":a=kd(a.b);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "}
|
|
|
|
|
function Vf(a,b){var c="",d=a.b;8>b?(c=Kf(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Da[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.ra[b-16]):20==b&&(c="PS="+J(a,Db(d)));c&&(c+=" ");return c}function Wf(a){var b,c="";for(b=0;6>b;b++)c+=Vf(a,b);c=c+"\n"+(Vf(a,6)+Vf(a,7)+Vf(a,20));return c+=Uf(a,"T")+Uf(a,"N")+Uf(a,"Z")+Uf(a,"V")+Uf(a,"C")}h.Jb=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
|
|
|
|
|
function Xf(a,b,c){var d=[],e=Z(b)>>>0;for(b=0;b<a.G.length;b++){var f=a.G[b],g=f.A>>>0,l=f.oc;if(e>=g&&e<g+l){e=qa(f.Ib,[e-g],a.Jb);0<=e?Yf(a,b,e,d):c&&(e=~e,Yf(a,b,e-1,d),Yf(a,b,e,d));break}}return d}function Yf(a,b,c,d){var e={},f=a.G[b].Ib,g=0,l=null;0<=c&&c<f.length&&(g=f[c][0],l=f[c][1]);l&&(e=a.G[b].za[l],l="."==l.charAt(0)?null:e.l||l);d.push(l);d.push(g);d.push(e.a);d.push(e.c)}
|
|
|
|
|
function Zf(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return wf(a)||a.g("no variables"),!0;if(!c[2])return wf(a,c[1]);if(!c[3])return delete a.ca[c[1]],!0;b=sf(a,c[3]);return void 0!==b?(a.ca[c[1]]=b,!0):!1}a.g("invalid assignment:"+b);return!1}
|
|
|
|
|
function $f(a,b,c){var d=null;if(b=Ff(a,b,!0)){var e=Xf(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.A-e[1])&&(g=" + "+k(f,4,!0)),f=e[0]+" ("+J(a,e[1])+")"+g,c&&a.g(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.A)&&(g=" - "+k(f,4,!0)),f=e[4]+" ("+J(a,e[5])+")"+g,c&&a.g(f),d||(d=f))}else c&&a.g("no symbols")}return d}
|
|
|
|
|
function Mf(a,b){var c;if(b&&"?"==b[1])a.g("register commands:"),a.g("\tr\tdump registers"),a.g("\trx [#]\tset flag or register x to [#]");else{var d=a.b;null==c&&(c=!0);if(b&&1<b.length){var e=b[1],f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.g("missing value for "+b[1]);return}f=sf(a,b);if(void 0===f)return;b=e.toUpperCase();switch(b){case "SP":case "R6":d.u[6]=f&65535;break;case "PC":case "R7":od(d,f);a.K=X(d.u[7]);break;case "N":d.T=f?32768:0;break;
|
|
|
|
|
case "Z":d.X=f?0:1;break;case "V":d.P=f?32768:0;break;case "C":d.O=f?65536:0;break;default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}M(d);a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,I(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.g(c[2]):vf(a,null,c[2].charCodeAt(0)):sf(a,b,!0)}
|
|
|
|
|
function bg(a,b,c){var d="t"!=b;c=uf(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ea(c,function(){return gb(a,!0)&&a.bb(e,d,!1)},function(){M(a.b);gb(a,!1)})}
|
|
|
|
|
case "Z":d.X=f?0:1;break;case "V":d.P=f?32768:0;break;case "C":d.O=f?65536:0;break;default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){d.u[b]=f&65535;break}a.g("unknown register: "+e);return}a.C.aa();a.g("updated registers:")}a.g(Wf(a));c&&(a.K=X(d.u[7]),Nf(a,J(a,a.K.A)))}}function ag(a,b){b=oa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1<c[2].length?a.g(c[2]):vf(a,null,c[2].charCodeAt(0)):sf(a,b,!0)}
|
|
|
|
|
function bg(a,b,c){var d="t"!=b;c=uf(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ea(c,function(){return gb(a,!0)&&a.bb(e,d,!1)},function(){a.C.aa();gb(a,!1)})}
|
|
|
|
|
function Nf(a,b,c,d){if(b=Ff(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Ff(a,c,!0);if(!d||d.A<b.A)return;e=d.A-b.A;if(256<e){a.g("range too large");return}d=-1}c=0;for(var f;0<e&&d--;){f=hb(a,!1)||a.V?a.H:null;var g=null!=f?"cycles":null,l=Xf(a,b),m=b.A;if(l[0]&&d&&(!c&&d||0>l[0].indexOf("+"))){var p=l[0]+":";l[2]&&(p+=" "+l[2]);a.g(p)}l[3]&&(g=l[3],f=null);f=Tf(a,b,g,f);a.g(f);a.K=b;e-=b.A-m;c++}}}
|
|
|
|
|
function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+I(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0<b.length){a.U&&(b="a "+I(a,a.S.A)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var l=g[0],m=l.charAt(0),p=1;p<l.length;p++){var q=l.charAt(p);if("?"==m||"r"==m||"a">q||"z"<q){g[0]=l.substr(p);g.unshift(l.substr(0,p));break}}g[0]=g[0].toLowerCase();switch(g[0].charAt(0)){case "a":var w=
|
|
|
|
|
Ff(a,g[1],!0);if(w)if(a.S=w,void 0===g[2])a.g("begin assemble at "+I(a,w.A)),a.U=!0,M(a.b);else{var u;a.g("not supported yet");u=[];if(u.length){for(var v=0;v<u.length;v++)a.mb(w,u[v],1);a.g(Tf(a,a.S))}}break;case "b":a:{var C=g[0],x=g[1],D=b;if("?"==x)a.g("breakpoint commands:"),a.g("\tbp [a]\tset exec breakpoint at addr [a]"),a.g("\tbr [a]\tset read breakpoint at addr [a]"),a.g("\tbw [a]\tset write breakpoint at addr [a]"),a.g("\tbc [a]\tclear breakpoint at addr [a]"),a.g("\tbl\tlist all breakpoints"),
|
|
|
|
|
a.g("\tbn [n]\tbreak after [n] instruction(s)");else{var za=C.charAt(1);if("l"==za){var Pc;Pc=0+Rf(a,a.f);Pc+=Rf(a,a.M);(Pc+=Rf(a,a.C))||a.g("no breakpoints")}else if("n"==za)a.la=uf(a,x),a.g("break after "+a.la+" instruction(s)");else if(void 0===x)a.g("missing breakpoint address");else{var U=X();if("*"!=x&&(U=Ff(a,x,!0),!U))break a;"c"==za?null==U.A?(yf(a),a.g("all breakpoints cleared")):Pf(a,a.f,U)||Pf(a,a.M,U)||Pf(a,a.C,U)||a.g("breakpoint missing: "+I(a,U.A)):null!=U.A&&(Jf(a,U,D),"p"==za?a.Oa(a.f,
|
|
|
|
|
U):"r"==za?a.Oa(a.M,U):"w"==za?a.Oa(a.C,U):a.g("unknown breakpoint command: "+za))}}}break;case "c":a.Pa&&(a.Pa.value="");break;case "d":a:{var Pa,Qa=g[0],ia=g[1],Aa=g[2],ug=g[3];if("?"==ia){var Ra="";for(Pa in mb)a.va[Pa]&&(Ra&&(Ra+=","),Ra+=Pa);Ra+=",state,symbols";a.g("dump memory commands:");a.g("\tdb [a] [#] dump # bytes at address a");a.g("\tdw [a] [#] dump # words at address a");a.g("\tdd [a] [#] dump # dwords at address a");a.g("\tdh [#] [#] dump # instructions from history");
|
|
|
|
|
Ra.length&&a.g("dump extension commands:\n\t"+Ra)}else if("state"==ia){var ye=cg(a.F,!0);"console"==Aa?console.log(ye):(a.Pa&&(a.Pa.value=""),a.g(ye))}else if("symbols"==ia)for(var Qc=0;Qc<a.G.length;Qc++){var Rc=a.G[Qc],Sa;for(Sa in Rc.za)if("."!=Sa.charAt(0)){var ze=Rc.za[Sa].o;if(void 0!==ze){var Ae=Rc.za[Sa].l;Ae&&(Sa=Ae);a.g(I(a,ze)+" "+Sa)}}}else{if("d"==Qa){for(Pa in mb)if(g[1]==Pa){var Be=a.va[Pa];Be?(g.shift(),g.shift(),Be(g)):a.g("no dump registered for "+ia);break a}ia||(Qa=a.pb||"db")}else a.pb=
|
|
|
|
|
Qa;if("dh"==Qa){var Ce=ia,De=Aa,Ee="",Fe=0,ca=a.da,ja=a.I;if(ja.length){var Z=+Ce||a.Ua,nb=+De||10;isNaN(Z)?Z=nb:Ee="more ";Z>ja.length&&(a.g("note: only "+ja.length+" available"),Z=ja.length);ca-=Z;0>ca&&(null==ja[ja.length-1].A?(Z=ca+Z,ca=0):ca+=ja.length);var Sc=[];"call"==De&&(nb=1E5,Sc=["CALL"]);for(void 0!==Ce&&a.g(Z+" instructions earlier:");0<nb&&ca!=a.da;){var Ge=ja[ca++];if(null==Ge.A)break;var ob=X(Ge.A),vg=Z--,He=Tf(a,ob,"history",vg);(!Sc.length||0<=He.indexOf(Sc[0]))&&a.g(He);ob.xb&&
|
|
|
|
|
(ca+=ob.xb,nb-=ob.xb,Z-=ob.xb);ca>=ja.length&&(ca=0);a.Ua=Z;Fe++;nb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var pb=Ff(a,ia);if(pb){var $b=0;Aa&&("l"==Aa.charAt(0)&&(Aa=Aa.substr(1)||ug),$b=uf(a,Aa)>>>0,65536<$b&&($b=65536));for(var qb="",Ta="dd"==Qa?4:"dw"==Qa?2:1,ac=Ta*$b||128,wg=ac+15>>4||1;wg--&&0<ac;){var bc=0,rb=0,sb,Tc="",Ie="",ia=I(a,pb.A);for(sb=4==Ta?16:a.ga;0<sb&&0<ac;sb--){var Uc,cc=2==Ta?a.ia(pb,Uc=2):a.Qa(pb,Uc=1),bc=bc|cc<<(rb<<3),rb=rb+Uc;rb==Ta&&(Tc+=I(a,bc,Ta),
|
|
|
|
|
Tc+=1==Ta?9==sb?"-":" ":" ",bc=rb=0);Ie+=32<=cc&&128>cc?String.fromCharCode(cc):".";ac--}qb&&(qb+="\n");qb+=ia+" "+Tc+(0==sb?" "+Ie:"")}qb&&a.g(qb);a.Na=pb}}}}break;case "e":if("else"==g[0])break;var Ua,Vc,Wc,Xc,Yc=g[0],Zc=g[1];"eb"==Yc?(Ua=1,Vc=255,Wc=a.Qa,Xc=a.mb):"e"==Yc||"ew"==Yc?(Ua=2,Vc=65535,Wc=a.ia,Xc=a.Sa):Zc=null;if(null==Zc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var dc=Ff(a,Zc);if(dc)for(var ec=2;ec<
|
|
|
|
|
g.length;ec++){var tb=sf(a,g[ec]);if(void 0===tb){a.g("unrecognized value: "+g[ec]);break}tb&~Vc&&a.g("warning: "+k(tb)+" exceeds "+Ua+"-byte value");var xg=Wc.call(a,dc);a.g("changing "+I(a,dc.A)+" from "+I(a,xg,Ua)+" to "+I(a,tb,Ua));Xc.call(a,dc,tb,Ua)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var $c=Ff(a,Je,!0);if(!$c)break a;Jf(a,$c,yg);a.Oa(a.f,$c,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.aa?(c||a.g("halting"),a.ea()):hb(a,!0)||c||a.g("already halted");
|
|
|
|
|
break;case "i":if("if"==g[0]){var ad;var ub=b.substr(2),ub=oa(ub);sf(a,ub)?(c||a.g("true: "+ub),ad=!0):(c||a.g("false: "+ub),ad=!1);ad||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var bd=0,cd=X(),vb=X(a.b.u[6]);for(a.g("stack trace for "+I(a,vb.A));10>bd;){for(var Ba=null,Ag=256;65536>vb.A>>>0;){cd.A=a.ia(vb,2);if(null==vb.A||!Ag--)break;if(!(cd.A&1)){for(var Bg=a,fc=cd,Ke=null,wb=
|
|
|
|
|
fc.A,Le=wb,dd=1;6>=dd&&wb;dd++){if(2<dd){fc.A=wb;var gc=Tf(Bg,fc);if(0<=gc.indexOf("JSR")){var Me=gc.indexOf(" ");if(wb+(gc.indexOf(" ",Me+1)-Me-1)/2==Le){Ke=gc;break}}}wb-=2}fc.A=Le;if(Ba=Ke)break}}if(!Ba||null==Ba)break;var Ne=null;if("ks"==zg){var Oe=Ba.match(/[0-9A-F]+$/);Oe&&(Ne=$f(a,Oe[0]))}Ba=na(Ba,50)+" ;"+(Ne||"stack="+I(a,vb.A));a.g(Ba);bd++}bd||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ka,la=null,F=g[1];"?"==F&&(F=void 0);
|
|
|
|
|
if(void 0!==F){var ta=0;if("all"==F)ta=1878917119,F=null;else if("on"==F)la=!0,F=null;else if("off"==F)la=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ka in mb)if(F==ka){ta=mb[ka];la=!!(a.ha&ta);break}if(!ta){a.g("unknown message category: "+F);break a}}if(ta)if("on"==g[2])a.ha|=ta,la=!0;else if("off"==g[2]&&(a.ha&=~ta,la=!1,1073741824==ta)){for(var ed=0;ed<a.pa.length;ed++)a.g(a.pa[ed]);a.pa=[]}}var Cg=0,xb="";for(ka in mb)if(!F||F==ka){var Dg=!!(a.ha&mb[ka]);if(null===la||la==
|
|
|
|
|
Dg)xb&&(xb+=","),++Cg%10||(xb+="\n\t"),"key"==ka&&(ka="keys"),xb+=ka}void 0===F&&a.g("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.g((null!==la?la?"messages on: ":"messages off: ":"message categories:\n\t")+(xb||"none"));zf(a)}break;case "p":if("print"==g[0]){ag(a,b.substr(5));break}var Eg="pr"==g[0]?1:0;if(a.V)a.g("step in progress");else{var Pe=X(a.b.u[7]);a.Qa(Pe);a.V?(a.Oa(a.f,Pe,!0),a.ab()||(a.F&&a.F.nb(),a.V=0)):bg(a,Eg?"tr":"t")}break;case "r":if("reset"==b){a.F&&
|
|
|
|
|
a.F.reset();break}Mf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var yb=+g[2];if(8==yb||10==yb||16==yb)a.ga=yb;else{a.g("invalid base: "+yb);break}}a.g("default base: "+a.ga);break;case "cs":var zb;void 0!==g[3]&&(zb=+g[3]);switch(g[2]){case "int":a.b.Xa=zb;break;case "start":a.b.kb=zb;break;case "stop":a.b.Ya=zb;break;default:a.g("unknown cs option");break a}void 0!==zb&&Fc(a.b);a.g("checksums "+(a.b.v.Wa?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Kc(a.b,+g[2])||a.g("warning: using 1x multiplier, previous target not reached"));
|
|
|
|
|
function Sf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.U&&(a.g("ended assemble at "+J(a,a.S.A)),a.K=a.S,a.U=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ma=null;if(ib(a)&&0<b.length){a.U&&(b="a "+J(a,a.S.A)+" "+b);var f=!1,g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var l=g[0],m=l.charAt(0),p=1;p<l.length;p++){var q=l.charAt(p);if("?"==m||"r"==m||"a">q||"z"<q){g[0]=l.substr(p);g.unshift(l.substr(0,p));break}}g[0]=g[0].toLowerCase();switch(g[0].charAt(0)){case "a":var w=
|
|
|
|
|
Ff(a,g[1],!0);if(w)if(a.S=w,void 0===g[2])a.g("begin assemble at "+J(a,w.A)),a.U=!0,a.C.aa();else{var u;a.g("not supported yet");u=[];if(u.length){for(var v=0;v<u.length;v++)a.mb(w,u[v],1);a.g(Tf(a,a.S))}}break;case "b":a:{var C=g[0],x=g[1],D=b;if("?"==x)a.g("breakpoint commands:"),a.g("\tbp [a]\tset exec breakpoint at addr [a]"),a.g("\tbr [a]\tset read breakpoint at addr [a]"),a.g("\tbw [a]\tset write breakpoint at addr [a]"),a.g("\tbc [a]\tclear breakpoint at addr [a]"),a.g("\tbl\tlist all breakpoints"),
|
|
|
|
|
a.g("\tbn [n]\tbreak after [n] instruction(s)");else{var ya=C.charAt(1);if("l"==ya){var Oc;Oc=0+Rf(a,a.f);Oc+=Rf(a,a.M);(Oc+=Rf(a,a.D))||a.g("no breakpoints")}else if("n"==ya)a.la=uf(a,x),a.g("break after "+a.la+" instruction(s)");else if(void 0===x)a.g("missing breakpoint address");else{var U=X();if("*"!=x&&(U=Ff(a,x,!0),!U))break a;"c"==ya?null==U.A?(yf(a),a.g("all breakpoints cleared")):Pf(a,a.f,U)||Pf(a,a.M,U)||Pf(a,a.D,U)||a.g("breakpoint missing: "+J(a,U.A)):null!=U.A&&(Jf(a,U,D),"p"==ya?a.Oa(a.f,
|
|
|
|
|
U):"r"==ya?a.Oa(a.M,U):"w"==ya?a.Oa(a.D,U):a.g("unknown breakpoint command: "+ya))}}}break;case "c":a.Pa&&(a.Pa.value="");break;case "d":a:{var Oa,Pa=g[0],ha=g[1],za=g[2],ug=g[3];if("?"==ha){var Qa="";for(Oa in H)a.va[Oa]&&(Qa&&(Qa+=","),Qa+=Oa);Qa+=",state,symbols";a.g("dump memory commands:");a.g("\tdb [a] [#] dump # bytes at address a");a.g("\tdw [a] [#] dump # words at address a");a.g("\tdd [a] [#] dump # dwords at address a");a.g("\tdh [#] [#] dump # instructions from history");Qa.length&&
|
|
|
|
|
a.g("dump extension commands:\n\t"+Qa)}else if("state"==ha){var ye=cg(a.C,!0);"console"==za?console.log(ye):(a.Pa&&(a.Pa.value=""),a.g(ye))}else if("symbols"==ha)for(var Pc=0;Pc<a.G.length;Pc++){var Qc=a.G[Pc],Ra;for(Ra in Qc.za)if("."!=Ra.charAt(0)){var ze=Qc.za[Ra].o;if(void 0!==ze){var Ae=Qc.za[Ra].l;Ae&&(Ra=Ae);a.g(J(a,ze)+" "+Ra)}}}else{if("d"==Pa){for(Oa in H)if(g[1]==Oa){var Be=a.va[Oa];Be?(g.shift(),g.shift(),Be(g)):a.g("no dump registered for "+ha);break a}ha||(Pa=a.qb||"db")}else a.qb=Pa;
|
|
|
|
|
if("dh"==Pa){var Ce=ha,De=za,Ee="",Fe=0,ba=a.ea,ia=a.I;if(ia.length){var Y=+Ce||a.Ua,mb=+De||10;isNaN(Y)?Y=mb:Ee="more ";Y>ia.length&&(a.g("note: only "+ia.length+" available"),Y=ia.length);ba-=Y;0>ba&&(null==ia[ia.length-1].A?(Y=ba+Y,ba=0):ba+=ia.length);var Rc=[];"call"==De&&(mb=1E5,Rc=["CALL"]);for(void 0!==Ce&&a.g(Y+" instructions earlier:");0<mb&&ba!=a.ea;){var Ge=ia[ba++];if(null==Ge.A)break;var nb=X(Ge.A),vg=Y--,He=Tf(a,nb,"history",vg);(!Rc.length||0<=He.indexOf(Rc[0]))&&a.g(He);nb.xb&&(ba+=
|
|
|
|
|
nb.xb,mb-=nb.xb,Y-=nb.xb);ba>=ia.length&&(ba=0);a.Ua=Y;Fe++;mb--}}Fe||(a.g("no "+Ee+"history available"),a.Ua=void 0)}else{var ob=Ff(a,ha);if(ob){var Zb=0;za&&("l"==za.charAt(0)&&(za=za.substr(1)||ug),Zb=uf(a,za)>>>0,65536<Zb&&(Zb=65536));for(var pb="",Sa="dd"==Pa?4:"dw"==Pa?2:1,$b=Sa*Zb||128,wg=$b+15>>4||1;wg--&&0<$b;){var ac=0,qb=0,rb,Sc="",Ie="",ha=J(a,ob.A);for(rb=4==Sa?16:a.ha;0<rb&&0<$b;rb--){var Tc,bc=2==Sa?a.ja(ob,Tc=2):a.Qa(ob,Tc=1),ac=ac|bc<<(qb<<3),qb=qb+Tc;qb==Sa&&(Sc+=J(a,ac,Sa),Sc+=
|
|
|
|
|
1==Sa?9==rb?"-":" ":" ",ac=qb=0);Ie+=32<=bc&&128>bc?String.fromCharCode(bc):".";$b--}pb&&(pb+="\n");pb+=ha+" "+Sc+(0==rb?" "+Ie:"")}pb&&a.g(pb);a.Na=ob}}}}break;case "e":if("else"==g[0])break;var Ta,Uc,Vc,Wc,Xc=g[0],Yc=g[1];"eb"==Xc?(Ta=1,Uc=255,Vc=a.Qa,Wc=a.mb):"e"==Xc||"ew"==Xc?(Ta=2,Uc=65535,Vc=a.ja,Wc=a.Sa):Yc=null;if(null==Yc)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a");else{var cc=Ff(a,Yc);if(cc)for(var dc=2;dc<
|
|
|
|
|
g.length;dc++){var sb=sf(a,g[dc]);if(void 0===sb){a.g("unrecognized value: "+g[dc]);break}sb&~Uc&&a.g("warning: "+k(sb)+" exceeds "+Ta+"-byte value");var xg=Vc.call(a,cc);a.g("changing "+J(a,cc.A)+" from "+J(a,xg,Ta)+" to "+J(a,sb,Ta));Wc.call(a,cc,sb,Ta)}}break;case "g":a:{var Je=g[1],yg=b;if(void 0!==Je){var Zc=Ff(a,Je,!0);if(!Zc)break a;Jf(a,Zc,yg);a.Oa(a.f,Zc,!0)}a.ab(!0)||c||a.g("cpu busy or unavailable, run command ignored")}break;case "h":a.v.ba?(c||a.g("halting"),a.fa()):hb(a,!0)||c||a.g("already halted");
|
|
|
|
|
break;case "i":if("if"==g[0]){var $c;var tb=b.substr(2),tb=oa(tb);sf(a,tb)?(c||a.g("true: "+tb),$c=!0):(c||a.g("false: "+tb),$c=!1);$c||(d=!1);break}f=!0;break;case "k":var zg=g[0];if("?"==g[1])a.g("stack trace commands:"),a.g("\tk\tshow frame addresses"),a.g("\tks\tshow symbol information");else{var ad=0,bd=X(),ub=X(a.b.u[6]);for(a.g("stack trace for "+J(a,ub.A));10>ad;){for(var Aa=null,Ag=256;65536>ub.A>>>0;){bd.A=a.ja(ub,2);if(null==ub.A||!Ag--)break;if(!(bd.A&1)){for(var Bg=a,ec=bd,Ke=null,vb=
|
|
|
|
|
ec.A,Le=vb,cd=1;6>=cd&&vb;cd++){if(2<cd){ec.A=vb;var fc=Tf(Bg,ec);if(0<=fc.indexOf("JSR")){var Me=fc.indexOf(" ");if(vb+(fc.indexOf(" ",Me+1)-Me-1)/2==Le){Ke=fc;break}}}vb-=2}ec.A=Le;if(Aa=Ke)break}}if(!Aa||null==Aa)break;var Ne=null;if("ks"==zg){var Oe=Aa.match(/[0-9A-F]+$/);Oe&&(Ne=$f(a,Oe[0]))}Aa=na(Aa,50)+" ;"+(Ne||"stack="+J(a,ub.A));a.g(Aa);ad++}ad||a.g("no return addresses found")}break;case "l":if("ln"==g[0]){$f(a,g[1],!0);break}f=!0;break;case "m":a:{var ja,ka=null,F=g[1];"?"==F&&(F=void 0);
|
|
|
|
|
if(void 0!==F){var sa=0;if("all"==F)sa=1878917119,F=null;else if("on"==F)ka=!0,F=null;else if("off"==F)ka=!1,F=null;else{"keys"==F&&(F="key");"kbd"==F&&(F="keyboard");for(ja in H)if(F==ja){sa=H[ja];ka=!!(a.ia&sa);break}if(!sa){a.g("unknown message category: "+F);break a}}if(sa)if("on"==g[2])a.ia|=sa,ka=!0;else if("off"==g[2]&&(a.ia&=~sa,ka=!1,1073741824==sa)){for(var dd=0;dd<a.qa.length;dd++)a.g(a.qa[dd]);a.qa=[]}}var Cg=0,wb="";for(ja in H)if(!F||F==ja){var Dg=!!(a.ia&H[ja]);if(null===ka||ka==Dg)wb&&
|
|
|
|
|
(wb+=","),++Cg%10||(wb+="\n\t"),"key"==ja&&(ja="keys"),wb+=ja}void 0===F&&a.g("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.g((null!==ka?ka?"messages on: ":"messages off: ":"message categories:\n\t")+(wb||"none"));zf(a)}break;case "p":if("print"==g[0]){ag(a,b.substr(5));break}var Eg="pr"==g[0]?1:0;if(a.V)a.g("step in progress");else{var Pe=X(a.b.u[7]);a.Qa(Pe);a.V?(a.Oa(a.f,Pe,!0),a.ab()||(a.C&&a.C.nb(),a.V=0)):bg(a,Eg?"tr":"t")}break;case "r":if("reset"==b){a.C&&a.C.reset();
|
|
|
|
|
break}Mf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var xb=+g[2];if(8==xb||10==xb||16==xb)a.ha=xb;else{a.g("invalid base: "+xb);break}}a.g("default base: "+a.ha);break;case "cs":var yb;void 0!==g[3]&&(yb=+g[3]);switch(g[2]){case "int":a.b.Xa=yb;break;case "start":a.b.kb=yb;break;case "stop":a.b.Ya=yb;break;default:a.g("unknown cs option");break a}void 0!==yb&&Gc(a.b);a.g("checksums "+(a.b.v.Wa?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Kc(a.b,+g[2])||a.g("warning: using 1x multiplier, previous target not reached"));
|
|
|
|
|
a.g("target speed: "+(a.b.Ra.toFixed(2)+"Mhz")+" ("+a.b.Ia+"x)");break;default:if(g[1]){a.g("unknown option: "+g[1]);break}case "?":a.g("debugger options:"),a.g("\tbase #\t\tset default base to #"),a.g("\tcs int #\tset checksum cycle interval to #"),a.g("\tcs start #\tset checksum cycle start count to #"),a.g("\tcs stop #\tset checksum cycle stop count to #"),a.g("\tsp #\t\tset speed multiplier to #")}break;case "t":bg(a,g[0],g[1]);break;case "u":Nf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Zf(a,
|
|
|
|
|
b.substr(3))||(d=!1);break}if("ver"==g[0]){a.g("PDPjs version 1.30.1 ("+a.b.Vb+",RELEASE"+(lb?",TYPEDARRAYS":",LONGARRAYS")+")");a.g(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){ag(a,b.substr(1));break}var fd="commands:",gd;for(gd in Bf)fd+="\n"+na(gd,9)+Bf[gd];Hd(a)||(fd+="\nnote: history disabled if no exec breakpoints");a.g(fd);break;default:f=!0}f&&(a.g("unknown command: "+b),d=!1)}}catch(Qe){a.g("debugger error: "+(Qe.stack||Qe.message)),d=!1}return d}
|
|
|
|
|
function Gc(a,b,c){b=qf(a,b,c);for(var d in b)if(!Sf(a,b[+d]))return!1;return!0}La(function(){for(var a=A(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new xf(d);fb(d,c)}});
|
|
|
|
|
function dg(a,b,c){r.call(this,"Computer",a,dg,67108864);this.v.fa=!1;eg(this,b);this.M=Dc(this,"autoPower",a);this.F=0;this.ba=a.busWidth||a.buswidth;this.f=fg;this.I=null;this.G=this.U=!1;this.ca=Dc(this,"url")||"";(Math.random()+.1).toString(36);this.i=gg(this);if(this.b=eb("CPU",this.id)){this.j=eb("Debugger",this.id);this.w=new Cb({id:this.vb+".bus",busWidth:this.ba},this.b,this.j);var d,e=cb(this.id);if((this.B=eb("Panel",this.id))&&this.B.Pa)for(b=0;b<e.length;b++)d=e[b],d.na=this.B.na,d.g=
|
|
|
|
|
this.B.g,d.Pa=this.B.Pa;this.g("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.g("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ca&&d.Ca(this,this.w,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=Dc(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.G=!0,this.f=fg),this.f&&
|
|
|
|
|
b.substr(3))||(d=!1);break}if("ver"==g[0]){a.g("PDPjs version 1.30.1 ("+a.b.Ub+",RELEASE"+(lb?",TYPEDARRAYS":",LONGARRAYS")+")");a.g(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){ag(a,b.substr(1));break}var ed="commands:",fd;for(fd in Bf)ed+="\n"+na(fd,9)+Bf[fd];Hd(a)||(ed+="\nnote: history disabled if no exec breakpoints");a.g(ed);break;default:f=!0}f&&(a.g("unknown command: "+b),d=!1)}}catch(Qe){a.g("debugger error: "+(Qe.stack||Qe.message)),d=!1}return d}
|
|
|
|
|
function Hc(a,b,c){b=qf(a,b,c);for(var d in b)if(!Sf(a,b[+d]))return!1;return!0}La(function(){for(var a=A(document,"pdp11","debugger"),b=0;b<a.length;b++){var c=a[b],d=z(c),d=new xf(d);fb(d,c)}});
|
|
|
|
|
function dg(a,b,c){r.call(this,"Computer",a,dg,67108864);this.v.ga=!1;eg(this,b);this.M=Ec(this,"autoPower",a);this.C=0;this.ca=a.busWidth||a.buswidth;this.f=fg;this.I=null;this.G=this.U=!1;this.da=Ec(this,"url")||"";(Math.random()+.1).toString(36);this.i=gg(this);if(this.b=eb("CPU",this.id)){this.j=eb("Debugger",this.id);this.w=new Eb({id:this.vb+".bus",busWidth:this.ca},this.b,this.j);var d,e=cb(this.id);if((this.B=eb("Panel",this.id))&&this.B.Pa)for(b=0;b<e.length;b++)d=e[b],d.na=this.B.na,d.g=
|
|
|
|
|
this.B.g,d.Pa=this.B.Pa;this.g("PDPjs v1.30.1\nCopyright \u00a9 2012-2016 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");this.g("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");for(b=0;b<e.length;b++)d=e[b],d.Ca&&d.Ca(this,this.w,this.b,this.j);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.H=d:this.f=parseInt(d,10));var f;if(a=Ec(this,"state")||(f=!0,a.state))b=this.N=a,f||(this.G=!0,this.f=fg),this.f&&
|
|
|
|
|
(this.K=new N(this,"1.30.1"),hg(this.K)?b=null:delete this.K);!b&&this.f&&(b=ig(this))&&(this.G=!0);if(b){var g=this;ua(b,null,!0,function(a,b,c){c?(g.H=null,g.G=!1,g.na("Unable to load machine state from server (error "+c+(b?": "+oa(b):"")+")")):(g.I=b,g.U=!0);G(g)})}else G(this);this.J.power||(this.M=!0);!c&&this.M&&jg(this,this.lb)}else n("Unable to find CPU component")}y(dg);var fg=0;
|
|
|
|
|
function eg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){n(d.message+" ("+c+")")}}a.V=b}function Dc(a,b,c){var d=b.toLowerCase(),d=Wa[b]||Wa[d];void 0===d&&a.V&&(d=a.V[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function jg(a,b,c){for(var d=cb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!ib(f)){ib(f,function(){jg(a,b,c)});return}}b.call(a,c)}
|
|
|
|
|
function eg(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){n(d.message+" ("+c+")")}}a.V=b}function Ec(a,b,c){var d=b.toLowerCase(),d=Wa[b]||Wa[d];void 0===d&&a.V&&(d=a.V[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function jg(a,b,c){for(var d=cb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!ib(f)){ib(f,function(){jg(a,b,c)});return}}b.call(a,c)}
|
|
|
|
|
function kg(a,b){var c=new N(a,"1.30.1","validate");if(hg(c)&&lg(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.na("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=dg.prototype;
|
|
|
|
|
h.lb=function(a){void 0===a&&(a=this.f||(this.I?1:fg));if(!this.F){this.F++;var b=!1,c=!1;this.S=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>fg){if(hg(d,this.I)){this.C=new N(this,"1.30.1","failsafe");hg(this.C)&&(mg(this,d),a=2,ng(this.C));this.C.set("timestamp",sa());og(this.C);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"==
|
|
|
|
|
h.lb=function(a){void 0===a&&(a=this.f||(this.I?1:fg));if(!this.C){this.C++;var b=!1,c=!1;this.S=!1;var d=this.K||new N(this,"1.30.1");if(-1==a)b=!0;else if(a>fg){if(hg(d,this.I)){this.D=new N(this,"1.30.1","failsafe");hg(this.D)&&(mg(this,d),a=2,ng(this.D));this.D.set("timestamp",ta());og(this.D);var e=this.f&&!this.G;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=lg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hg(d,g):("error"==
|
|
|
|
|
f&&"no machine state"!=g?(this.na("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.i=null)):this.g(f+": "+g),ng(d),hg(d)?(c=lg(d),e=!0):c=!1))}e&&kg(this,c?d:null)}else 2==a&&d.clear()}else kg(this);delete this.I;delete this.K}e=cb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.b&&(c=pg(this,g,d,b,c));b=[d,a,c];-1!=a?jg(this,this.Lb,b):this.Lb(b)}};
|
|
|
|
|
function pg(a,b,c,d,e){if(!b.v.fa){b.v.fa=!0;if(b.ya){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ya(f,d)&&f&&(n("Unable to restore state for "+b.type),a.N&&!a.U?(c.clear(),a.f=fg,window&&window.location.reload()):a.S=!0,b.ya(null),e=!1)}if(!d&&b.Mb)for(a=b.Mb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
|
|
|
|
h.Lb=function(a){var b=a[0],c=0>a[1];a=a[2];this.da=!0;this.v.fa=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.F=0};
|
|
|
|
|
function mg(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.ca;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}}
|
|
|
|
|
function cg(a,b,c){var d,e="none";if(a.F)return null;a.F--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.ea(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.fa=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m<l.length;m++){var p=l[m];p.v.fa&&(p.xa&&(d=p.xa(b,c),"object"===typeof d&&f.set(p.id,
|
|
|
|
|
d)),c&&(p.v.fa=!1,!1===d&&(e=null)))}e&&(c?(l=d=!1,b?(a.i&&qg(a,a.i,f.toString()),og(g)&&og(f)||(e=null,d=l=!0)):a.f&&(d=!0,l=3==a.f),d&&f.clear(l)):e=f.toString());c&&(a.v.fa=!1,b=a.J.power)&&(b.textContent="Power");a.F=0;return e}h.reset=function(){this.w&&this.w.reset&&(B(this,"Resetting "+this.w.type),this.w.reset());for(var a=cb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.w&&c.reset&&(B(this,"Resetting "+c.type),c.reset())}};
|
|
|
|
|
h.start=function(a,b){for(var c=cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};h.stop=function(a,b){for(var c=cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
|
|
|
|
h.ja=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.F||(d.v.fa?cg(d,!1,!0):jg(d,d.lb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.fa&&!d.F)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");cg(d,a,!0);!a&&d.N?window&&window.location.reload():d.lb(fg)}else d.reset(),d.b&&d.b.fb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.J[b]=
|
|
|
|
|
function pg(a,b,c,d,e){if(!b.v.ga){b.v.ga=!0;if(b.ya){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ya(f,d)&&f&&(n("Unable to restore state for "+b.type),a.N&&!a.U?(c.clear(),a.f=fg,window&&window.location.reload()):a.S=!0,b.ya(null),e=!1)}if(!d&&b.Mb)for(a=b.Mb.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
|
|
|
|
h.Lb=function(a){var b=a[0],c=0>a[1];a=a[2];this.ea=!0;this.v.ga=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.b&&(pg(this,this.b,b,c,a),this.b.fb());this.S&&(mg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.C=0};
|
|
|
|
|
function mg(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.i||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;ua("http://www.pcjs.org/api/v1/report",d,!0)}}
|
|
|
|
|
function cg(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.1"),g=new N(a,"1.30.1","validate"),l=ta();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.1");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.xa&&(c&&a.b.fa(),d=a.b.xa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ga=!1,!1===d&&(e=null)));for(var l=cb(a.id),m=0;m<l.length;m++){var p=l[m];p.v.ga&&(p.xa&&(d=p.xa(b,c),"object"===typeof d&&f.set(p.id,
|
|
|
|
|
d)),c&&(p.v.ga=!1,!1===d&&(e=null)))}e&&(c?(l=d=!1,b?(a.i&&qg(a,a.i,f.toString()),og(g)&&og(f)||(e=null,d=l=!0)):a.f&&(d=!0,l=3==a.f),d&&f.clear(l)):e=f.toString());c&&(a.v.ga=!1,b=a.J.power)&&(b.textContent="Power");a.C=0;return e}h.reset=function(){this.w&&this.w.reset&&(B(this,"Resetting "+this.w.type),this.w.reset());for(var a=cb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.w&&c.reset&&(B(this,"Resetting "+c.type),c.reset())}};
|
|
|
|
|
h.start=function(a,b){for(var c=cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}this.aa(!0)};h.stop=function(a,b){for(var c=cb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}this.aa(!0)};
|
|
|
|
|
h.pa=function(a,b,c){var d=this;switch(b){case "power":return this.J[b]=c,c.onclick=function(){d.C||(d.v.ga?cg(d,!1,!0):jg(d,d.lb))},!0;case "reset":return this.J[b]=c,c.onclick=function(){if(d.v.ga&&!d.C)if(d.f&&!d.H){var a=va("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");cg(d,a,!0);!a&&d.N?window&&window.location.reload():d.lb(fg)}else d.reset(),d.b&&d.b.fb()},!0;case "save":if(fa())c.parentNode.removeChild(c);else return this.J[b]=
|
|
|
|
|
c,c.onclick=function(){var a=gg(d,!0);if(a){var b=!!(d.f&&!d.H||d.N),c=cg(d,b);b?qg(d,a,c):d.na("Resume disabled, machine state not saved")}},!0}return!1};
|
|
|
|
|
function gg(a,b){var c=a.i;c||((c=ya("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=rg(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c}
|
|
|
|
|
function gg(a,b){var c=a.i;c||((c=Ba("user"),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=rg(a,c))||a.na("The user ID is invalid.")):b&&a.na("Browser local storage is not available"));return c}
|
|
|
|
|
function rg(a,b){a.i=null;b=ua(ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ca("user",b.data),a.i=b.data)}catch(d){n(d.message+" ("+c+")")}return a.i}function ig(a){var b=null;a.i&&(b=ga()+"/api/v1/user?req=load&user="+a.i+"&state="+sg(a,"1.30.1"));return b}
|
|
|
|
|
function qg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=sg(a,"1.30.1");d.data=c;b=ua(ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.na("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.na(c),Ca("user",""),a.i=null)}}h.nb=function(){};
|
|
|
|
|
h.ua=function(a){this.b&&this.b.ua(a);this.B&&this.B.ua(a)};La(function(){for(var a=A(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=A(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=z(f),g=new dg(g,d,!0);fb(g,f);g.M&&jg(g,g.lb)}});Ga.show.push(function(){for(var a=A(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=eb("Computer",c.id))&&c.da&&!c.v.fa&&c.lb(-1)}});
|
|
|
|
|
Ga.exit.push(function(){for(var a=A(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=eb("Computer",c.id))&&c.v.fa&&cg(c,!(!c.f||c.H),!0)}});function N(a,b,c){this.id=a.id;this.key=sg(a,b,c);this.j=a.j;ng(this,a.pc)}function sg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
|
|
|
|
h.aa=function(a){this.b&&this.b.aa(a);this.B&&this.B.aa(a)};La(function(){for(var a=A(document,"pdp11-machine"),b=0;b<a.length;b++)for(var c=a[b],d=z(c),c=A(c,"pdp11","computer"),e=0;e<c.length;e++){var f=c[e],g=z(f),g=new dg(g,d,!0);fb(g,f);g.M&&jg(g,g.lb)}});Ga.show.push(function(){for(var a=A(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=eb("Computer",c.id))&&c.ea&&!c.v.ga&&c.lb(-1)}});
|
|
|
|
|
Ga.exit.push(function(){for(var a=A(document,"pdp11","computer"),b=0;b<a.length;b++){var c=z(a[b]);(c=eb("Computer",c.id))&&c.v.ga&&cg(c,!(!c.f||c.H),!0)}});function N(a,b,c){this.id=a.id;this.key=sg(a,b,c);this.j=a.j;ng(this,a.nc)}function sg(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
|
|
|
|
|
N.prototype={constructor:N,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){ng(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,
|
|
|
|
|
1);c=0}}};function ng(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function og(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);Ca(a.key,c)||(n("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function lg(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){n(c.message||c),b=!1}return b}function hg(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:xa()&&(b=ya(a.key))?(a[a.id]=b,a.b=!0):!1}var tg=0;
|
|
|
|
|
1);c=0}}};function ng(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function og(a){var b=!0;if(xa()){var c=JSON.stringify(a[a.id]);Ca(a.key,c)||(n("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function lg(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){n(c.message||c),b=!1}return b}function hg(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:xa()&&(b=Ba(a.key))?(a[a.id]=b,a.b=!0):!1}var tg=0;
|
|
|
|
|
function Fg(a,b,c,d,e,f){e("Loading "+a+"...");ua(a,null,!0,function(g,l,m){m?(l||(l="unable to load "+a+" ("+m+")"),f(l,null)):Gg(l,a,b,c,d,e,f)})}
|
|
|
|
|
function Gg(a,b,c,d,e,f,g){function l(a,f){if(f)g(f,null);else{c&&(bb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PDPjs$2"),
|
|
|
|
|
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Hg(a,f,l):l(a,null):g("no data"+(b?" for file: "+b:""),null)}
|
|
|
|
|
@ -901,4 +899,4 @@ function Hg(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
|
|
|
|
|
"");a=a.replace(d[0],g);Hg(a,b,c)}})}else c(a,null)}
|
|
|
|
|
function Ig(a,b,c,d){function e(a){if(void 0===l){var b=g&&A(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=ma(a))}function f(a){e("Error: "+a);m&&(--tg||Na(!0));m=!1}var g,l,m=!0;tg++;ab[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));q.appendChild(w)}c||
|
|
|
|
|
(c="/versions/pdp11/1.30.1/components.xsl");p=function(d,l){l?Fg(c,null,null,!1,e,function(d,m){m?(bb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--tg||Na(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--tg||Na(!0)):f("invalid machine element: "+
|
|
|
|
|
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Oa;})();
|
|
|
|
|
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fg(b,a,d,!0,e,p):Gg(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(u){f(u.message)}return m}window.embedPDP11=function(a,b,c,d){Na(!1);return Ig(a,b,c,d)};window.enableEvents=Na;window.sendEvent=Ua;})();
|
|
|
|
|
|