[Coco] CLEAR 0

Bill Gunshannon bill.gunshannon at hotmail.com
Wed Dec 26 20:05:34 EST 2018


On 12/26/18 6:45 PM, Arthur Flexser wrote:
> On Wed, Dec 26, 2018 at 4:20 PM Bill Gunshannon <bill.gunshannon at hotmail.com>
> wrote:
> 
>> 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.)
> 
> Art
> 

True, I read it too fast.  I knew what CLEAR 0 did but I tried to
get the explanation from the original COCO book without typing the
whole paragraph  in.

bill



More information about the Coco mailing list