64tass - Man Page

A multi pass optimizing macro assembler for the 65xx series of processors

Synopsis

64tass [OPTION]... [SOURCES]...

Description

64tass is cross assembler targeting the 65xx series of micro processors. This manual is only describing the command line options. The many features are described in the HTML manual.

Options

Output options

-o filename, --output filename

Place output into filename. The default output filename is "a.out", this option changes it. May be used multiple times. The format is remembered but section reverts to global after each file.

--output-append filename

Append to output file instead of overwriting it.

--no-output

Same as output but no file will be written.

--output-section sectionname

Output this section instead of everything

-X,  --long-address

Use 3 byte address/length for CBM and nonlinear output instead of 2 bytes. Also increases the size of raw output to 16 MiB.

--cbm-prg

Generate CBM format binaries (default). The first 2 bytes are the little endian address of the first valid byte (start address). Overlapping blocks are flattened and uninitialized memory is filled up with zeros. Uninitialized memory before the first and after the last valid bytes are not saved. Up to 64 KiB or 16 MiB with long address.

-b,  --nostart

Output raw data only without start address. Overlapping blocks are flattened and uninitialized memory is filled up with zeros. Uninitialized memory before the first and after the last valid bytes are not saved. Up to 64 KiB or 16 MiB with long address.

-f,  --flat

Flat address space output mode. Overlapping blocks are flattened and uninitialized memory is filled up with zeros. Uninitialized memory after the last valid byte is not saved. Up to 4 GiB.

-n,  --nonlinear

Generate nonlinear output file. Overlapping blocks are flattened. Blocks are saved in sorted order and uninitialized memory is skipped. Up to 64 KiB or 16 MiB with long address.

--atari-xex

Generate a Atari XEX output file. Overlapping blocks are kept, continuing blocks are concatenated. Saving happens in the definition order without sorting, and uninitialized memory is skipped in the output. Up to 64 KiB.

--apple2

Generate a Apple II output file (DOS 3.3). Overlapping blocks are flattened and uninitialized memory is filled up with zeros. Uninitialized memory before the first and after the last valid bytes are not saved. Up to 64 KiB.

--intel-hex

Use Intel HEX output file format. Overlapping blocks are kept, data is stored in the definition order, and uninitialized areas are skipped. I8HEX up to 64 KiB, I32HEX up to 4 GiB.

--s-record

Use Motorola S-record output file format. Overlapping blocks are kept, data is stored in the definition order, and uninitialized memory areas are skipped. S19 up to 64 KiB, S28 up to 16 MiB and S37 up to 4 GiB.

Operation options

-a,  --ascii

Use ASCII/Unicode text encoding instead of raw 8-bit. Normally no conversion takes place, this is for backwards compatibility with a DOS based Turbo Assembler editor, which could create PETSCII files for 6502tass. (including control characters of course) Using this option will change the default "none" and "screen" encodings to map ´a´-´z´ and ´A´-´Z´ into the correct PETSCII range of $41-$5A and $C1-$DA, which is more suitable for an ASCII editor. It also adds predefined petcat style PETSCII literals to the default encodings, and enables Unicode letters in symbol names. For writing sources in UTF-8/UTF-16 encodings this option is required!

-B,  --long-branch

Automatic BXX *+5 JMP xxx. Branch too long messages can be annoying sometimes, usually they'll need to be rewritten to BXX *+5 JMP xxx. 64tass can do this automatically if this option is used. But BRA is not converted.

-C,  --case-sensitive

Make all symbols (variables, opcodes, directives, operators, etc.) case sensitive. Otherwise everything is case insensitive by default.

-D label=value

Defines a label to a value. Same syntax is allowed as in source files. Be careful with string quoting, the shell might eat some of the characters.

-q,  --quiet

Suppress messages. Disables header and summary messages.

-T,  --tasm-compatible

Enable TASM compatible operators and precedence Switches the expression evaluator into compatibility mode. This enables ".", ":" and "!" operators and disables 64tass specific extensions, disables precedence handling and forces 16 bit unsigned evaluation (see "differences to original Turbo Assembler" below)

-I path

Specify include search path. If an included source or binary file can't be found in the directory of the source file then this path is tried. More than one directories can be specified by repeating this option. If multiple matches exist the first one is used.

-M file, --dependencies file

Specify make rule output file. Writes a dependency rule suitable for 'make' from the list of files used during compilation.

--make-phony

Enable phony target generation for dependencies.

Diagnostic options

-E file, --error file

Specify error output file. Normally compilation errors a written to the standard error output. It's possible to redirect them to a file or to the standard output by using '-' as the file name.

--error-append file

Append to error file instead of overwriting it.

--no-error

Do not output any errors, just count them.

-w,  --no-warn

Suppress warnings. Disables warnings during compile. Finer grained warning control is available by using the -W options.

--no-caret-diag

Suppress displaying of faulty source line and fault position after fault messages.

--macro-caret-diag

Restrict source line and fault position display to macro expansions only.

-Wall

Enable most diagnostic warnings, except those individually disabled. Or with the 'no-' prefix disable all except those enabled.

-Werror

Make all diagnostic warnings to an error, except those individually set to a warning.

-Werror=<name>

Change a diagnostic warning to an error. For example "-Werror=implied-reg" makes this check an error. The "-Wno-error=" variant is useful with "-Werror" to set some to warnings.

-Walias

Warns about alias opcodes.

-Waltmode

Warn about alternative address modes. Sometimes alternative addressing modes are used as the fitting one is not available. For example there's no lda direct page y so instead data bank y is used with a warning.

-Wbranch-page

Warns if a branch is crossing a page. Page crossing branches execute with a penalty cycle. This option helps to locate them.

-Wcase-symbol

Warn if symbol letter case is used inconsistently.

-Wimmediate

Warns for cases where immediate addressing is more likely. -Wimplied-reg Warns if implied addressing is used instead of register. Some instructions have implied aliases like 'asl' for 'asl a' for compatibility reasons, but this shorthand not the preferred form.

-Wleading-zeros

Warns if about leading zeros. A leading zero could be a prefix for an octal number but as octals are not supported so the result will be decimal.

-Wlong-branch

Warns when a long branch is used. This option gives a warning for instructions which were modified by the long branch function. Less intrusive than disabling long branches and see where it fails.

-Wmacro-prefix

Warn about macro call without prefix. Such macro calls can easily be mistaken to be labels if invoked without parameters. Also it's hard to notice that an unchanged call turned into label after the definition got renamed. This warning helps to find such calls so that prefixes can be added.

-Wno-deprecated

Don't warn about deprecated features. Unfortunately there were some features added previously which shouldn't have been included. This option disables warnings about their uses.

-Wno-float-compare

Don't warn if floating point comparisons are only approximate. Floating point numbers have a finite precision and comparing them might give unexpected results.

-Wno-float-round

Don't warn when floating point numbers are implicitly rounded. A lot of parameters are expecting integers but floating point numbers are accepted as well. The style of rounding used may or may not be what you wanted.

-Wno-ignored

Don't warn about ignored directives.

-Wno-jmp-bug

Don't warn about the jmp ($xxff) bug. It's fine that the high byte is read from the 'wrong' address on 6502, NMOS 6502 and 65DTV02.

-Wno-label-left

Don't warn about certain labels not being on left side. You may disable this if you use labels which look like mistyped versions of implied addressing mode instructions and you don't want to put them in the first column.

-Wno-page

Don't do an error for page crossing.

-Wno-pitfalls

Don't note on common pitfalls. Experts don't need notes about how to fix things ;)

-Wno-portable

Don't warn about source portability problems.

-Wno-size-larger

Don't warn if size is larger due to negative offset Negative offsets add space in front of memory area that's out of bound. Sometimes this may be fine.

-Wno-star-assign

Don't warn about ignored compound multiply.

-Wno-wrap-addr

Don't warn about address space calculation wrap around. If a memory location ends up outside of the processors address space then just wrap it around.

-Wno-wrap-bank0

Don't warn for bank 0 address calculation wrap around.

-Wno-wrap-dpage

Don't warn for direct page address calculation wrap around.

-Wno-wrap-mem

Don't warn for compile offset wrap around. Continue from the beginning of image file once it's end was reached.

-Wno-wrap-pbank

Don't warn for program bank address calculation wrap around.

-Wno-wrap-pc

Don't warn for program counter bank crossing. If it's data only and the programmer deals with it then this might be ok.

-Wold-equal

Warn about old equal operator. The single '=' operator is only there for compatibility reasons and should be written as '==' normally.

-Woptimize

Warn about optimizable code. Warns on things that could be optimized, at least according to the limited analysis done.

-Wshadow

Warn about symbol shadowing. Checks if local variables 'shadow' other variables of same name in upper scopes in ambiguous ways.

-Wstrict-bool

Warn about implicit boolean conversions. Boolean values can be interpreted as numeric 0/1 and other types as booleans. This is convenient but may cause mistakes.

-Wunused

Warn about unused constant symbols, any type.

-Wunused-const

Warn about unused constants.

-Wunused-label

Warn about unused labels.

-Wunused-macro

Warn about unused macros.

-Wunused-variable

Warn about unused variables.

Target selection options

--m65xx

Standard 65xx (default). For writing compatible code, no extra codes. This is the default.

-c,  --m65c02

CMOS 65C02. Enables extra opcodes and addressing modes specific to this CPU.

--m65ce02

CSG 65CE02. Enables extra opcodes and addressing modes specific to this CPU.

-i,  --m6502

NMOS 65xx. Enables extra illegal opcodes. Useful for demo coding for C64, disk drive code, etc.

-t,  --m65dtv02

65DTV02. Enables extra opcodes specific to DTV.

-x,  --m65816

W65C816. Enables extra opcodes. Useful for SuperCPU projects.

-e,  --m65el02

65EL02. Enables extra opcodes, useful RedPower CPU projects. Probably you'll need "--nostart" as well.

--mr65c02

R65C02. Enables extra opcodes and addressing modes specific to this CPU.

--mw65c02

W65C02. Enables extra opcodes and addressing modes specific to this CPU.

--m4510

CSG 4510. Enables extra opcodes and addressing modes specific to this CPU. Useful for C65 projects.

Symbol listing options

-l file, --labels=file

List labels into file. May be used multiple times. The format is remembered but root reverts to global after each file.

--labels-append=file

Append labels to file instead of overwriting it.

--labels-root=<path>

Specify the scope to list labels from.

--normal-labels

Lists labels in a 64tass readable format. (default)

--export-labels

List labels for include in a 64tass readable format. This will always compile exported .proc/.pend blocks assuming they're needed externally.

--vice-labels

List labels in a VICE readable format.

--vice-labels-numeric

List labels in a VICE readable format, including numeric constants.

--dump-labels

List labels for debugging.

Assembly listing options

-L file, --list=file

List into file. Dumps source code and compiled code into file. Useful for debugging, it's much easier to identify the code in memory within the source files.

-m,  --no-monitor

Don't put monitor code into listing. There won't be any monitor listing in the list file.

-s,  --no-source

Don't put source code into listing. There won't be any source listing in the list file.

--line-numbers

This option creates a new column for showing line numbers for easier identification of source origin.

--tab-size=number

By default the listing file is using a tab size of 8 to align the disassembly. This can be changed to other more favorable values like 4. Only spaces are used if 1 is selected. Please note that this has no effect on the source code on the right hand side.

--verbose-list

Normally the assembler tries to minimize listing output by omitting "unimportant" lines. But sometimes it's better to just list everything including comments and empty lines.

Other options

-?,  --help

Give this help list. Prints help about command line options.

--usage

Give a short usage message. Prints short help about command line options.

-V,  --version

Print program version.

Exit Status

Normally the exit status is 0 if no error occured.

Author

Written by Zsolt Kajtar.

Reporting Bugs

Online bug tracker: <https://sourceforge.net/p/tass64/bugs/>

See Also

Full documentation at: <http://tass64.sourceforge.net/>

Info

Apr 25 2021 64tass 1.56