The LWTOOLS assembler is called LWASM. This chapter documents the various features of the assembler. It is not, however, a tutorial on 6x09 assembly language programming.
The binary for LWASM is called "lwasm". Note that the binary is in lower case. lwasm takes the following command line arguments.
This will cause the assembler to accept the additional instructions available on the 6309 processor. This is the default mode; this option is provided for completeness and to override preset command arguments.
This option is the same as if the first line of the source code is "PRAGMA 6309".
This is equivalent to
This will enable recognition of 6800 compatibility instructions.
This will cause the assembler to reject instructions that are only available on the 6309 processor. This actually has the effect of starting the assembler as though the first line of the source is "PRAGMA 6809".
Select the DECB output format target. Equivalent to
While this is the default output format currently, it is not safe to rely on that fact. Future versions may have different defaults. It is also trivial to modify the source code to change the default. Thus, it is recommended to specify this option if you need DECB output.
Select the output format. Valid values are
obj for the
object file target,
decb for the DECB LOADM format,
os9 for creating OS9 modules,
a raw binary,
hex for ASCII hexadecminal format,
srec for Motorola S-Record format, and
for Intel Hex format.
Cause LWASM to generate a listing. If
file is specified,
the listing will go to that file. Otherwise it will go to the standard output
stream. By default, no listing is generated. Unless
is specified, the list will not include the symbol table.
Cause LWASM to output the global symbol table in assembly source format. If
file is specified, the table output will go to the specified
file. Otherwise, it will go to the standard output stream. Local symbols will
not be included. Incomplete symbols will be defined to zero with a comment
indicating incompleteness. Symbols defined with SET will also be listed using
SET in the symbol dump. However, if the symbol is defined multiple times, the
order of the definitions in the dump file is undefined.
Causes LWASM to generate a list of symbols when generating a listing. It has no effect unless a listing is being generated.
Behaves just like
--symbols but with local labels omitted.
This option generates a map file which can be used by debuggers and monitors to provide symbol information. A map file may be created independent of a listing file. (Patches are pending for MAME and exec09.)
Select the proprietary object file format as the output target.
This option specifies the name of the output file. If not specified, the
Do assembly as usual but suppress generation of the output file.
Specify assembler pragmas. Multiple pragmas are separated by commas. The pragmas accepted are the same as for the PRAGMA assembler directive described below.
Select raw binary as the output target.
path to the end of the include path.
Pre-defines the symbol SYM as either the specified VAL. If VAL is omitted, the symbol is defined as 1. The symbol will be defined as though it were defined using the SET directive in the assembly source. That means it can be overridden by a SET directive within the source code. Attempting to redefine SYM using EQU will result in a multiply defined symbol error.
Specifies the handling of tabs in listing files.
disables tab expansion.
--tabs=8 is the default setting.
Present a help screen describing the command line options.
Provide a summary of the command line options.
Display the software version.
Increase the debugging level. Only really useful to people hacking on the LWASM source code itself.