summaryrefslogtreecommitdiff
path: root/z80.c
diff options
context:
space:
mode:
Diffstat (limited to 'z80.c')
-rw-r--r--z80.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/z80.c b/z80.c
index 69231e6..506f998 100644
--- a/z80.c
+++ b/z80.c
@@ -48,6 +48,8 @@ static void InitTables()
static void Z80_CheckInterrupt(Z80 *cpu)
{
+ Z80Word vector;
+
/* Check interrupts
*/
if (PRIV->raise)
@@ -99,7 +101,8 @@ static void Z80_CheckInterrupt(Z80 *cpu)
case 2:
PUSH(cpu->PC);
- cpu->PC=(Z80Word)cpu->I*256+PRIV->devbyte;
+ vector=(Z80Word)cpu->I*256+PRIV->devbyte;
+ cpu->PC=PEEKW(vector);
PRIV->memptr.w=cpu->PC;
break;
}