diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-09 19:24:18 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-09 19:24:18 -0700 |
commit | 7d51c0144bcc12d49cc6d4d5207e086451b9b6b7 (patch) | |
tree | 7538c25a07d98ba45cb2da15442f01990439ae10 /zdis.c | |
parent | 57456f30398fdb57a8bf1a201e222f121570a4a1 (diff) |
Fix terminal instruction detection in disassembler
Diffstat (limited to 'zdis.c')
-rw-r--r-- | zdis.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -135,9 +135,6 @@ int main(int argc, char ** argv) //z80_disasm(&instbuf, disbuf); //printf("%X: %s\n", address, disbuf); - if (instbuf.op == Z80_HALT || instbuf.op == Z80_RET || instbuf.op == Z80_RETI || instbuf.op == Z80_RETN || instbuf.op == Z80_RST) { - break; - } switch (instbuf.op) { case Z80_JR: @@ -155,9 +152,14 @@ int main(int argc, char ** argv) case Z80_JPCC: case Z80_CALL: case Z80_CALLCC: + case Z80_RST: reference(instbuf.immed); def = defer(instbuf.immed, def); break; + default: + if (z80_is_terminal(&instbuf)) { + address = filesize + 1; + } } } } |