From af22cf182bac86007c5c1231b88a11cff22c4869 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 20 Mar 2020 20:22:19 +0100 Subject: [PATCH] Simplify `out_PCRelByte` by using PC --- src/asm/section.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asm/section.c b/src/asm/section.c index 4f0a1257..46536519 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -405,7 +405,7 @@ void out_PCRelByte(struct Expression *expr) nPC++; } else { /* Target is relative to the byte *after* the operand */ - uint16_t address = pCurrentSection->nOrg + nPC + 1; + uint16_t address = sym_GetValue(pPCSymbol) + 1; /* The offset wraps (jump from ROM to HRAM, for loopexample) */ int16_t offset = expr->nVal - address;