summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-27 09:09:23 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-10-27 09:09:23 (GMT)
commit250cd657fc50bd6577a819d4d2d2fcd22978f839 (patch)
tree8f594ae40f9fcb651cf186ca2a96d90ab319a4d2
parent8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903 (diff)
downloadabc80sim-250cd657fc50bd6577a819d4d2d2fcd22978f839.zip
abc80sim-250cd657fc50bd6577a819d4d2d2fcd22978f839.tar.gz
abc80sim-250cd657fc50bd6577a819d4d2d2fcd22978f839.tar.bz2
abc80sim-250cd657fc50bd6577a819d4d2d2fcd22978f839.tar.xz
z80: DD CB/FD CB increment R by 2, not 3
For some reason, DD CB/FD CB instructions increment R by 2 and not 3. They are weird enough as it is, so perhaps they fetch the opcode on the immediate path. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--z80.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/z80.c b/z80.c
index 2c86c74..d57fe30 100644
--- a/z80.c
+++ b/z80.c
@@ -2171,7 +2171,7 @@ static void do_CB_instruction(wordregister *ix)
addr = ix->word + (int8_t)mem_read(REG_PC++);
instruction = mem_read(REG_PC++);
- inc_r();
+ /* No R increment here, for some reason */
data = mem_read(addr);