[Coco] BASIC format questions

RETRO Innovations go4retro at go4retro.com
Tue Mar 14 23:08:52 EDT 2017


OK, wrote  a spot of C to relink all of the lines.  Working fine. Now to 
continue working on the interpreter.

My assumption is that a "goto" will force the BASIC interpreter to look 
at it's current line.  if the goto line is more, it will start scanning 
line numbers from current line, but if less, it will scan from beginning 
of program.  If that is true, it would create implications on where one 
should place GOSUB routines and such.

DATA statements are another issue where the non linear flow of the code 
will take a bit of thinking.  I wonder if the interpreter has to scan 
from the beginning of the program to find the first DATA statement when 
a READ is encountered, and then jump between two chunks of BASIC code 
all the time to read said DATA statements. Anyone privy to details 
before I go spelunking through the DECB source?

Jim


More information about the Coco mailing list