From 1b6a91c574dfeab2f25e23eac46c0082dcf307b2 Mon Sep 17 00:00:00 2001 From: "paul.kimpel@digm.com" Date: Wed, 20 Mar 2013 05:58:20 +0000 Subject: [PATCH] 1. Commit emulator files at the point where the Mark XIII MCP completely finishes initialization and is able to interact through the SPO. 2. Commit improvements to SyllableDebugger for Silent Running and fixed-column register displays. --- emulator/B5500CentralControl.js | 2 +- emulator/B5500Processor.js | 9 ++-- webUI/tools/B5500SyllableDebugger.html | 69 ++++++++++++++++++++++---- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/emulator/B5500CentralControl.js b/emulator/B5500CentralControl.js index 4616652..7c03932 100644 --- a/emulator/B5500CentralControl.js +++ b/emulator/B5500CentralControl.js @@ -544,7 +544,7 @@ B5500CentralControl.prototype.tock = function tock() { *************************************/ } interval = (that.nextTimeStamp += B5500CentralControl.rtcTick) - thisTime; - that.timer = setTimeout(function() {that.tock()}, (interval < 0 ? 1 : interval)); + that.timer = setTimeout(that.tock, (interval < 0 ? 1 : interval)); }; /**************************************/ diff --git a/emulator/B5500Processor.js b/emulator/B5500Processor.js index b8fcca1..4d92e3a 100644 --- a/emulator/B5500Processor.js +++ b/emulator/B5500Processor.js @@ -2590,7 +2590,7 @@ B5500Processor.prototype.applyRCW = function(word, inline) { this.V = f = word % 8; // [7:3], V word = (word-f)/8; this.H = word % 8; // [4:3], H - word = (word - word % 0x10)/0x10; + word = (word - word % 16)/16; return word % 2; // [2:1], DESC bit }; @@ -2634,9 +2634,8 @@ B5500Processor.prototype.enterSubroutine = function(descriptorCall) { /* Enters a subroutine via the present Program Descriptor in A as part of an OPDC or DESC syllable. Also handles accidental entry */ var aw = this.A; // local copy of word in A reg - var bw; // local copy of word in B reg var arg = this.cc.bit(aw, 5); // descriptor argument bit - var mode = this.cc.bit(aw, 4); // descriptor mode bit (1-char mode) + var mode = this.cc.bit(aw, 4); // descriptor mode bit (1=char mode) if (arg && !this.MSFF) { ; // just leave the Program Descriptor on TOS @@ -2650,6 +2649,7 @@ B5500Processor.prototype.enterSubroutine = function(descriptorCall) { this.B = this.buildMSCW(); this.BROF = 1; this.adjustBEmpty(); + this.F = this.S; } // Push a RCW @@ -2705,7 +2705,7 @@ B5500Processor.prototype.exitSubroutine = function(inline) { } } else { // flag bit is set result = this.applyRCW(this.B, inline); - this.X = this.B % 0x8000000000; // save F setting from MSCW to restore S at end + this.X = this.B % 0x8000000000; // save F setting from RCW to restore S at end this.S = this.F; this.loadBviaS(); // B = [S], fetch the MSCW @@ -4496,6 +4496,7 @@ B5500Processor.prototype.run = function() { /*************************************************************** * SECL: Syllable Execution Complete Level * ***************************************************************/ + if ((this === this.cc.P1 ? this.cc.IAR : this.I) && this.NCSF) { // there's an interrupt and we're in normal state this.T = 0x0609; // inject 3011=SFI into T diff --git a/webUI/tools/B5500SyllableDebugger.html b/webUI/tools/B5500SyllableDebugger.html index 98ddb2c..3797603 100644 --- a/webUI/tools/B5500SyllableDebugger.html +++ b/webUI/tools/B5500SyllableDebugger.html @@ -19,9 +19,12 @@