diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-04-25 21:01:11 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-04-25 21:01:11 -0700 |
commit | 46db74a053d7fca9dee69e8737a435e65b538577 (patch) | |
tree | fa645a9997fac9f040b6664ffbaf9b0733fdc71e /z80inst.c | |
parent | 68be5ac1a6452de7333d77b91d5a9634aac05b5b (diff) |
Get Z80 core working for simple programs
Diffstat (limited to 'z80inst.c')
-rw-r--r-- | z80inst.c | 12 |
1 files changed, 6 insertions, 6 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) { + if ((decoded->reg >= Z80_BC && decoded->reg < Z80_UNUSED) || decoded->op == Z80_CALL || decoded->op == Z80_CALLCC) { decoded->immed |= *(++istream) << 8; } else if (decoded->immed & 0x80) { decoded->immed |= 0xFF00; @@ -1338,16 +1338,16 @@ char *z80_mnemonics[Z80_OTDR+1] = { }; char * z80_regs[Z80_USE_IMMED] = { - "b", "c", - "d", + "b", "e", - "h", + "d", "l", - "ixh", + "h", "ixl", - "iyh", + "ixh", "iyl", + "iyh", "i", "r", "a", |