Language

  • Writing Source — The syntax underneath everything else: labels and local labels, constants, every number format, strings and escapes, and what may go in an expression.
  • Instructions — What 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.
  • Directives — Every 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.
  • Libraries — Writing 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.
  • Modules — MODULE — 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 Banking — What 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.
  • Virtual Origins — !virtual, for a routine that runs somewhere other than where it is loaded: assembling it for the address it will run at while its bytes stay inline, so a copied routine keeps its symbols instead of arriving as an incbin'ed blob. Covers $ inside a block, the page argument a debugger needs, what a sweep does with it, and the six things a block refuses.