ref: af22cf182bac86007c5c1231b88a11cff22c4869
parent: 5a0fcda4c83b2ee3918655a5f5c393613fea50fe
author: ISSOtm <eldredhabert0@gmail.com>
date: Fri Mar 20 16:22:19 EDT 2020
Simplify `out_PCRelByte` by using PC
--- a/src/asm/section.c
+++ b/src/asm/section.c
@@ -405,7 +405,7 @@
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;