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.c | |
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.c')
-rw-r--r-- | asmmon.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -305,7 +305,7 @@ void list(uint16_t start, uint16_t end, uint8_t all, uint8_t ln, uint8_t addr, u if (t->next && !isopdone(t)) { op_done = isopdone(t->next); } - if (am != 0xFF && op_done && t->id != TOK_RS && !t->next) { + if (am != 0xFF && op_done && t->id != TOK_RS) { switch (am) { case EIND: putchar('('); am_done = 0; break; case BREG: putchar('b'); am_done = 1; break; @@ -418,10 +418,16 @@ int asmmon(const char *fn) { case PTOK_DQUOTE : case PTOK_SQUOTE : case PTOK_B : + case PTOK_E : case PTOK_X : case PTOK_Y : case PTOK_S : case PTOK_P : + case PTOK_A : + case PTOK_C : + case PTOK_D : + case PTOK_F : + case PTOK_R : case PTOK_MINUS : case PTOK_PLUS : is_valid = 1; break; default : is_valid = 0; stop = 1; break; @@ -440,7 +446,7 @@ int asmmon(const char *fn) { case 'h': cmds = (isshcmd || !strcasecmp(cmd, "help" )) << 4; break; case 'i': cmds = (isshcmd || !strcasecmp(cmd, "inst" )) << 5; break; case 'd': cmds = (isshcmd || !strcasecmp(cmd, "done" )) << 6; break; - case 's': cmds = (isshcmd || !strcasecmp(cmd, "set" )) << 7; break; + case 's': cmds = (isshcmd || !strcasecmp(cmd, "sett" )) << 7; break; case ' ': case '\t': default: |