PDP-11 panel switches can now be scripted

This commit is contained in:
Jeff Parsons 2017-02-06 13:07:15 -08:00 committed by Jeff Parsons
commit 2e93b71095
14 changed files with 334 additions and 224 deletions

View file

@ -42,7 +42,7 @@ k.toString=function(){return this.name?this.name:this.id||this.type};
k.ca=function(a,b,c){switch(b){case "clear":return this.P[b]||(this.P[b]=c,c.onclick=function(a){return function(){a.P.print&&(a.P.print.value="")}}(this)),!0;case "print":return this.P[b]||(this.ta=this.P[b]=c,c.value="",this.i=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),this.aa=function(a){this.i(a,this.cb)}),!0;default:return!1}};k.log=function(){};k.i=function(){};
k.status=function(a){this.i(this.cb+": "+a)};k.aa=function(a,b,c){ha(a,b,c||this.type)};function wa(a,b){a.G.error=!0;a.aa(b)}function xa(a,b){b&&(a.G.ready?b():a.zb=b);return a.G.ready}function ya(a){if(!a.G.error&&(a.G.ready=!0,a.G.ready)){var b=a.zb;a.zb=null;b&&b()}}function Aa(a,b){a.G.mb&&(b?a.G.Ib=!0:void 0===b&&a.i(a.toString()+" busy"));return a.G.mb}function Ca(a,b){if(a.G.Ib)return a.G.mb=!1,a.G.Ib=!1;if(a.G.error)return a.i(a.toString()+" error"),!1;a.G.mb=b;return a.G.mb}
k.va=function(){return this.G.ja=!0};k.ua=function(a,b){b&&(this.G.ja=!1);return!0};function Da(a,b){if(a.K){a===a.K?b|=0:b=b||a.ha;var c=a.K.ha&b;return!!b&&c===b||!!(c&a.K.wd)}return!1}function Ea(a,b){a.K&&Da(a,0)&&a.K.message(b,void 0)}function r(a,b,c,d,e,f,g){a.K&&(!0===g?g=0:null==g&&(g=a.ha),Fa(a.K,a,b,c,d,e,f,g))}window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));
var fa=window?window.PCjs.Machines:{},da=window?window.PCjs.Components:[],sa=["sleep","wait"],ta={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},va={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};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});
var fa=window?window.PCjs.Machines:{},da=window?window.PCjs.Components:[],sa=["hold","sleep","wait"],ta={alert:function(a){q(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},va={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});
Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function Ga(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 Ha(a,b,c){var d="";b?11<b&&(b=11):b=a&-16777216?11:a&-65536?8: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 t(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}

View file

@ -41,7 +41,7 @@ function la(a,b,c){for(var d=!0;c<b.length;){var e=b[c],f=e[0],g=null;0<=ma.inde
k.toString=function(){return this.name?this.name:this.id||this.type};
k.S=function(a,b,c){switch(b){case "clear":return this.w[b]||(this.w[b]=c,c.onclick=function(a){return function(){a.w.print&&(a.w.print.value="")}}(this)),!0;case "print":return this.w[b]||(this.pa=this.w[b]=c,c.value="",this.aa=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.G=function(a){this.aa(a,this.Ya)}),!0;default:return!1}};k.log=function(){};k.aa=function(){};
k.status=function(a){this.aa(this.Ya+": "+a)};k.G=function(a,b,c){fa(a,b,c||this.type)};function pa(a,b){b&&(a.i.ready?b():a.eb=b);return a.i.ready}function z(a){if(!a.i.error&&(a.i.ready=!0,a.i.ready)){var b=a.eb;a.eb=null;b&&b()}}function qa(a,b){if(a.i.nb)return a.i.ab=!1,a.i.nb=!1;if(a.i.error)return a.aa(a.toString()+" error"),!1;a.i.ab=b;return a.i.ab}k.ca=function(){return this.i.U=!0};k.ba=function(a,b){b&&(this.i.U=!1);return!0};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var ca=window?window.PCjs.Machines:{},r=window?window.PCjs.Components:[],ma=["sleep","wait"],na={alert:function(a){t(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},oa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var ca=window?window.PCjs.Machines:{},r=window?window.PCjs.Components:[],ma=["hold","sleep","wait"],na={alert:function(a){t(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},oa={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
function ra(a){var b=16,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==