diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-09 17:52:46 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-09 17:52:46 -0400 |
commit | 2b03202a30e9da09bfc5c0d382b1f5d2287287a4 (patch) | |
tree | 6b918e0f2eee2b56e07a95d8b8397143d24f9106 /assemble.c | |
parent | f16af793a58a9f398fc598a0c129e3bb90eb61f6 (diff) |
Added the bitwise OR, left shift, and right shift
expressions to the emulator's assembler.
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -8,6 +8,9 @@ uint8_t isexpr(uint8_t type, uint8_t dbg) { case EXPR_MINUS: case EXPR_LOW: case EXPR_HIGH: + case EXPR_OR: + case EXPR_LSHFT: + case EXPR_RSHFT: return 1; default: return 0; @@ -76,6 +79,9 @@ uint64_t get_val(token *t, uint64_t addr, uint8_t size, uint8_t dbg) { switch (type) { case EXPR_PLUS : (isstart) ? (value = tmp_val) : (value += tmp_val); break; case EXPR_MINUS: (isstart) ? (value = -tmp_val) : (value -= tmp_val); break; + case EXPR_OR : value |= tmp_val; break; + case EXPR_LSHFT: value <<= tmp_val; break; + case EXPR_RSHFT: value >>= tmp_val; break; case EXPR_LOW : value = tmp_val; switch (size) { |