[Coco] Re: BASIC irony
Rodney V Hamilton
Rodney_Hamilton at GBRonline.com
Tue Aug 17 09:56:14 EDT 2004
In article <1giiaka.miqsj01fcla8cM%tlindner at ix.netcom.com>, tlindner at ix.netcom.com says...
>
>tim lindner <tlindner at ix.netcom.com> wrote:
>
>> I fired up the emulator and found out that Color BASIC seems to crap out
>> in the rage of 64XXX. 63999 is a valid line number, but anything higher
>> returns an error. I can't even RENUM the program higher than 63999
>>
>> Interesting. I'll have to look into the source regarding this.
>
>So I looked into the source. It seems 63999 is the largest Color BASIC
>line number becuase allowing any larger numbers could result in the
>ASCII to integer code overflowing.
>
>I did try hacking a larger line number and the program ran fine: if you
>can let the program fall thru to the large line numbers. Issuing a GOTO
>to a large line number results in a ?SN ERROR.
>
>Also trying to delete or EDIT a existing large line numbered line causes
>a ?SN ERROR. RENUM does work as expected.
>
>Another break from the Dartmuth standard is that Color BASIC _will_ list
>lines larger than 63999.
>
>--
>tim lindner
>tlindner at ix.netcom.com
Tim, if you move the max number test to AFTER the digit conversion,
you can extend the max line number to 65279 (=$FEFF) with no change
in code size. To demo, poke the following 16 bytes starting at $AF73:
58,49,58,49,D3,2B,58,49,DB,01,89,00,81,FE,22,CF (all in hex)
Not much use, but fun anyway.
Rodney Hamilton
More information about the Coco
mailing list