turbotools 1.0 -- native tools for TurboDOS object code
=======================================================

Three programs for working with TurboDOS systems and the object code they
are built from, without a CP/M emulator:

    gen         link a TurboDOS system, as Software 2000's GEN does
    disasm      relocation-aware Z80 disassembler
    serial      stamp serial numbers and absolute symbols into REL files

These are the tools that have to know something about TurboDOS.  The
format-generic ones -- an assembler, a linker, a librarian, and the
utilities that inspect and compare REL files -- are a separate package,
REL_tools, which this one depends on.


Why they are separate from REL_tools
------------------------------------

The test is what a program has to know.

mz80 and mlink need to know the REL object format and nothing else; they
work on anybody's object files.  gen needs to know that TurboDOS has six
segment classes of its own invention and that a .PAR file may patch any
symbol by name after the link.  disasm carries TurboDOS's inline message
convention, its string idioms, and the shape of its drive specification
modules.  serial knows that a serialised module carries ?ORIG? and ?UNIT?
as absolute publics.

None of that belongs in a general REL toolkit, and a general REL toolkit
is no use without it if TurboDOS is what you have.  Hence two packages.


What they are for
-----------------

**gen** links a system: it reads a .GEN configuration file, the modules
that file names, and a .PAR file of symbolic patches, and writes a .COM,
a .SYS or an Intel HEX image.  It is checked against the original the
only way that settles anything -- seven shipped configurations linked
both ways and compared byte for byte.

**disasm** is not built on a conventional disassembler, and that is the
point.  A disassembler working from a flat binary has to guess which
words are addresses and which are constants, and it guesses wrong often
enough to matter.  A relocatable object does not require the guess: the
file says which words are relocated, a relocated word is a pointer and
never an immediate, and its target is a label site.  The relocation map
is the code/data oracle.  Disassembly is recursive descent from every
public and every relocated word, then a linear sweep over the remainder,
with a coverage report saying how much each pass accounted for.

**serial** adds, changes and removes absolute public symbols.  This is
how a module can both define and reference a symbol -- something no
MACRO-80 source file can express, since a symbol is EXTRN or PUBLIC and
never both.  Anyone reconstructing such a module needs to know that, or
they will write EQU/PUBLIC into the source and be unable to reproduce
the two modules that need it most.


Building
--------

    make ; sudo make install

Needs REL_tools.  If a REL_tools source tree sits beside this one the
build uses it directly; otherwise it builds against an installed copy:

    make RELPREFIX=/usr/local

No configure script.  Builds with gcc 13 on Linux and clang 19 on
FreeBSD, -std=c2x, warning-free.  PREFIX, DESTDIR, CC and CFLAGS are
honoured.  Other targets: test, sanitize-test, manual, dist.

The comparison against the original GEN needs the TurboDOS
reconstruction's sources and a CP/M emulator; it is skipped with a note
when they are absent.  The behavioural tests run anywhere.


Documentation
-------------

    turbotools_manual.pdf           the manual
    gen(1), disasm(1), serial(1)    man pages

For the object format itself, and for the assembler and linker, see
REL_tools -- its manual documents the REL bit stream in full.


Licence
-------

Two-clause BSD.  Copyright 2026 Robert Cousins.

Robert Cousins <rec@rcousins.com>
https://rcousins.com/pub/
