[Coco] (D)ECB and command-line arguments

Brett Gordon beretta42 at gmail.com
Mon Jul 14 11:09:55 EDT 2014


mark,   i did a pretty lengthy article on tandycoco.com or something about
passing a commandline to ML programs via basic.  its not perfect but i
believe i used the REM or ' method.  This method is great if you dont mind
processing text in ML.

sincerely, brett
from atop mnt. shavano, san isabell forest, co
On Jun 19, 2014 7:08 AM, "Mark McDougall" <msmcdoug at iinet.net.au> wrote:

> Hi again gurus,
>
> I was thinking about ways of passing arguments to Coco binary executables
> from (D)ECB.
>
> The obvious way is to use USR1() but that requires DEFUSR and knowing the
> EXEC address, or at least PEEKing the values from RAM. You are also
> restricted to a single integer parameter.
>
> I had the idea of using something like:
>
> EXEC :arg1, arg2, ...
>
> where the ML program would then parse the BASIC line input buffer to
> extract the arguments. Would've been nice, but it seems EXEC doesn't accept
> the colon as a trailing statement separator.
>
> I guess you could do something like this:
>
> ARG$="arg1, arg2, ..."
> EXEC
>
> and then have the ML search the BASIC string table (assuming it hasn't
> been trashed). Would that be doable?
>
> Anyone else got any ideas?
>
> Regards,
>
> --
> |              Mark McDougall                | "Electrical Engineers do it
> |  <http://members.iinet.net.au/~msmcdoug>   |   with less resistance!"
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>


More information about the Coco mailing list