[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] ACC & resolution change
> > Oh and I think (correct me please if I am wrong) that accessoiries never
> > get AP_TERM messages.
>
> This is what I am missing. AP_TERM would be best, but it's not sent.
Yes. As far as I know, there is no way to detect that the accesory is
being terminated due to resolution change, so you cannot perform a
cleanup. E.g. you cannot unhook a vector you have grabbed. Conclusion: you
cannot grab vectors from within an accessory. The program, if it has to
patch the vector chain, must split into a TSR (loaded from AUTO) which
uses the interrupt, and a controlling accessory (which does not use any
interrupts).
You could possibly consider using the GEMDOS terminate vector to detect
whether the accessory process is being terminated or not. However, this
won't work under plain TOS, as, as far as I know, the accessories run in
the context of the main application.
The best solution is not to use interrupts in GEM programs, however.
Gtx,
--
Konrad M.Kokoszkiewicz
mail: draco@atari.org
http://draco.atari.org
** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** Taka to juz natura pospolstwa, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.