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 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.

Hmmm... Interrupt handlers that take more than 1 interrupt period to
complete and that a few dozen times... Sounds like a program that has
terrible slowdown anyway.

OK, slowdown is much better than hanging, but I think a well-written
program should never put such demanding tasks on an interrupt.
It should rather set a flag from the interrupt handler and then poll that
flag in the main loop. Or use scheduling...

Bye,
                Maarten


****
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