UTTORI ASM ยท IN DEVELOPMENT
Assembly lifecycle
Write assembly using assembly lifecycle, with examples and limits.
On this page
SNES behavior
Uttori ASM builds a typed program model and runs three stages:
collectDefinitionsdiscovers symbols, macros, and structural shape.resolveLayoutcalculates addresses and instruction sizes.emitProgramwrites bytes and finalizes the output.
The distinction is why forward labels work and why an instruction must estimate the same width it eventually emits. The SNES plugin creates fresh mapper, checksum, optimization, SPC, and freespace state for every assembler session and resets pass-local state between stages. There is no cross-session cartridge poltergeist.
For patches, baseImage becomes the initial output. Reads use it when present, and writes replace or extend it. For fresh builds, unwritten gaps are expanded with the active output fill byte, initially $00.
6502 family behavior
Uttori ASM builds a typed program model and runs three stages:
collectDefinitionsdiscovers symbols, macros, and structural shape.resolveLayoutcalculates addresses and instruction sizes.emitProgramwrites bytes and finalizes the output.
The distinction is why forward labels work and why zero-page versus absolute must estimate the same width it eventually emits. The 65xx plugin creates fresh CPU, scope, segment, and NES linker state for every assembler session and resets pass-local state between stages. There is no cross-session cartridge poltergeist.
For patches, baseImage becomes the initial output. Reads use it when present, and writes replace or extend it. For fresh raw builds, unwritten gaps are expanded with the active output fill byte, initially $00. For NES builds, the lifecycle prefills header plus PRG with fillByte (default $FF) before the first source line.