PDP-11 panel switches can now be scripted
This commit is contained in:
parent
112c0e88c6
commit
2e93b71095
14 changed files with 334 additions and 224 deletions
|
|
@ -34,7 +34,7 @@ f.toString=function(){return this.name?this.name:this.id||this.type};
|
|||
f.T=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.Sa=this.H[b]=c,c.value="",this.l=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.Wa=function(a){this.l(a,this.fb)}),!0;default:return!1}};f.log=function(){};f.l=function(){};
|
||||
f.status=function(a){this.l(this.fb+": "+a)};f.Wa=function(a,b,c){c=c||this.type;b||y((c?c+": ":"")+a)};function ua(a,b){a.C.error=!0;a.Wa(b)}function G(a,b){b&&(a.C.ready?b():a.eb=b);return a.C.ready}f.X=function(a){this.C.error||(this.C.ready=!1!==a,this.C.ready&&(a=this.eb,this.eb=null,a&&a()))};function H(a,b){a.C.Ga&&(b?a.C.bb=!0:void 0===b&&a.l(a.toString()+" busy"));return a.C.Ga}
|
||||
function I(a,b){if(a.C.bb)return a.C.Ga=!1,a.C.bb=!1;if(a.C.error)return a.l(a.toString()+" error"),!1;a.C.Ga=b;return a.C.Ga}function J(a,b){if(a.u){a===a.u?b|=0:b=b||a.ma;var c=a.u.ma&b;return!!b&&c===b||!!(c&a.u.Re)}return!1}window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));
|
||||
var K=window?window.PCjs.Machines:{},B=window?window.PCjs.Components:[],ra=["sleep","wait"],sa={alert:function(a){y(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ta={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 K=window?window.PCjs.Machines:{},B=window?window.PCjs.Components:[],ra=["hold","sleep","wait"],sa={alert:function(a){y(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},ta={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 va(a){A.call(this,"C1PPanel",a);this.C.N=!1}p(va,A);va.prototype.T=function(a,b,c,d){return this.U&&this.U.T(a,b,c,d)||this.s&&this.s.T(a,b,c,d)||this.b&&this.b.T(a,b,c,d)||this.u&&this.u.T(a,b,c,d)?!0:A.prototype.T.call(this,a,b,c,d)};va.prototype.ia=function(a,b){a&&!this.C.N&&(this.C.N=!0,this.U=b,this.s=L(b,"cpu"),this.b=L(b,"keyboard"),this.u=L(b,"debugger"),wa())};
|
||||
function wa(){for(var a=!1,b=F(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],e=C(d),g=oa(e.id);g||(a=!0,g=new va(e));D(g,d);a&&g.X()}}w(wa);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function ka(a,b,c){for(var d=!0;c<b.length;){var f=b[c],g=f[0],h=null;0<=la.inde
|
|||
e.toString=function(){return this.name?this.name:this.id||this.type};
|
||||
e.L=function(a,b,c){switch(b){case "clear":return this.B[b]||(this.B[b]=c,c.onclick=function(a){return function(){a.B.print&&(a.B.print.value="")}}(this)),!0;case "print":return this.B[b]||(this.sa=this.B[b]=c,c.value="",this.F=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.ta=function(a){this.F(a,this.va)}),!0;default:return!1}};e.log=function(){};e.F=function(){};
|
||||
e.status=function(a){this.F(this.va+": "+a)};e.ta=function(a,b,c){c=c||this.type;b||z((c?c+": ":"")+a)};function oa(a,b){a.u.error=!0;a.ta(b)}function I(a,b){b&&(a.u.ready?b():a.ua=b);return a.u.ready}e.R=function(a){this.u.error||(this.u.ready=!1!==a,this.u.ready&&(a=this.ua,this.ua=null,a&&a()))};function pa(a,b){if(a.u.wa)return a.u.ra=!1,a.u.wa=!1;if(a.u.error)return a.F(a.toString()+" error"),!1;a.u.ra=b;return a.u.ra}
|
||||
window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]));var J=window?window.PCjs.Machines:{},D=window?window.PCjs.Components:[],la=["sleep","wait"],ma={alert:function(a){z(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},na={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 J=window?window.PCjs.Machines:{},D=window?window.PCjs.Components:[],la=["hold","sleep","wait"],ma={alert:function(a){z(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},na={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 f.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),f=this;c.prototype=this.prototype;b.prototype=new c;return b});function K(a){C.call(this,"C1PPanel",a);this.u.I=!1}p(K,C);
|
||||
K.prototype.L=function(a,b,c,d){return this.J&&this.J.L(a,b,c,d)||this.G&&this.G.L(a,b,c,d)||this.b&&this.b.L(a,b,c,d)?!0:C.prototype.L.call(this,a,b,c,d)};K.prototype.$=function(a,b){a&&!this.u.I&&(this.u.I=!0,this.J=b,this.G=L(b,"cpu"),this.b=L(b,"keyboard"),qa())};function qa(){for(var a=!1,b=H(document,"c1pjs","panel"),c=0;c<b.length;c++){var d=b[c],f=F(d),g=E(f.id);g||(a=!0,g=new K(f));G(g,d);a&&g.R()}}v(qa);
|
||||
|
|
|
|||
Loading…
Reference in a new issue