From 1fa0c5b6863f30603e5a05e1d2f0c5d56f7c9187 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 21 Mar 2021 10:42:50 -0700 Subject: [PATCH] Added alderwicks fix --- assembler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assembler.c b/assembler.c index d6ff683..3e712d6 100644 --- a/assembler.c +++ b/assembler.c @@ -349,8 +349,10 @@ pass1(FILE *f) if(skipblock(w, &cbits, '[', ']')) { if(w[0] == '[' || w[0] == ']') continue; - if(sihx(w)) - addr += slen(w) == 4 ? 2 : 1; + if(slen(w) == 4 && sihx(w)) + addr += 2; + else if(slen(w) == 2 && sihx(w)) + addr += 1; else addr += slen(w); } else if(w[0] == '%') {