177 lines
7.0 KiB
HTML
177 lines
7.0 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
|
||
|
<TITLE>co65 Users Guide: Usage</TITLE>
|
||
|
<LINK HREF="co65-3.html" REL=next>
|
||
|
<LINK HREF="co65-1.html" REL=previous>
|
||
|
<LINK HREF="co65.html#toc2" REL=contents>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<A HREF="co65-3.html">Next</A>
|
||
|
<A HREF="co65-1.html">Previous</A>
|
||
|
<A HREF="co65.html#toc2">Contents</A>
|
||
|
<HR>
|
||
|
<H2><A NAME="s2">2.</A> <A HREF="co65.html#toc2">Usage</A></H2>
|
||
|
|
||
|
|
||
|
<P>The co65 utility converts one o65 file per run into one assembler files in
|
||
|
ca65 format. The utility tries to autodetect the type of the o65 input file
|
||
|
using the operating system identifier contained in the o65 option list.</P>
|
||
|
|
||
|
|
||
|
<H2><A NAME="ss2.1">2.1</A> <A HREF="co65.html#toc2.1">Command line option overview</A>
|
||
|
</H2>
|
||
|
|
||
|
|
||
|
<P>The converter may be called as follows:</P>
|
||
|
<P>
|
||
|
<BLOCKQUOTE><CODE>
|
||
|
<PRE>
|
||
|
---------------------------------------------------------------------------
|
||
|
Usage: co65 [options] file
|
||
|
Short options:
|
||
|
-V Print the version number
|
||
|
-g Add debug info to object file
|
||
|
-h Help (this text)
|
||
|
-m model Override the o65 model
|
||
|
-n Don't generate an output file
|
||
|
-o name Name the output file
|
||
|
-v Increase verbosity
|
||
|
|
||
|
Long options:
|
||
|
--bss-label name Define and export a BSS segment label
|
||
|
--bss-name seg Set the name of the BSS segment
|
||
|
--code-label name Define and export a CODE segment label
|
||
|
--code-name seg Set the name of the CODE segment
|
||
|
--data-label name Define and export a DATA segment label
|
||
|
--data-name seg Set the name of the DATA segment
|
||
|
--debug-info Add debug info to object file
|
||
|
--help Help (this text)
|
||
|
--no-output Don't generate an output file
|
||
|
--o65-model model Override the o65 model
|
||
|
--verbose Increase verbosity
|
||
|
--version Print the version number
|
||
|
--zeropage-label name Define and export a ZEROPAGE segment label
|
||
|
--zeropage-name seg Set the name of the ZEROPAGE segment
|
||
|
---------------------------------------------------------------------------
|
||
|
</PRE>
|
||
|
</CODE></BLOCKQUOTE>
|
||
|
</P>
|
||
|
|
||
|
|
||
|
<H2><A NAME="ss2.2">2.2</A> <A HREF="co65.html#toc2.2">Command line options in detail</A>
|
||
|
</H2>
|
||
|
|
||
|
|
||
|
<P>Here is a description of all the command line options:</P>
|
||
|
<P>
|
||
|
<DL>
|
||
|
|
||
|
<DT><B><CODE>--bss-label name</CODE></B><DD><P>Set the label used to mark the start of the bss segment. When this option is
|
||
|
given, the label is also exported and may be accessed from other code. When
|
||
|
accessing such a label from C code, be sure to include the leading
|
||
|
underscore. If you don't need to access the bss segment, there's no need to
|
||
|
use this option.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--bss-name seg</CODE></B><DD><P>Set the name of the bss segment. The default name is "BSS" which is
|
||
|
compatible with the standard ld65 linker configurations.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--code-label name</CODE></B><DD><P>Set the label used to mark the start of the code segment. When this option
|
||
|
is given, the label is also exported and may be accessed from other code.
|
||
|
When accessing such a label from C code, be sure to include the leading
|
||
|
underscore. If you don't need to access the code segment, there's no need to
|
||
|
use this option.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--code-name seg</CODE></B><DD><P>Set the name of the code segment. The default name is "CODE" which is
|
||
|
compatible with the standard ld65 linker configurations.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--data-label name</CODE></B><DD><P>Set the label used to mark the start of the data segment. When this option
|
||
|
is given, the label is also exported and may be accessed from other code.
|
||
|
When accessing such a label from C code, be sure to include the leading
|
||
|
underscore. If you don't need to access the data segment, there's no need to
|
||
|
use this option.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--data-name seg</CODE></B><DD><P>Set the name of the data segment. The default name is "DATA" which is
|
||
|
compatible with the standard ld65 linker configurations.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-d, --debug</CODE></B><DD><P>Enables debug mode, something that should not be needed for mere mortals.
|
||
|
Currently the converter does only accept cc65 loadable modules generated by
|
||
|
ld65 when not in debug mode. Please note that correct conversion has never
|
||
|
been tested for o65 files from other sources, so be careful when using
|
||
|
<CODE>-d</CODE>.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-g, --debug-info</CODE></B><DD><P>This will cause the converter to insert a <CODE>.DEBUGINFO</CODE> command into the
|
||
|
generated assembler code. This will cause the assembler to include all
|
||
|
symbols in a special section in the object file.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-h, --help</CODE></B><DD><P>Print the short option summary shown above.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-m model, --o65-model model</CODE></B><DD><P>Set an o65 model. This option changes the way, output is generated for the
|
||
|
given o65 file. For example, cc65 loadable drivers have a zero page segment,
|
||
|
but this segment must not be defined in the file itself, because the
|
||
|
standard module loader will overlay it with the zeropage space used by the
|
||
|
application that loads this module. So instead of allocating space in the
|
||
|
zero page segment, the converter will reference the start of the zero page
|
||
|
area used by the application.</P>
|
||
|
<P>Currently, the following models are defined:</P>
|
||
|
<P>
|
||
|
<UL>
|
||
|
<LI>lunix</LI>
|
||
|
<LI>os/a65</LI>
|
||
|
<LI>cc65-module</LI>
|
||
|
</UL>
|
||
|
</P>
|
||
|
<P>The default is to autodetect the model to use from the input file, so
|
||
|
there's rarely a need to use this option.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-n, --no-output</CODE></B><DD><P>Don't do the actual conversion, just read in the o65 file checking for
|
||
|
problems. This option may be used in conjunction with <CODE>--verbose</CODE> to
|
||
|
view some information about the input file.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-o name</CODE></B><DD><P>Specify the name of the output file. If you don't specify a name, the
|
||
|
name of the o65 input file is used, with the extension replaced by ".s".</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-v, --verbose</CODE></B><DD><P>Using this option, the converter will be somewhat more verbose and print
|
||
|
some information about the o65 input file (among other things). You may use
|
||
|
this option together with <CODE>--no-output</CODE> to just get the o65 info.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>-V, --version</CODE></B><DD><P>Print the version number of the compiler. When submitting a bug report,
|
||
|
please include the operating system you're using, and the compiler
|
||
|
version.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--zeropage-label name</CODE></B><DD><P>Set the label used to mark the start of the zeropage segment. When this
|
||
|
option is given, the label is also exported and may be accessed from other
|
||
|
code. When accessing such a label from C code, be sure to include the
|
||
|
leading underscore. If you don't need to access the zeropage segment,
|
||
|
there's no need to use this option.</P>
|
||
|
|
||
|
|
||
|
<DT><B><CODE>--zeropage-name seg</CODE></B><DD><P>Set the name of the data segment. The default name is "ZEROPAGE" which is
|
||
|
compatible with the standard ld65 linker configurations.</P>
|
||
|
|
||
|
</DL>
|
||
|
</P>
|
||
|
|
||
|
|
||
|
<HR>
|
||
|
<A HREF="co65-3.html">Next</A>
|
||
|
<A HREF="co65-1.html">Previous</A>
|
||
|
<A HREF="co65.html#toc2">Contents</A>
|
||
|
</BODY>
|
||
|
</HTML>
|