[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TRAP #1 from TRAP #2?



Suppose I were writing, say, a file selector [hypothetically speaking,
of course >;) ].  AIUI, a file selector installs itself by hooking into
TRAP #2, fielding fsel_input() and fsel_exinput() calls and passing
everything else on down the XBRA chain.  The problem, of course, is
that now that I'm firmly stuck on the wrong side of the user/kernel
boundary, I have to turn around and read the disk if I want to have any
files to select from, and that means hitting (you guessed it) GEMDOS
TRAP #1.

Now, the Compendium makes ominous noises about not calling TRAP #1 from
an interrupt handler Or Else(TM), and I don't doubt that includes TRAP
handlers too.  On the other hand, every other file selector in the world
does it.  My guess is that I have to somehow invoke the GEMDOS trap
handler "manually"; my question is, how?

In fact, now that I think about it, I'm going to have the same problem
when I try to call e.g. evnt_multi(), but worse, since not only will I
have to invoke the TRAP #2 handler "manually", but I'll also have to
provide my own set of intin, intout, et al. arrays -- correct? incorrect?

TIA, as always.

						-sbigham