Home
projects

TRS-80 software I wrote
  Zeta BBS
  Utilities
  Printer Utils
  Patches
  Operating Systems
  Library of C
  Languages
  Include files
  Hardware
  Games
  FORTRAN Programs
  File Utils
  Disk Utils
  Comms Programs
  CMD File Utils
  BASIC Programs
  University assignments
  fidonet-packet-handlers

Your donation gives me time
to develop more cool free stuff

Nick Andrew - TRS-80 - Utilities

TRS-80 Utilities

This package contains many miscellaneous utilities which I wrote, or which I ported to the TRS-80.

amortz
A loan amortization program written in C which outputs a table of months and payments.
anagram
C program to produce anagrams of a string argument.
basic
A utility to disable the "POKE" and "SYSTEM" keywords.
bincheck
A C program to output a checksum and XOR of each 256-byte block of a file.
border
A C program to draw an ASCII border around a lot of text. The border is of fixed size (right margin is column 79).
cleanup
A C program to process backspaces (character 0x08) in text files. The backspace character removes the character before it.
cmd
There is a utility in this directory called "REGIONS" which analyses a loadable file and determines the addresses of all contiguous memory regions used by the file. It also reports whether the file overlaps itself (which might be some kind of copy protection, or it might be a patch which can be merged by another of my utilities).
copyit
This program is the Swiss Army Knife of tape copy programs. It autodetects whether the file being read is a BASIC program, or EDTASM source code, or a loadable file, and alters its behaviour accordingly.
day
This simple program calculates and prints the day of the week.
directory
There's a utility in this directory called "VISIBLE" which "finds invisible user files on disks". I didn't know that there was a problem viewing them with "DIR".
drop
This utility converts a file to lower case.
errors
This utility patches a hook in the BASIC interpreter to print full text error messages. For example, "SYNTAX ERROR" instead of "?SN ERROR".
fast-format
This is a program to test whether it's possible to do a really fast format on a disk. I'm not sure how.
fileupd
This utility updates a file with lines from another file. The input files are assumed to be in sorted order, so this program is really a kind of merge. Only the first 13 characters of every line are compared.
format
This C program produces "wraparound output from a file". I think it is designed for email because there is a special case for the first character of a line being '>'.
gettok
This program extracts the BASIC token strings from the ROM and writes an assembler source file with the definitions.
granules
This program calculates the number of free granules on a disk. A granule is the fundamental unit of disk allocation. There is also "map" which shows free granules in visual form.
grep
A simple grep utility. Only fixed strings are searched for, and comparisons are case-independent.
ifupd
Executes a command only if a file is updated (i.e. if the 'U' flag is set in the file's directory entry).
large-file-editor
This is a line editor for large files (up to 128 Kbytes in size). It requires my 256 Kbytes RAM modification.
memtest
This is a background resident program to test memory. It displays a warning message if memory is found to be faulty.
merge
This C program merges "two files columnwise". I suppose that means it is like the Unix "paste" program. The comments note that I ported this program from "merge.b" which was written in the "B" language, the parent of "C", and which ran on NSWIT's Honeywell Level/66 mainframe.
newc
According to the comment, this program "gets rid of undesirable Shift/Down Arrow effects". Whatever they may be!
newjkl
This program looks like a patch to Newdos-80. It dumps the screen contents to the printer ... including graphics.
newsfmt
This C program "reformats news files to suit". I think that means stripping all unwanted headers and reformatting very long lines.
pack
This directory contains two implementation of the Unix "pack" program, one in C and the other in assembler. "pack" was the ancestor of "compress" which was the ancestor of "gzip" and "bzip2". Included is "pack", "pcat" and "unpack".
pdir
This program does a "printer-oriented DIR I P".
peekhash
This program takes a 16-bit TRS-80 type password hash and tries to find a corresponding password by brute force. It is not too hard, even for a TRS-80, to find synonyms.
prime
This program finds all prime numbers up to 65535.
ptrdump
There are two versions of a program in this directory which dump a file to the printer.
repc
This C program does repeat character encoding or decoding on a file. The output file starts with the magic sequence 0x1b 0x1d and repeated characters represented by 0x10 followed by a repeat count followed by the repeated character. The 0x10 character itself is repeat-encoded so this program is safe for binary files.
report-writer
The C program in this directory "ppk1" was written as an assignment solution for the University subject PPK (I've forgotten what the acronym stands for). Anyway it is a fairly flexible parser of line-oriented data files in a variety of formats. I'm sure my implementation provided far more than the specifications required, in only 600 lines of code. Other people were writing their solutions in COBOL, a spectacularly useless language for a program of this kind (or indeed any other kind).
rot13
This is rot13, actually 10 lines of C code.
save
This looks like a program to copy the TRS-80 "microchess" program from one tape to another.
screen-dump
This is some kind of screen dump program which writes the contents of the screen to disk sectors. Ugh!
sort
This C program sorts a text file. It looks like a bubble sort to me (again, ugh!). I wrote a much more lovely quicksort in PL/1 when I worked for IBM.
split
This directory contains a variety of programs to split large files into smaller files of various lengths.
superc
IBM had a great comparison utility called SUPERC which I wanted to emulate. This program doesn't come close, but it does detect inserted and deleted lines.
tab4
This program changes tabs in source files to spaces. The default tab width is 4. It understands that each tab character has varying width.
tax
I wrote this little C program to help with my parents' tax return.
textdiff
This program finds the "difference of two text files".
tune
This is a music playing program. I had calculated a frequency and duration table for each note. I don't remember how well it worked.
unarc
This is a TRS-80 port of a CP/M program written by Bob Freed. There are a few different versions in this directory because I couldn't figure out which, if any, was the latest.
uncmprs
This program "expands space compression codes in a file and deletes unusual characters". Gotta love how those pesky unusual characters get into files so they have to be automatically deleted. Space compression codes seem to be characters 0xc0 and up (where 0xc0 means 256 spaces and 0xc1 means 1 space). The unusual characters seem to be those in the range 0x80 - 0xbf, or chunky 2x3 TRS-80 graphics characters.
uncrc
This program finds passwords which encode to any given TRS-80 password hash. Maybe that means I got the description for "peekhash" wrong.
waveform
I wrote this program under contract for Geoff Arthur when he wanted to produce a TRS-80 hardware/software package (there was an off-the-shelf ADC module available) to do waveform analysis for TV repair (Geoff was an old TV repairman if I recall). This program just displayed a demonstration waveform. Geoff didn't realise the TRS-80 only had chunky graphics so he abandoned the idea of me writing this program for him and changed strategy to have somebody else write it under DOS. He told me that he had the program working once, but I don't know whether anything came of it.
wc
This C program counts (verbosely) the number of lines, words and characters in its input.

Download