ulas: pass now resets the currently set section
authorLukas Krickl <lukas@krickl.dev>
Sun, 19 Jan 2025 06:25:03 +0000 (07:25 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 19 Jan 2025 06:25:03 +0000 (07:25 +0100)
TODO.md
src/ulas.c

diff --git a/TODO.md b/TODO.md
index 673a46b0b7ef8f0fbd22d60ee449f01e997c7f86..0d6c2cd5b119b3b93f0f3406f0f3c35f69f6eae2 100644 (file)
--- 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
index 2b0acbd74062f30e5254414483d3a50736aa1db8..b533cf2e0c373d5da3e4f2f361b6e6da29888360 100644 (file)
@@ -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;