summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.myr8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.myr b/main.myr
index 0fd856c..292d2d6 100644
--- a/main.myr
+++ b/main.myr
@@ -86,7 +86,9 @@ const main = {
;;
// JP
| 0x1:
- pc = ((opcode & 0x0f) << 8) | arg
+ pc = (opcode & 0x0f : uint16)
+ pc <<= 8
+ pc |= (arg : uint16)
// CALL
| 0x2:
sp++
@@ -94,7 +96,9 @@ const main = {
std.die("stack overflow")
;;
stk[sp] = pc
- pc = ((opcode & 0x0f) << 8) | arg
+ pc = (opcode & 0x0f : uint16)
+ pc <<= 8
+ pc |= (arg : uint16)
// SE
| 0x3:
if reg[opcode & 0x0f] == arg