Mercurial > repos > blastem
diff z80inst.c @ 235:d9bf8e61c33c
Get Z80 core working for simple programs
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 25 Apr 2013 21:01:11 -0700 |
parents | 4d4559b04c59 |
children | 682e505f5757 |
line wrap: on
line diff
--- a/z80inst.c Mon Apr 22 23:56:13 2013 -0700 +++ b/z80inst.c Thu Apr 25 21:01:11 2013 -0700 @@ -1249,7 +1249,7 @@ } 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_regs[Z80_USE_IMMED] = { + "c", "b", - "c", + "e", "d", - "e", + "l", "h", - "l", + "ixl", "ixh", - "ixl", + "iyl", "iyh", - "iyl", "i", "r", "a",