[Coco] D(S)ECB Question

CoCo Mongrel cocomongrel at googlemail.com
Mon Sep 29 21:30:12 EDT 2008


Hi CoCo Folk

I'm working on a rework of an old game in BASIC for the CoCo 3.  I know you
can chain-load one program from another.  What I'd like to do is have a
program that displays a splash screen, preloads some graphics into memory,
takes some input from the player, and then loads up the main program.  But
here's the catch.  I want it to load the main program and one of several
alternate versions of some subroutines, stored separately on disk.  The
different subroutines are different game strategies for the AI opponent.
I'm concerned about running out of BASIC program space if I include all the
alternate subroutines.  I guess I could have separate copies of the program
with each alternate subroutine, but that's too clunky and I need to conserve
disk space as well.  The subs don't have to be loaded by the setup program.
It could just poke a value somewhere and let the main program check that
value and load the appropriate subroutine itself after it gets loaded and
run.  But the point is that I need to be able to load the subroutine without
clearing out the existing main program.

I seem to have a fuzzy recollection that you can do something like this if
you save one or both programs as ASCII instead of tokenized, or am I making
that up?  Can BASIC be patched so it doesn't clear everything else out?
Needless to say the line numbers of the subroutines would be chosen so that
they don't conflict with the main program.

cocomongrel



More information about the Coco mailing list