Bulletin

This file is part of Synchro-Sette April 1983 . Download the collection to get this file.
Date: April 1983
Type: Program
Platform(s): TS 1000
Tags: Software

This program displays an animated title screen for the “Synchro-Sette Bulletin Board” for April 1983, then scrolls two text strings across separate banner boxes on screen. It uses RAND USR 16514 repeatedly to call a machine-code routine, and POKEs to address 16515 (the ZX81 system variable FRAMES/display file area) to manipulate the display, with address 16418 also poked at line 20. The title animation uses inverse-video characters (percent-prefixed) to flash text in place, then draws a full-screen border and two inner rectangular boxes using Spectrum block graphics. Two marquee-style text scrollers at lines 500–590 display strings B$ and C$ in 28-character windows, with a subroutine at line 1000 that pauses scrolling when a key is held down.


Program Analysis

Program Structure

The program is divided into three broad phases:

  1. Animated flash intro (lines 1–22): Alternates between inverse-video and normal renditions of the two title strings inside a loop of 20 iterations, calling machine code each time.
  2. Decorated title screen (lines 23–69): Clears the screen, draws a full-screen border and two inner rectangular boxes using block graphics, then animates the three title lines scrolling upward to their final positions.
  3. Scrolling ticker loop (lines 500–590): Scrolls strings B$ and C$ through 28-character windows, looping indefinitely via GOTO 500.

A utility subroutine at line 1000 provides keypress-controlled pause: it returns immediately if no key is held, but if a key is pressed it waits 50 frames then spins until the key is released before returning.

Lines 9998–9999 are a save stub: SAVE "BULLETI%N" (the %N producing an inverse N in the filename) followed by GOTO 0 to restart.

Machine Code Usage

RAND USR 16514 is called at lines 4, 8, 12, and 26. Address 16514 on a ZX81/TS1000 is within the system variable area (specifically near FRAMES at 16435 and display file pointer territory), so this almost certainly jumps into a short machine-code routine embedded or patched into memory before the BASIC runs — presumably loaded from tape or POKEd in earlier. The return value is discarded (RAND throws it away), making this a pure side-effect call.

POKE 16515,128 (lines 10, 25) and POKE 16515,X (line 18) write to a location just above 16514, suggesting the machine-code routine reads a parameter from this address. The value 128 likely acts as a reset/neutral state. At line 16–18, X is set either to a value in 129–156 (a random display attribute or character code) or 1–10, giving the routine a range of behaviors to produce a flash or border effect.

POKE 16418,0 at line 20 writes to the ZX81 system variable CDFLAG (fast/slow mode flag), forcing the machine back to a known display state after the flash loop.

Block Graphics Border Drawing

Lines 28–43 draw a complete border around the 32×24 screen using Spectrum block-graphic characters:

PositionCharacterGlyph
Top-left (0,0)\:'
Top edge (0,1–30)\''
Top-right (0,31)\':
Right edge (1–22,31)\ :
Bottom-right (23,31)\.:
Bottom edge (23,1–30)\..
Bottom-left (23,0)\:.
Left edge (1–22,0)\:

Two inner rectangular boxes (rows 6–8 and 15–17, columns 1–30) are drawn using the same set of corner and edge graphics at lines 54–69, creating panel frames for the scrolling ticker text.

Title Animation Technique

Lines 45–53 implement an upward-scroll animation for each title line by iterating N from 21 down to a target row. Each iteration of the loop prints the text in inverse video at row N, then immediately overwrites it with a row of inverse spaces (effectively erasing it), then prints it in normal video at row N-1. This creates the illusion of the text moving upward one row per loop iteration without any actual screen scrolling. The same technique is reused for all three title strings.

Scrolling Ticker (Lines 500–590)

The ticker uses a standard BASIC substring-window idiom: B$(N TO N+27) extracts a 28-character window from the string, advancing N by 1 each iteration. The loop runs from N=1 to LEN B$-30, meaning the string must be at least 31 characters long for any output to appear — the -30 rather than -27 leaves a small safety margin. The same logic is applied to C$ in the lower box. After both strings are exhausted, GOTO 500 restarts both scrollers indefinitely.

Note that B$ and C$ are never defined within this listing; they must be pre-loaded (e.g. from a companion tape block or set interactively), which is consistent with a bulletin-board system where the content changes each issue.

Key BASIC Idioms

  • PRINT AT 0,0;""; — printing an empty string at the home position is used as a lightweight cursor-reset idiom without clearing the screen.
  • RAND (bare, line 14) — reseeds the random number generator from the hardware clock before computing X, ensuring non-deterministic flash patterns each cycle.
  • IF X=2 THEN LET X=INT(RND*28)+129 / IF X=1 THEN LET X=INT(RND*10)+1 — a two-branch dispatch disguised as sequential IFs rather than using a nested conditional, since ZX81 BASIC has no ELSE.
  • The GOSUB 1000 pause-on-keypress pattern (lines 515, 545) is a common ZX81 speed-control idiom for scrolling displays.

Content

Appears On

Cassette to accompany the April 1983 issue of Synchro-Sette.

Related Products

Related Articles

Related Content

Image Gallery

Bulletin

Source Code

   1 REM Y\;;\.'\. :%KNOT $TAB \@@RND\: TAB \'.RNDTAN 
   2 LET S$="% %S%Y%N%C%H%R%O%-%S%E%T%T%E% "
   3 LET T$="% %B%U%L%L%E%T%I%N% % %B%O%A%R%D% "
   4 RAND USR 16514
   5 FOR N=1 TO 20
   6 PRINT AT 10,6;"% % % % % % % THE% % % % % % % "
   7 PRINT AT 0,0;"";
   8 RAND USR 16514
   9 PRINT AT 10,8;S$
  10 POKE 16515,128
  11 PRINT AT 0,0;"";
  12 RAND USR 16514
  13 PRINT AT 10,7;T$
  14 RAND 
  15 LET X=INT (RND*2)+1
  16 IF X=2 THEN LET X=INT (RND*28)+129
  17 IF X=1 THEN LET X=INT (RND*10)+1
  18 POKE 16515,X
  19 NEXT N
  20 POKE 16418,0
  21 PRINT AT 22,0;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
  22 PAUSE 200
  23 PRINT AT 0,0;"";
  24 CLS 
  25 POKE 16515,128
  26 RAND USR 16514
  27 PRINT AT 22,0;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
  28 PRINT AT 23,0;"\:."
  29 FOR N=22 TO 1 STEP -1
  30 PRINT AT N,0;"\: "
  31 NEXT N
  32 PRINT AT 0,0;"\:'"
  33 FOR N=1 TO 30
  34 PRINT AT 0,N;"\''"
  35 NEXT N
  36 PRINT AT 0,31;"\':"
  37 FOR N=1 TO 22
  38 PRINT AT N,31;"\ :"
  39 NEXT N
  40 PRINT AT 23,31;"\.:"
  41 FOR N=30 TO 1 STEP -1
  42 PRINT AT 23,N;"\.."
  43 NEXT N
  44 PAUSE 100
  45 FOR N=21 TO 3 STEP -1
  46 PRINT AT N,6;"\@@THE SYNCHRO-SETTE\@@";AT N,6;"% % % % % % % % % % % % % % % % % % % ";AT N-1,6;" THE SYNCHRO-SETTE "
  47 NEXT N
  48 FOR N=21 TO 13 STEP -1
  49 PRINT AT N,7;"\@@BULLETIN  BOARD\@@";AT N,6;"% % % % % % % % % % % % % % % % % % % ";AT N-1,7;" BULLETIN  BOARD "
  50 NEXT N
  51 FOR N=1 TO 25
  52 PRINT AT 20,7;"\@@FOR  APRIL/1983\@@";AT 20,7;"% % % % % % % % % % % % % % % % % ";AT 20,7;" FOR  APRIL/1983 "
  53 NEXT N
  54 PRINT AT 6,1;"\:'";AT 7,1;"\: ";AT 8,1;"\:."
  55 FOR N=2 TO 29
  56 PRINT AT 6,N;"\''"
  57 NEXT N
  58 PRINT AT 6,30;"\':";AT 7,30;"\ :";AT 8,30;"\.:"
  59 FOR N=29 TO 2 STEP -1
  60 PRINT AT 8,N;"\.."
  61 NEXT N
  62 PRINT AT 15,1;"\:'";AT 16,1;"\: ";AT 17,1;"\:."
  63 FOR N=2 TO 29
  64 PRINT AT 15,N;"\''"
  65 NEXT N
  66 PRINT AT 15,30;"\':";AT 16,30;"\ :";AT 17,30;"\.:"
  67 FOR N=29 TO 2 STEP -1
  68 PRINT AT 17,N;"\.."
  69 NEXT N
 500 FOR N=1 TO LEN B$-30
 510 PRINT AT 7,2;B$(N TO N+27)
 515 GOSUB 1000
 520 NEXT N
 530 FOR N=1 TO LEN C$-30
 540 PRINT AT 16,2;C$(N TO N+27)
 545 GOSUB 1000
 550 NEXT N
 590 GOTO 500
\n1000 IF INKEY$="" THEN RETURN 
\n1010 PAUSE 50
\n1020 IF INKEY$="" THEN GOTO 1020
\n1030 RETURN 
\n9998 SAVE "BULLETI%N"
\n9999 GOTO 0

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

People

No people associated with this content.

Scroll to Top