The Language

  • Writing SourceThe syntax underneath everything else: labels and local labels, constants, every number format, strings and escapes, and what may go in an expression.
  • InstructionsWhat FantASM accepts and what has to be turned on: the undocumented instructions that need no flag, the three ways to enable Z80N, the CSpect pseudo-ops, and how an operand may be written. Flags and timings are measured in Bizmuth's reference rather than restated here.
  • DirectivesEvery directive, grouped by what it does: placing code, laying down data, including files, conditional assembly, macros, enums and structs. Includes the ones whose syntax surprises — #define makes a macro rather than a constant, and enum takes its name after the directive.
  • LibrariesWriting a library as a file: !library and the guard it brings, includes scoped by where they sit, types and macros belonging to the library that declares them, an INTERFACE saying what is public, and --gc-libraries for paying only for what you call.
  • ModulesMODULE — the legacy way to namespace, and the way to place bytes at the end of a file. Carries the scope rules both forms share: the three ways to reach across a boundary, local labels, GLOBAL as export rather than visibility, and --gc-modules with KEEP.
  • Memory and BankingWhat each machine's memory looks like, selecting a page with bank and page, knowing where you are with _page/_bank/_slot, and using --ram to make a build fail at your desk rather than on someone else's hardware.