summaryrefslogtreecommitdiff
path: root/ops.yaml
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-06-25 19:33:30 -0400
committerPaul Duncan <pabs@pablotron.org>2018-06-25 19:33:30 -0400
commita30ab5a748196a1364b38f7551fe4f9e859e141c (patch)
tree992671c39772befe515e071e8ba13c3b79c8f3bc /ops.yaml
parenta0f7b0d142a00171b37b9f7b7b9d15d70ea7724d (diff)
downloadgb-c-a30ab5a748196a1364b38f7551fe4f9e859e141c.tar.bz2
gb-c-a30ab5a748196a1364b38f7551fe4f9e859e141c.zip
add sbc_d8()
Diffstat (limited to 'ops.yaml')
-rw-r--r--ops.yaml12
1 files changed, 11 insertions, 1 deletions
diff --git a/ops.yaml b/ops.yaml
index 3d6f7b8..71489b5 100644
--- a/ops.yaml
+++ b/ops.yaml
@@ -3579,6 +3579,8 @@ ops:
hex: 0xDD
cat: "invalid"
op: XX
+ code: |
+ cpu_set_state(ctx, old_pc, GB_CPU_STATE_INVALID);
- id: SBC A, d8
hex: 0xDE
cat: "8-bit math"
@@ -3594,7 +3596,7 @@ ops:
h: H
c: C
code: |
- cpu_set_state(ctx, old_pc, GB_CPU_STATE_INVALID);
+ sbc_d8(ctx, old_pc + 1);
- id: RST 18H
hex: 0xDF
cat: "jumps/calls"
@@ -9503,6 +9505,14 @@ templates:
}
static void
+ sbc_d8(
+ gb_t * const ctx,
+ const uint16_t addr
+ ) {
+ sbc(ctx, mmu_rb(ctx, addr));
+ }
+
+ static void
and(
gb_t * const ctx,
const uint8_t val