pkimpel / retro-b5500

Web-based emulator and operating environment for the Burroughs B5500 computer system.
http://www.phkimpel.us/B5500/
MIT License
76 stars 7 forks source link

statement at line 4385 of B5500Processor.js is probably wrong #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
it looks like there is one parameter too many:
 case 0x25: // XX45: ISO=Variable Field Isolate op
this.adjustAFull();
t2 = variant >>> 3; // number of whole chars
if (t2) {
t1 = this.G*6 + this.H; // starting source bit position
t2 = t2*6 - (variant & 7) - this.H; // number of bits
if (t1+t2 <= 48) {
this.A = this.cc.fieldIsolate(this.A, t1, t2);
} else { // handle wrap-around in the source value
this.A = this.cc.fieldInsert(
//                           vvvvvvvvvvvvvvvvvvvvv
this.cc.fieldIsolate(this.A, 0, t2-48+t1, t1+t2-48), 48-t2, 48-t1,
//                           ^^^^^^^^^^^^^^^^^^^^^
this.cc.fieldIsolate(this.A, t1, 48-t1));
}
// approximate the shift cycle counts
this.cycleCount += (variant >>> 3) + (variant & 7) + this.G + this.H;
this.G = (this.G + variant >>> 3) & 7;
this.H = 0;
}
break;

Original issue reported on code.google.com by petim...@planet.nl on 20 Nov 2013 at 9:03

GoogleCodeExporter commented 9 years ago
FYI:
petimixa = PEterTInekeMIrellaXAvier
Used this as our family-account 

Original comment by pfgroots...@gmail.com on 23 Nov 2013 at 11:17

GoogleCodeExporter commented 9 years ago
statement is corrected in release 0.17 

Original comment by pfgroots...@gmail.com on 16 Dec 2013 at 8:18

GoogleCodeExporter commented 9 years ago
Thanks, Peter -- good catch. You are correct that there is an extra parameter, 
but it was not fixed in 0.17 -- there was an unrelated change to the line in 
that release. I have the fix queued up for 0.18.

This being Javascript, the fourth parameter is simply ignored by 
cc.fieldIsolate(). In any case, it's a benign error. Note that the expressions 
for the third and fourth parameters are equivalent. It appears that I 
introduced the error in r245 while debugging the ISO syllable almost a year ago.

Original comment by paul.kimpel@digm.com on 29 Dec 2013 at 4:15

GoogleCodeExporter commented 9 years ago
Correction -- the additional parameter was introduced in r271 of the 
retro-b5500 repo.

Original comment by paul.kimpel@digm.com on 29 Dec 2013 at 4:31