Memory can now be explicitly "zeroed" with any byte pattern (but the default is still zero); note that memory blocks are still always zero-initialized when first created

This commit is contained in:
Jeff 2016-11-03 15:50:19 -07:00 committed by Jeff Parsons
commit 3b88e4c53c
5 changed files with 18 additions and 10 deletions

View file

@ -239,7 +239,12 @@ RAMPDP11.prototype.initRAM = function()
RAMPDP11.prototype.reset = function()
{
if (this.fAllocated) {
this.bus.zeroMemory(this.addrRAM, this.sizeRAM);
/*
* TODO: Add a configuration parameter for selecting the byte pattern on reset?
* Note that when memory blocks are originally created, they are currently always
* zero-initialized, so this would only affect resets.
*/
this.bus.zeroMemory(this.addrRAM, this.sizeRAM, 0);
if (this.abInit) {
this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM, true);
}