Viitor_cc65/usr/share/doc/cc65/webdoc/intro-3.html
kueller 223cc6685e Neue Version V963
git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_cc65@5933 504e572c-2e33-0410-9681-be2bf7408885
2011-01-03 10:48:06 +00:00

49 lines
1.6 KiB
HTML

<!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 assembler</TITLE>
<LINK HREF="intro-4.html" REL=next>
<LINK HREF="intro-2.html" REL=previous>
<LINK HREF="intro.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="intro-4.html">Next</A>
<A HREF="intro-2.html">Previous</A>
<A HREF="intro.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3.</A> <A HREF="intro.html#toc3">The assembler</A></H2>
<P>The assembler translates one assembly source into an object file, for each
invocation. The assembler is <EM>not</EM> able to translate more than one source
file per run.</P>
<P>Let's translate the "hello.s" and "text.s" files from our example:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
ca65 hello.s
ca65 -t c64 text.s
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>The <CODE>-t</CODE> switch is needed when translating the <CODE>text.s</CODE> file, so the
text is converted from the input character-set (usually ISO-8859-1) into the
target character-set (PETSCII, in this example) by the assembler. The
compiler-generated file <CODE>hello.s</CODE> does not contain any character constants,
so specification of a target is not necessary (it wouldn't do any harm,
however).</P>
<P>If the assembler does not complain, we should now have two object files (named
<CODE>hello.o</CODE> and <CODE>text.o</CODE>) in the current directory.</P>
<P>For more information about the assembler, see
<A HREF="ca65.html">ca65.html</A>.</P>
<HR>
<A HREF="intro-4.html">Next</A>
<A HREF="intro-2.html">Previous</A>
<A HREF="intro.html#toc3">Contents</A>
</BODY>
</HTML>