> >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 up
> >with the interrupt itself.
>
> Nope. That will only make a different of 1 word on the stack. That amount
> won't cause an overload.

Nope nope! This IS the reason!

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 stack!!!

Well, if this occurs a lot of times after eachother, the memory will be
filled. If the situation solves itself afterwards, let's say after 10
seconds, then those extra word every interrupt could already have
overwritten code! If the EI is executer after the RET (or RETI) then nothing
will happen because there won't be a 1 word addition to the stack.

If you still don't get the point then please say it.


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
          email me: [EMAIL PROTECTED] or ICQ: 10196372
             visit the Datax homepage at http://datax.cjb.net/
MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to