Re: Pointer at the start of a BASIC line: what good is it?

From: David Roberts <daver21145_at_gmail.com>
Date: Wed, 27 Oct 2021 21:41:18 +0100
Message-ID: <CAC5emFHxf5AoCJ8mDrqaHjPTwA3FNR_crHaWrejWneJd1Lxrmg_at_mail.gmail.com>
If you are writing your own BASIC you can do what you want of course. As
long as your compatibility is at the text level and not at the tokenised
 BASIC level.

Dave

On Wed, 27 Oct 2021 at 20:26, <ruud_at_baltissen.org> wrote:

> Hallo allemaal,
>
>
> Still busy writing my own BASIC that should run on my Commodore
> PC20-III, I stumbled in something strange, again. I was sure that the
> first two bytes of a BASIC line were the length of it. That worked fine
> for a long time until I loaded a real C64 program and tried to edit it.
> Seeing the values and checking on Internet I learned it were pointers to
> the next line. Or better (IMHO worse), it points to the zero end byte at
> the end of the line. Why is this all?
>
> Using only the length and having to delete or insert a line, I only had
> to move a block of bytes and that was it. Now I have to correct the
> pointer in every line after every move as well. The C64 does do it: see
> the routine at $A533.
> And why pointing to the zero end byte, why not to the start of the next
> line? Now I have to read this pointer and add one to it before I can use
> it.
>
> So my question: what good is it? Or can I only blame mr. Bill Gates for
> this behaviour?
>
>
> Met vriendelijke groet / kind regards, Ruud Baltissen
>
>
Received on 2021-10-27 23:03:35

Archive generated by hypermail 2.3.0.