summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-08-09 17:52:46 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2020-08-09 17:52:46 -0400
commit2b03202a30e9da09bfc5c0d382b1f5d2287287a4 (patch)
tree6b918e0f2eee2b56e07a95d8b8397143d24f9106 /assemble.c
parentf16af793a58a9f398fc598a0c129e3bb90eb61f6 (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/assemble.c b/assemble.c
index ed56cc8..d127ce5 100644
--- a/assemble.c
+++ b/assemble.c
@@ -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) {