Viitor_cc65/usr/share/doc/cc65/webdoc/library-4.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

53 lines
1.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>cc65 Library Overview: Target specific stuff</TITLE>
<LINK HREF="library-5.html" REL=next>
<LINK HREF="library-3.html" REL=previous>
<LINK HREF="library.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="library-5.html">Next</A>
<A HREF="library-3.html">Previous</A>
<A HREF="library.html#toc4">Contents</A>
<HR>
<H2><A NAME="s4">4.</A> <A HREF="library.html#toc4">Target specific stuff</A></H2>
<P>For each supported system there's a header file that contains calls or defines
specific for this system. So, when programming for the C64, include c64.h, for
the C128, include c128.h and so on. To make the task for the Commodore systems
easier, there is also a header file named cbm.h that will define stuff common
for all CBM systems, and include the header file for the specific target
system.</P>
<P>The header files contain</P>
<P>
<UL>
<LI>Defines for special keys (like function keys)
</LI>
<LI>Defines for special characters (like the graphics characters)
</LI>
<LI>Variables with a fixed address in memory that may be used to access
special hardware. For the C64 and C128 there is a variable struct named
<CODE>SID</CODE>. Writing to the fields of this struct will write to the SID device
instead. Using these variables will make your program more readable and more
portable. Don't fear ineffective code when using these variables, the
compiler will translate reads and writes to these structs into direct memory
accesses.
</LI>
<LI>Other routines that make only sense for a specific system. One example
are routines to write memory locations in the system bank for the CBM PET-II
family.
</LI>
</UL>
</P>
<HR>
<A HREF="library-5.html">Next</A>
<A HREF="library-3.html">Previous</A>
<A HREF="library.html#toc4">Contents</A>
</BODY>
</HTML>