[Coco] CLEAR 0
flexser at fiu.edu
Wed Dec 26 18:45:35 EST 2018
On Wed, Dec 26, 2018 at 4:20 PM Bill Gunshannon <bill.gunshannon at hotmail.com>
> On 12/26/18 3:59 PM, rietveld rietveld wrote:
> > I am archiving a bunch of coco tapes. One of the tapes says to type '
> CLEAR 0' before typing CLOADM. What does the clear 0 do?
> Well, the book says the number is the highest address basic can use
> so I would guess it is telling BASIC you get no memory for things
> like strings. :-)
I think you're confusing the TWO arguments that the CLEAR function can
optionally take. It's the SECOND argument that is the highest address
Basic can use, as in CLEAR 200, &H7000.
The first argument, which defaults to 200, is the number of bytes available
for string space, so in fact you're correct that CLEAR 0 doesn't allow any
memory for strings, so you should get an ?OS ERROR if any string variables
are used. (String constants that appear within the program's text, like
PRINT "ABCDE" don't require external string space, and so would be okay
under CLEAR 0.)
More information about the Coco