[comp.sys.atari.st] Pexec in accessories

johan@sm.luth.se (Johan Nordlander) (09/02/88)

Hi there!

I'm new to the net as a contributor but I've been following
this newsgroup with interest for the last two years.

My current ST project is a kind of CLI accessory wich would
allow me to run non-GEM programs from within any GEM
application. This requires calls to GEMDOS Pexec from the
accessory, and here's where the trouble starts.

I've managed to make programs load and execute normally,
but when they do, some of them seems to mess things up for
the AES so that when my accessory closes and AES dispatches
the main application, strange things start happening.
Sometimes the application just hangs, other times the screen
is filled with beautiful patterns. In one case I've been
able to detect that control is not passed back to the main
application but to the code immediately following the
terminate trap in the newly executed program. Note that the
Pexec call returns correctly and that these problems start
later on when the accessory calls evnt_mesag. However, none
of these peculiarities occur when I run programs compiled
under MWC.

As I understand it, from the GEMDOS point of view, desk
accessories are indistinguishable from the main application.
A Pexec call from within an accessory should then perform
exactly as if the main application had made the call, as
long as the called program is non-GEM. The problems
mentioned above seem to indicate that this assumption is
wrong.

It may be that the source of these problems is to be found
in the way my system is configured (Fatspeed, NeoDesk etc).
But before I start dissecting my system it would be great
to know whether pexecing from accessories is allowed at all.

I'd appreciate any comment on this.

-- 
johan@luth.UUCP                                         Johan Nordlander
johan@sm.luth.se                                        Dept of Math & CS
...{uunet,mcvax}!enea!luth!johan                        U of Lulea, SWEDEN