Large GEOS applications typically don't fit in one piece in their designated memory area. They are therefore split into overlays which are loaded into memory on demand. The individual overlays are stored as records of a VLIR (Variable Length Index Record) file. When GEOS starts a VLIR overlay appliation it loads record number 0 which is supposed to contain the main program. The record numbers starting with 1 are to be used for the actual overlays.
cc65/samples/geos" there's a VLIR overlay demo application consisting
of the files "
overlay-demo.c" and "
This is a simple one step process:
Always place the
cl65 -t geos-cbm -O -o overlay-demo.cvt -m overlay-demo.map overlay-demores.grc overlay-demo.c
.grcfile as first input file on the command-line in order to make sure that the generated
.hfile is available when it is needed for inclusion by a
You will almost certainly want to generate a map file that shows (beside a lot of other infos) how large your individual overlays are. This info is necessary to tune the distribution of code into the overlays and to optimize the memory area reserved for the overlays.
grc65 -t geos-cbm overlay-demores.grc
ca65 -t geos-cbm overlay-demores.s
cc65 -t geos-cbm -O overlay-demo.c ca65 -t geos-cbm overlay-demo.s
ld65 -t geos-cbm -o overlay-demo.cvt -m overlay-demo.map overlay-demores.o overlay-demo.o geos-cbm.lib