AZM Book 4 — Assembler Manual
This manual is for programmers who already know assembly language and want to learn the AZM assembler itself. It assumes you can read ordinary Z80 code and focuses on AZM source syntax, directives, expressions, layout types, register contracts, op declarations, compatibility features, diagnostics and output formats.
The first three AZM books teach programming tracks. Book 4 teaches the assembler itself.
Learning arc
- Getting started — what AZM is, how it fits with Debug80, what a small program looks like and how to invoke the CLI.
- Source syntax and symbols — parser rules, labels, the
@entry prefix, forward references, case rules and naming conventions. - Addresses, constants and expressions —
.org,$,.equ, expression operators, range checks and enums. - Raw data, storage and strings —
.db,.dw, little-endian byte order, string directives and.ds. - The layout system — scalar types,
sizeof,offset, records with.type, type aliases with.typealias, unions with.unionand compact cast syntax. - Register care and contracts — a concrete collision example,
@entry labels, AZMDoc;!syntax, conflict checking and the audit-to-error workflow. - Ops and aliases — inline op declarations, operand classes, overloads, directive compatibility and source file inclusion.
- Diagnostics and output — error codes, how to read a failing build, warnings vs errors and output artifacts.
Chapter table
| Ch | File | What it covers |
|---|---|---|
| — | Preface | Audience, assumptions and the purpose of the manual |
| 1 | Getting Started with AZM | Debug80 integration, source extensions, a first program and basic invocation |
| 2 | Source Syntax and Symbols | Line structure, comments, labels, @ entries, naming conventions, case rules and numeric literals |
| 3 | Addresses, Constants and Expressions | .org, $, .equ, expressions, range checks and enums |
| 4 | Raw Data, Storage and Strings | .db, .dw, little-endian byte order, string directives and .ds |
| 5 | The Layout System | Scalar types, sizeof, offset, records, type aliases, unions and compact cast syntax |
| 6 | Register Care and Contracts | Register collisions, @ entry labels, AZMDoc ;! syntax, conflict checking and the audit-to-error workflow |
| 7 | Op Declarations and Aliases | Inline op declarations, operand classes, overloads, directive compatibility and source file inclusion |
| 8 | Diagnostics and Output | Error codes, reading a failing build, warnings vs errors and output artifacts |
Appendices
| Appendix | File | What it covers |
|---|---|---|
| A | Directive Reference | All directives with syntax, purpose and chapter reference; built-in alias table |
| B | Expression Operators | Operator table with precedence and numeric literal formats |
| C | CLI Flag Reference | All command-line flags grouped by category |
| D | Built-in Functions | sizeof, offset, LSB and MSB — syntax, return values and case rules |
The general AZM Books appendices cover number notation, registers, flags, addressing forms and Z80 instruction support.
Table of contents
- Preface
- Chapter 1 — Getting Started with AZM
- Chapter 2 — Source Syntax and Symbols
- Chapter 3 — Addresses, Constants and Expressions
- Chapter 4 — Raw Data, Storage and Strings
- Chapter 5 — The Layout System
- Chapter 6 — Register Care and Contracts
- Chapter 7 — Op Declarations and Aliases
- Chapter 8 — Diagnostics and Output
- Appendix A — Directive Reference
- Appendix B — Expression Operators
- Appendix C — CLI Flag Reference
- Appendix D — Built-in Functions