The symbol's evaluation by the assembler and linker was very inconsistent
This commit is contained in:
ISSOtm
2020-02-07 13:18:49 +01:00
parent 9687e6e1dd
commit ea52e45335
3 changed files with 12 additions and 31 deletions

View File

@@ -154,6 +154,14 @@ void rpn_Symbol(struct Expression *expr, char *tzSym)
pushbyte(expr, *tzSym++);
pushbyte(expr, 0);
expr->nRPNPatchSize += 5;
/* RGBLINK assumes PC is at the byte being computed... */
if (sym == pPCSymbol && nPCOffset) {
struct Expression pc = *expr, offset;
rpn_Number(&offset, nPCOffset);
rpn_SUB(expr, &pc, &offset);
}
} else {
rpn_Number(expr, sym_GetConstantValue(tzSym));
}