[comp.sys.atari.st.tech] Programming help wanted..

cse183@cck.cov.ac.uk (Neil J Smalley) (01/08/91)

	I hope someone out there can help. Here's what I'm trying to
do.
	- write a program that will run and then call another program
from the same .PRG file.

	E.g  program file WORK.PRG will in fact be two programs
             CHECK.PRG and THIS.PRG

CHECK.PRG will execute first and then call THIS.PRG.

	I also want to able to remove CHECK.PRG from THIS.PRG and
seperate the two again.
	I know it can be done because I've got several compacter programs
that do it (run the decompacter and then run the program) but I wish to
do it.
	The reason why I want to do this is to create some sort of
access control for the shell I am writing.
	My language of choice is GFA BASIC 3 because thats what all
the development is being written in. C(Mark Williams) is acceptable though.

P.S	I'm using a 520(1meg) STe with tos 1.6	

	Thanks a lot in advance.
		Commander
-- 
	                 --- COMMANDER --- 
'No more than six computers will ever be sold in the commercial Market'
Howard Aiken 1950(Designer of IBM's first ever computer).
                    Cse183@uk.ac.cov.cck

wolfram@cip-s06.informatik.rwth-aachen.de (Wolfram Roesler) (01/25/91)

cse183@cck.cov.ac.uk (Neil J Smalley) writes:


>	I hope someone out there can help. Here's what I'm trying to
>do.
>	- write a program that will run and then call another program
>from the same .PRG file.

>	E.g  program file WORK.PRG will in fact be two programs
>             CHECK.PRG and THIS.PRG

>CHECK.PRG will execute first and then call THIS.PRG.

>	I also want to able to remove CHECK.PRG from THIS.PRG and
>seperate the two again.
>-- 

The required Gemdos function is Pexec to execute another prg. After execution
control is returned to the calling program.
You can also use the AES shell lib functions to call a program while discarding
the caller.
For further details RTFM. When using Pexec, set the last parameter to NULL or 0
instead of "" in order to pass the environment correctly.

BTW, all the world seems to be writing shell programs. But you'll have to do
a lot before you reach up to the Okami Shell, see my posting in atari.st.