[Coco] BASIC format questions

Darren A mechacoco at gmail.com
Mon Mar 13 14:37:33 EDT 2017


On Mon, Mar 13, 2017 at 11:37 AM, RETRO Innovations <go4retro at go4retro.com>
wrote:

> 10 ? "H"
>
> 20 goto 10
>
>
> translates into:
>
>
> 1E 0A   00 0A  87 22 48 22 00
>         10     ?   "  H  "  EOL
> 1E 13   00 14  81 A5  31 30 00
>         20     go to  10    EOL
> 00 00
>
>
> I understand all the rest, but not the 1E0A and 1E13.  I mean, I
> understand what they mean (address of start of next line), but I am not
> sure what it is specifically pointing to?
>
>
> If I assume the second 1E is at memory location 1E0A, then 1E13 points to
> the 00 of the end of BASIC marker.  That would imply that BASIC starts at
> 1E01.  Am I right on that point?  Does that always hold true (Commodore,
> for one, moves the start of BASIC depending on various things)?
>
> I ask because I need to shift all of the addresses for interpreting. How
> do I know where the BASIC start is given an arbitrary BASIC file?
>


Basic does not care what the value of those "link pointers" are in the
file, as long as they are not 0000.  The program is always loaded into RAM
starting at the address contained in $19-1A.  After loading, the entire
program is scanned line by line to reconstruct all the link pointers.


- Darren


More information about the Coco mailing list