]> git.sur5r.net Git - cc65/blobdiff - doc/co65.sgml
Added a C header that translates from the source file's encoding to PetSCII.
[cc65] / doc / co65.sgml
index 584ae9b9ef8e90f85420022a184ee9e43c168d7f..865aed2bbd837a3dbf59e1cebeba717ad2488eb3 100644 (file)
@@ -2,8 +2,7 @@
 
 <article>
 <title>co65 Users Guide
-<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
-<date>12.02.2003
+<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
 
 <abstract>
 co65 is an object file conversion utility. It converts o65 object files into
@@ -23,7 +22,7 @@ of loading them from disk.
 
 co65 is an object file conversion utility. It converts o65 object files into
 assembler files, which may be translated by ca65 to generate object files in
-the native object file format used by the cc65 tool chain. 
+the native object file format used by the cc65 tool chain.
 
 Since loadable drivers used by the library that comes with cc65 use the o65
 relocatable object code format, using the co65 utility allows to link these
@@ -121,7 +120,7 @@ Here is a description of all the command line options:
   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.
-                                                   
+
 
   <tag><tt>--data-name seg</tt></tag>
 
@@ -210,9 +209,10 @@ Here is a description of all the command line options:
 
   <tag><tt>--zeropage-name seg</tt></tag>
 
-  Set the name of the data segment. The default name is "ZEROPAGE" which is
+  Set the name of the zeropage segment. The default name is "ZEROPAGE" which is
   compatible with the standard ld65 linker configurations.
 
+</descrip>
 
 
 <sect>Input and output<p>
@@ -260,7 +260,7 @@ used to access the functions in the driver code.
 When loading a driver at runtime, the load address of the driver is also the
 address of the code segment, so the locations of the header and jump table are
 known. However, when linking the driver statically, it is up to the programmer
-to provide this information to the driver API. 
+to provide this information to the driver API.
 
 For this purpose, it is necessary to define a code segment label that can be
 accessed from the outside later. Please note that the converter does currently
@@ -274,6 +274,9 @@ the address of this variable as the address of the code segment of the driver.
 Be sure to never modify the variable which is in reality the start of your
 driver!
 
+
+<sect1>Example - Convert and link a graphics driver<p>
+
 As an example, here are some instructions to convert and use the c64-hi.tgi
 graphics driver:
 
@@ -282,15 +285,15 @@ segment. Use the assembler to generate an object file from the assembler
 output.
 
   <tscreen><verb>
-               co65 --code-label _c64_hi c64-hi.tgi
+        co65 --code-label _c64_hi c64-hi.tgi
         ca65 c64-hi.s
   </verb></tscreen>
 
-Next, change your C code to declare a variable that is actually the first byte
+Next, change your C code to declare a variable that is actually the address
 of the driver:
 
   <tscreen><verb>
-               extern char c64_hi;
+        extern void c64_hi[];
   </verb></tscreen>
 
 Instead of loading and unloading the driver, change the code to install and
@@ -298,7 +301,7 @@ uninstall the driver, which will be already in memory after linking:
 
   <tscreen><verb>
         /* Install the driver */
-        tgi_install (&c64_hi);
+        tgi_install (c64_hi);
 
         ...
 
@@ -312,15 +315,6 @@ will get an "undefined external" error for the _c64_hi symbol.
 
 
 
-<sect>Bugs/Feedback<p>
-
-If you have problems using the converter, if you find any bugs, or if you're
-doing something interesting with the code, I would be glad to hear from you.
-Feel free to contact me by email (<htmlurl url="mailto:uz@cc65.org"
-name="uz@cc65.org">).
-
-
-
 <sect>Copyright<p>
 
 co65 is (C) Copyright 2003 Ullrich von Bassewitz. For usage of the binaries
@@ -335,14 +329,14 @@ including commercial applications, and to alter it and redistribute it
 freely, subject to the following restrictions:
 
 <enum>
-<item>         The origin of this software must not be misrepresented; you must not
-               claim that you wrote the original software. If you use this software
-               in a product, an acknowledgment in the product documentation would be
-       appreciated but is not required.
-<item> Altered source versions must be plainly marked as such, and must not
-       be misrepresented as being the original software.
-<item> This notice may not be removed or altered from any source
-       distribution.
+<item>  The origin of this software must not be misrepresented; you must not
+        claim that you wrote the original software. If you use this software
+        in a product, an acknowledgment in the product documentation would be
+        appreciated but is not required.
+<item>  Altered source versions must be plainly marked as such, and must not
+        be misrepresented as being the original software.
+<item>  This notice may not be removed or altered from any source
+        distribution.
 </enum>
 
 </article>