Programers Toolkit

Developer(s): Paul Holmes
Date: 1981
Type: Program
Platform(s): TS 1000

A set of eight machine-code routines for 16K ZX81/TS1000 BASIC programmers. RENUMBER renumbers a program in steps of your choice. SEARCH AND REPLACE changes every occurrence of one character into another. SEARCH AND LIST lists the line numbers where a character appears. HYPER-GRAPHICS MODE moves the start of the character table. FILL fills a number of lines with a character, REVERSE turns lines to inverse video, WAIT holds a program until a signal comes in from the cassette player, and FREE reports the free memory. Each routine is called with USR, as a command or from your own program, with its settings POKEd in first.

The cassette reads “PROGRAMMERS TOOL KIT 16K”, “©Paul Holmes 81” and Softsync Inc., New York, and the code carries “COPYRIGHT PAUL HOLMES 1981”. The instructions say the toolkit was written to be compatible with Softsync’s Graphics Kit, and both can be loaded together.

Using it

Before loading, enter POKE 16389,124 and NEW to lower RAMTOP, then LOAD "TOOLKIT" and press 1 when it has loaded. The code then sits above RAMTOP, safe from your own program. If the Graphics Kit is already loaded, skip the POKE and NEW.

  • RENUMBER: RAND USR 32171, by default from line 10 in steps of 10. The start line and step are POKEd into 31936/31937 and 31939/31940. Target line numbers in GOTO and GOSUB must first be written with four digits, and computed jumps are not changed.
  • SEARCH AND REPLACE: POKE 32349 with the old character code, POKE 32364 with the new one, then PRINT USR 32326. Line numbers, line pointers and the hidden floating-point numbers are left alone.
  • SEARCH AND LIST: POKE 32390 with the character code, then RAND USR 32367.
  • HYPER-GRAPHICS MODE: POKE 32711 with a value, then USR 32710. Values above 30 generally fill the screen with inverse spaces, and 30 restores the normal set.

Program Analysis

The tape program is short. Line 10 is a REM holding the routines, line 20 the SAVE, and line 30 runs a relocator at 16514 that copies 1K of code with LDIR to 7C00H and jumps into it. Lines 31–38 then POKE eight more bytes into the code at 32317, and line 40 clears the program with NEW if a check byte at 27394 is wrong.

What’s in the download

Two recordings of the program (PT1 and PT2, which load identically) as TZX files with text listings, photographs of the cassette and of the six-page instruction sheet, and a note that it does not start in the EightyOne emulator: it loads, but nothing happens when 1 is pressed.

Related Products

Machine code routines write better, faster, and more elaborate programs. Renumber program lines, search and replace any character, insert a...

Image Gallery

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