The JSONL IR is the stable boundary between zas and zld.
Each line is a JSON object representing one record.
- One JSON object per line (JSONL).
- Each record MUST include:
"ir":"zasm-v1.1". zldMUST reject unknown or missing IR versions.
label— defines a labelinstr— instructiondir— directive
IR v1.1 also defines additive records that improve tooling and diagnostics:
meta— stream metadatasrc— source mapping tablediag— structured diagnostics
Operands are typed objects:
{ "t":"sym", "v":"NAME" }{ "t":"num", "v":123 }{ "t":"str", "v":"text" }{ "t":"mem", "base":"HL" }
IR v1.1 adds additive operand forms for ABI clarity and better lowering:
{ "t":"reg", "v":"A" }(register-typed operand){ "t":"mem", "base":"HL", "disp": 4 }(memory displacement)
Optional loc object:
"loc": { "line": 12, "col": 3 }Tools SHOULD use loc for error reporting when present.
The schema lives at:
schema/ir/v1.1/record.schema.json
All records MUST validate against the schema.
- IR version is v1.1.
- Backward-compatible additions MAY be introduced in later minor versions.
Some tools may accept zasm-v1.0 streams for backwards compatibility, but the supported integration target is v1.1.