Added support for address-specific message categories in I/O tables
This commit is contained in:
parent
a3833fba28
commit
861d78e6d2
7 changed files with 47 additions and 46 deletions
|
|
@ -1356,7 +1356,7 @@ BusPDP11.prototype.addIOTable = function(component, table)
|
|||
|
||||
for (var iReg = 0; iReg < nRegs; iReg++, addr += 2) {
|
||||
if (sReg && nRegs > 1) sReg = afn[4] + iReg;
|
||||
if (!this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, component.bitsMessage || MessagesPDP11.BUS, sReg || component.idComponent)) {
|
||||
if (!this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[7] || component.bitsMessage || MessagesPDP11.BUS, sReg || component.idComponent)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1577,7 +1577,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl
|
|||
/* falls through */
|
||||
|
||||
case PDP11.PDR.ACF.RW: // 0x6: read/write, no system trap/abort action
|
||||
pdr |= ((accessFlags & PDP11.ACCESS.WRITE) ? 0xc0 : 0x80);
|
||||
pdr |= ((accessFlags & PDP11.ACCESS.WRITE) ? (PDP11.PDR.ACCESSED | PDP11.PDR.MODIFIED) : PDP11.PDR.ACCESSED);
|
||||
break;
|
||||
|
||||
default: // 0x0 (non-resident, abort all accesses) or 0x3 or 0x7 (unused, abort all accesses)
|
||||
|
|
|
|||
|
|
@ -1270,9 +1270,10 @@ if (DEBUGGER) {
|
|||
if (this.sMessagePrev && sMessage == this.sMessagePrev) return;
|
||||
this.sMessagePrev = sMessage;
|
||||
|
||||
if ((this.bitsMessage & MessagesPDP11.HALT) && this.cpu && this.cpu.isRunning() || this.isBusy(true)) {
|
||||
var fRunning = false;
|
||||
if ((this.bitsMessage & MessagesPDP11.HALT) && this.cpu && (fRunning = this.cpu.isRunning()) || this.isBusy(true)) {
|
||||
this.stopCPU();
|
||||
sMessage += " (cpu halted)";
|
||||
if (fRunning) sMessage += " (cpu halted)";
|
||||
}
|
||||
|
||||
this.println(sMessage); // + " (" + this.cpu.getCycles() + " cycles)"
|
||||
|
|
|
|||
|
|
@ -330,21 +330,21 @@ var PDP11 = {
|
|||
MMR0: { // 177572
|
||||
ENABLED: 0x0001, // 000001 address relocation enabled
|
||||
PAGE_NUM: 0x000E, // 000016 page number of last fault
|
||||
PAGE_D: 0x0010, // 000020 last fault occurred in D space
|
||||
PAGE_D: 0x0010, // 000020 last fault occurred in D space (11/44 and 11/70 only)
|
||||
PAGE: 0x001E, // 000176 (all of the PAGE bits)
|
||||
MODE: 0x0060, // 000140 processor mode as of last fault
|
||||
COMPLETED: 0x0080, // 000200 last instruction completed (R/O)
|
||||
COMPLETED: 0x0080, // 000200 last instruction completed (R/O) (11/70 only)
|
||||
DSTMODE: 0x0100, // 000400 only destination mode references will be relocated (aka MAINT bit)
|
||||
MMU_TRAPS: 0x0200, // 001000 enable MMU traps
|
||||
MMU_TRAPS: 0x0200, // 001000 enable MMU traps (11/70 only)
|
||||
UNUSED: 0x0C00, // 006000
|
||||
TRAP_MMU: 0x1000, // 010000 trap: MMU
|
||||
TRAP_MMU: 0x1000, // 010000 trap: MMU (11/70 only)
|
||||
ABORT_RO: 0x2000, // 020000 abort: read-only
|
||||
ABORT_PL: 0x4000, // 040000 abort: page length
|
||||
ABORT_NR: 0x8000, // 100000 abort: non-resident
|
||||
ABORT: 0xE000, // 160000 (all of the ABORT bits)
|
||||
UPDATE: 0xF0FE // Includes all of: ABORT, TRAP, COMPLETED, MODE, and PAGE bits
|
||||
UPDATE: 0xE0FE // Includes all of: ABORT, COMPLETED, MODE, and PAGE bits
|
||||
},
|
||||
MMR1: { // 177574: general purpose auto-inc/auto-dec register
|
||||
MMR1: { // 177574: general purpose auto-inc/auto-dec register (11/44 and 11/70 only)
|
||||
REG1_NUM: 0x0007, //
|
||||
REG1_DELTA: 0x00F8, //
|
||||
REG2_NUM: 0x0700, //
|
||||
|
|
@ -352,7 +352,7 @@ var PDP11 = {
|
|||
},
|
||||
MMR2: { // 177576: virtual program counter register
|
||||
},
|
||||
MMR3: { // 172516: mapping register
|
||||
MMR3: { // 172516: mapping register (11/44 and 11/70 only)
|
||||
USER_D: 0x0001,
|
||||
SUPER_D: 0x0002,
|
||||
KERNEL_D: 0x0004,
|
||||
|
|
|
|||
|
|
@ -1130,23 +1130,23 @@ DevicePDP11.prototype.writeIgnored = function(data, addr)
|
|||
*/
|
||||
DevicePDP11.UNIBUS_IOTABLE = {
|
||||
[PDP11.UNIBUS.UNIMAP]: /* 170200 */ [null, null, DevicePDP11.prototype.readUNIMAP, DevicePDP11.prototype.writeUNIMAP, "UNIMAP", 64, PDP11.MODEL_1170],
|
||||
[PDP11.UNIBUS.SIPDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSIPDR, DevicePDP11.prototype.writeSIPDR, "SIPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.SDPDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDPDR, DevicePDP11.prototype.writeSDPDR, "SDPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.SIPAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSIPAR, DevicePDP11.prototype.writeSIPAR, "SIPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.SDPAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDPAR, DevicePDP11.prototype.writeSDPAR, "SDPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.KIPDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKIPDR, DevicePDP11.prototype.writeKIPDR, "KIPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.KDPDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDPDR, DevicePDP11.prototype.writeKDPDR, "KDPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.KIPAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKIPAR, DevicePDP11.prototype.writeKIPAR, "KIPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.KDPAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDPAR, DevicePDP11.prototype.writeKDPAR, "KDPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", 1, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.SIPDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSIPDR, DevicePDP11.prototype.writeSIPDR, "SIPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.SDPDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDPDR, DevicePDP11.prototype.writeSDPDR, "SDPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.SIPAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSIPAR, DevicePDP11.prototype.writeSIPAR, "SIPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.SDPAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDPAR, DevicePDP11.prototype.writeSDPAR, "SDPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.KIPDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKIPDR, DevicePDP11.prototype.writeKIPDR, "KIPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.KDPDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDPDR, DevicePDP11.prototype.writeKDPDR, "KDPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.KIPAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKIPAR, DevicePDP11.prototype.writeKIPAR, "KIPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.KDPAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDPAR, DevicePDP11.prototype.writeKDPAR, "KDPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", 1, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"],
|
||||
[PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", 1, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", 1, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", 1, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.UIPDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUIPDR, DevicePDP11.prototype.writeUIPDR, "UIPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.UDPDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDPDR, DevicePDP11.prototype.writeUDPDR, "UDPDR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.UIPAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUIPAR, DevicePDP11.prototype.writeUIPAR, "UIPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.UDPAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDPAR, DevicePDP11.prototype.writeUDPAR, "UDPAR", 8, PDP11.MODEL_1145],
|
||||
[PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", 1, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", 1, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", 1, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.UIPDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUIPDR, DevicePDP11.prototype.writeUIPDR, "UIPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.UDPDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDPDR, DevicePDP11.prototype.writeUDPDR, "UDPDR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.UIPAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUIPAR, DevicePDP11.prototype.writeUIPAR, "UIPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.UDPAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDPAR, DevicePDP11.prototype.writeUDPAR, "UDPAR", 8, PDP11.MODEL_1145, MessagesPDP11.MMU],
|
||||
[PDP11.UNIBUS.R0SET0]: /* 177700 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"],
|
||||
[PDP11.UNIBUS.R1SET0]: /* 177701 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"],
|
||||
[PDP11.UNIBUS.R2SET0]: /* 177702 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"],
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function yc(a,b,c){var d=[];for(b>>>=a.ka;0<c&&b<a.Y.length;)d.push(a.Y[b++]),c-
|
|||
k.ma=function(a){3932160<=a&&(a=Ec(this.b,a));return this.Y[(a&this.Qa)>>>this.ka].sa(a&this.v,a)};k.fb=function(a){3932160<=a&&(a=Ec(this.b,a));var b=a&this.v,c=(a&this.Qa)>>>this.ka;this.f=!1;this.na++;a=this.Y[c].mc(b,a);this.na--;return a};k.Eb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].cc(a&this.v,b&255,a)};k.tb=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.f=!1;this.na++;this.Y[(a&this.Qa)>>>this.ka].dc(a&this.v,b&255,a);this.na--};
|
||||
k.ib=function(a,b){3932160<=a&&(a=Ec(this.b,a));this.Y[(a&this.Qa)>>>this.ka].Ub(a&this.v,b&65535,a)};k.Fb=function(a,b){3932160<=a&&(a=Ec(this.b,a));var c=a&this.v,d=(a&this.Qa)>>>this.ka;this.f=!1;this.na++;this.Y[d].pc(c,b&65535,a);this.na--};
|
||||
function Fc(a){for(var b=0,c=[],d=0;d<a.D;d++){var e=a.Y[d];if(e.Wa||e.Vc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,h=0,l=[];g<e.length;){for(var m=e[g],n=g+1;n<e.length&&e[n]===m;)n++;l[h++]=n-g;l[h++]=m;g=n}l.length<e.length&&(e=l)}c[f]=e}}return c}function Gc(a,b,c,d,e,f,g,h,l){for(;b<=c;b+=2){var m=b&vc;if(void 0!==a.cb[m])return q("I/O address already registered: "+p(b,8,!0)),!1;a.cb[m]=[d,e,f,g,l||"unknown",h,!1]}return!0}
|
||||
function Ib(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.Xa)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],v=f[5]||1,r=0;r<v;r++,e+=2)if(n&&1<v&&(n=f[4]+r),!Gc(a,e,e,g,h,l,m,b.la||64,n||b.ab))return!1}}return!0}function Kb(a,b){a.B.push(b)}
|
||||
function Ib(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.b.Xa)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],v=f[5]||1,r=0;r<v;r++,e+=2)if(n&&1<v&&(n=f[4]+r),!Gc(a,e,e,g,h,l,m,f[7]||b.la||64,n||b.ab))return!1}}return!0}function Kb(a,b){a.B.push(b)}
|
||||
k.Ha=function(a,b,c){this.f=!0;this.na||(this.j&&F(this.j,32)&&E(this.j,"memory fault ("+c+") on "+J(this.j,a),!0,!0),b&&(this.b.ua|=b),this.b.wa(4,0,a))};function Hc(a){var b=a.f;a.f=!1;return b}function Bc(a,b,c){q("Memory block error ("+a+": "+p(b)+","+p(c)+")");return!1}function K(a){t.call(this,"Device",a,K,1024);this.f={fa:0,oc:-1}}z(K);k=K.prototype;
|
||||
k.Ia=function(a,b,c,d){this.v=b;this.C=a;this.b=c;this.j=d;var e=this;this.f.oc=Ic(c,function(){e.f.Nb|=128;e.f.Nb&64&&Jc(e.b,e.f.fe);e.C&&e.C.qa(1);Kc(e.b,e.f.oc,1E3/60)});this.f.fe=Tc(64,6);Ib(b,this,Uc);Kb(b,this.reset.bind(this));d&&Vc(d,256,function(a){var b=e.b;L(e,"KIPDR",b.P[0],0,a[0]);L(e,"KDPDR",b.P[0],8,a[0]);L(e,"KIPAR",b.ha[0],0,a[0]);L(e,"KDPAR",b.ha[0],8,a[0],!0);L(e,"SIPDR",b.P[1],0,a[0]);L(e,"SDPDR",b.P[1],8,a[0]);L(e,"SIPAR",b.ha[1],0,a[0]);L(e,"SDPAR",b.ha[1],8,a[0],!0);L(e,"UIPDR",
|
||||
b.P[3],0,a[0]);L(e,"UDPDR",b.P[3],8,a[0]);L(e,"UIPAR",b.ha[3],0,a[0]);L(e,"UDPAR",b.ha[3],8,a[0],!0)});H(this)};function L(a,b,c,d,e,f){a=a.j;if(!(e&&0>b.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+J(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Nb=128;Kc(this.b,this.f.oc,1E3/60,!0)};k.vd=function(){return this.f.Nb};k.pe=function(a){this.f.Nb=a&192};k.xd=function(){return Wc(this.b)};k.re=function(a){Xc(this.b,a&-129|this.b.Da&128)};k.yd=function(){return Yc(this.b)};
|
||||
|
|
@ -89,13 +89,13 @@ k.Re=function(a,b){b=b>>1&7;this.b.ha[3][b]=a;this.b.P[3][b]&=65295};k.Xd=functi
|
|||
k.Ae=function(a){this.b.u[7]=a};k.Db=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Za[a]};k.Hb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Za[b]=a};k.Gd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[1]};k.ye=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[1]=a};k.Hd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.La[3]};k.ze=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.La[3]=a};k.pd=function(a){return this.b.Jc[a-65504>>1]};
|
||||
k.je=function(a,b){this.b.Jc[b-65504>>1]=a};k.Gc=function(a){if(65520==a){a=0;switch(Cc){case Cc:a=this.v.gc}a=(a>>6)-1}else a=0;return a};k.Nc=function(){};k.Wd=function(){return 1};k.Oe=function(){};k.od=function(){return this.b.ua};k.ie=function(){this.b.ua=0};k.wd=function(){return this.b.Ic};k.qe=function(a,b){b&1||(a&=255);this.b.Ic=a};k.Bd=function(a,b){return b?0:this.b.Rb};k.te=function(a){ad(this.b,a)};k.Vd=function(a,b){return b?0:this.b.sb&65280};k.Ne=function(a){this.b.sb=a|255};
|
||||
k.Ed=function(){return bd(this.b)};k.we=function(a){cd(this.b,a&-1793|bd(this.b)&1792);this.b.J|=128};k.Mc=function(a,b){F(this)&&E(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)};
|
||||
var M={},Uc=(M[61568]=[null,null,K.prototype.ae,K.prototype.Te,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ud,K.prototype.Me,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Sd,K.prototype.Ke,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Td,K.prototype.Le,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Rd,K.prototype.Je,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.ud,K.prototype.oe,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.sd,K.prototype.me,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.td,
|
||||
K.prototype.ne,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.rd,K.prototype.le,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.Ad,K.prototype.se,"MMR3",1,1145],M[65382]=[null,null,K.prototype.vd,K.prototype.pe,"LKS"],M[65402]=[null,null,K.prototype.xd,K.prototype.re,"MMR0",1,1145],M[65404]=[null,null,K.prototype.yd,K.prototype.Mc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.zd,K.prototype.Mc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.$d,K.prototype.Se,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Yd,
|
||||
K.prototype.Qe,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Zd,K.prototype.Re,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Xd,K.prototype.Pe,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Cb,K.prototype.Gb,"R0SET0"],M[65473]=[null,null,K.prototype.Cb,K.prototype.Gb,"R1SET0"],M[65474]=[null,null,K.prototype.Cb,K.prototype.Gb,"R2SET0"],M[65475]=[null,null,K.prototype.Cb,K.prototype.Gb,"R3SET0"],M[65476]=[null,null,K.prototype.Cb,K.prototype.Gb,"R4SET0"],M[65477]=[null,null,K.prototype.Cb,K.prototype.Gb,
|
||||
"R5SET0"],M[65478]=[null,null,K.prototype.Fd,K.prototype.xe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Id,K.prototype.Ae,"R7KERNEL"],M[65480]=[null,null,K.prototype.Db,K.prototype.Hb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Db,K.prototype.Hb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Db,K.prototype.Hb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Db,K.prototype.Hb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Db,K.prototype.Hb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Db,
|
||||
K.prototype.Hb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Gd,K.prototype.ye,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Hd,K.prototype.ze,"R6USER",1,1145],M[65504]=[null,null,K.prototype.pd,K.prototype.je,"CTRL",8,1170],M[65520]=[null,null,K.prototype.Gc,K.prototype.Nc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Gc,K.prototype.Nc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Wd,K.prototype.Oe,"SYSID",1,1170],M[65526]=[null,null,K.prototype.od,K.prototype.ie,"CPUERR",1,1170],M[65528]=
|
||||
[null,null,K.prototype.wd,K.prototype.qe,"MB",1,1170],M[65530]=[null,null,K.prototype.Bd,K.prototype.te,"PIR"],M[65532]=[null,null,K.prototype.Vd,K.prototype.Ne,"SL"],M[65534]=[null,null,K.prototype.Ed,K.prototype.we,"PSW"],M);$a(function(){for(var a=D(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=A(d);switch(c.type){case "default":c=new K(c);B(c,d);break;case "pc11":c=new dd(c);B(c,d);break;case "rl11":c=new N(c),B(c,d)}}});var ed;
|
||||
if(Ab){var fd=new ArrayBuffer(2);(new DataView(fd)).setUint16(0,256,!0);ed=256===(new Uint16Array(fd))[0]}else ed=!1;var gd=ed;
|
||||
var M={},Uc=(M[61568]=[null,null,K.prototype.ae,K.prototype.Te,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ud,K.prototype.Me,"SIPDR",8,1145,256],M[62608]=[null,null,K.prototype.Sd,K.prototype.Ke,"SDPDR",8,1145,256],M[62624]=[null,null,K.prototype.Td,K.prototype.Le,"SIPAR",8,1145,256],M[62640]=[null,null,K.prototype.Rd,K.prototype.Je,"SDPAR",8,1145,256],M[62656]=[null,null,K.prototype.ud,K.prototype.oe,"KIPDR",8,1145,256],M[62672]=[null,null,K.prototype.sd,K.prototype.me,"KDPDR",8,1145,256],
|
||||
M[62688]=[null,null,K.prototype.td,K.prototype.ne,"KIPAR",8,1145,256],M[62704]=[null,null,K.prototype.rd,K.prototype.le,"KDPAR",8,1145,256],M[62798]=[null,null,K.prototype.Ad,K.prototype.se,"MMR3",1,1145,256],M[65382]=[null,null,K.prototype.vd,K.prototype.pe,"LKS"],M[65402]=[null,null,K.prototype.xd,K.prototype.re,"MMR0",1,1145,256],M[65404]=[null,null,K.prototype.yd,K.prototype.Mc,"MMR1",1,1145,256],M[65406]=[null,null,K.prototype.zd,K.prototype.Mc,"MMR2",1,1145,256],M[65408]=[null,null,K.prototype.$d,
|
||||
K.prototype.Se,"UIPDR",8,1145,256],M[65424]=[null,null,K.prototype.Yd,K.prototype.Qe,"UDPDR",8,1145,256],M[65440]=[null,null,K.prototype.Zd,K.prototype.Re,"UIPAR",8,1145,256],M[65456]=[null,null,K.prototype.Xd,K.prototype.Pe,"UDPAR",8,1145,256],M[65472]=[null,null,K.prototype.Cb,K.prototype.Gb,"R0SET0"],M[65473]=[null,null,K.prototype.Cb,K.prototype.Gb,"R1SET0"],M[65474]=[null,null,K.prototype.Cb,K.prototype.Gb,"R2SET0"],M[65475]=[null,null,K.prototype.Cb,K.prototype.Gb,"R3SET0"],M[65476]=[null,null,
|
||||
K.prototype.Cb,K.prototype.Gb,"R4SET0"],M[65477]=[null,null,K.prototype.Cb,K.prototype.Gb,"R5SET0"],M[65478]=[null,null,K.prototype.Fd,K.prototype.xe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Id,K.prototype.Ae,"R7KERNEL"],M[65480]=[null,null,K.prototype.Db,K.prototype.Hb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Db,K.prototype.Hb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Db,K.prototype.Hb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Db,K.prototype.Hb,"R3SET1",1,1145],M[65484]=
|
||||
[null,null,K.prototype.Db,K.prototype.Hb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Db,K.prototype.Hb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Gd,K.prototype.ye,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Hd,K.prototype.ze,"R6USER",1,1145],M[65504]=[null,null,K.prototype.pd,K.prototype.je,"CTRL",8,1170],M[65520]=[null,null,K.prototype.Gc,K.prototype.Nc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Gc,K.prototype.Nc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Wd,K.prototype.Oe,
|
||||
"SYSID",1,1170],M[65526]=[null,null,K.prototype.od,K.prototype.ie,"CPUERR",1,1170],M[65528]=[null,null,K.prototype.wd,K.prototype.qe,"MB",1,1170],M[65530]=[null,null,K.prototype.Bd,K.prototype.te,"PIR"],M[65532]=[null,null,K.prototype.Vd,K.prototype.Ne,"SL"],M[65534]=[null,null,K.prototype.Ed,K.prototype.we,"PSW"],M);
|
||||
$a(function(){for(var a=D(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=A(d);switch(c.type){case "default":c=new K(c);B(c,d);break;case "pc11":c=new dd(c);B(c,d);break;case "rl11":c=new N(c),B(c,d)}}});var ed;if(Ab){var fd=new ArrayBuffer(2);(new DataView(fd)).setUint16(0,256,!0);ed=256===(new Uint16Array(fd))[0]}else ed=!1;var gd=ed;
|
||||
function I(a,b,c,d,e,f){this.v=a;this.id=hd+=2;this.b=null;this.F=b;this.Tb=c;this.size=d||0;this.type=e||id;this.f=e==jd;this.controller=null;uc(this);this.Wa=this.Vc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],kd(this,f.Qc);else if(Ab)this.B=new ArrayBuffer(this.size),this.D=new DataView(this.B,0,this.size),this.G=new Uint8Array(this.B,0,this.size),this.I=new Uint16Array(this.B,0,this.size>>1),this.b=new Int32Array(this.B,0,this.size>>2),kd(this,gd?ld:md);else{a=this.b=Array(this.size>>
|
||||
2);for(f=0;f<a.length;f++)a[f]=0;kd(this,nd)}else kd(this)}var id=0,Cc=1,jd=2,Ac=4,Dc=["NONE","RAM","ROM","VID","H/W"],hd=0;
|
||||
I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ab)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.D.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(Ab)for(b=0;b<a.length;b++)this.D.setInt32(b<<2,a[b],!0);else this.b=a;return this.Wa=!0}return!1},ob:function(a,b){b?this.C++||od(this,pd,!1):this.g++||qd(this,pd,!1)},K:function(a,b){this.j&&F(this.j,128)&&E(this.j,
|
||||
|
|
@ -127,7 +127,7 @@ function cd(a,b){a.Z=b<<12;a.$=~b&4;a.V=b<<14;a.U=b<<16;if((b^a.N)&2048)for(var
|
|||
function pe(a,b){a.J&128||(a.Z=a.$=a.U=b,a.V=a.Z^a.U>>1)}function qe(a,b,c,d){a.J&128||(a.Z=a.$=a.U=b,a.V=(c^d)&(d^b))}k.wa=function(a,b,c){if(!this.M){0>this.Aa?this.Aa=bd(this):this.B||(a=4,this.ua|=4,this.u[6]=4,c=-3);this.pa=a;this.B=0;var d=this.sa(a|this.S),e=this.sa(a+2&65535|this.S);cd(this,e&-12289|this.Aa>>2&12288);re(this,this.Aa);re(this,this.u[7]);Q(this,d);this.J&=~(b|18);this.J|=9;this.Aa=-1;this.md=a;this.ld=c;if(-3<=c)throw a;}};
|
||||
function se(a){var b=te(a),c=te(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);Q(a,b);cd(a,c);a.J&=-17}function Ec(a,b){var c=b>>13&31;31>c&&(b=a.Ta&32?a.Sb[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||
function ue(a,b,c){var d,e,f;if(!(c&a.L))return f=b&65535,57344<=f&&(f|=a.yc),f;d=b>>13;a.Ta&a.$c[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ha[a.B][d]<<6)+(b&8191)&a.Ea;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.P[a.B][d]=e;if(f!=(4194170&a.Ea)||a.B)a.bb=a.B,a.mb=d;g&&(g&57344&&(0<=a.Aa&&(g|=128),a.Da&57344||
|
||||
(g|=a.bb<<5|a.mb<<1,Xc(a,a.Da&-61695|g),a.wa(168,64,-1))),a.Da&61440||!(f<(4191360&a.Ea)||f>(4194239&a.Ea))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ve(a,b){return a.v.Yb(b)}function te(a){var b=a.sa(a.u[6]|a.S);a.u[6]=a.u[6]+2&65535;return b}function re(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.pa=a.pa&65535|(a.pa&-65536)<<8|16121856;we(a,0,c);a.Ub(c,b)}function we(a,b,c){!a.B&&c<=a.sb&&(b||4<c)&&(1145<=a.Xa&&c<=a.sb-32?(a.ua|=4,a.u[6]=4,a.wa(4,0,-3)):(a.ua|=8,a.J|=32))}
|
||||
(g|=a.bb<<5|a.mb<<1,Xc(a,a.Da&-57599|g),a.wa(168,64,-1))),a.Da&61440||!(f<(4191360&a.Ea)||f>(4194239&a.Ea))||(a.Da|=4096,a.Da&512&&(a.J|=64)));return f}function ve(a,b){return a.v.Yb(b)}function te(a){var b=a.sa(a.u[6]|a.S);a.u[6]=a.u[6]+2&65535;return b}function re(a,b){var c=a.u[6]-2&65535;a.u[6]=c;a.pa=a.pa&65535|(a.pa&-65536)<<8|16121856;we(a,0,c);a.Ub(c,b)}function we(a,b,c){!a.B&&c<=a.sb&&(b||4<c)&&(1145<=a.Xa&&c<=a.sb-32?(a.ua|=4,a.u[6]=4,a.wa(4,0,-3)):(a.ua|=8,a.J|=32))}
|
||||
function xe(a,b,c,d){var e,f,g=d&8?0:a.S;switch(b){case 0:return a.wa(4,0,-2),0;case 1:return 6==c&&d&4&&we(a,b,a.u[6]),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.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.sa(e)|g;a.b-=8;break;case 6:return e=a.sa(Qd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Qd(a,2)),e=e+
|
||||
a.u[c]&65535,e=a.sa(e|a.S)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;a.pa=a.pa&65535|(a.pa&-65536)<<8|(f<<3&248|c)<<16;6==c&&0>f&&we(a,b,a.u[6]);return e}k.Zb=function(a){if(!this.L)return this.v.Zb(a);this.M++;a=ve(this,ue(this,a,3));this.M--;return a};k.fb=function(a){if(!this.L)return this.v.fb(a);this.M++;a=this.Hc(ue(this,a,2));this.M--;return a};k.tb=function(a,b){this.L?(this.M++,a=ue(this,a,5),a&1&&this.b--,this.v.Eb(a,b),this.M--):this.v.tb(a,b)};
|
||||
k.Fb=function(a,b){this.L?(this.M++,this.Oc(ue(this,a,4),b),this.M--):this.v.Fb(a,b)};k.Xc=function(a,b,c){return xe(this,a,b,c)};k.Yc=function(a,b,c){return ue(this,xe(this,a,b,c),c)};k.Hc=function(a){return this.v.ma(this.Mb=a)};k.be=function(a){return this.v.ma(this.Mb=ue(this,a,2))};k.Oc=function(a,b){this.v.ib(this.Mb=a,b&65535)};k.Ue=function(a,b){this.v.ib(this.Mb=ue(this,a,4),b)};
|
||||
|
|
@ -251,7 +251,7 @@ function ni(a,b,c){var d,e=(c?a.L:a.mb).F;c=!1;if(void 0!==b){b=$h(a,b);"%"==b.c
|
|||
function gi(a,b){a.j=a;a.la=a.Tc=536870912;a.ja=null;a.za=[];b=Xh(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Cb){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.la|=Cb[c],a.i(c+" messages enabled"))}}function Vc(a,b,c){for(var d in Cb)if(b==Cb[d]){a.Ma[d]=c;break}}
|
||||
k.wc=function(a){a=a.toUpperCase();var b=ji[a];null==b&&(b=-1,"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7<b))&&(b=-1);return b};function si(a){return 6>a?"R"+a:6==a?"SP":"PC"}
|
||||
k.xc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.Za[a-8];else if(20>a)b=this.b.La[a-16];else{var c=this.b,d=this.w;switch(a){case 20:b=bd(this.b);break;case 21:b=c.Rb;break;case 22:b=c.ua;break;case 23:b=c.sb;break;case 24:b=Wc(c);break;case 25:b=Yc(c);break;case 26:b=Zc(c);break;case 27:b=c.Ta;break;case 28:d&&(b=d.ta);break;case 29:d&&(b=d.rb);break;case 30:d&&mc(d)&&(b=d.Ya)}}return b};
|
||||
k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.pa&65535).F));if(this.la&1073741824)this.za.push(a);else if(!this.ja||a!=this.ja){this.ja=a;if(this.la&-2147483648&&this.b&&this.b.A.W||wb(this,!0))this.da(),a+=" (cpu halted)";this.i(a);this.b&&(a=this.b,Ed(a),a.za=0,a.qa())}};
|
||||
k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.pa&65535).F));if(this.la&1073741824)this.za.push(a);else if(!this.ja||a!=this.ja){this.ja=a;b=!1;if(this.la&-2147483648&&this.b&&(b=this.b.A.W)||wb(this,!0))this.da(),b&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Ed(a),a.za=0,a.qa())}};
|
||||
function fi(a){var b;if(!He(a))a.H&&a.H.length&&a.i("instruction history buffer freed"),a.ba=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b<a.H.length;b++)a.H[b]=Y();a.ba=0;a.i("instruction history buffer allocated")}}k.jb=function(a,b){if(!ti(this,b))return!1;this.b.jb(a);return!0};
|
||||
k.kb=function(a,b,c){if(!ti(this))return!1;null===b&&(b=!this.yb||"tr"==this.yb);this.K=0;a||He(this)&&Ie(this,this.b.u[7],0);try{a=Fd(this.b,a);var d=this.b.kb(a);0<d&&(Sb(this.b,d),this.K+=d,Tb(this.b,d,!0),Ub(this.b,d),this.Aa++)}catch(e){"number"!=typeof e&&(this.K=0,zb(this.b,e.stack||e.message))}!1!==c&&(this.w&&this.w.stop&&this.w.stop(),this.C.qa(-1));zd(this,b||!1);return 0<this.K};k.da=function(a){this.b&&this.b.da(a)};
|
||||
function zd(a,b){if(a.lb){void 0===b&&(b=!0);var c;c=a.b;if(c=c.J&8?c.md|c.ld<<8:0){var d=c>>8;a.i("trapped to "+J(a,c&255,1)+" ("+(0>d?Bb[-d]:J(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.O?ui(a):vi(a)}}function ti(a,b){var c;(c=!a.b||!xb(a.b))||(c=a.b,c.A.ia?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!yb(a.b)}k.Ka=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function Fb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0<g&&k<a.h.length;){var l=a.h[k
|
|||
function Eb(a,b,c){var d=[];for(b>>>=a.c;0<c&&b<a.h.length;)d.push(a.h[b++]),c-=a.b;return d}function Db(a,b,c,d){var e=0;for(b>>>=a.c;0<c&&b<a.h.length;){var f=d[e++];if(!f)break;a.h[b++]=f;c-=a.b}}function Kb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.oa)>>>a.c].Fb(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.oa)>>>a.c].V(b&a.l,b)}h.mb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.oa)>>>this.c;this.m=!1;this.g++;a=this.h[c].Xb(b,a);this.g--;return a};
|
||||
function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.oa)>>>a.c].Jb(b&a.l,c&255,b)}h.$a=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.g++;this.h[(a&this.oa)>>>this.c].Kb(a&this.l,b&255,a);this.g--};function Ob(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.oa)>>>a.c].sb(b&a.l,c&65535,b)}h.pb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.oa)>>>this.c;this.m=!1;this.g++;this.h[d].ec(c,b&65535,a);this.g--};
|
||||
function Pb(a){for(var b=0,c=[],d=0;d<a.A;d++){var e=a.h[d];if(e.wa||e.kc){c[b++]=d;var f=b++;if(e=e.save()){for(var g=0,k=0,l=[];g<e.length;){for(var n=e[g],p=g+1;p<e.length&&e[p]===n;)p++;l[k++]=p-g;l[k++]=n;g=p}l.length<e.length&&(e=l)}c[f]=e}}return c}function Qb(a,b,c,d,e,f,g,k,l){for(;b<=c;b+=2){var n=b&Bb;if(void 0!==a.Aa[n])return t("I/O address already registered: "+m(b,8,!0)),!1;a.Aa[n]=[d,e,f,g,l||"unknown",k,!1]}return!0}
|
||||
function cb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ea)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,w=0;w<u;w++,e+=2)if(p&&1<u&&(p=f[4]+w),!Qb(a,e,e,g,k,l,n,b.qd||64,p||b.za))return!1}}return!0}function eb(a,b){a.w.push(b)}
|
||||
function cb(a,b,c){for(var d in c){var e=+d,f=c[d];if(!(f[6]&&f[6]>a.a.Ea)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,w=0;w<u;w++,e+=2)if(p&&1<u&&(p=f[4]+w),!Qb(a,e,e,g,k,l,n,f[7]||b.qd||64,p||b.za))return!1}}return!0}function eb(a,b){a.w.push(b)}
|
||||
function J(a,b,c){a.m=!0;a.g||(c&&(a.a.fa|=c),K(a.a,4,0,b))}function Rb(a){var b=a.m;a.m=!1;return b}function Hb(a,b,c){t("Memory block error ("+a+": "+m(b)+","+m(c)+")");return!1}function L(a){y.call(this,"Device",a,L,1024);this.b={L:0,Ib:-1}}A(L);h=L.prototype;h.ja=function(a,b,c,d){this.h=b;this.l=a;this.a=c;this.F=d;var e=this;this.b.Ib=Sb(c,function(){e.b.Ya|=128;e.b.Ya&64&&Tb(e.a,e.b.rd);e.l&&e.l.ya(1);Ub(e.a,e.b.Ib,1E3/60)});this.b.rd=Vb(64,6);cb(b,this,Wb);eb(b,this.reset.bind(this));F(this)};
|
||||
h.reset=function(){this.b.Ya=128;Ub(this.a,this.b.Ib,1E3/60,!0)};h.Fc=function(){return this.b.Ya};h.Dd=function(a){this.b.Ya=a&192};h.Hc=function(){var a=this.a,b=a.Z;b&57344||(b=b&-3199|a.bb<<5|a.cb<<1);return b};h.Fd=function(a){Xb(this.a,a&-129|this.a.Z&128)};h.Ic=function(){var a=this.a;a.Z&57344||(a.Db=a.A>>16&65535);a=a.Db;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Jc=function(){var a=this.a;a.Z&57344||(a.Eb=a.A&65535);return a.Eb};h.Kc=function(){return this.a.Ba};
|
||||
h.Gd=function(a){var b=this.a;1170>b.Ea&&(a&=-49);b.Ba!=a&&(b.Ba=a,b.Ra=a&16?4194303:262143,Yb(b))};h.ld=function(a){a=a>>1&63;var b=this.a.ab[a>>1];return a&1?b>>16:b&65535};h.ge=function(a,b){b=b>>1&63;var c=b>>1;this.a.ab[c]=b&1?this.a.ab[c]&65535|(a&63)<<16:this.a.ab[c]&-65536|a&65534};h.dd=function(a){return this.a.H[1][a>>1&7]};h.$d=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.bd=function(a){return this.a.H[1][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};
|
||||
|
|
@ -82,13 +82,13 @@ h.gd=function(a){return this.a.X[3][(a>>1&7)+8]};h.ce=function(a,b){b=(b>>1&7)+8
|
|||
h.Na=function(a){a&=7;return this.a.C&2048?this.a.f[a]:this.a.Fa[a]};h.Pa=function(a,b){b&=7;this.a.C&2048?this.a.f[b]=a:this.a.Fa[b]=a};h.Qc=function(){return 1==(this.a.C&49152)>>14?this.a.f[6]:this.a.pa[1]};h.Md=function(a){1==(this.a.C&49152)>>14?this.a.f[6]=a:this.a.pa[1]=a};h.Rc=function(){return 3==(this.a.C&49152)>>14?this.a.f[6]:this.a.pa[3]};h.Nd=function(a){3==(this.a.C&49152)>>14?this.a.f[6]=a:this.a.pa[3]=a};h.zc=function(a){return this.a.$b[a-65504>>1]};
|
||||
h.xd=function(a,b){this.a.$b[b-65504>>1]=a};h.Wb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.ub}a=(a>>6)-1}else a=0;return a};h.dc=function(){};h.fd=function(){return 1};h.be=function(){};h.yc=function(){return this.a.fa};h.wd=function(){this.a.fa=0};h.Gc=function(){return this.a.Zb};h.Ed=function(a,b){b&1||(a&=255);this.a.Zb=a};h.Lc=function(a,b){return b?0:this.a.Gb};h.Hd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Gb=a;b.u|=2};
|
||||
h.ed=function(a,b){return b?0:this.a.ob&65280};h.ae=function(a){this.a.ob=a|255};h.Oc=function(){return Zb(this.a)};h.Kd=function(a){$b(this.a,a&-1793|Zb(this.a)&1792);this.a.u|=128};h.cc=function(){};
|
||||
var M={},Wb=(M[61568]=[null,null,L.prototype.ld,L.prototype.ge,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.dd,L.prototype.$d,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.bd,L.prototype.Yd,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.cd,L.prototype.Zd,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.ad,L.prototype.Xd,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Ec,L.prototype.Cd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.Cc,L.prototype.Ad,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Dc,
|
||||
L.prototype.Bd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.Bc,L.prototype.zd,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Kc,L.prototype.Gd,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Fc,L.prototype.Dd,"LKS"],M[65402]=[null,null,L.prototype.Hc,L.prototype.Fd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Ic,L.prototype.cc,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Jc,L.prototype.cc,"MMR2",1,1145],M[65408]=[null,null,L.prototype.kd,L.prototype.fe,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.hd,
|
||||
L.prototype.de,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.jd,L.prototype.ee,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.gd,L.prototype.ce,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET0"],M[65473]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET0"],M[65474]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET0"],M[65475]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET0"],M[65476]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET0"],M[65477]=[null,null,L.prototype.Ma,L.prototype.Oa,
|
||||
"R5SET0"],M[65478]=[null,null,L.prototype.Pc,L.prototype.Ld,"R6KERNEL"],M[65479]=[null,null,L.prototype.Sc,L.prototype.Od,"R7KERNEL"],M[65480]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Na,L.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Na,
|
||||
L.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Qc,L.prototype.Md,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Rc,L.prototype.Nd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.zc,L.prototype.xd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Wb,L.prototype.dc,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Wb,L.prototype.dc,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.fd,L.prototype.be,"SYSID",1,1170],M[65526]=[null,null,L.prototype.yc,L.prototype.wd,"CPUERR",1,1170],M[65528]=
|
||||
[null,null,L.prototype.Gc,L.prototype.Ed,"MB",1,1170],M[65530]=[null,null,L.prototype.Lc,L.prototype.Hd,"PIR"],M[65532]=[null,null,L.prototype.ed,L.prototype.ae,"SL"],M[65534]=[null,null,L.prototype.Oc,L.prototype.Kd,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=C(d);switch(c.type){case "default":c=new L(c);D(c,d);break;case "pc11":c=new ac(c);D(c,d);break;case "rl11":c=new N(c),D(c,d)}}});var bc;
|
||||
if(Xa){var cc=new ArrayBuffer(2);(new DataView(cc)).setUint16(0,256,!0);bc=256===(new Uint16Array(cc))[0]}else bc=!1;var dc=bc;
|
||||
var M={},Wb=(M[61568]=[null,null,L.prototype.ld,L.prototype.ge,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.dd,L.prototype.$d,"SIPDR",8,1145,256],M[62608]=[null,null,L.prototype.bd,L.prototype.Yd,"SDPDR",8,1145,256],M[62624]=[null,null,L.prototype.cd,L.prototype.Zd,"SIPAR",8,1145,256],M[62640]=[null,null,L.prototype.ad,L.prototype.Xd,"SDPAR",8,1145,256],M[62656]=[null,null,L.prototype.Ec,L.prototype.Cd,"KIPDR",8,1145,256],M[62672]=[null,null,L.prototype.Cc,L.prototype.Ad,"KDPDR",8,1145,256],
|
||||
M[62688]=[null,null,L.prototype.Dc,L.prototype.Bd,"KIPAR",8,1145,256],M[62704]=[null,null,L.prototype.Bc,L.prototype.zd,"KDPAR",8,1145,256],M[62798]=[null,null,L.prototype.Kc,L.prototype.Gd,"MMR3",1,1145,256],M[65382]=[null,null,L.prototype.Fc,L.prototype.Dd,"LKS"],M[65402]=[null,null,L.prototype.Hc,L.prototype.Fd,"MMR0",1,1145,256],M[65404]=[null,null,L.prototype.Ic,L.prototype.cc,"MMR1",1,1145,256],M[65406]=[null,null,L.prototype.Jc,L.prototype.cc,"MMR2",1,1145,256],M[65408]=[null,null,L.prototype.kd,
|
||||
L.prototype.fe,"UIPDR",8,1145,256],M[65424]=[null,null,L.prototype.hd,L.prototype.de,"UDPDR",8,1145,256],M[65440]=[null,null,L.prototype.jd,L.prototype.ee,"UIPAR",8,1145,256],M[65456]=[null,null,L.prototype.gd,L.prototype.ce,"UDPAR",8,1145,256],M[65472]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET0"],M[65473]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET0"],M[65474]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET0"],M[65475]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET0"],M[65476]=[null,null,
|
||||
L.prototype.Ma,L.prototype.Oa,"R4SET0"],M[65477]=[null,null,L.prototype.Ma,L.prototype.Oa,"R5SET0"],M[65478]=[null,null,L.prototype.Pc,L.prototype.Ld,"R6KERNEL"],M[65479]=[null,null,L.prototype.Sc,L.prototype.Od,"R7KERNEL"],M[65480]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET1",1,1145],M[65484]=
|
||||
[null,null,L.prototype.Na,L.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Na,L.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Qc,L.prototype.Md,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Rc,L.prototype.Nd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.zc,L.prototype.xd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Wb,L.prototype.dc,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Wb,L.prototype.dc,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.fd,L.prototype.be,
|
||||
"SYSID",1,1170],M[65526]=[null,null,L.prototype.yc,L.prototype.wd,"CPUERR",1,1170],M[65528]=[null,null,L.prototype.Gc,L.prototype.Ed,"MB",1,1170],M[65530]=[null,null,L.prototype.Lc,L.prototype.Hd,"PIR"],M[65532]=[null,null,L.prototype.ed,L.prototype.ae,"SL"],M[65534]=[null,null,L.prototype.Oc,L.prototype.Kd,"PSW"],M);
|
||||
Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b<a.length;b++){var c,d=a[b];c=C(d);switch(c.type){case "default":c=new L(c);D(c,d);break;case "pc11":c=new ac(c);D(c,d);break;case "rl11":c=new N(c),D(c,d)}}});var bc;if(Xa){var cc=new ArrayBuffer(2);(new DataView(cc)).setUint16(0,256,!0);bc=256===(new Uint16Array(cc))[0]}else bc=!1;var dc=bc;
|
||||
function I(a,b,c,d,e,f){this.h=a;this.id=ec+=2;this.a=null;this.Ka=b;this.rb=c;this.size=d||0;this.type=e||fc;this.l=e==gc;this.controller=null;Ab(this);this.wa=this.kc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],hc(this,f.gc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),hc(this,dc?ic:jc);else{a=this.a=Array(this.size>>
|
||||
2);for(f=0;f<a.length;f++)a[f]=0;hc(this,kc)}else hc(this)}var fc=0,Ib=1,gc=2,Gb=4,Jb=["NONE","RAM","ROM","VID","H/W"],ec=0;
|
||||
I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Xa)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.c.getInt32(b<<2,!0);else a=this.a;return a},restore:function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Xa)for(b=0;b<a.length;b++)this.c.setInt32(b<<2,a[b],!0);else this.a=a;return this.wa=!0}return!1},v:function(a,b){J(this.h,b,32);return 255},g:function(a,b,c){J(this.h,c,32)},w:function(a,b){return this.Fb(a++,b++)|
|
||||
|
|
@ -116,7 +116,7 @@ function Zb(a){return a.C=a.C&63728|Fc(a)|(a.i&65535?0:4)|(a.g&32768?2:0)|P(a)}f
|
|||
function Mc(a,b){a.u&128||(a.s=a.i=a.m=b,a.g=a.s^a.m>>1)}function Nc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.g=(c^d)&(d^b))}function K(a,b,c,d){if(!a.ua){0>a.Ja?a.Ja=Zb(a):a.v||(b=4,a.fa|=4,a.f[6]=4,d=-3);a.A=b;a.v=0;var e=a.V(b|a.R),f=a.V(b+2&65535|a.R);$b(a,f&-12289|a.Ja>>2&12288);Oc(a,a.Ja);Oc(a,a.f[7]);Q(a,e);a.u&=~(c|18);a.u|=9;a.Ja=-1;if(-3<=d)throw b;}}function Pc(a){var b=Qc(a),c=Qc(a)&-1793;a.C&49152&&(c=c&-225|a.C&63712);Q(a,b);$b(a,c);a.u&=-17}
|
||||
function Lb(a,b){var c=b>>13&31;31>c&&(b=a.Ba&32?a.ab[c]+(b&8190)&4194302:b&-3932161);return b}
|
||||
function Rc(a,b,c){var d,e,f;if(!(c&a.aa))return f=b&65535,57344<=f&&(f|=a.Rb),f;d=b>>13;a.Ba&a.sd[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.Ra;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!=(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(f!=(4194170&a.Ra)||a.v)a.bb=a.v,a.cb=d;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.Z&57344||
|
||||
(g|=a.bb<<5|a.cb<<1,Xb(a,a.Z&-61695|g),K(a,168,64,-1))),a.Z&61440||!(f<(4191360&a.Ra)||f>(4194239&a.Ra))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Qc(a){var b=a.V(a.f[6]|a.R);a.f[6]=a.f[6]+2&65535;return b}function Oc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A=a.A&65535|(a.A&-65536)<<8|16121856;Sc(a,0,c);a.sb(c,b)}function Sc(a,b,c){!a.v&&c<=a.ob&&(b||4<c)&&(1145<=a.Ea&&c<=a.ob-32?(a.fa|=4,a.f[6]=4,K(a,4,0,-3)):(a.fa|=8,a.u|=32))}
|
||||
(g|=a.bb<<5|a.cb<<1,Xb(a,a.Z&-57599|g),K(a,168,64,-1))),a.Z&61440||!(f<(4191360&a.Ra)||f>(4194239&a.Ra))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Qc(a){var b=a.V(a.f[6]|a.R);a.f[6]=a.f[6]+2&65535;return b}function Oc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.A=a.A&65535|(a.A&-65536)<<8|16121856;Sc(a,0,c);a.sb(c,b)}function Sc(a,b,c){!a.v&&c<=a.ob&&(b||4<c)&&(1145<=a.Ea&&c<=a.ob-32?(a.fa|=4,a.f[6]=4,K(a,4,0,-3)):(a.fa|=8,a.u|=32))}
|
||||
function Tc(a,b,c,d){var e,f,g=d&8?0:a.R;switch(b){case 0:return K(a,4,0,-2),0;case 1:return 6==c&&d&4&&Sc(a,b,a.f[6]),a.a-=3,7==c?a.f[c]:a.f[c]|g;case 2:f=2;e=a.f[c];7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!=c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!=c&&(e|=g);e=a.V(e)|g;a.a-=8;break;case 6:return e=a.V(Hc(a,2)),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=a.V(Hc(a,2)),e=e+a.f[c]&
|
||||
65535,e=a.V(e|a.R)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;6==c&&0>f&&Sc(a,b,a.f[6]);return e}h.mb=function(a){if(!this.aa)return this.h.mb(a);this.ua++;a=this.Yb(Rc(this,a,2));this.ua--;return a};h.$a=function(a,b){this.aa?(this.ua++,a=Rc(this,a,5),a&1&&this.a--,Nb(this.h,a,b),this.ua--):this.h.$a(a,b)};h.pb=function(a,b){this.aa?(this.ua++,this.fc(Rc(this,a,4),b),this.ua--):this.h.pb(a,b)};h.mc=function(a,b,c){return Tc(this,a,b,c)};
|
||||
h.nc=function(a,b,c){return Rc(this,Tc(this,a,b,c),c)};h.Yb=function(a){return Mb(this.h,this.Xa=a)};h.md=function(a){return Mb(this.h,this.Xa=Rc(this,a,2))};h.fc=function(a,b){Ob(this.h,this.Xa=a,b&65535)};h.he=function(a,b){Ob(this.h,this.Xa=Rc(this,a,4),b)};function Uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Tc(a,b,d,2),c&65536||61440!==(a.C&61440)&&(d&=65535),a.v=a.C>>12&3,c=a.V(d|c&a.R),a.v=a.C>>14&3):c=6!=d||(a.C>>2&12288)===(a.C&12288)?a.f[d]:a.pa[a.C>>12&3];return c}
|
||||
|
|
|
|||
Loading…
Reference in a new issue