Skip to content

Appendices03

Appendix 3 — CLI Flag Reference ​

The source file is always the last argument:

sh
azm [flags] source.asm

Default invocation:

sh
azm source.asm

Produces four output files next to the source: source.bin, source.hex, source.d8.json, source.lst.


Output control ​

FlagArgumentWhat it does
-o, --outputpathSet the output base path; extension must match --type
-t, --typebin or hexPrimary output format; default is hex
--nobin—Suppress .bin flat binary output
--nohex—Suppress .hex Intel HEX output
--nod8m—Suppress .d8.json Debug80 source map
--nolst—Suppress .lst assembler listing
--source-rootpathWrite source paths in .d8.json relative to this root (for portable maps)
--asm80—Write a .z80 lowered-ASM80 source file alongside other artifacts

Source, include and import flags ​

FlagArgumentWhat it does
-I, --includedirAdd dir to the .include / .import search path; repeatable
--aliasesfileLoad a JSON alias profile; repeatable for multiple files
--interfacefileLoad an .asmi external register contract file; repeatable

Register contract flags ​

FlagArgumentWhat it does
--rcoff, audit, warn, error or strictRegister contract analysis level; default is off
--register-contractsoff, audit, warn, error or strictLong form of --rc
--contracts—Insert or update inferred .routine directives
--fix—Apply conservative register contract source repairs; implies --contracts, so inferred .routine directives are rewritten too
--require-expectout—Fail on caller dependencies on inferred outputs that lack .expectout
--reg-report—Write source.regcontracts.txt with inferred routine contracts
--reg-report-formattext or jsonSelect register contract report format; default is text
--reg-baselinefileCompare against a JSON register contract report baseline
--reg-ratchet—Fail when register contract findings are new or changed relative to the baseline
--reg-interface—Write source.asmi with inferred extern contract records
--reg-infer—Write a register-contract inference review artifact
--reg-infer-formatjson or markdownSelect the inference artifact format; default is json
--reg-profilemon3Load a built-in register contract summary profile for known ROM environments
--accept-outROUTINE:CARRIER[,CARRIER…]Confirm one or more output candidates; repeatable

Case and compatibility flags ​

FlagArgumentWhat it does
--case-styleupper, lower, consistent, offEnforce case style for mnemonics and register names; emits AZMN_CASE_STYLE on violations. Default is off
--symbol-casestrict or insensitiveSelect symbol lookup mode; default is strict

Other flags ​

FlagArgumentWhat it does
-V, --version—Print the AZM version string and exit
-h, --help—Print command usage and exit

--rc levels ​

LevelEffect
offNo register contract analysis (default)
auditAnalyze contracts and let the build finish; useful while editing
warnPrint register contract warnings; build succeeds
errorFail the build on proven register contract conflicts
strictRequire AZM to prove every call safe, so unknown routine boundaries and stack effects fail