[Coco] BAS binary format

Johann Klasek johann+coco at klasek.at
Wed Nov 6 17:48:45 EST 2013


On Wed, Nov 06, 2013 at 11:28:41AM -0600, Theodore (Alex) Evans wrote:
> On 11/06/2013 10:22 AM, Johann Klasek wrote:
> >The stringconstant case is missing. While in "..." you must not
> >expand token codes.
> 
> Except that the Color BASIC etc. *do* expand token codes in string 
> constants when you do a program listing.

To my surprise - although MS based Basic interpreters I know of do not -
you are right. The reason could be that Color BASIC does not allow to
generate characters of code >= 128. I could verify this by poking the
token code into the Basic program which is expanded by LIST later on.

But I found another case where a special handling maybe needed:

A comment which is introduced with a tick (') is represented in binary
by $3A $83. The tokenizer implicitly inserts a ":" before the '-Token
and LIST suppresses this ":" ...
However, the output is not wrong if "'" would be shown as ":'". The
Basic code remains valid, but successive conversions back and forth
would lead to a growth of ":". ;)

Johann

-- 
The dragon on my side: http://klasek.at/hc/dragon/



More information about the Coco mailing list