summaryrefslogtreecommitdiff
path: root/main.myr
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 14:02:51 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 14:02:51 -0500
commit438e75b69611e598816b9f0b9d3cbd942cbe3fc5 (patch)
tree187ec87848c380d57568c1d1b81bc4f4d9cd7b9f /main.myr
parent2346e752d01524c40cc1c4671247798c89802de9 (diff)
Implement SNE (register arguments) and LD for the I register
Diffstat (limited to 'main.myr')
-rw-r--r--main.myr10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.myr b/main.myr
index d7fc392..fcccb77 100644
--- a/main.myr
+++ b/main.myr
@@ -168,6 +168,16 @@ const main = {
reg[opcode & 0x0f] <<= 1
| _: std.die("unimplemented opcode\n")
;;
+ // SNE
+ | 0x9:
+ if reg[opcode & 0x0f] != reg[(arg & 0xf0) >> 4]
+ pc += 2
+ ;;
+ // LD (I)
+ | 0xa:
+ I = (opcode & 0x0f : uint16)
+ I <<= 8
+ I |= (arg : uint16)
| _ : std.die("unimplemented opcode\n")
;;
pc += 2