| I can't say exactly what is wrong, but for starters, you are already in
supervisor mode when the Cconout trap routine is executed, so you need
to watch that you don't overrun the supervisor stack when executing
another trap.
Second, there IS a low limit on this kind of re-entrant behavior, I
read this somewhere, and think it is "3". AES may already be at the
limit. By starting out in Cconout, you may put it over the limit.
Personally, I never would have considered such at thing - I would have
dismissed calling AES from a trap as unlikely to work under any
conditions. Pleae let me know if you get it to work, as I would find
it useful.
One thing you might try is, from the Cconout trap routine, alter the
process stack to appear as if you have JSR'd into a process-level
Cconout routine, and then taken the trap. You then RTI from the trap
routine into the user mode routine of your choice, which can do AES and
VDI to your heart's content, and then RTS back to the original stream
of execution. You have to be careful, and a little clever, but this
method should work.
(A similar trick is used on VAX/VMS in VALID's GED in order to trap all
the Pascal Writeln's at AST level, and display the resulting text in the
graphics window. Yes, it an ugly hack, but it does work.)
|