ZX81 Scroll

This file is part of Timex Sinclair Public Domain Library Tape 1003 . Download the collection to get this file.
Date: 198x
Type: Program
Platform(s): TS 1000
Tags: Demo

This program displays a decorative screen composed entirely of block graphics characters, creating a two-part banner: a large header graphic followed by a smaller sub-graphic below it. The block graphics are rendered using the ZX81/TS1000 character set, arranged across multiple PRINT statements with TAB positioning. After displaying the graphics, a short delay loop (lines 100–110) pauses the output before a SCROLL loop (lines 120–140) scrolls the screen upward 16 lines, then CLS clears the display and the program loops back to restart via GOTO 10. The program runs continuously as an animated display loop.


Program Analysis

Program Structure

The program is divided into three functional phases that repeat indefinitely:

  1. Display phase (lines 10–90): Clears leading space with blank PRINT commas, then renders two block-graphic images using TAB-indented string literals.
  2. Delay phase (lines 100–110): A simple FOR N=1 TO 50 loop providing a brief pause before the scroll animation begins.
  3. Scroll and loop phase (lines 120–150): A FOR F=1 TO 16 / SCROLL / NEXT F sequence scrolls the screen content upward 16 lines, followed by CLS and GOTO 10 to restart.

Block Graphics Layout

Lines 20–50 form the main upper banner, a wide multi-row graphic built from block graphic characters (chars 128–143). Line 20 uses leading spaces and a few isolated block characters to form a top edge row. Lines 30–50 each contain dense sequences of block graphic escapes forming the body of the design. The banner is left-aligned with TAB 3.

Lines 70–90 form a smaller secondary graphic, positioned with TAB 12 and consisting of three rows of block characters — likely a word or logo in a smaller size beneath the main banner.

PRINT Comma Spacing

Line 10 uses fourteen consecutive commas in a single PRINT statement. On the ZX81/TS1000, each comma in a PRINT statement advances to the next 16-column print zone (or issues a newline if already at the last zone). With a 32-column display and only two zones, successive commas generate blank lines, providing vertical padding above the graphic. Line 60 similarly uses four commas to insert vertical space between the two graphic sections.

Scroll Animation

Rather than simply calling CLS to erase the screen, the program uses a loop of 16 SCROLL commands to push the display content upward one line at a time. This creates a smooth wipe-off animation effect before the screen is fully cleared and redrawn. The CLS at line 145 then ensures a clean slate before GOTO 10 restarts the cycle.

Key Variables

VariableUsed atPurpose
N100–110Delay loop counter (1 to 50)
F120–140Scroll loop counter (1 to 16)

Notable Techniques and Observations

  • All graphics are rendered purely through BASIC string literals — no machine code or POKE-based character redefinition is used.
  • The delay loop (50 iterations) is minimal; actual pause duration depends on the interpreter’s loop overhead, which is consistent and predictable on this hardware.
  • Lines 160 and 170 (SAVE and RUN) are utility lines appended after the main program logic and are not reached during normal execution flow.
  • The GOTO 10 at line 150 creates an infinite loop with no exit condition, making this a pure display/demo program.

Content

Appears On

Assembled by Tim Ward from many sources. Contains programs 10122 – 10175.

Related Products

Related Articles

Related Content

Image Gallery

ZX81 Scroll

Source Code

  10 PRINT ,,,,,,,,,,,,,,
  20 PRINT TAB 3;"    \ '         \ :     \'     "
  30 PRINT TAB 3;"\:'\''\''\''\ :\ :\''\''\''\: \:'\''\''\''\ :\ '\''\''\''\: \: \:'\''\''\''"
  40 PRINT TAB 3;"\''\''\''\':\ :\ :   \: \:    \ :\ :\''\''\''\: \: \:    "
  50 PRINT TAB 3;"\''\''\''\''\ '\ '   \' \''\''\''\''\ '\ '\''\''\''\' \' \'    "
  60 PRINT ,,,,
  70 PRINT TAB 12;"\''\: \: \: \:'\: \: "
  80 PRINT TAB 12;"\.' \.'\. \:'\: \: "
  90 PRINT TAB 12;"\''\' \' \' \''\' \' "
 100 FOR N=1 TO 50
 110 NEXT N
 120 FOR F=1 TO 16
 130 SCROLL 
 140 NEXT F
 145 CLS 
 150 GOTO 10
 160 SAVE "1015%4"
 170 RUN 

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top