summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-27 09:07:50 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-10-27 09:07:50 (GMT)
commit8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903 (patch)
tree6c9e0f61868315d92ac3592c683a40a2485f3320
parent0f135cc50615925cc763d01a503d2924698ff7f5 (diff)
downloadabc80sim-8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903.zip
abc80sim-8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903.tar.gz
abc80sim-8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903.tar.bz2
abc80sim-8ecf87c27eb672b6be5f0d9bc70ccba2d54a7903.tar.xz
z80: on accepting an interrupt, increase R by one
That, at least, is the claim. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--z80.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/z80.c b/z80.c
index 1081932..2c86c74 100644
--- a/z80.c
+++ b/z80.c
@@ -1317,6 +1317,7 @@ static void do_nmi(void)
z80_state.iff2 = z80_state.iff1;
z80_state.iff1 = 0;
REG_PC = 0x66;
+ inc_r();
}
@@ -1345,6 +1346,8 @@ do_int(void)
default: /* oops, unkown interrupt mode... */
break;
}
+
+ inc_r();
}