| name | mads |
| description | Use for MADS/Mad-Assembler work: Atari 8-bit 6502/65C02/65816 assembly syntax, command-line usage, directives, pseudo-commands, labels, macros, procedures, structures, arrays, memory banks, relocatable code, and SpartaDOS X output. |
MADS Assembler
MADS, also called Mad-Assembler, is a cross-assembler commonly used for Atari
8-bit development. Its syntax is close to XASM/QA/FA, with additions for local
and temporary labels, macros, procedures, typed data, virtual and hardware
memory banks, relocatable output, SpartaDOS X files, and WDC 65816 code.
Use this skill when writing, reviewing, porting, or debugging MADS assembly.
Prefer the smallest reference file that answers the question.
Quick Start
- For command-line assembly, output files, listings, and exit codes, read
references/usage.md.
- For comments, line joining, mnemonic chaining, numbers, strings, expressions,
and operator precedence, read references/syntax.md.
- For ordinary assembler directives such as
.ORG, .BYTE, .WORD, .DS,
.VAR, .ZPVAR, .IFDEF, .REPT, .PRINT, .ERROR, .LEN, .SIZEOF,
.DEFINE, and .UNDEF, read references/directives.md.
- For XASM-style pseudo-commands such as
OPT, ORG, INS, ICL, DTA,
SIN, COS, RND, IFT, ELS, ELI, and EIF, read
references/pseudo-commands.md.
Reference Map
Orientation
Assembly Control and Syntax
- references/control.md: high-level assembly control,
conditional assembly pointers, and zero-page assembly behavior.
- references/code-generation-directives.md:
#IF, #WHILE, and #CYCLE code-generation directives.
- references/directives.md: dot directives.
- references/pseudo-commands.md: legacy-style
pseudo-commands.
- references/macro-commands.md: built-in macro
commands such as
MVA, MWA, ADW, SBW, branches, increments, moves, and
compares.
Names and Scope
Abstractions and Data
Linking and Output Formats
Authoring Guidance
- Use MADS-native constructs when they clarify Atari 8-bit code: named local
areas,
.PROC, .STRUCT, .ARRAY, and macro commands are expected in MADS
projects.
- Preserve source compatibility when porting from XASM: check
references/introduction.md before changing
syntax that XASM and MADS treat differently.
- For examples involving 65816 accumulator or index width, verify the relevant
mode directives in references/relocatable-code.md
and mnemonic support in references/mnemonics.md.
- When diagnosing assembly output, inspect both the command-line options in
references/usage.md and the output-affecting
OPT /
ORG / INS / ICL / DTA behavior in
references/pseudo-commands.md.
Reference Layout Notes
The bundled references/ files are the self-contained assembler reference for
this skill. Load only the specific reference file needed for the task, and keep
topic work in the Atari router files unless the user is specifically asking
about MADS syntax, directives, relocation, or SpartaDOS X output.