co65-2.html

来自「cc65 的编译器文档」· HTML 代码 · 共 177 行

HTML
177
字号
<!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 inca65 format. The utility tries to autodetect the type of the o65 input fileusing 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] fileShort 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 verbosityLong 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 isgiven, the label is also exported and may be accessed from other code. Whenaccessing such a label from C code, be sure to include the leadingunderscore. If you don't need to access the bss segment, there's no need touse 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 iscompatible 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 optionis 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 leadingunderscore. If you don't need to access the code segment, there's no need touse 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 iscompatible 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 optionis 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 leadingunderscore. If you don't need to access the data segment, there's no need touse 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 iscompatible 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 byld65 when not in debug mode. Please note that correct conversion has neverbeen 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 thegenerated assembler code. This will cause the assembler to include allsymbols 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 thegiven o65 file. For example, cc65 loadable drivers have a zero page segment,but this segment must not be defined in the file itself, because thestandard module loader will overlay it with the zeropage space used by theapplication that loads this module. So instead of allocating space in thezero page segment, the converter will reference the start of the zero pagearea 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, sothere'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 forproblems. This option may be used in conjunction with <CODE>--verbose</CODE> toview 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, thename 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 printsome information about the o65 input file (among other things). You may usethis 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 compilerversion.</P><DT><B><CODE>--zeropage-label name</CODE></B><DD><P>Set the label used to mark the start of the zeropage segment. When thisoption is given, the label is also exported and may be accessed from othercode. When accessing such a label from C code, be sure to include theleading 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 iscompatible 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>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?