From 6b94054c71a0f371d83e97cee0200c29e685c5c2 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 3 Nov 2023 13:39:19 +0200 Subject: Work on TPU --- src/asm_pass3.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/asm_pass3.py') 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": -- cgit v1.3