Fixed some regressions in MACRO-10 support (all the KA10 diagnostics archived so far assemble and pass again)

This commit is contained in:
Jeff 2017-03-31 18:42:57 -07:00 committed by Jeff Parsons
commit f928fd85f5
2 changed files with 16 additions and 16 deletions

View file

@ -1644,9 +1644,8 @@ class DebuggerPDP10 extends Debugger {
if (!sOpcode) {
/*
* MACRO-10 permits instructions to be assembled without an explicit opcode;
* an address expression is sufficient. This is done to generate UUO opcodes,
* for example.
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address expression),
* so if that's all we have, skip the opcode parsing.
*/
if (sOperands) opCode = opMask = 0;
}
@ -1710,10 +1709,10 @@ class DebuggerPDP10 extends Debugger {
if (opCode >= 0) break;
}
/*
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address reference),
* MACRO-10 also allows instructions to be assembled without an opcode (ie, just an address expression),
* so we'll give that a try next (as long as we're not mashing two symbols together).
*/
if (opCode < 0 && sOperands && !sOperands.match(/^[0-9A-Z$%.?]/i)) {
if (opCode < 0 && (!sOperands || !sOperands.match(/^[0-9A-Z$%.?]/i))) {
sOperands = sOpcode + sOperands;
sOpcode = "";
opCode = 0;