summaryrefslogtreecommitdiff
path: root/z80inst.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 /z80inst.c
parent57456f30398fdb57a8bf1a201e222f121570a4a1 (diff)
Fix terminal instruction detection in disassembler
Diffstat (limited to 'z80inst.c')
-rw-r--r--z80inst.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/z80inst.c b/z80inst.c
index e6d2a33..d5def01 100644
--- a/z80inst.c
+++ b/z80inst.c
@@ -1531,4 +1531,11 @@ uint8_t z80_word_reg(uint8_t reg)
}
}
+uint8_t z80_is_terminal(z80inst * inst)
+{
+ return inst->op == Z80_RET || inst->op == Z80_RETI || inst->op == Z80_RETN || inst->op == Z80_JP
+ || inst->op == Z80_JR || inst->op == Z80_HALT || (inst->op == Z80_NOP && inst->immed == 42);
+}
+
+