summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 13:30:36 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 13:30:36 -0500
commit1a8eb561f724f3189fd782bb07d30760c03cbd3e (patch)
tree1e756f94f0e3dbfa1bbbf27e5f60287457573003
parent615cc2b7cf222deed55764bcd41a80c725d837af (diff)
Implement SE and SNE
-rw-r--r--main.myr10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.myr b/main.myr
index 68aef16..f79b3d6 100644
--- a/main.myr
+++ b/main.myr
@@ -95,6 +95,16 @@ const main = {
;;
stk[sp] = pc
pc = ((opcode & 0x0f) << 8) | arg
+ // SE
+ | 0x3:
+ if reg[opcode & 0x0f] == arg
+ pc += 2
+ ;;
+ // SNE
+ | 0x4:
+ if reg[opcode & 0x0f] != arg
+ pc += 2
+ ;;
| _ : std.die("unimplemented opcode\n")
;;
;;