[Coco] D(S)ECB Question

Arthur Flexser flexser at fiu.edu
Mon Sep 29 23:52:17 EDT 2008


My memory is somewhat hazy on this, but I think the MERGE command will stop
execution of your program, so that RUN <line number> will need to be typed after
the merge takes place to have it continue where you left off.  Or GOTO <line
number>.  Either way, you'll lose all the variable values, I think, except those
you've poked into memory somewhere and retrieve by PEEKing.  Also, I believe the
program you're merging must be in ASCII Basic format, which means that it may
load pretty slowly, if it is long.

A better approach might be to use the RUN<filename> command to load in whichever
of the subprograms you want based on the outcome of an IF statement, having
first poked into memory whatever variable values you want the subprogram to have
access to.  When you need to return to the main program, include a statement in
the subprogram that runs the filename of the main program, etc.  If this slows
things down too much from all the disk accesses, consider including a Ramdisk
utility so that your programs have to be loaded from physical disk only once,
and can be quickly swapped in and out from Ramdisk storage thereafter.  That
would require a 512K CoCo 3 for the Ramdisk, and that your program confine
itself to 128K.

It is also possible to have your programs poke in new values for the pointers
that Basic uses for the start and end of variable and array storage, which would
allow both programs to access the same variable values, if you work things just
right.

Art

On Mon, 29 Sep 2008, CoCo Mongrel wrote:

> Answering my own question...  Duh!  The MERGE command is what I was looking
> for.
> 
> cocomongrel
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list