Skip to content

Which System has which call

docs/systems.md lists, for every call in the headers, the oldest System that provides it, measured by booting each System we have (29 System and machine pairs, from 0.1 to 9.2.1) and recording its trap tables, packages and Gestalt selectors (tools/probe/trapprobe.c, tools/availability.py, data in data/availability.tsv).

  • TrapAvailable(trap) (OSUtils.h) says at run time whether a trap exists, on every ROM from the 64K ROM on. Check it before calling a trap newer than the oldest System you support, for example if (TrapAvailable(_Gestalt)) Gestalt(...).
  • -DMAC_MIN_SYSTEM=0x0605 makes clang warn at each call that needs a newer System than 6.0.5 (or a manager Gestalt must report, such as QuickTime). -DMAC_NO_COLOR_QD warns at each Color QuickDraw call, for the Mac Plus and SE. Without them the headers warn about nothing.
  • On the 64K ROM the Memory Manager does not set MemErr, so the 68k calls store D0 there themselves and MemError() works on every System.