home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!jesup
- From: jesup@cbmvax.commodore.com (Randell Jesup)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: running segments from within an application
- Message-ID: <36744@cbmvax.commodore.com>
- Date: 5 Nov 92 23:22:31 GMT
- References: <9211050408.AA24272@mackay.mpce.mq.edu.au>
- Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
- Organization: Commodore, West Chester, PA
- Lines: 22
-
- s3007048@mackay.mpce.mq.edu.au writes:
- >I need to know how to pass parameters to segements run from within an
- >application. I know about RunSeg() and LoadSeg(), and i've thought
- >about using Execute()...
-
- I think you mean RunCommand(). RunCommand() is the best way to
- pass arguments to a seglist (program) you loaded. In fact, it's the only
- really safe way. The problem is that there are two separate ways in which
- arguments are passed (well actually 3): 1) pointer to string in a0, length in
- d0, string usually has a \n in it at the end. 2) as buffered input on the
- input filehandle (RunCommand does this for you). 3) via Set/GetArguments()
- (also done for you by RunCommand).
-
- If Execute() or System() will do what you need, use them (it's easier
- than LoadSeg/RunCommand/etc).
-
- --
- To be or not to be = 0xff
- -
- Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
- {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
- Disclaimer: Nothing I say is anything other than my personal opinion.
-