:> > I have a little question:
:> >
:> > -  Interrupt occurs
:> > -> (DI)
:> > -> Interrupt Routine (-> new interrupt occurs)
:> > -> EI
:> > -> ret
:> >
:> >
:> > What will happen if a NEW interrupt occurs when the MSX is
:> > processing obove mentioned "routine-part"?
:> >
:> > - After switching the interrupts on, will the MSX remember the
:> >   interrupt and calls again the interrupt-routine?
:> >
:> > OR:
:> >
:> > - Is the additional interrupt lost forever?
:>
:> Hi
:>
:> I think the interrupt will be lost forever since all interrupts are
:> disbled by DI. I know for sure it wont be remembered.
:>
:> I don't know what kind of interrupt routine you are using but it is
:> possible that an EI is in there (e.g. when you use a bios call an EI
:> is almost always in there). In that case the new interrupt will occur,
:> and your interrupt routine will be called when it is still in the
:> process of handling the previous interrupt. As you can imagine your
:> msx will crash in this scenario due to the exponential growth of the
:> heap etc. etc.
:>
:> HTH
:>
:
:I don't know it exatcly anymore
:but when you enter an interupt routine the interupt flag will be set
:this flag will hold other interupts untill its resets
:you always have to end and interupt routine with RETI and not with RET
:But there must be people on this list who can explain it perfectly.
:
:Erik


Ahhh!!!

All wrong!!!

If the VDP generates an interrupt, it sets a bit in VDP-statusregister#0.
This bit is sent through to the INT-pin of the Z80, and this way generating
an interrupt.

If an interrupt is generated, the INT pin stays high until VDP s#0 is read.
If you do a DI-instruction, the Z80 _ignores_ any interrupts sent to the
int-pin. However, the VDP keeps sending this signal to the INT-pin until s#0
is read, so *after the instruction after EI* the new interrupt immediately
executes.

Unless you read s#0 after the second interrupt is generated. Then it will be
lost forever... But don't care, because if you read s#0 only a few times or
shortly after the DI-instruction, the chance is very low the interrupt is
deleted. And IF it's deleted that one interrupt won't be noticed anyway (and
it will probably only be read on the interrupt-routine for the 9th sprite
etc is in most cases only useful when used on interrupt).


~Grauw



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