diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-06-25 19:33:30 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-06-25 19:33:30 -0400 |
commit | a30ab5a748196a1364b38f7551fe4f9e859e141c (patch) | |
tree | 992671c39772befe515e071e8ba13c3b79c8f3bc | |
parent | a0f7b0d142a00171b37b9f7b7b9d15d70ea7724d (diff) | |
download | gb-c-a30ab5a748196a1364b38f7551fe4f9e859e141c.tar.bz2 gb-c-a30ab5a748196a1364b38f7551fe4f9e859e141c.zip |
add sbc_d8()
-rw-r--r-- | ops.yaml | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |