summaryrefslogtreecommitdiff
path: root/zdis.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-09 19:24:18 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-09 19:24:18 -0700
commit7d51c0144bcc12d49cc6d4d5207e086451b9b6b7 (patch)
tree7538c25a07d98ba45cb2da15442f01990439ae10 /zdis.c
parent57456f30398fdb57a8bf1a201e222f121570a4a1 (diff)
Fix terminal instruction detection in disassembler
Diffstat (limited to 'zdis.c')
-rw-r--r--zdis.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/zdis.c b/zdis.c
index f7c7201..1a032e3 100644
--- a/zdis.c
+++ b/zdis.c
@@ -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;
+ }
}
}
}