summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-12-27 17:13:34 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-12-27 17:13:34 -0500
commit73e659f5de2db13f45af20f0dd4f4d158464e116 (patch)
treee87cdd6de628df948cb96782236542efb6f60beb
parent0667a16224c5501e38b96c8c17cd041b5d2c73c3 (diff)
Implement SKP instruction.
-rw-r--r--asm.myr9
1 files changed, 9 insertions, 0 deletions
diff --git a/asm.myr b/asm.myr
index 94d80f0..3d70adc 100644
--- a/asm.myr
+++ b/asm.myr
@@ -152,6 +152,15 @@ const emitinstr = {p
| _:
-> `std.Err(std.fmt("invalid arguments to SNE: {}, {}", p[1], p[2]))
;;
+ | "SKP":
+ if p.len < 2
+ -> `std.Err("SKP missing address")
+ ;;
+ match parselit(p[1])
+ | `Register(n): b = `std.Some([0xe0 | (n & 0x0f), 0x9e])
+ | _:
+ -> `std.Err(std.fmt("invalid argument to SKP: {}", p[1]))
+ ;;
| _:
-> `std.Err(std.fmt("unrecognized instruction {}", p[0]))
;;