diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-07-25 02:52:33 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-07-25 02:52:33 +0200 |
| commit | c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35 (patch) | |
| tree | 41a8b648e48ca58f9edb67ebeda5cd82a0519f6a /asm.c | |
| parent | d07257c9e92e8697915aaf40070c6228a5855104 (diff) | |
| download | tis100-c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35.tar.gz tis100-c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35.zip | |
Add label support to curses source view
Diffstat (limited to 'asm.c')
| -rw-r--r-- | asm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |
