Index of /pub/turbodos/turbotools-1.2/turbotools-1.2/

NameLast ModifiedSize
UpParent Directory
Directorymanual2026-11-09 17:35-
Directorytests2026-11-09 17:35-
Filedisasm.12026-11-09 17:35 4k
[TXT]disasm.c2026-11-09 17:35 160k
Filegen.12026-11-09 17:35 3k
[TXT]gen.c2026-11-09 17:35 43k
FileMakefile2026-11-09 17:35 10k
Fileserial.12026-11-09 17:35 3k
[TXT]serial.c2026-11-09 17:35 13k
Fileturbotools_manual.pdf2026-11-09 17:35 244k
Fileturbotools_manual.tex2026-11-09 17:35 7k
[TXT]z80dis.c2026-11-09 17:35 19k
[TXT]z80dis.h2026-11-09 17:35 5k
turbotools 1.2 -- 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. What changed in 1.2 ------------------- No change to the programs' sources. Two things change what you get: gen links against REL_tools 1.5's librel, which fixes a loader bug gen inherited: a word in one COMMON block naming a label in another was deposited into the other block, silently. No shipped TurboDOS module does this and every image relinks byte-identically; a new driver might. The Makefile stamps the compiler's target and makes every object depend on it, so a native make in a tree last built for another CPU rebuilds the tree instead of linking objects of two architectures together. 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. Platforms --------- x86-64 Linux gcc 13, glibc x86-64 FreeBSD clang 19, LLD riscv64 Linux gcc 13, cross-compiled and run under qemu-user, and again with a native riscv64 gcc in a container The RISC-V build is not a formality. RISC-V makes plain char UNSIGNED, where both x86 platforms make it signed, and these programs read a bit stream a byte at a time. What was measured there is the whole job, not just the suite: gen linked the 193-module TurboDOS reconstruction into a system image identical to the 22,272 bytes Software 2000 shipped, and every one of the 199 objects assembled to the same bytes as on x86-64. AddressSanitizer and valgrind do not work usefully under emulation and were not run there; UndefinedBehaviorSanitizer does, and is clean over the suite and the whole corpus. 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/
Proudly Served by LiteSpeed Web Server at www.rcousins.com Port 443