Fixed old, longstanding, and surprisingly bad bug in cleanMemory() for all machine implementations

This commit is contained in:
Jeff Parsons 2017-07-12 21:02:30 -07:00 committed by Jeff Parsons
commit ec438be5c9
24 changed files with 145 additions and 128 deletions

View file

@ -327,12 +327,14 @@ class BusPDP10 extends Component {
{
var fClean = true;
var iBlock = addr >>> this.nBlockShift;
var sizeBlock = this.nBlockSize - (addr & this.nBlockLimit);
while (size > 0 && iBlock < this.aBusBlocks.length) {
if (this.aBusBlocks[iBlock].fDirty) {
this.aBusBlocks[iBlock].fDirty = fClean = false;
this.aBusBlocks[iBlock].fDirtyEver = true;
}
size -= this.nBlockSize;
size -= sizeBlock;
sizeBlock = this.nBlockSize;
iBlock++;
}
return fClean;