[Coco] Extended Color BASIC memory

Robert Gault robert.gault at att.net
Wed Apr 3 11:35:29 EDT 2013


Allen Huffman wrote:
> Ah, the things we re-remember. It has been twenty years since I did anything with Extended Color BASIC, and I wanted to type out what I relearned.
>
> On a 32K or 64K CoCo, Extended Color BASIC offers you 22,823 bytes of memory which is used by the BASIC program and any variables it contains while it runs.
>
> There are four (I think?) blocks of memory reserved for graphics screens, and if you are not using them, you can type "PCLEAR 1" to lower that to just one bank. This gives 27,431 bytes free.
>
> There is no "PCLEAR 0" command (oversight? bug?), but there are assembly routines that accomplish the same thing. Using one of those increases available memory to 28,967.
>
> I used a small assembly routine to get PCLEAR 0. I probably found it in Rainbow magazine. Since I didn't know a "safe" place to store it (and since it was used just once, then thrown away), I stored it at the top of the VDG display screen, ran it, then it was gone.
>
> 5 FORA=0TO8:READA$:POKE1024+A,VAL("&H"+A$):NEXTA:EXEC1024:DATAC6,1,96,BC,1F,2,7E,96,A3
>
> So... Someone wanna re-remind me what this actually does to accomplish PCLEAR 0?
>
> -

What needs to be done is tell Basic where the beginning of program memory is 
located. The RAM variables are at $19-$1F. You also need to clear one or more 
bytes of memory in the new area if you want programs to work.

With a Coco3 that moved the ROM code to RAM, it is easy to patch Basic for a 
PCLEAR0.

10 POKE&H968F,&H21:POKE&H96A3,&H21
20 PCLEAR0



More information about the Coco mailing list