From d31aed21b27fbda68abe088d657ba18455607cc4 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 17 Aug 2020 20:37:44 -0400 Subject: - Fixed some bugs in the emulator's assembler. - Simplified the effective address functions. - Made SuBEditor a bit faster. - JSR, and RTS now support using the RS prefix, which is used to specify the return address size, with an RS prefix of 0 being a return address size of 64 bits, rather than 8 bits. --- lexer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lexer.c') diff --git a/lexer.c b/lexer.c index 63eef47..e315155 100644 --- a/lexer.c +++ b/lexer.c @@ -653,6 +653,22 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) { } if (i) { l->tok = tokens; + token *tok = tokens; + if (tok->id == TOK_SYM && tok->next) { + symbol *s = tok->sym; + for (; tok; tok = tok->next) { + switch (tok->id) { + case TOK_HEX : + case TOK_BIN : + case TOK_DEC : + case TOK_CHAR: + case TOK_EXPR: + s->val = get_val(tok, address, 3, dbg); + tok = skip_expr(tok, dbg); + break; + } + } + } tokens = NULL; last_tok = NULL; bytecount dummy; -- cgit v1.2.3-13-gbd6f