Machine code, Z80 & assemblers
Z80 machine code, assemblers, disassemblers, and low-level programming.
135 threads · 1353 messages · 2003-09-18 → 2026-06-29
The center of gravity in modern TS2068 Z80 work is disassembly as a path to understanding the machine. David Anderson's multi-year TS 2068 ROM Disassembly project shipped as a physical book in January 2023 (#2700) — the most complete one outside Timex's own source — and grew out of the same itch Adam Trionfo describes: disassembling forces you to learn the hardware. That ethos drove Adam's deep dive on Q*Bert (#2011), reverse-engineering the cart ROM UDG-by-UDG to recreate a tape version of a game never released on tape. The same archaeology fueled the long Timeblasters investigation (#3129, #3167) — Larry Lorenson, Adam, and others mapping ~4 KB of Z80 buried inside Dan Tandberg's mostly-BASIC game using dz80 2.0 with LUA scripts and the EightyOne debugger — and surfaced Rampager (#3329), Tandberg's never-distributed Z80 monitor/editor for the TS1000, as a tool worth hunting.
On cross-development tooling, Jeff Burrell's survey in #1055 is the canonical reference: zmac (the 48k.ca build, chosen because it produces a real listing file and emits .tap), rmac, Zeus, and z88dk — with the standing caveat that none produce relocatable code, which bites whenever ML has to coexist with BASIC. Pasmo earned Ryan Gray's endorsement during Tim Swenson's ZX81 mouse-cursor debugging (#4222), where passtest1/passtest2 and mousetest.asm became the canonical reference for passing values between BASIC and Z80 on both 2068 and ZX81. Eduardo Fuentes used z88dk to bring Core War / Redcode 94 to the 2068 (#3900, drift-in from a website-updates thread). For period-authentic tooling, LewisB's #1189 revived interest in Crystal Computing's Zeus and Ray Kingsley's Hot Z 2068, and surfaced Syd Wyncoop's TS1000/TS2068 ML article series with its Hex Loader 2068 BASIC stub.
Recurring how-to questions got concrete answers. Bitwise ops from BASIC: Ryan's DEF FN b(n,x)=INT(x/n)<>2*INT(x/(2*n)) in #3958 lets you bit-test without ML — a thread that drifted in from Mike Druckenmiller's 6850 UART serial-port code. Where to put loaded code: Ryan's #5408 answer — load above RAMTOP after CLEAR, or use the allocate-a-big-string trick (as QuickFont does) — settled the LOAD CODE pitfall. Calling ROM routines: David pointed Jeff K at the function-dispatcher writeup and a SyncWare News article (#2770). Embedding ML in BASIC: David's clock program (#2877) is the worked example — CLEAR 65019 reserves a region, the ML clock survives NEW, RANDOMIZE USR toggles it.
Cartridge and DOS work drifts heavily into ML territory. Thread #2138 is nominally "BASIC to cartridge" but is really about adding relocatable Z80 to .dck AROS images; Ryan's QuickFont port (#2281) had to detect cartridge-mode at runtime and re-POKE its ML because a DCK program PEEKs RAM not ROM. Math help (#4222) became reverse-engineering of Oliger DOS directory entries. "64 Column Mode Support" (#4481) puzzled out OS-64's memory map, with Ryan documenting how the custom COPY and FDDRS232 drivers slot into display file 1's attribute space. Jon's TSAnim (#7483) is the modern showpiece — AI-assisted double-buffered ~8.3 fps video using both display files on real hardware with the Pico. December 2025's #8807 drifted from a Tomahawk loading problem into Tim Swenson and Carl Miles testing Hi-Z's single-step breakpoint behavior — discovering breakpoints only persist inside single-step mode and the address display shows internal pointers rather than the user's PC.
Key threads
- TS 2068 ROM Disassembly is live (#2700 on groups.io) — David Anderson's multi-year ROM disassembly ships as a physical book — the most complete TS 2068 ROM disassembly outside Timex's own source, and the anchor of the disassembly-as-learning culture.
- Tetris for TS2068; was: Monitor And Dissembler TS2068? (#1189 on groups.io) — Revives interest in period assemblers (Zeus, Hot Z 2068) and surfaces Syd Wyncoop's TS1000/TS2068 machine-language article series with its Hex Loader 2068 BASIC stub.
- Z80 Cross-Compiler for Spectrum/TS 2068? (#1055 on groups.io) — Jeff Burrell's foundational survey of the modern Z80 toolchain — zmac (48k.ca), rmac, Zeus, z88dk — with the listing-file and relocatable-code tradeoffs everyone now cites.
- Q*Bert on tape? (#2011 on groups.io) — Adam Trionfo's long Q*Bert disassembly — reverse-engineering the cart ROM UDG-by-UDG to make a tape version of a game never released on tape.
- Archiving 'Timeblasters' by Calliope Software (#3129 on groups.io) — Flagship case study for disassembling a 1980s commercial program: ~4 KB of Z80 in a mostly-BASIC game, dissected with dz80 2.0 + LUA in EightyOne.
- Timex Programming Tools; was: Archiving 1983 'Timeblasters' (#3167 on groups.io) — Surfaces Dan Tandberg's never-distributed Rampager monitor/editor and Mike Druckenmiller's plan for a TS2068-native disassembler that emits POKE-style BASIC.
- Math help, please :) (drifted to ZX81 Z80 debugging help) (#4222 on groups.io) — Tim Swenson's passtest/mousetest examples become the canonical reference for BASIC↔Z80 value passing; Pasmo enters the toolchain. Drift-in from an Oliger DOS directory-format question.
- Core War (drifted from T/S Website Updates - 6-23-2023) (#3900 on groups.io) — Eduardo Fuentes ports Core War / Redcode 94 to the 2068 with z88dk — drift-into-topic from a general website-updates thread, and a showcase of z88dk C-to-Sinclair porting.
- BASIC to cartridge (#2138 on groups.io) — Jeff Burrell and Jeff K work out embedding relocatable Z80 in .dck AROS carts; Ryan makes QuickFont detect cart-mode and re-POKE its ML — the canonical reference for ML+BASIC on cart.
- How to do Binary Comparison (BIT Test) in Timex Basic (#3958 on groups.io) — Drifted from 6850 UART serial-port code into Ryan's DEF FN b() bit-test workaround for the AND/OR Timex BASIC lacks.
- Math Subroutines Book by Richard Booth (#3782 on groups.io) — Group typing-in of Booth's 'Applied Sinclair' programs via zmakebas + tsmake preprocessor — the working pattern for ASCII-listing BASIC back onto a real 2068.
- TSAnim: Full motion video on the T/S 2068 (#7483 on groups.io) — Jon's double-buffered ~8.3 fps video player — modern showcase of what dual display files + tight Z80 can do on real hardware with the Pico.
- Tape Programs on the TS Pico (drifted to Breakpoints in Hot-Z) (#8807 on groups.io) — Dec 2025 thread that drifted from a Tomahawk loading problem into Carl Miles and Tim Swenson reverse-engineering Hi-Z's single-step breakpoint behavior.
- QuickFont (#1590 on groups.io) — Ryan Gray's revived 1985 font editor — recurring testbed for ML-in-BASIC integration, cart-mode detection, and zmakebas-as-source.
- UnoDos and the TS2068 (#874 on groups.io) — Jeff Burrell's FPGA work booting the 2068 as a Spectrum with UnoDos/esxDos, and François Lanciault's argument for re-using Interface 1 / Interface1bis syntax for SD storage.
All threads (135)
↳ marks a thread where this topic begins mid-conversation — the link jumps to the message where it starts.