wdc-utils/man1/wdc816as.1

180 lines
4.9 KiB
Groff

.Dd December 29, 2016
.Dt WDC816AS 1
.Os
.Sh NAME
.Nm wdc816as ,
.Nm wdc02as
.Nd WDC assembler
.Sh SYNOPSIS
.Nm
.Op Fl GSL1
.Op Fl I Ar path
.Op Fl D Ar symbol Ns Op = Ns Ar value
.Op Fl O Ar outfile
.Ar sourcefile
.Sh DESCRIPTION
The WDC macro assembler,
.Nm ,
provides all the tools and facilities to do professional assembly language
program development.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl 1
Version 1.0 of the assembler used slightly different control characters. In
particular, the macro concatenation character
.Ql |
was changed to
.Ql @ ,
the bit-wise inclusive OR character
.Ql ^
was changed to
.Ql | ,
and the bit-wise exclusive OR character
.Ql ^
was added. This option changes the characters back to the 1.0 versions
for compatibility.
.It Fl D
This option is used to define an absolute symbol at run time. The symbol
can then be used in conditional statements to change the code generated.
The symbol can be followed with an equal sign and an absolute decimal
value. If no value is specified, then the symbol is given the value one.
For example the following command line:
.Pp
.Dl Nm Fl D Ns Ar COUNT=3 Fl D Ns Ar DEBUG Ar FILE.ASM
.Pp
will set the absolute symbol COUNT to the value 3 and the symbol DEBUG to
the value 1. Specifying these options is equivalent to the following
statements appearing at the beginning of the source file:
.Pp
.Bd -literal -offset indent
COUNT GEQU 3
DEBUG GEQU 1
.Ed
.It Fl G
The assembler and linker can now produce source level debugging information
for programs. When this option is specified, the assembler will generate
special object file records which indicate the number of bytes generated
for each source line in the file. Information is also generated to
determine the source file containing the source line. This option will
increase the size of object modules generated by the assembler. The
.Li INCDEBUG
directive can be used to control the generation of source information
for included files. The
.Fl G
option creates the
.Pa .bin
file used with the WDC Debugger
.Nm ( WDCDB.EXE )
and the
.Pa WDCDB.INI
files.
.It Fl I
When the assembler encounters an
.Li INCLUDE
or
.Li APPEND
directive, the assembler looks in specific directories in a specific
order for the named file. First, the current directory is checked. Next,
any directories that have been specified using the
.Fl I
option will be searched. Finally, if an environment variable called
.Ev WDC_INC_65816
or
.Ev WDC_INC_6502
has been defined, then any directories specified in that variable
will be searched.
.Pp
For example, if one of the following lines is in the
.Pa AUTOEXEC.BAT
file:
.Pp
.Bd -literal -offset indent
SET WDC_INC_65816=C:\eWDC\eINCLUDE;C:\eWDC\eMACROS
SET WDC_INC_6502=C:\eWDC\eINCLUDE;C:\eWDC\eMACROS
.Ed
.Pp
then, the command:
.Pp
.Dl Nm Fl I Ar C:\eMYINC Ar PROG
.Pp
will assemble the file
.Ar PROG.ASM .
If the file contains any
.Li INCLUDE
or
.Li APPEND
directives, then the assembler will look for the specified file in this order:
.Pp
.Bd -literal -offset indent
current directory
C:\eMYINC
C:\eWDC\eINCLUDE
C:\eWDC\eMACROS
.Ed
.It Fl K
This option causes the path name specifying the name of the listing file to
be placed in the reserved word
.Dv __FILE__ .
.It Fl L
This option instructs the assembler to generate a listing file that will
have the same root name as the output name and an extension of
.Pa .LST .
The format and output control of the listing file are controlled by
assembler directives within the source file.
.It Fl O
This option is used to specify the name of the output file. Normally, the
output file has the same root name as the source file, and the extension is
changed to
.Pa .OBJ .
For example, the command:
.Pp
.Dl Nm Ar MYPROG.ASM
.Pp
will generate an output file called
.Ar MYPROG.OBJ .
If the
.Fl O
option is used, the output file name can be specified directly. For example:
.Pp
.Dl Nm Fl O Ar JUNK.REL Ar MYPROG.ASM
.Pp
will place the same output into a file called
.Ar JUNK.REL .
.It Fl S
Normally, labels that aren't declared global are not placed in the object
module since the assembler resolves all references to them. If the
.Fl S
option is specified, the symbols are included in the object file so that
the linker may pass them on to a symbol file that can be used when
debugging.
.It Fl V
This is the Verbose option. This option displays the amount of
RAM needed to assemble the program.
.It Fl W
This option causes a change in the default page width to 132, creating
a wide listing.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width indent
.It Ev WDC_INC_65816 , WDC_INC_6502
A semi-colon separated list of directories to search if an
input file cannot be found in the current directory or in any
directories specified via the
.Fl I
flag.
.El
.Sh SEE ALSO
.\" .Xr wdc02as 1 ,
.Xr wdc02cc 1 ,
.Xr wdc02op 1 ,
.\" .Xr wdc816as 1 ,
.Xr wdc816cc 1 ,
.Xr wdc816op 1 ,
.Xr wdcdb 1 ,
.Xr wdcln 1 ,
.Xr wdclib 1 ,
.Xr wdcobj 1 ,
.Xr wdcsym 1