![kueller](/assets/img/avatar_default.png)
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_cc65@4352 504e572c-2e33-0410-9681-be2bf7408885
217 lines
8.8 KiB
HTML
217 lines
8.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
|
|
<TITLE>ca65 Users Guide: Usage</TITLE>
|
|
<LINK HREF="ca65-3.html" REL=next>
|
|
<LINK HREF="ca65-1.html" REL=previous>
|
|
<LINK HREF="ca65.html#toc2" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="ca65-3.html">Next</A>
|
|
<A HREF="ca65-1.html">Previous</A>
|
|
<A HREF="ca65.html#toc2">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s2">2.</A> <A HREF="ca65.html#toc2">Usage</A></H2>
|
|
|
|
|
|
|
|
|
|
<H2><A NAME="ss2.1">2.1</A> <A HREF="ca65.html#toc2.1">Command line option overview</A>
|
|
</H2>
|
|
|
|
|
|
<P>The assembler accepts the following options:</P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
---------------------------------------------------------------------------
|
|
Usage: ca65 [options] file
|
|
Short options:
|
|
-D name[=value] Define a symbol
|
|
-I dir Set an include directory search path
|
|
-U Mark unresolved symbols as import
|
|
-V Print the assembler version
|
|
-W n Set warning level n
|
|
-g Add debug info to object file
|
|
-h Help (this text)
|
|
-i Ignore case of symbols
|
|
-l Create a listing if assembly was ok
|
|
-mm model Set the memory model
|
|
-o name Name the output file
|
|
-s Enable smart mode
|
|
-t sys Set the target system
|
|
-v Increase verbosity
|
|
|
|
Long options:
|
|
--auto-import Mark unresolved symbols as import
|
|
--cpu type Set cpu type
|
|
--debug-info Add debug info to object file
|
|
--feature name Set an emulation feature
|
|
--help Help (this text)
|
|
--ignore-case Ignore case of symbols
|
|
--include-dir dir Set an include directory search path
|
|
--listing Create a listing if assembly was ok
|
|
--list-bytes n Maximum number of bytes per listing line
|
|
--macpack-dir dir Set a macro package directory
|
|
--memory-model model Set the memory model
|
|
--pagelength n Set the page length for the listing
|
|
--smart Enable smart mode
|
|
--target sys Set the target system
|
|
--verbose Increase verbosity
|
|
--version Print the assembler version
|
|
---------------------------------------------------------------------------
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="ss2.2">2.2</A> <A HREF="ca65.html#toc2.2">Command line options in detail</A>
|
|
</H2>
|
|
|
|
|
|
<P>Here is a description of all the command line options:</P>
|
|
<P>
|
|
<DL>
|
|
<P>
|
|
<A NAME="option--cpu"></A> </P>
|
|
<DT><B><CODE>--cpu type</CODE></B><DD><P>Set the default for the CPU type. The option takes a parameter, which
|
|
may be one of</P>
|
|
<P>6502, 65SC02, 65C02, 65816, sunplus, sweet16, HuC6280</P>
|
|
<P>The sunplus cpu is not available in the freeware version, because the
|
|
instruction set is "proprietary and confidential".</P>
|
|
|
|
<P>
|
|
<A NAME="option--feature"></A> </P>
|
|
<DT><B><CODE>--feature name</CODE></B><DD><P>Enable an emulation feature. This is identical as using <CODE>.FEATURE</CODE>
|
|
in the source with two exceptions: Feature names must be lower case, and
|
|
each feature must be specified by using an extra <CODE>--feature</CODE> option,
|
|
comma separated lists are not allowed.</P>
|
|
<P>See the discussion of the <CODE>
|
|
<A HREF="ca65-10.html#.FEATURE">.FEATURE</A></CODE>
|
|
command for a list of emulation features.</P>
|
|
|
|
<P>
|
|
<A NAME="option-g"></A> </P>
|
|
<DT><B><CODE>-g, --debug-info</CODE></B><DD><P>When this option (or the equivalent control command <CODE>.DEBUGINFO</CODE>) is
|
|
used, the assembler will add a section to the object file that contains
|
|
all symbols (including local ones) together with the symbol values and
|
|
source file positions. The linker will put these additional symbols into
|
|
the VICE label file, so even local symbols can be seen in the VICE
|
|
monitor.</P>
|
|
|
|
|
|
<DT><B><CODE>-h, --help</CODE></B><DD><P>Print the short option summary shown above.</P>
|
|
|
|
|
|
<DT><B><CODE>-i, --ignore-case</CODE></B><DD><P>This option makes the assembler case insensitive on identifiers and labels.
|
|
This option will override the default, but may itself be overridden by the
|
|
<CODE>
|
|
<A HREF="ca65-10.html#.CASE">.CASE</A></CODE> control command.</P>
|
|
|
|
|
|
<DT><B><CODE>-l, --listing</CODE></B><DD><P>Generate an assembler listing. The listing file will always have the
|
|
name of the main input file with the extension replaced by ".lst". This
|
|
may change in future versions.</P>
|
|
|
|
|
|
<DT><B><CODE>--list-bytes n</CODE></B><DD><P>Set the maximum number of bytes printed in the listing for one line of
|
|
input. See the <CODE>
|
|
<A HREF="ca65-10.html#.LISTBYTES">.LISTBYTES</A></CODE> directive
|
|
for more information. The value zero can be used to encode an unlimited
|
|
number of printed bytes.</P>
|
|
|
|
|
|
<DT><B><CODE>--macpack-dir dir</CODE></B><DD><P>This options allows to specify a directory containing macro files that are
|
|
used instead of the builtin images when a <CODE>
|
|
<A HREF="ca65-10.html#.MACPACK">.MACPACK</A></CODE> directive is encountered. If <CODE>--macpack-dir</CODE>
|
|
was specified, a <CODE>.mac</CODE> extension is added to the package name and
|
|
the resulting file is loaded from the given directory. This is most useful
|
|
when debugging the builtin macro packages.</P>
|
|
|
|
|
|
<DT><B><CODE>-mm model, --memory-model model</CODE></B><DD><P>Define the default memory model. Possible model specifiers are near, far and
|
|
huge.</P>
|
|
|
|
|
|
<DT><B><CODE>-o name</CODE></B><DD><P>The default output name is the name of the input file with the extension
|
|
replaced by ".o". If you don't like that, you may give another name with
|
|
the -o option. The output file will be placed in the same directory as
|
|
the source file, or, if -o is given, the full path in this name is used.</P>
|
|
|
|
|
|
<DT><B><CODE>--pagelength n</CODE></B><DD><P>sets the length of a listing page in lines. See the <CODE>
|
|
<A HREF="ca65-10.html#.PAGELENGTH">.PAGELENGTH</A></CODE> directive for more information.</P>
|
|
|
|
|
|
<DT><B><CODE>-s, --smart-mode</CODE></B><DD><P>In smart mode (enabled by -s or the <CODE>
|
|
<A HREF="ca65-10.html#.SMART">.SMART</A></CODE>
|
|
pseudo instruction) the assembler will track usage of the <CODE>REP</CODE> and
|
|
<CODE>SEP</CODE> instructions in 65816 mode and update the operand sizes
|
|
accordingly. If the operand of such an instruction cannot be evaluated by
|
|
the assembler (for example, because the operand is an imported symbol), a
|
|
warning is issued.</P>
|
|
<P>Beware: Since the assembler cannot trace the execution flow this may
|
|
lead to false results in some cases. If in doubt, use the .ixx and .axx
|
|
instructions to tell the assembler about the current settings. Smart
|
|
mode is off by default.</P>
|
|
|
|
<P>
|
|
<A NAME="option-t"></A> </P>
|
|
<DT><B><CODE>-t sys, --target sys</CODE></B><DD><P>Set the target system. This will enable translation of character strings
|
|
and character constants into the character set of the target platform.
|
|
The default for the target system is "none", which means that no translation
|
|
will take place. The assembler supports the same target systems as the
|
|
compiler, see there for a list.</P>
|
|
|
|
|
|
<DT><B><CODE>-v, --verbose</CODE></B><DD><P>Increase the assembler verbosity. Usually only needed for debugging
|
|
purposes. You may use this option more than one time for even more
|
|
verbose output.</P>
|
|
|
|
|
|
<DT><B><CODE>-D</CODE></B><DD><P>This option allows you to define symbols on the command line. Without a
|
|
value, the symbol is defined with the value zero. When giving a value,
|
|
you may use the '$' prefix for hexadecimal symbols. Please note
|
|
that for some operating systems, '$' has a special meaning, so
|
|
you may have to quote the expression.</P>
|
|
|
|
|
|
<DT><B><CODE>-I dir, --include-dir dir</CODE></B><DD><P>Name a directory which is searched for include files. The option may be
|
|
used more than once to specify more than one directory to search. The
|
|
current directory is always searched first before considering any
|
|
additional directories.</P>
|
|
|
|
|
|
<DT><B><CODE>-U, --auto-import</CODE></B><DD><P>Mark symbols that are not defined in the sources as imported symbols. This
|
|
should be used with care since it delays error messages about typos and such
|
|
until the linker is run. The compiler uses the equivalent of this switch
|
|
(<CODE>
|
|
<A HREF="ca65-10.html#.AUTOIMPORT">.AUTOIMPORT</A></CODE>) to enable auto imported
|
|
symbols for the runtime library. However, the compiler is supposed to
|
|
generate code that runs through the assembler without problems, something
|
|
which is not always true for assembler programmers.</P>
|
|
|
|
|
|
<DT><B><CODE>-V, --version</CODE></B><DD><P>Print the version number of the assembler. If you send any suggestions
|
|
or bugfixes, please include the version number.</P>
|
|
|
|
<P>
|
|
<A NAME="option-W"></A> </P>
|
|
<DT><B><CODE>-Wn</CODE></B><DD><P>Set the warning level for the assembler. Using -W2 the assembler will
|
|
even warn about such things like unused imported symbols. The default
|
|
warning level is 1, and it would probably be silly to set it to
|
|
something lower.</P>
|
|
|
|
</DL>
|
|
</P>
|
|
|
|
|
|
|
|
<HR>
|
|
<A HREF="ca65-3.html">Next</A>
|
|
<A HREF="ca65-1.html">Previous</A>
|
|
<A HREF="ca65.html#toc2">Contents</A>
|
|
</BODY>
|
|
</HTML>
|