Re: BASIC listing..

From: Imre Széll <iszell75_at_gmail.com>
Date: Fri, 7 Jun 2013 08:55:53 +0200
Message-ID: <CAHFX3ZPqW8bCUiDF72C-J5FrZJC1A7W1waJ13wmsCvcU+_K3LA@mail.gmail.com>
Perhaps it checks only the high byte of the start address?


2013/6/7 <silverdr@wfmh.org.pl>

> Normally CBM BASIC program consists of lines, which are represented as
> something like (pseudocode):
>
> struct basicline
> {
>         int nextLinePointer;
>         int lineNumber;
>         unsigned char lineContent[];
>         unsigned char eolMarker = \0;
> }
>
> When listing a program next lines are fetched until nextLinePointer points
> to 0x0000. Meaning there should be three consecutive \0s (one for the EOL
> marker and two to make BASIC stop looking further). One could argue whether
> this is efficient but it seems that some programs can actually use those
> two bytes for themselves. Example:
>
> http://dl.dropboxusercontent.com/u/58002657/cbm/c64/nuvieplayer-v1.0.prg
>
> where the nextLinePointer points directly to the starting address of ML
> code (LDY #$00) but BASIC still lists the stub properly. Does anyone (out
> of head) know why this works without confusing BASIC?
>
> --
> SD!
>        Message was sent through the cbm-hackers mailing list
>


       Message was sent through the cbm-hackers mailing list
Received on 2013-06-07 07:00:06

Archive generated by hypermail 2.2.0.