diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-04-29 22:58:45 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-04-29 22:58:45 -0700 |
commit | ae4a60bf38d7942d2b75a98588a76e80c28047d2 (patch) | |
tree | b49ee9113dc481cd1220b9c39e4c2434afd4c5a4 /z80inst.c | |
parent | ce28b14ff4a8f56a7f9653db90a1aa685714dda6 (diff) |
Fix decoding of address in JP and JPCC instructions in the Z80 core
Diffstat (limited to 'z80inst.c')
-rw-r--r-- | z80inst.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1249,7 +1249,7 @@ uint8_t * z80_decode(uint8_t * istream, z80inst * decoded) } if ((decoded->addr_mode & 0x1F) == Z80_IMMED && decoded->op != Z80_RST && decoded->op != Z80_IM) { decoded->immed = *(++istream); - if ((decoded->reg >= Z80_BC && decoded->reg < Z80_UNUSED) || decoded->op == Z80_CALL || decoded->op == Z80_CALLCC) { + if ((decoded->reg >= Z80_BC && decoded->reg < Z80_UNUSED) || decoded->op == Z80_CALL || decoded->op == Z80_CALLCC || decoded->op == Z80_JP || decoded->op == Z80_JPCC) { decoded->immed |= *(++istream) << 8; } else if (decoded->immed & 0x80) { decoded->immed |= 0xFF00; |