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

Arthur Flexser flexser at fiu.edu
Fri Jun 20 14:31:39 EDT 2014


Well, since you are going to have to first load in some ML code, and have
it evaluate arguments when executed....

It would be essentially no more difficult to just hijack one of Basic's
existing commands (on a CoCo 3, where everything is in RAM).  Take a
command that is unlikely to be needed at the same time your routine is, and
just overlay it with your argument evaluation and other needed code.  You
could also overlay the name of the command with your name of choice that
has the same number of letters as the original name.   So all you need is:

LOADM"GORPCMD"               (no need for an EXEC)
GORP 5,28,"Hi there, I am the Gorp command"

(If your code exceeds the original command code in length, you have it
branch someplace else where it won't conflict with anything.)

Art


On Fri, Jun 20, 2014 at 8:27 AM, Mark McDougall <msmcdoug at iinet.net.au>
wrote:

> On 20/06/2014 4:03 AM, Arthur Flexser wrote:
>
>  A technique I've used is this:  You put a dummy DATA statement at the end
>> of your program, like "DATA 1"  and have the program read that single data
>> value.
>>
>
> The idea is to have something that can be typed from the command-line,
> rather than be part of a program listing. Very simple to use without
> requiring excessive typing or having to remember 'magic' codes.
>
> eg.
>
> loadm foobarbin
> exec `-a -f fred.txt
>
> I'll look into this - thanks William!
>
> 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