--- title: "ZX81 Scroll" id: 57266 type: "computer_media" slug: "zx81-scroll" url: "http://localhost/computer_media/zx81-scroll/" markdown_url: "http://localhost/computer_media/zx81-scroll.md" published_at: "2024-10-04T07:50:00+00:00" modified_at: "2026-03-30T21:18:50+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/10/154_ZX81.png" excerpt: "A looping block-graphics banner display scrolls off screen and redraws itself continuously, using nothing but PRINT and SCROLL for a hypnotic animated effect." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Demo" slug: "demo" taxonomy: "genre" url: "http://localhost/type/demo/" media_contents: - id: 56734 title: "Timex Sinclair Public Domain Library Tape 1003" type: "computer_media" url: "http://localhost/computer_media/timex-sinclair-public-domain-library-tape-1003/" media_type: "Program" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/10/154_ZX81.png" media_type_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 | Variable | Used at | Purpose | | --- | --- | --- | | `N` | 100–110 | Delay loop counter (1 to 50) | | `F` | 120–140 | Scroll 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. ## 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 ```