Scrolling Routines
by [unknown]
from Popular Computing Weekly, 17th July 1986

Versatility and smoothness in scrolling

[Only half of the program was printed in the magazine. That is: only four of
the eight scrolling routines were printed; the message finder was omitted;
the demonstration program was omitted. JimG]

While programs to scroll messages smoothly aren't exactly new, the eight
[four] machine code routines presented here are fairly versatile in that they
are relocatable and allow scrolling on any BASIC screen line (0 to 23).

All characters with codes between 32 and 164 (the character set, block
graphics and UDGs) may be scrolled; those outside this range are simply
"stepped over". The message will be repeated once the carriage return (CHR$
13) delimiter is found, thereby giving an endless loop scroll.

A return from these routines is effected by pressing the SPACE/BREAK keys.
Both the character set and the UDGs are accessed through their system
variables, so either can be altered.

Four [Two] different "fonts" are provided, each with two speeds, by
"stretching" the characters in vertical and horizontal planes. For example
"2x1 FAST" will produce a fast scroll with characters twice as high as
normal. Any manipulation of the characters is carried out in the first 16 or
32 bytes of the printer buffer. Also, due to the critical timing, some
scrollers will not work properly within the bottom 16K of RAM  indeed it is
best to put all machine code routines above 32767.

The location and position of the message on screen are accessed through the
unused system variables 23681 (for the screen line number) and 23728, 23729
(holding the origin of the message, low order byte first). However, a message
finder has been included to detect the origin automatically and to set these
variables. [Oh, no, it hasn't.]

All the routines are error trapped: a line number greater than 23 (on tall
scrollers, 22) will produce the message "out of screen", while the message
finder reports "statement lost" if no BASIC line starts with REM$. [Oh, no,
it won't.]

[The remainder of the instructions are irrelevant as the code doesn't exist.]

If, later in the program, you want to scroll another message, you can change
the search to, say, REM# by poking the start address (plus 27) of the searcher
with 35 (the code of #) and then recall it.

Many readers will know that if the high-order byte of a line number is
greater than 63, then that line will not be listed. Run the demonstration
program and BREAK into it. Then enter PRINT USR 62000 as a direct command.
The number returned is the origin of the message in memory; let's say it is
24700. By poking (24700-6),255 the message will have disappeared. You can
retrieve the line by poking back the original number, (ie. 0).

This provides a way of preventing tampering with your message, but do not put
any BASIC program lines after the message, or they will be neither listed or
executed.

