Sideways Billboard

Date: 198x
Type: Program
Platform(s): TS 2068
Tags: Banner

Scrolls a message of your own across a blue band in the middle of the screen, in giant letters made from the ROM character set, and repeats it until BREAK is pressed. A menu offers two versions. 8X Sideways Billboard turns each font pixel into a whole character cell. 4X Sideways Billboard uses quarter-block graphics to make each font pixel 4×4 screen pixels, which gives smaller letters and a longer message. Both programs build the whole message before it moves, which the instructions say takes about six or seven seconds per character, and both ask for a message ending in a space.

Program Analysis

Program Structure

A small loader (added for this release) asks for 1 or 2 and loads BILBRD.B1 (8X) or BILBRD.B2 (4X) from tape. Each program shows its instructions, takes the message in A$ and builds a string array H$ that holds the enlarged message, one array row for each screen row. It then scrolls in three stages: lines 3000–3200 slide the message in from the right edge, lines 4000–4200 move a 32-column window along the array, and lines 5000–5200 scroll the tail off. Line 6000 starts again.

Reading the Font

Both versions read the ROM font directly with PEEK (15360+CODE A$(B)*8+C) for rows 1–6 of each character, leaving out the blank top and bottom rows. Each bit is tested by repeated subtraction of 128, 64, 32 and so on. In the 8X version, every set bit puts a full block :: into H$(6,LEN A$*7), so each letter is 7 cells wide and 6 rows tall. The 4X version first fills a 6×8 work array K$ with “1” and space characters. It then takes each 2×2 group of pixels as a four-character pattern and matches it against all 16 combinations (lines 2330–2345) to pick the matching quarter-block graphic, so each letter becomes 4 cells by 3 rows.

Notable Techniques

  • Large text made by reading the ROM character bitmaps at 15360, with no UDGs or machine code.
  • The 4X version maps 2×2 pixel groups onto the 16 Spectrum-style block graphics, so its letters have twice the resolution per cell.
  • The lead-in loop uses negative AT columns (FOR J=-31 TO 0). The ROM takes the size of the value, so the message appears at the right edge and grows leftward.
  • Each scroll step is one PRINT statement that reprints all six (or three) rows from string slices.

Potential Issues

  • Messages shorter than the stated minimum (5 characters for 8X, 9 for 4X) make the slice arithmetic go out of range.
  • The 4X version’s speed-control PAUSE lines (3135, 4135, 5135) are REMmed out, so its delay loops do nothing.

It comes from a Larken disk in the TS User Group’s collection (disk l-24). For this release it was converted to load and run from tape on a stock TS2068: the LKDOS RANDOMIZE USR 100 and OPEN #4,"dd" calls and the PRINT #4: prefixes on the colour statements were removed, and the menu loader was added so either version can be chosen. It was tested in ZEsarUX.

Image Gallery

Source Code

  400 REM *8X SIDEWAYS BILLBOARD*
  401 CLS 
  402 RANDOMIZE USR 100: OPEN #4,"dd"
  405 BORDER 7
  410 PRINT #4: PAPER 7
  412 PRINT #4: INK 0
  500 PRINT "THIS PROGRAM SCROLLS YOUR       MESSAGE ACROSS THE SCREEN IN    8X8 CHARACTERS"
  505 PRINT '
  510 PRINT "MESSAGE SHOULD BE MINIMUM OF    5 CHARACTERS (MAX 300+) AND LASTCHARACTER SHOULD BE A SPACE"''
  515 PRINT "IT TAKES ABOUT 6 SECONDS PER    CHARACTER TO LOAD THE ARRAY AND THE MESSAGE WILL CONTINUALLY    REPEAT ITSELF UNTIL ""BREAK"" IS  ENTERED"
  525 PRINT AT 15,0; INK 1; FLASH 1;"INPUT MESSAGE"
 1090 INPUT A$
 1095 PRINT AT 15,0; INK 1; FLASH 1;"LOADING ARRAY"
 1100 DIM H$(6,LEN A$*7)
 1200 FOR B=1 TO LEN A$
 1210 FOR C=1 TO 6
 1220 LET D=PEEK (15360+CODE A$(B)*8+C)
 1230 LET E=128
 1240 FOR F=1 TO 7
 1250 IF D<E THEN GO TO 2100
 1260 LET H$(C,7*(B-1)+F)="::"
 2000 LET D=D-E
 2100 LET E=E/2
 2200 NEXT F
 2300 NEXT C
 2400 NEXT B
 2920 LET L=(LEN A$-5)*7
 2925 CLS 
 3000 FOR J=-31 TO 0
 3005 BORDER 1
 3010 PRINT #4: PAPER 1: PRINT #4: INK 7
 3100 PRINT AT 8,J;H$(1,1 TO 32+J);AT 9,J;H$(2,1 TO 32+J);AT 10,J;H$(3,1 TO 32+J);AT 11,J;H$(4,1 TO 32+J);AT 12,J;H$(5,1 TO 32+J);AT 13,J;H$(6,1 TO 32+J)
 3200 NEXT J
 4000 FOR J=2 TO L+2
 4100 PRINT AT 8,0;H$(1,J TO 31+J);AT 9,0;H$(2,J TO 31+J);AT 10,0;H$(3,J TO 31+J);AT 11,0;H$(4,J TO 31+J);AT 12,0;H$(5,J TO 31+J);AT 13,0;H$(6,J TO 31+J)
 4200 NEXT J
 5000 FOR J=L+3 TO L+33
 5100 PRINT AT 8,0;H$(1,J TO 33+L);AT 9,0;H$(2,J TO 33+L);AT 10,0;H$(3,J TO 33+L);AT 11,0;H$(4,J TO 33+L);AT 12,0;H$(5,J TO 33+L);AT 13,0;H$(6,J TO 33+L)
 5200 NEXT J
 6000 GO TO 3000
 7000 STOP 
 9000 RANDOMIZE USR 100: SAVE "BILBRD.B1" LINE 1

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