Commodore 2001-8 User Manual page 22

Table of Contents

Advertisement

go up and make a change in the middle of the line, we can See that it makes no difference where we hit
the carriage return in the line. If we space up to the word PARTY the first time that it is on the screen, now
even though the cursor is blinking on the P, a carriage return causes the entire line to be reprinted. The
basic rule is that when a carriage return is struck, regardless of where it occurs in the line, the entire line
is transferred, whether it be a 40-or 80-eolumn line. Sophistication in using the editor will become more
apparent as you use it when writing programs.
SCROLLING
Now that we have a mixture of 40-and BO-eolumn lines on the screen; let us investigate what happens
when we try to move the cursor off the bottom. To do this, we just cursor down until the cursor is at the
base of the screen. Hitting the next cursor down causes the entire screen to move up one line. Any time
we attempt to print past the thousandth character on the screen, the screen editor automatically moves
the entire screen up one line.
Lines move up on the screen by a one line or two line jump depending on the status of the top line on the
I
screen. This Is accomplished in hardware by checking the top line pointer plus one. If an
80~01umn
line
Is to be scrolled off the top, the 81st character through to the thousanth character are moved to the top of
the screen memory, and the bottom 80 characters of memory are filled with blanks. If only a
4O~0lumn
line Is to be moved off the top, the 41st character is moved to the first, etc., and 40 characters are blanked
at the bottom of memory. The cursor is positioned automatically in the same position at the bottom of the
screen as it was when you tried to move the cursor down; or in the case of a carriage return and/or
printing, the cursor is moved automatically to the left....and side of the bottom line.
This process is totally automatic and is caused by attempting to print carriage return or space off the
bottom of the screen. There is no other program control over the movement. As we will see when we write
a program that causes scrolling, the scrolling speed on the PET is too fast to read. If the reverse key is
held down while printing is occurring, the scrolling will be slower by a factor of 20.
HOME AND CLEAR
Striking the home key moves the cursor to the upper left-hand corner of the screen (the first location of
the screen memory). Holding the shift key down and pressing the clear key gives you a blank screen with
the cursor blinking in the upper left-hand corner. This is accomplished by moving blanks into all thousand
screen positions and again homing the cursor. Clear or home can be given at any place on the screen-.
The PET basically moves data from the keyboard to the screen and then when
a
carriage return
is
struck
moves the screen data into
a
program. This allows the
user
the flexibility of making
a
correction on the
screen without having any effect on the program that
is
going to receIve the corrected version. Keys are
prOVided to a//ow movement around the screen and to
insert
or delete,
as
welf as type over any character
on the screen. This allows the entire screen to act
as
an editing place for user-controfled input.
17
j

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pet 2001-8

Table of Contents