Tidied up some Bus and Disk messages

This commit is contained in:
Jeff 2017-07-20 21:25:54 -07:00 • committed by Jeff Parsons
commit d8f98fb263
11 changed files with 57 additions and 56 deletions

View file

@ -326,7 +326,9 @@ class Bus extends Component {
*/
this.cpu.flushPageBlocks();
if (!this.cpu.isRunning()) { // allocation messages at "run time" are bit too much
this.status(Math.floor(size / 1024) + "Kb " + Memory.TYPE.NAMES[type] + " at " + Str.toHex(addr));
var kb = (size / 1024)|0;
var sb = kb? (kb + "Kb ") : (size + " bytes ");
this.status(sb + Memory.TYPE.NAMES[type] + " at " + Str.toHex(addr));
}
return true;
}