intro-2.html
来自「cc65 的编译器文档」· HTML 代码 · 共 51 行
HTML
51 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD> <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20"> <TITLE>cc65 compiler intro: The compiler</TITLE> <LINK HREF="intro-3.html" REL=next> <LINK HREF="intro-1.html" REL=previous> <LINK HREF="intro.html#toc2" REL=contents></HEAD><BODY><A HREF="intro-3.html">Next</A><A HREF="intro-1.html">Previous</A><A HREF="intro.html#toc2">Contents</A><HR><H2><A NAME="s2">2.</A> <A HREF="intro.html#toc2">The compiler</A></H2><P>The compiler translates one C source into one assembler source for eachinvocation. It does <EM>not</EM> create object files directly, and it is <EM>not</EM>able to translate more than one file per run.</P><P>In the example above, we would use the following command line, to translate<CODE>hello.c</CODE> into <CODE>hello.s</CODE>:</P><P><BLOCKQUOTE><CODE><PRE> cc65 -O -I ../include -t c64 hello.c</PRE></CODE></BLOCKQUOTE></P><P>The <CODE>-O</CODE> switch tells the compiler to do an additional optimizer run, whichis usually a good idea, since it makes the code smaller. If you don't careabout the size, but want to have slightly faster code, use <CODE>-Oi</CODE> to inlinesome runtime functions.</P><P>The <CODE>-I</CODE> switch gives a search path for the include files. You may also setthe environment variable CC65_INC to the search path.</P><P>The <CODE>-t</CODE> switch is followed by the target system.</P><P>If the compiler does not complain about errors in our hello world, we willhave a file named "<CODE>hello.s</CODE>" in our directory that contains the assemblersource for the hello module.</P><P>For more information about the compiler see <A HREF="cc65.html">cc65.html</A>.</P><HR><A HREF="intro-3.html">Next</A><A HREF="intro-1.html">Previous</A><A HREF="intro.html#toc2">Contents</A></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?