aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/asm_pass3.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/asm_pass3.py b/src/asm_pass3.py
index edfd79f..7fcb44d 100644
--- a/src/asm_pass3.py
+++ b/src/asm_pass3.py
@@ -30,6 +30,9 @@ def pass_3(result2: Result2) -> Result3:
address = eval_expr(symbols, args[0])
continue
case "@label":
+ label = args[0]
+ if label in symbols:
+ raise Exception(f"When defining label {label} as {address:>04x}, symbol {label} already defined as {symbols[label]:>04x}")
symbols[args[0]] = address
continue
case "@let":