Bold

This file is part of and Long Island Sinclair Timex (LIST) User Group Library Tape #2. Download the collection to get this file.
Date: 198x
Type: Program
Platform(s): TS 2068
Tags: Font

This program loads and launches a machine code routine that implements bold (double-struck) text printing on the system. The code is stored at address 57786 and occupies 29 bytes, sitting above the RAMTOP set by CLEAR 56575. After loading, execution is transferred to the machine code entry point via RANDOMIZE USR 57786. Lines 35 and 39 provide a simple confirmation message and listing before halting, while line 40 handles saving both the BASIC loader and the machine code block back to tape as a two-file package.


Program Analysis

Program Structure

The program is a classic two-part tape package: a BASIC loader and a companion machine code binary. The BASIC portion handles memory setup, loading, execution handoff, and re-saving, while the actual bold-print functionality resides entirely in the 29-byte machine code block.

  1. 10 — REM label identifying the program’s purpose.
  2. 20CLEAR 56575 sets RAMTOP, protecting the machine code area starting at 57786 from being overwritten by BASIC.
  3. 30 — Loads the machine code block to its fixed address, then immediately transfers control via RANDOMIZE USR 57786, which installs the bold-print patch.
  4. 35 — Prints a confirmation message to indicate successful loading.
  5. 39LIST followed by STOP displays the program listing and halts, giving the user a clean exit point.
  6. 40 — Saves the BASIC loader (with LINE 20 auto-run) and then saves the raw machine code block as a second file, both under the name bold.

Memory Layout

AddressPurpose
56575RAMTOP (set by CLEAR); top of BASIC-accessible RAM
57786Entry point and load address of the machine code routine
57786–5781429-byte machine code block (bold-print patch)

Key BASIC Idioms

  • CLEAR before LOAD ""CODE is the standard idiom for reserving high-memory space for machine code, preventing the BASIC system from encroaching on it.
  • RANDOMIZE USR is the conventional way to call a machine code subroutine from BASIC; the return value is discarded and any non-zero return is absorbed without error.
  • Placing the SAVE commands on line 40 — beyond the STOP at line 39 — means they are only reached if the user explicitly types GO TO 40 or RUN 40, keeping the save step manual and deliberate.
  • SAVE "bold" LINE 20 encodes the auto-run line number into the BASIC file header, so the loader restarts automatically from 20 when loaded.

Machine Code Usage

The 29-byte routine at 57786 is not embedded in the BASIC listing itself (e.g., via REM or DATA); it is stored as a separate CODE file on tape. This keeps the BASIC source clean and the machine code relocatable as a standalone binary. The routine’s job — patching the system to produce bold output — likely works by intercepting or replacing a ROM character-output routine so that each character is printed twice with a one-pixel horizontal offset, a well-known technique for synthesizing bold text without a dedicated font.

Notable Techniques

  • The gap between RAMTOP (56575) and the code address (57786) is 1211 bytes, leaving a comfortable buffer that may be intentional to avoid conflicts with system variables or other resident code in that region.
  • Combining LIST and STOP on a single line (39) is a neat way to present the program to the user immediately after installation while preventing any further automatic execution.
  • Using a two-file save strategy (BASIC loader + CODE block) under the same filename bold is standard practice for distributing machine code utilities, making sequential loading straightforward.

Potential Anomalies

There are no obvious bugs. One minor observation: if RANDOMIZE USR 57786 at line 30 returns normally, execution falls through to line 35 as expected. However, if the machine code patch redirects the ROM print routine permanently, subsequent output (including line 35‘s confirmation message) would itself be rendered in bold — which may be intentional as a demonstration of the patch’s effect.

Content

Appears On

Track the OSCAR 10 satellite, design Bézier curves interactively, take a geography quiz on a hand-drawn map of North America, or hear the Olympic fanfare — LIST Library Tape 2 is a well-curated selection of practical and creative programs.

Related Products

Related Articles

Related Content

Image Gallery

Source Code

   10 REM bold print
   20 CLEAR 56575
   30 LOAD ""CODE : RANDOMIZE USR 57786
   35 PRINT "Bold print now loaded"
   39 LIST : STOP 
   40 SAVE "bold" LINE 20: SAVE "bold"CODE 57786,29

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

People

No people associated with this content.

Scroll to Top