summaryrefslogtreecommitdiff
path: root/zruntime.S
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-06-02 21:38:18 -0700
committerMike Pavone <pavone@retrodev.com>2013-06-02 21:38:18 -0700
commit4066439cd031e2bac9b450bc3ef4a777dc1fe1c6 (patch)
treed5409930bc3aa15ce2e55a146c762c739329613a /zruntime.S
parent4d2c9b8e60afc95138fed359deaf7d50335707c9 (diff)
Clear IFF1 and IFF2 when an interrupt is taken on the Z80
Diffstat (limited to 'zruntime.S')
-rw-r--r--zruntime.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/zruntime.S b/zruntime.S
index 2531eb4..d6250fb 100644
--- a/zruntime.S
+++ b/zruntime.S
@@ -38,7 +38,11 @@ z80_handle_cycle_limit_int:
cmp 116(%rsi), %ebp
jb zskip_int
mov 112(%rsi), %ebp /* set cycle limit to sync cycle */
+ /* not sure this is really necessary now that IFF1 and IFF2 are geting cleared */
movl $0xFFFFFFFF, 116(%rsi) /* make sure the interrupt doesn't fire more than once */
+ /* disable interrupts */
+ movb $0, 96(%rsi)
+ movb $0, 97(%rsi)
add $7, %ebp
sub $2, %r9w
mov %r9w, %r14w