diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-06-15 13:56:42 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-06-15 13:56:42 -0400 |
commit | 83835b229abdee7b4e79156c4f76f854476127f5 (patch) | |
tree | 856c2fefad2c5f001aa72278b3b6c490899a190a | |
parent | d5bb94cc655d4410544394478587d36b1041d9d3 (diff) | |
download | gb-c-83835b229abdee7b4e79156c4f76f854476127f5.tar.bz2 gb-c-83835b229abdee7b4e79156c4f76f854476127f5.zip |
fix RST 18H, populate rst()
-rwxr-xr-x[-rw-r--r--] | gen.rb | 0 | ||||
-rw-r--r-- | ops.yaml | 15 |
2 files changed, 9 insertions, 6 deletions
@@ -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 |