Skip to content

DEF FN & BASIC Technique Deep-Dives

📚 Reference · 🌲 Evergreen · Owner: Ryan Gray · 2023-07 → 2025-06

Ryan Gray's investigations into Sinclair/Timex BASIC's user-defined functions — recursion, passing parameters to subroutines via the DEFADD trick, bit-testing — turning an obscure corner of BASIC into reusable technique.

  • No external links yet.

About

A cluster of reference-grade write-ups, mostly by Ryan Gray, that pin down how the TS/Sinclair BASIC DEF FN system really works and what you can do with it: recursive user-defined functions, the DEFADD trick for passing parameters into subroutines, and binary/bit-test techniques. Luis D'Ardis's beginner-oriented "Sinclair BASICs: DEF FN" thread is a good on-ramp. Evergreen knowledge — the kind of thing worth finding again years later.

In the meetings

Discussed in 2 meeting recaps:


Topics: BASIC programming · Machine code, Z80 & assemblers · Utilities & applications