From c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Tue, 25 Jul 2023 02:52:33 +0200 Subject: Add label support to curses source view --- asm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'asm.c') diff --git a/asm.c b/asm.c index cd18747..9de05c7 100644 --- a/asm.c +++ b/asm.c @@ -266,7 +266,7 @@ tpu_validate(struct tpu *tpu) for (i = 0; i < TPU_MAX_INST; i++) { if (tpu->insts[i].ops[0].type == OP_LABEL) { - dst = label_map_get(&tpu->labels, + dst = label_map_get(&tpu->label_map, tpu->insts[i].ops[0].val.label); if (dst == TPU_MAX_INST) die("load: tpu X%lu Y%lu, label '%s' not defined", @@ -394,9 +394,9 @@ tis_load(struct tis *tis, const char *filepath) tok_next_in(&tokenizer, TOK_NL, -1); break; case TOK_LABEL: - if (!label_map_add(&tpu->labels, + if (!label_map_add(&tpu->label_map, tokenizer.tokstr, tpu->inst_cnt)) - die("load: line %lu, duplicate label", + die("load: line %lu, duplicate label (pos)", tokenizer.lineno); break; case TOK_NL: -- cgit v1.2.3-71-gd317