From: Lukas Krickl Date: Sun, 19 Jan 2025 06:25:03 +0000 (+0100) Subject: ulas: pass now resets the currently set section X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=281831d7312f10b6589a3f71bf4084138b539a75;p=ulas%2F.git ulas: pass now resets the currently set section --- diff --git a/TODO.md b/TODO.md index 673a46b..0d6c2cd 100644 --- a/TODO.md +++ b/TODO.md @@ -4,4 +4,5 @@ - Add label size to listing and symbol files. Labels should have the size of `current_label` - `previous_label` unless .org was used. - Add `#if` preprocessor directive that can evaluate expressions - Add `.error` and `.warning` directives -- Add `.section "name"` directive allowing custom sections for symbol files +- Add failing tests for most failure cases +- Assert `.section` in full test diff --git a/src/ulas.c b/src/ulas.c index 2b0acbd..b533cf2 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -89,6 +89,7 @@ void ulas_nextpass(void) { ulas.address = ulascfg.org; ulas.chksm = 0; ulas.filename = ulas.initial_filename; + ulas.section[0] = '\0'; // reset section for (int i = 0; i < ULAS_CHARCODEMAPLEN; i++) { ulas.charcodemap[i] = (char)i;