From 1a8eb561f724f3189fd782bb07d30760c03cbd3e Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Wed, 1 Jan 2020 13:30:36 -0500 Subject: Implement SE and SNE --- main.myr | 10 ++++++++++ 1 file changed, 10 insertions(+) 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") ;; ;; -- cgit v1.3