diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-01-27 13:42:57 -0500 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-01-27 13:42:57 -0500 |
commit | cd6982e5da1f5facdc1e0154b3a27c01e8b076c9 (patch) | |
tree | c8db5ade59d054c6f88ff2ab2cb99df45b250fad /asmmon.h | |
parent | 1700d8d10453ffe046438de0e6fbd496def915a1 (diff) |
- Fixed some bugs in the emulator.
- Started work on implementing the Super VIA emulation.
- Added support for disabling disassembly per
instruction, when in debug mode.
- Did some more work on rewriting the SuB Suite to
work with the new calling convention.
- Rewrote the symbol handling code in the emulator's
assembler, to make it both simpler, and to add
support for arbitrarily deep symbol scopes.
- Added support for arbitrarily deep local symbol
scopes.
For example, to declare a symbol of depth 2, you add
two '@' characters to the start of the symbol name.
In other words, the number of '@' characters before
the symbol name is what determines the scope of that
symbol.
And to use a symbol thats outside the current
scope, you would use the same syntax as using a
struct member, so you would do `global.local`.
Diffstat (limited to 'asmmon.h')
-rw-r--r-- | asmmon.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -4,11 +4,11 @@ #define MAX_TOK 0x1000 -typedef struct tok token ; -typedef struct ln line ; -typedef struct sym symbol ; -typedef struct fix fixup ; -typedef struct inst instruction ; +typedef struct tok token; +typedef struct ln line; +typedef struct sym symbol; +typedef struct fix fixup; +typedef struct inst instruction; struct tok { @@ -59,6 +59,7 @@ struct sym { symbol *prev; symbol *down; symbol *up; + int depth; uint16_t count; uint64_t val; uint8_t isstruct : 1; @@ -88,6 +89,7 @@ extern symbol *locals; extern symbol *last_loc; extern fixup *fixups; extern fixup *last_fix; +extern tmp_symtab *tmp_sym_table; extern uint8_t lex_type; |