Re: BASIC for the CBM-II/8088

From: Rhialto <rhialto_at_falu.nl>
Date: Thu, 5 Jul 2018 21:38:25 +0200
Message-ID: <20180705193825.GQ20645@falu.nl>
On Thu 05 Jul 2018 at 12:26:51 +0000, Baltissen, GJPAA (Ruud) wrote:
> On the C64 a BASIC line can be spread over at least two lines. I still
> haven't found out how the C64 knows that the current screen line is
> part of a bigger BASIC line.

There is a table of 25 bytes, usually described as "screen line wrap (or
link) table". In the PET it is at $00E0 - $00F8. The 80-column version
uses this space for something else, since it doesn't combine lines. (Not
even when it has a window set with shorter lines).

https://archive.org/stream/transactor-anthology/anthology#page/n37/mode/2up

In the 64 it looks like it is $00D9 - $00F2 "Screen line link table".

https://archive.org/stream/transactor-anthology/anthology#page/n45/mode/2up

The table contains, for each of the 25 screen lines, the high byte of
the screen memory where it starts. The corresponding low byte is in
table in ROM somewhere.

If the screen line is a start line, the high bit is set. For a
continuation line, the high bit is clear.

list

10 for i = 217 to 242
20 printpeek(i);
30 next
ready.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx


run
 132  132  132  132  132  132  132  5  1
33  133  133  133  5  134  134  134  134
  134  134  134  135  135  135  135  135
  135
ready.


### commodore basic ###

 31743 bytes free

ready.
10 for i = 224 to 248
20 ?peek(i);
30 next
xxxxxxxxxxxxxcmkfjkjfkljkdhjghvhvhvhvhvh
vhvhvhjvhvhvhvhvhvhvhvhvjy
run
 128  128  128  128  128  128  128  129
 129  1  129  129  129  130  130  130  1
30  130  130  130  131  131  131  131  1
31
ready.

Hm, the table seems one byte too long :-) Possibly so that even the last
line has a pointer to where it ends, or something.

Also, on the VIC and 64, things probably go wrong if you try to relocate
the screen to $8000 or higher, since the trick with the high bit doesn't
work any more.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl      -- are condemned to reinvent it. Poorly.


Received on 2018-07-05 22:00:05

Archive generated by hypermail 2.2.0.