Skip to content

Machine code, Z80 & assemblers

Z80 machine code, assemblers, disassemblers, and low-level programming.

135 threads · 1359 messages · 2003-09-18 → 2026-04-29

Machine-code discussion in the group splits between tooling, reverse-engineering the ROM and a body of practical 2068-specific gotchas worked out in the open. The ROM-disassembly tradition is the clearest through-line across the two eras: in 2004, Jeff Burrell posted a partially-commented Home + ExROM disassembly to the Yahoo Group that assembled byte-for-byte against the ROM images (originally Cross32, then ported to the Z88DK Z80MA), and that work — together with Syd Wyncoop's Z80 article series and Ray Kingsley's Hot Z 2068 — fed almost two decades later into David Anderson's published TS2068 ROM Disassembly book in 2023, with David explicitly saying he kept at it for the same reason Adam Trionfo disassembles games: it's the best way to learn the hardware. On the tooling side, the consensus groups.io-era cross-assembler list is zmac (Jeff Burrell's choice because it produces a listing file and emits .tap), Pasmo, rmac, the z88dk assembler/C compiler, plus period-correct Zeus and Hot Z; the recurring caveat is that none of them produce relocatable code, which bites whenever ML has to coexist with a BASIC program. The Yahoo-era roots of the z88dk story are still there too — alvin albrecht (aralbrec) posted his Sprite Pack C library with IM2 interrupt support and a block memory allocator as far back as 2003, with a complete getting-started tutorial for all the 2068 video modes.

A central practical thread is getting machine code to live alongside BASIC and survive — where to poke it, and how to keep variables, NEW, or cartridge-loading from stomping it. The worked-out answer: lower RAMTOP with CLEAR to protect a region (David's clock program uses CLEAR 65019; bytes loaded above RAMTOP, just below the UDGs, survive NEW and a RANDOMIZE USR turns the ML clock on or off), or load into a large pre-allocated string and find its address (the QuickFont trick). Ryan Gray spelled out that loading CODE into the unknown below STKEND gets clobbered by new variable allocation. This dovetailed with Jeff Burrell's tapToCart (BASIC-to-DCK conversion) work, where Ryan discovered that a DCK cartridge program PEEKs RAM rather than ROM, so QuickFont had to detect it was running as a cartridge and re-poke its machine code into high memory.

2068-specific hardware quirks show up in both eras and explain a lot of "works on emulator, not on hardware" frustration. The biggest one, surfaced by Paolo Ferraris in 2005 and explained by alvin albrecht: unlike the Spectrum (which pulls all data lines up so an IM 2 interrupt vector of #FF is guaranteed), the TS2068 only pulls up D2, so the vector is XXXXX1XX with no guarantee, and you must use the full 257-byte IM2 table for reliable operation. Other early posts pin down the 8x1 multicolor mode (1 attribute per row, dual display file at the same offset, section 5.2.2 of the Tech Manual), the OUT 244,3 page-in trick used by Spectrum-emulator cartridges, and cheveron noting that the Timex ROM is "seriously unfinished" with unused code and system variables — which is exactly what David's later disassembly work has been disambiguating. cheveron's 2011 demo (split-screen hi-color/hi-res, IM2-driven AY music, smooth hi-colour vertical scrolling all at once) stands as the era's proof-of-concept of what the 2068 can do in ML when you actually use the Timex modes.

A few smaller but useful takeaways recur. Since Sinclair BASIC has no bitwise operators, the group converged on DEF FN b(n,x)=INT(x/n)<>2*INT(x/(2*n)) for bit-testing (and on decomposing a byte into A0..A7 that can be summed back to reconstruct the value) as the BASIC-only alternative to dropping into ML. Adam's groups.io-era "Timeblasters" disassembly with dz80 2.0 + LUA scripts uncovered ~4K of Z80 in a game thought to be mostly BASIC, mirroring his Q*Bert disassembly workflow. And the standing advice for newcomers — Willie Jones asking for "2068 MC for dummies" — is that any Spectrum assembly book (Toni Baker is the canonical recommendation) works on the 2068 until you hit ROM calls, which are easily converted; Tim Swenson's Floating Point Calculator document shows RST $10 prints a character on both the 1000 and 2068.

Key threads

All threads (135)

↳ marks a thread where this topic begins mid-conversation — the link jumps to the message where it starts.

Thread Msgs Activity Started by
UnoDos and the TS2068 79 💬 2022-08-25 JEFFREY L BURRELL
BASIC to cartidge 📎 55 💬 2022-11-02 JEFFREY L BURRELL
Tetris for TS2068; was: Monitor And Dissembler TS2068? 📎 54 💬 2023-02-26 Adam Trionfo
"64 Column Mode Support" from T/S BASIC; was: New Timex documents uploaded ↳ #5033 📎 49 💬 2023-11-30 Adam Trionfo
Help me fix a file in The Crown? 📎 45 💬 2024-01-09 Ryan Gray
2068 relay board ↳ #1708 📎 43 💬 2022-07-06 Tim H
Q*Bert on tape? ↳ #2044 📎 41 💬 2022-10-26 Adam Trionfo
Grimm’s Fairy Trails 📎 40 💬 2023-01-31 Adam Trionfo
Archiving "Timeblasters" by Calliope Software ↳ #3400 📎 37 💬 2023-05-05 Adam Trionfo
Tape Programs on the TS Pico ↳ #8852 📎 34 💬 2025-12-25 Paul Anderson
Timex Programming Tools; was: Archiving 1983 'Timeblasters' (3-20-83 Version) by ↳ #3185 📎 34 💬 2023-04-26 Adam Trionfo
Clock program ↳ #2884 📎 25 💬 2023-03-03 Adam Trionfo
LOAD "" CODE with Zesarux ↳ #5386 📎 23 💬 2024-01-01 David Anderson
Math Subroutines Book by Richard Booth 📎 23 💬 2023-06-22 Adam Trionfo
How to do Binary Comparison (BIT Test) in Timex Basic 📎 22 💬 2023-07-26 kevin.personal
New Mexico Timex Companies; was: ROM code calls in the 2068 📎 22 💬 2023-05-19 Adam Trionfo
TS2068 Music Maker; was: Thank you, Tim Swenson! 📎 21 💬 2022-03-07 Adam Trionfo
Core War ↳ #4045 📎 20 💬 2023-07-29 David Anderson
TSAnim: Full motion video on the T/S 2068 (all 4 frames of it) ↳ #7512 📎 20 💬 2025-01-08 Jon
Math help, please :) ↳ #4239 📎 19 💬 2023-09-05 David Anderson
Z80 Cross-Compiler for Spectrum/TS 2068? 📎 17 💬 2023-11-18 Adam Trionfo
Help with Androids 2764 and EPROM cart; was Convert Dock File to BIN File? 📎 17 💬 2022-01-03 Adam Trionfo
QuickFont 📎 16 💬 2024-02-12 Ryan Gray
Z80 TS2068 Emulator Overflow & Half Carry Flags 📎 14 💬 2023-05-13 John Mobley
Creating a work space for Machine Code in a Basic Line 📎 14 💬 2023-04-25 Michael A. Druckenmiller
That "Dragon Warrier-Looking" Game 📎 13 💬 2024-03-13 Adam Trionfo
Five more detailed questions about creating a TS2068 AROS cartridge image 📎 13 💬 2022-09-15 qwertyfan2000
TS 2068 ROM Disassembly book 13 💬 2022-07-17 David Anderson
Assembly Language Idea and Build Tools Example 📎 13 💬 2023-10-12 John Mobley
BATCODE ↳ #7776 📎 13 💬 2025-02-17 Timothy Swenson
Does anyone know where I can find a Spectrum Emulator Cartridge 12 💬 2015-06-25 Pete Rittwage
Robotron for ZX81/TS1000 📎 12 💬 2026-04-03 Don Crawford
What makes Z80 special? 12 💬 2022-04-14 Adam Trionfo
Need help identifying some eproms 12 💬 2007-09-12 Luis Alberto D'Ardis
Looks like I found the documentation for my Diagnostics Cartridge... 📎 11 💬 2024-05-28 Carl Miles
TS 2068 Extended Video Display Option: I will only ask ONCE but I think I know t 11 💬 2026-01-08 Thomas Hynes
WRX16 DEMO 📎 11 💬 2023-05-21 Adam Trionfo
"Machine Code Graphics Loop" by Bernard Bush 📎 10 💬 2022-05-31 Adam Trionfo
p2ts150 📎 10 💬 2024-12-27 Ryan Gray
ROM patcher Python Script by Claude 📎 9 💬 2026-04-02 Ricardo Calcagno
Tricky Z80 Code 📎 9 💬 2026-01-12 T2
ZX-Wespi-Nano project ↳ #8734 9 💬 2025-11-18 larry lorenson
Help with Packman Cart for T/S 2068? 📎 9 💬 2022-02-19 Adam Trionfo
ZXzine Issue #11 Timer in Assembly question 9 💬 2025-01-27 qwertyfan2000
Undocumented Zilog Z80 Opcodes 8 💬 2026-01-12 John Mobley
Timex Sinclair PROM Burner 📎 8 💬 2024-02-21 andy
Z80 Branch Math 📎 8 💬 2025-09-22 John Mobley
Why Use "Out" for Spectrum Cartridge? 8 💬 2008-03-29 Glen Goodwin
ZX81 Floating Point Calculator ↳ #1855 📎 7 💬 2022-08-11 Ryan Gray
The Box Trilogy by C. Vernon Tidwell ; was: Sprites 2068 - Sprite Development an 📎 7 💬 2022-05-24 Adam Trionfo
2068 Basic compiler / Assembler 7 💬 2022-01-18 Willie Jones
TS Pico Script ↳ #7591 7 💬 2025-01-24 Jay Carlson
menu program for TSPico 📎 6 💬 2024-08-26 Floppy Days Podcast - Ra
multicolour mode.... 6 💬 2013-04-19 Luis Alberto D'Ardis
Sinclair ZX81 Assembly Language 6 💬 2025-10-10 John Mobley
Old ROM vs. New ROM on ZX81/Timex 1000? 5 💬 2023-04-20 Adam Trionfo
interrupt mode 2 5 💬 2005-12-08 Paolo Ferraris
ts 2068 video programming. 5 💬 2013-03-05 Luis Alberto D'Ardis
zx81 assemblers software ts2068 ie Berch, ZXAS, ZX assembler and disassembler 5 💬 2025-11-21 larry lorenson
What is the difference USR and RANDOMIZE USR 5 💬 2023-06-15 Michael A. Druckenmiller
TS2068 ROM Disassembly 4 💬 2004-03-23 rafael mnrq
Diagnostic Cartridge for T/S 2068 4 💬 2022-10-14 Adam Trionfo
Bresenham Line in Z80, pass 2 4 💬 2025-06-27 andydansby
TS2068 Memory Map and ROM Disassembly by Bob Orrfelt 4 💬 2022-05-07 Adam Trionfo
Adventures in AI-assisted assembly programming for the T/S 2068 📎 4 💬 2024-12-29 Jon
ts1000 rem line Machine Code in ts2068? 4 💬 2021-07-04 Luis Alberto D'Ardis
Assemble-able ROM Files 📎 3 💬 2022-07-17 JEFFREY L BURRELL
Paper on Converting Spectrum assembly to T/S 2068 3 💬 2021-06-05 Timothy Swenson
Introduction to 2068 Machine Code by Lloyd Dreger 📎 3 💬 2023-05-10 David Anderson
Patching cartridges or ROM using bank switching - an additional resource 2 💬 2026-04-04 qwertyfan2000
Converting ZX Spectrum Machine Language programs to run on the TS2068 📎 2 💬 2023-11-22 Carl Miles
ZX81 Expanded Memory 📎 2 💬 2025-05-01 Timothy Swenson
Silversoft ZX81 Compiler 📎 2 💬 2025-02-03 Ryan Gray
Documentation for creating and testing T/S 2068 DCK files with DOSBox 📎 2 💬 2025-01-30 qwertyfan2000
Prototype RPG - "Ten Minute Adventure" 2 💬 2024-10-13 Jeremiah Stoddard
⭐ Proposal for AU (Golden) commands 1 💬 2024-08-25 Ricardo Calcagno
⭐ AZ80 assembler modification to output decimal data instead of hex data in LST fi 1 💬 2024-08-04 qwertyfan2000
The Mystery of the Missing 253 by Wes Brzozowski 1 💬 2005-07-20 Jarek Adamski
Program Your TS2068 in C 1 💬 2003-09-18 aralbrec
⭐ Bresenham in z80, pass 3 1 💬 2025-07-08 andydansby
⭐ Screen Address Calculator 1 💬 2025-06-22 andydansby
Saving ML Programs to Tape 📎 1 💬 2022-04-16 Adam Trionfo
ZX Spectrum machine language book available as download 📎 1 💬 2025-03-14 David Anderson
DEFADD trick 📎 1 💬 2025-03-09 Ryan Gray
⭐ System Software Question STRMS & CHANS 1 💬 2023-08-25 Michael A. Druckenmiller
⭐ Timex/Sinclair emulators-Z-80 IM 2 1 💬 2025-01-16 qwertyfan2000
⭐ Z88DK Compiler Switches For Display Modes 1 💬 2023-06-05 JEFFREY L BURRELL
RPGs on T/S 2068? 25 💬 2023-11-12 Adam Trionfo
"2068 Buggy Software" Archived ↳ #1585 📎 14 💬 2022-06-10 Adam Trionfo
Audio sequencer 📎 12 💬 2026-04-29 ***
TS Online User Group Meeting Sunday July 21 ↳ #6794 12 💬 2024-07-27 Adam Trionfo
Intel 8080 / Zilog Z80 Assembly Language 📎 10 💬 2025-09-07 Adam Trionfo
IDE for Sinclair software development 9 💬 2023-11-16 David Anderson
2068 with micro drive on ebay 9 💬 2022-04-18 David Anderson
Here's a demo showing off the true potential of the TS2068 8 💬 2011-11-24 cheveron
1000, 1500, 2068 Font 7 💬 2024-08-01 David Anderson
Hi-Color Frogger? 7 💬 2025-11-30 Joao Encarnado
compiling makebas in VS2019 Possible? 📎 7 💬 2023-08-29 Michael A. Druckenmiller
Timex and States and Capitals ↳ #9186 6 💬 2026-04-03 David Anderson
Feb 5 meeting call for topics 6 💬 2024-02-02 Adam Trionfo
Assembler Code 5 💬 2025-10-12 Peter BetBasoo
1-bit music on TS (also digital) 4 💬 2010-04-16 MISTER BEEP
Book "Introducing Timex Sinclair 2000 Machine Code" by Ian Robertson Sinclair, I 4 💬 2023-08-13 qwertyfan2000
Z80 ML Book by Australian Woman Named To Toni? 3 💬 2023-02-17 Adam Trionfo
Hi-res program follow-up 📎 3 💬 2026-03-25 Gus Lahoski
TIMEX BASIC and the Great LISP Fiasco! 3 💬 2022-11-17 tbaaron
Vintage Computing Christmas Challenge 2025 3 💬 2025-12-10 qwertyfan2000
T/S 2068, 1500, and 1000 ML Programming and Interfacing Book 📎 3 💬 2025-11-04 Adam Trionfo
For the PASCAL afflicted 3 💬 2025-10-21 David Anderson
8 Bit Workshop 3 💬 2022-09-14 David Anderson
Exploring the Bresenham Line routine 3 💬 2025-06-04 David Anderson
Sinclair ZX80/ZX81 Memory Map for ROM and ROM Checksum Calculator 2 💬 2023-02-27 John Mobley
Is this routine used on the TS2068? 📎 2 💬 2026-01-24 Ricardo Calcagno
2068 Disassembly 2 💬 2004-03-17 Jeff
System Variables 2 💬 2011-01-22 patohd
One-Bit Music - How is it Done? 2 💬 2010-08-13 Adam Trionfo
Timex Sinclair Small-C Compiler on ebay 2 💬 2022-08-22 Tim H
Z80 Book called "30 Customized Microprocessor Projects" 2 💬 2010-01-15 Adam Trionfo
Linux in TS computers. 2 💬 2025-06-11 Christian Mann
Mastering Machine Code on Your ZX81 2 💬 2022-05-02 Adam Trionfo
Manual for Ray Kingsley’s Hot-Z 2068 1 💬 2023-04-25 David Anderson
Eightyone program 1 💬 2023-04-22 larry lorenson
bugg(er)ed code for 80x24 display driver needs fixing 1 💬 2006-03-16 Andrew Owen
Sinclair ZX81 Assembly Language Part 2 1 💬 2025-11-28 John Mobley
ZX81-Screen-Editor 1 💬 2025-11-16 David Anderson
Stepping Z80 ML Code in T/S 2068 Emulator 1 💬 2022-10-09 Adam Trionfo
Hot Z Assembler/Disassembler Questions 1 💬 2022-10-04 Adam Trionfo
ZX Spectrum Raytracer 1 💬 2024-02-03 Charlie Day
24 Bit Addressing Concept Maybe 📎 1 💬 2023-11-30 Michael A. Druckenmiller
Bresenham Line article 1 💬 2025-06-07 andydansby
Z80 Assembly Reference Card by Micro Logic Corp. (Micro Chart) 1 💬 2022-04-06 Adam Trionfo
"Freeway Frog" and ML Monitor (from Spectrum ML for Absolute Beginner) 1 💬 2007-12-03 Adam Trionfo
ZX Destroyer 1 💬 2023-04-26 larry lorenson
Grimm’s iry Trails with TS 1500 3 💬 2023-01-30 David Anderson
Eightyone Debug window 📎 1 💬 2022-10-16 JEFFREY L BURRELL