From 83835b229abdee7b4e79156c4f76f854476127f5 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 15 Jun 2018 13:56:42 -0400 Subject: fix RST 18H, populate rst() --- ops.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'ops.yaml') diff --git a/ops.yaml b/ops.yaml index 360fadb..30451df 100644 --- a/ops.yaml +++ b/ops.yaml @@ -3349,12 +3349,12 @@ ops: c: C code: | invalid(ctx, old_pc); - - id: RST 16H + - id: RST 18H hex: 0xDF cat: "jumps/calls" op: RST dst: PC - addr: "0x16" + addr: "0x18" len: 1 time: 16 flags: @@ -3363,7 +3363,7 @@ ops: h: c: code: | - rst(ctx, 0x16); + rst(ctx, 0x18); - id: LDH (a8), A hex: 0xE0 cat: "8-bit load/store/move" @@ -8667,10 +8667,13 @@ templates: static void rst( gb_t * const ctx, - const uint8_t val + const uint16_t addr ) { - UNUSED(ctx); - UNUSED(val); + // push pc + push_rw(ctx, RW_PC); + + // jump + cpu_ww(ctx, RW_PC, addr); } static void -- cgit v1.2.3