Two lines on the screen = one BASIC line

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Two lines on the screen = one BASIC line

Ruud
Hallo allemaal,


A thing I haven't figured out yet:

How does BASIC know that two lines on the screen (of a C64) belong
to one BASIC line?


--
   
Kind regards / Met vriendelijke groet, Ruud Baltissen
www.Baltissen.org







---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus


       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Eric Parker
Because the actual line buffer is 80 columns wide IIRC.

On Sat, Feb 11, 2017 at 10:40 AM, <[hidden email]> wrote:
Hallo allemaal,


A thing I haven't figured out yet:

How does BASIC know that two lines on the screen (of a C64) belong
to one BASIC line?


--

Kind regards / Met vriendelijke groet, Ruud Baltissen
www.Baltissen.org







---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus


       Message was sent through the cbm-hackers mailing list

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Spiro Trikaliotis
In reply to this post by Ruud
Hello,

* On Sat, Feb 11, 2017 at 07:40:05PM +0100 [hidden email] wrote:
 
> How does BASIC know that two lines on the screen (of a C64) belong
> to one BASIC line?

It's not BASIC that knows this, it is the KERNAL routines for the screen
editor.

Regards,
Spiro.

--
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Segher Boessenkool
In reply to this post by Ruud
On Sat, Feb 11, 2017 at 07:40:05PM +0100, [hidden email] wrote:
> A thing I haven't figured out yet:
>
> How does BASIC know that two lines on the screen (of a C64) belong
> to one BASIC line?

See zero page d5 and the array at d9 (high bit of each byte).


Segher

       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Steve Gray
In reply to this post by Ruud
The screen editor has something called the "line link" table. Whenever a character is printed to the 40th column the line link table is updated. A bit is set that "links" the line to the one below it. This table is updated when the screen is scrolled as well.

I did some work understanding this for the PET's editor rom. You can find a commented disassembly here:


The C64's code is based on this but will be slightly adapted. Hope it helps.

Steve



From: "[hidden email]" <[hidden email]>
To: [hidden email]
Sent: Saturday, February 11, 2017 1:40 PM
Subject: Two lines on the screen = one BASIC line

Hallo allemaal,


A thing I haven't figured out yet:

How does BASIC know that two lines on the screen (of a C64) belong
to one BASIC line?


--
 
Kind regards / Met vriendelijke groet, Ruud Baltissen
www.Baltissen.org







---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus


      Message was sent through the cbm-hackers mailing list


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Segher Boessenkool
On Sat, Feb 11, 2017 at 09:48:30PM +0000, Steve Gray wrote:
> The screen editor has something called the "line link" table. Whenever a character is printed to the 40th column the line link table is updated. A bit is set that "links" the line to the one below it. This table is updated when the screen is scrolled as well.
> I did some work understanding this for the PET's editor rom. You can find a commented disassembly here:
> https://github.com/sjgray/cbm-edit-rom/blob/master/disassemblies/edit-4-40-n-60Hz-901499-01-linelink%20analysis.txt
>
> The C64's code is based on this but will be slightly adapted. Hope it helps.

It is almost the same on the C64, but the polarity of the "is this line
linked" bit is the other way around (0 is not linked, 1 is linked).
LNMX is at the same address on C64 (d5).


Segher

       Message was sent through the cbm-hackers mailing list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two lines on the screen = one BASIC line

Ruud
Hallo Eric, Spiro, Segher and Steve,


Thank you for your answers, you helped me a lot!


--
   
Kind regards / Met vriendelijke groet, Ruud Baltissen
www.Baltissen.org







---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus


       Message was sent through the cbm-hackers mailing list
Loading...