Hello, * On Sun, Oct 31, 2021 at 01:05:20AM +0200 Marc Rintsch wrote: > On 30.10.21 23:12, silverdr_at_srebrnysen.com wrote: > > So unless Ruud wants to build also a BASIC "screen editor" mimicking the C64 one's behaviour, I see no point/problem with lines longer than 80 chars. That is, until... > > > > > There is probably a limit of 255 bytes somewhere though. > > > > ... which I can neither confirm nor deny as I simply don't remember whether I even tried to get over 255/256 bytes per BASIC line. > > I think there is such a limit. When relinking the lines BASIC has to search > the 0-byte that marks the end of the line. Almost certainly this is done > with a loop using X or Y as index and thus limiting the search to 255 bytes. That's right: The routine is at $A533 on C64, $C533 on VIC 20: It has a pointer to the current line in $22/$23 and uses Y to get to the end of the line. Than it uses $22/$23 to write the end of the line and then proceeds the pointer to the next line. By using Y as an index (and not doing any high byte processing), BASIC can keep the pointer to the old link address in $22/$23 while proceeding to the end of the line with the Y register. Regards, Spiro -- Spiro R. Trikaliotis https://spiro.trikaliotis.net/Received on 2021-11-01 20:00:21
Archive generated by hypermail 2.3.0.