] On the MSX interrupts the interrupt ends with a EI:RET. (No RETI, it has no
] use).
]
] But it has a reason I forgot. What's the actual effect of RETI? What are
] the differences with an EI/RET? And with an EI/RETI?
It is mainly a feature for hardwaredevelopers that use the Z80 as a
At 09:17 PM 7/22/99 +0200, you wrote:
Example: You have an interrupt which during the interruptroutine. At the end
this results in one extra word on the stack, and the interrupt will be
restarted. But if the interrupt once again occurs during the
interruptroutine you'll get 2 words on the
On the MSX interrupts the interrupt ends with a EI:RET. (No RETI, it has no
use).
But it has a reason I forgot. What's the actual effect of RETI? What are
the differences with an EI/RET? And with an EI/RETI?
MARK 2
MSX Mailinglist. To unsubscribe, send an email to [EMAIL
At 04:59 PM 7/21/99 +0200, you wrote:
The reason why EI enabled the interrupt 1 instruction later had indeed to do
with the interrupt. If you let the interrupt end with EI:RET then the
interrupts will be enabled AFTER the RET, hence preventing a stack overload
when the interrupt-routines
On Thu, 22 Jul 1999, MkII wrote:
But it has a reason I forgot. What's the actual effect of RETI?
RETI is the same thing as RET, only with a different opcode.
Some Z80-based devices can detect the opcode of RETI when it's on
the data bus, and by doing this they can know when
On the MSX interrupts the interrupt ends with a EI:RET. (No RETI, it has
no
use).
But it has a reason I forgot. What's the actual effect of RETI? What are
the differences with an EI/RET? And with an EI/RETI?
Well according to the documentation the purpose of RETI is so
interrupt-generating
The reason why EI enabled the interrupt 1 instruction later had indeed to
do
with the interrupt. If you let the interrupt end with EI:RET then the
interrupts will be enabled AFTER the RET, hence preventing a stack
overload
when the interrupt-routines occasionally takes too long and can't keep
Keep in mind that when executing an EI the interrupts will be enabled
after
the next instruction. So this is the way to keep the interrupts disabled
as
short as possible, which is always preferred (although not required).
Nice tip. This reminds me of the EI/RETI pair back in the ZX era. The
Should I disable interrupts accessing the VDP register directly?
Yes.
Like this:
LD A,value
DI
OUT (#99),a
LD A,register+128
EI
OUT (#99),a
Keep in mind that when executing an EI the interrupts will be enabled after
the next instruction. So this is the way to keep the interrupts disabled as