[Coco] coco1 64K extended basic SN ERROR

Robert Gault robert.gault at att.net
Fri Sep 5 11:16:47 EDT 2014


Charlie Pelosi wrote:
> I have a 64K coco1 with Extended Color Basic. With some basic programs it gives me a ?SN ERROR but if I simply type RUN again the program runs fine with no error.
>
> One example is the game BUGS found here: http://www.colorcomputerarchive.com/coco/Disks/Games/Bugs%20(Color%20Computer%20Magazine).zip
> When I run BUGS.BAS it says ?SN ERROR. (no "in line number", just ?SN ERROR) I type RUN again and the game runs fine. Some experimenting tells me it never gets past the 1st line of the program.
>
> 0 CLS0:PCLEAR1:FILES0:CLEAR5,5119:GOTO4
>
> Another example is Jim Gerrie's Dungeon Crawl.
> http://rsp.retrocomputacion.com/games-jim-gerrie-ports-4-of-his-games-to-the-tandy-coco/
> When I RUN"CRAWL I get ?SN ERROR IN 0
> Entering RUN again and the game runs without the error.
> Line 0 reads:
> 0 PCLEAR1:GOSUB2600:CLEAR1300:DIMA$(15),B$(15),C$(15),D$(24),E$(24),I$(27),D(20,20,2),W$(34):GOTO900
>
> Now, I know the coco3 does not have this issue. Not sure about BUGS but I know Dungeon Crawl starts on the 1st RUN.
> What is the issue with the coco1? I will drag out my coco2 and try with that. Perhaps this is a known issue with ECB?
>
> Charlie
>
>
>
>
>

There is a PCLEAR bug in early versions of Extended Basic. Bugs and Crawl will 
RUN the first time if you manually enter a PCLEAR1 before starting the program.

If you want to understand the bug, you will need to study the "Unravelled" 
series at $96A3.

The workaround used by Coco1 programmers was to have
0 GOTO1000            or whatever would be the last line in the program
1000 PCLEAR1:GOTO 10  or whatever the "first" actual line would be

Since the programs in question already use a line 0, they would need to be 
renumbered with the RENUM command to use the above.

Robert


More information about the Coco mailing list