More robust handling of PDP-10 memory errors (so that when a file is assembled and loaded into non-existent memory, an error is generated); bumped the PDP-10 test machine to 32K words

This commit is contained in:
Jeff 2017-03-30 09:57:53 -07:00 committed by Jeff Parsons
commit ab41fdef3c
7 changed files with 73 additions and 52 deletions

View file

@ -2528,7 +2528,7 @@ class DebuggerPDP10 extends Debugger {
var dbg = this.dbg;
var nWords = 0, addrLo = null, addrHi = 0;
aWords.forEach(function(w, addr) {
bus.setWordDirect(addr, w);
bus.setWord(addr, w);
if (addrLo == null) addrLo = addr;
if (addr > addrHi) addrHi = addr;
nWords++;
@ -2665,10 +2665,15 @@ class DebuggerPDP10 extends Debugger {
if (addrStart == null) addrStart = addrLoad;
dbg.loadImage(macro10.getImage(), addrStart);
} catch(e) {
dbg.println(e.message);
nErrorCode = -1; // fake error so that command processing stops
if (typeof e == "number") {
nErrorCode = e || -1;
} else {
dbg.println(e.message);
nErrorCode = -1; // fake error so that command processing stops
}
}
} else {
}
if (nErrorCode) {
dbg.println("error (" + nErrorCode + ") processing " + (sURL || sFile));
}
dbg.macro10 = null;