[comp.sys.atari.st] cmd line in GEM programs

rosenkra@hall.cray.com (Bill Rosenkranz) (04/23/89)

---
question: i notice that on startup of a GEM .prg file, the command line
in the basepage is all 0's. this is true before appl_init and after. does
AES/VDI or anything else ever use this and (more importantly) can i stick
things in it?

question: does anybody have a WORKING demo showing message passing between
an application and a desk accessory? the communications should be able to
initiate on both sides. the docs on the various gl_apids from atari are
totally vague and atari GEM gurus themselves don't know what is the diff
between gl_apid (set by AES during appl_init) and the return from the
appl_init itself (often not the same value, but that could be gulam
screwing up).

on a related issue, i have been trying to install some temporary drivers
(for midi stuff, just calls Midiws, Bconstat, etc) using Pexec(3,...) and
invoking with Pexec(4,...) without much luck. actually the installs and
invocations work fine but i try to Malloc (not malloc) AFTER installing
2 or 3 drivers and find only 50 bytes left (pretty suprising on a MEGA 4 8^).
the code hangs on the 11/85 ROMs to boot. what gives? is Pexec just a waste
of time? why can't atari just fix the damn memory management already? sheesh.

heres what i want/tried:

memory synosis:

______________________
appl (GEM or ttp)
______________________
AES (rsc, workstat,etc)
______________________
Malloc (screen)
______________________
driver 1 (Pexec(3...))
______________________
.
.
______________________
driver n
______________________
Malloc (most of mem)
______________________

the last Malloc shows little or no mem left. the drivers are only 25k or so,
and i DO do Mshrink (or rather atari's gemstart.s does it) in each driver.
The Pexec(3,...) gives weird addr for each driver (i tried 2). by weird i mean
driver 2 comes before driver 1. i tried this both with a ram disk and in gulam
as well as from the desktop with no other memory resident stuff and get similar
results. i used Ptermres to exit the driver (until the main appl tells it
to stop via shared memory communication block in which case driver does a
Pterm). i have no problems invoking the drivers any number of times but
i need to do the Malloc last since the appl needs all the mem it can get
and i don't really want to have to figure out how much space the drivers
will need before hand. even if i do this, i fear the Pexec(3,...) will
probably fail anyway. BIG :-(...

i use alcyon 4.14 and friends (aln, libs, gemstart) on both Mega4 and 1040
(11/85 ROMs).

any ideas?

pls reply with email as our site misses about half of what we get via postings.

thanx...

-bill
rosenkra@hall.cray.com or rosenkra@boston.cray.com
...!umn-sc!hall!boston!rosenkra