![]() |
v6502
The MOS 6502 Virtual Machine and Toolchain Infrastructure
|
usage: as6502 [-STWw] [-F format] [file ...]
Any number of files may be specified and they will all be assembled, individually. To create useful binaries, rather than just object files, either specify flat as the format, or link the binaries with the Linker. If no files are specified, as6502 will assemble from stdin, line-buffered.
-F format
Specify a format to produce as output for linking or execution.
Supported formats:
-S
Dump assembly with binary results and addresses to stdout for verification of what is being produced.
-T
After first pass, dump a human readable representation of the symbol table.
-w
Emit warnings where possible, and attempt to recover, then continue assembly.
-W
Treat warnings as errors.
When assembling from stdin, label parsing and dereferencing is not supported. This is because the labels are all determined in advance on a first pass that only cares about instruction size, and then the second pass actually begins converting the assembly to machine code, while dereferencing the labels along the way via the pre-built table.
The assembler makes two passes over the source, and aims to be as efficient as possible, while still exposing powerful access to the assembly process.
Debug output logging has been added to allow printing of the assembly process, as it happens, the output is column oriented and can be seen below. Comment lines, or lines that contain no code or labels, are not printed. The column headers have been added for clarity, and the middle 170 lines omitted for brevity.