EASYprint Word Processor

This file is part of Byte Power Spring 1987 . Download the collection to get this file.
Developer(s): Eric Boisvert
Date: 1987
Type: Program
Platform(s): TS 2068

EASYprint is a text-file editor/printer utility that uses a machine-code module loaded from tape to handle its core functionality. The program manages memory carefully, using CLEAR to set up a workspace at address 28100 and mapping a second RAM bank region starting at 53630 for the machine-code routines. On startup it displays a decorative border using repeated character sequences and shows author and copyright information before handing control to the machine-code entry point at 53872 via RANDOMIZE USR. The save routine at line 9999 preserves three separate CODE blocks—a small 246-byte block at 29696, and a 10370-byte machine-code block at 53630—alongside the BASIC loader.


Program Structure

The program is organized into several distinct functional sections, each separated by REM labels:

  1. Lines 10–110: Main loader/initializer — sets up screen, loads machine code, displays UI, then jumps into the machine-code main loop.
  2. Lines 1000–1020: Save text file routine — prompts for filename via subroutine, then saves the text buffer as a CODE block.
  3. Lines 2000–2020: Load text file routine — prompts for filename, calls a machine-code loader helper, then loads the CODE block.
  4. Lines 3000–3010: Filename input subroutine — uses INPUT LINE and validates length ≤ 10 characters.
  5. Lines 8000–8020: Save customized version — saves both BASIC and the two CODE blocks for a customized build.
  6. Lines 9900, 9950: Utility stubs — CLEAR 65535: NEW and a secondary autorun loader stub.
  7. Lines 9998–9999: Save original version — preserves the full three-part tape image (BASIC + two CODE blocks).

Memory Map

AddressSizePurpose
28100variableText file buffer (CODE load/save target)
29696246 bytesSmall auxiliary CODE block (original save)
5363010370 bytesMain machine-code module

The CLEAR VAL "28099" at line 15 sets RAMTOP just below the text buffer, protecting the machine-code area from BASIC’s memory management. POKE 23607,115 adjusts the system variable STKBOT high byte, and POKE 23606,0 / POKE 23607,60 at lines 15 and 70 manipulate the ERR_SP/STKEND system variables to control stack or channel behaviour around the machine-code calls.

Machine-Code Entry Points

AddressCalled at lineApparent role
538721030Main UI / editor loop entry
53630100Conditional restart (if PEEK 23681 ≠ 0)
636872010Pre-load helper (possibly clears buffer)
637281020Returns text buffer length for SAVE CODE

Notable BASIC Idioms

  • VAL "number" is used pervasively for numeric literals in GO TO, GO SUB, POKE, and FOR statements. This is a well-known Sinclair memory optimization: it avoids storing the five-byte floating-point number after the token, reducing BASIC program size at the cost of a runtime VAL evaluation.
  • NOT PI evaluates to 0 (since PI is non-zero, NOT PI = 0) and is used as a compact way to write 0 in FOR loop starts and AT coordinates.
  • SGN PI evaluates to 1 and is used to reference stream #1 compactly in PRINT #SGN PI.
  • VAL "3e3" is scientific notation for 3000, used in GO SUB VAL "3e3" — another byte-saving trick.
  • Line 50 uses PRINT AT x,NOT PI,, — the double comma after the coordinates moves the print position, likely used to trigger a channel/stream side-effect rather than actually printing visible characters.

Startup Display

Lines 20–80 draw a decorative bordered UI before handing off to machine code. The loop from NOT PI (0) to VAL "10" (10) prints ASCII character sequences !"#$%&'()*+,- and ./0123456789:; at mirrored rows (top: row x, bottom: row 21-x), creating a symmetric border. A second loop prints something at column 0 for each mirrored pair of rows. The string " <=", at line 70 is followed by a POKE to system variable 23607, suggesting the trailing comma and the POKE together reconfigure a channel or stream pointer immediately before the machine-code main loop is entered at line 1030.

Content

Appears On

Tape-based magazine.

Related Products

Related Articles

This program is a word-processor for full-size printers only… It features Center, Justify, Word count and up to 132 columns!!!...

Related Content

Image Gallery

EASYprint Word Processor

Source Code

    0 REM  EASYprint                       by Eric Boisvert                ©1987 BYTE POWER       
   10 GO TO VAL "1030"
   15 PAPER VAL "7": INK VAL "0": POKE VAL "23606",VAL "0": CLEAR VAL "28099": POKE VAL "23607",VAL "115"
   20 LOAD ""CODE : FOR x=NOT PI TO VAL "10": PRINT AT x,VAL "9";" !""#$%&'()*+,-";AT VAL "21-x",VAL "9";"./0123456789:;"
   30 NEXT x
   40 FOR x=NOT PI TO VAL "9"
   50 PRINT AT x,NOT PI,,: IF x<>VAL "9" THEN PRINT AT VAL "21-x",NOT PI,,
   60 NEXT x
   70 PRINT AT VAL "12",VAL "9";"      <=",: POKE VAL "23607",VAL "60"
   80 PRINT #SGN PI;AT NOT PI,VAL "4";"Written by Eric Boisvert";AT VAL "2",VAL "3";"Copyright ©1987 BYTE POWER"
   90 INK VAL "7": LOAD "EASYprint"CODE : INK VAL "0"
  100 IF PEEK 23681<>0 THEN RANDOMIZE USR VAL "53630"
  110 LIST 9998: STOP 
 1000 REM SAVE TEXT FILE
 1010 GO SUB VAL "3e3": IF n$="" THEN GO TO 1010
 1020 SAVE n$CODE VAL "28100",USR VAL "63728"
 1030 PRINT #2: RANDOMIZE USR VAL "53872"
 2000 REM LOAD TEXT FILE
 2010 GO SUB VAL "3e3": RANDOMIZE USR VAL "63687": LOAD n$CODE VAL "28100"
 2020 GO TO VAL "1030"
 3000 CLS : INPUT "FILE NAME:"; LINE n$: IF LEN n$>VAL "10" THEN GO TO VAL "3e3"
 3010 RETURN 
 8000 REM                                                                SAVE CUSTOMIZED VERSION                                   
 8010 SAVE "EASYprint" LINE 9950: SAVE "EASYprint"CODE VAL "53630",VAL "10370"
 8020 VERIFY "": VERIFY ""CODE 
 9000 STOP 
 9900 CLEAR 65535: NEW 
 9950 CLEAR VAL "28099": PRINT #1;AT 1,0;"STILL LOADING...": LOAD ""CODE : RUN 
 9998 REM  SAVE ORIGINAL VERSION  
 9999 SAVE "EASYprint" LINE VAL "15": SAVE "EASYprint"CODE VAL "29696",VAL "246": SAVE "EASYprint"CODE VAL "53630",VAL "10370": VERIFY "": VERIFY ""CODE : VERIFY ""CODE 

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

Scroll to Top