summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 14:05:20 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 14:06:28 -0500
commitfda114b48f16caac4362b7205ef7111db264d7cc (patch)
tree7db61de4c00552e61b394d7103e38db107d61c2e
parent438e75b69611e598816b9f0b9d3cbd942cbe3fc5 (diff)
Implement JP + V0 and RND
-rw-r--r--main.myr9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.myr b/main.myr
index fcccb77..0684871 100644
--- a/main.myr
+++ b/main.myr
@@ -178,6 +178,15 @@ const main = {
I = (opcode & 0x0f : uint16)
I <<= 8
I |= (arg : uint16)
+ // JP + V0
+ | 0xb:
+ pc = (opcode & 0x0f : uint16)
+ pc <<= 8
+ pc |= (arg : uint16)
+ pc += (reg[0] : uint16)
+ // RND
+ | 0xc:
+ reg[opcode & 0x0f] = std.rand(0, 256) & arg
| _ : std.die("unimplemented opcode\n")
;;
pc += 2