]> git.sur5r.net Git - cc65/blobdiff - doc/debugging.sgml
remote TABs in doc/ and test/
[cc65] / doc / debugging.sgml
index f2421e5b6f0856401a0640896b3cee7d7f1f1fb6..8b09db384c4c14d9d0607b2d2fd3510e894d5d96 100644 (file)
@@ -1,13 +1,11 @@
 <!doctype linuxdoc system>
 
 <article>
-
-<title>Using VICE with cc65
-<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
-<date>03.12.2000
+<title>Using emulators with cc65
+<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
 
 <abstract>
-How to debug your code using the VICE emulator.
+How to debug your code using the VICE and Oricutron emulators.
 </abstract>
 
 <!-- Table of contents -->
@@ -24,12 +22,12 @@ tools and the VICE CBM emulator.
 
 <sect>What is VICE?<p>
 
-VICE is an emulator for many of the CBM machines. It runs on Unix, DOS and
-Windows 95. It emulates the Commodore 64, 128, VIC20, PET and the 600/700
-machines. For more information see the VICE home page:
+VICE is an emulator for many of the CBM machines. It runs on Unix, MS-DOS,
+Win32, OS/2, Acorn RISC OS, BeOS, QNX 6.x, Amiga, GP2X and Mac OS X. It emulates
+the Commodore 64, 128, VIC20, PET and the 600/700 machines. For more information
+see the VICE home page:
 
-<htmlurl url="http://www.cs.cmu.edu/~dsladic/vice/vice.html"
-name="http://www.cs.cmu.edu/~dsladic/vice/vice.html">
+<url url="http://vice-emu.sourceforge.net/">.
 
 VICE has a builtin machine language monitor that may be used for debugging
 your programs. Using an emulator for debugging has some advantages:
@@ -45,15 +43,10 @@ arbitary addresses), debug interrupt handlers and even debug routines that run
 inside the 1541 floppy.
 
 <item>You may use the label file generated by the linker to make much more use
-from the monitor.     
+from the monitor.
 
 </itemize>
 
-Please note that you need at least VICE version 0.16 for the label file
-feature to work. This version has still some problems (see <ref id="problems"
-name="Problems and workarounds">), but older versions had even more problems
-and do <em/not/ work correctly.
-
 
 
 <sect>How to prepare your programs<p>
@@ -95,7 +88,11 @@ file (I'm usually using a <tt/.lbl/ extension for these files). An example for
 a linker command line would be:
 
 <tscreen><verb>
-    ld65 -t c64 -Ln hello.lbl -m hello.map -o hello crt0 hello.o c64.lib
+    ld65 -o hello -t c64 -Ln hello.lbl -m hello.map hello.o c64.lib
+</verb></tscreen>
+or
+<tscreen><verb>
+    ld65 -o hello.tap -t atmos -Ln hello.sym -m hello.map hello.o atmos.lib
 </verb></tscreen>
 
 This will generate a file named hello.lbl that contains all symbols used in
@@ -106,13 +103,13 @@ debug info, so you don't have to care about this.
 
 
 
-<sect>How to use the label file<p>
+<sect>How to use the label file with VICE<p>
 
 Load your program, then enter the monitor and use the "<tt/ll/" command to
 load your label file like this:
 
 <tscreen><verb>
-               ll "hello.lbl"
+        ll "hello.lbl"
 </verb></tscreen>
 
 You will get lots of warnings and even a few errors. You may ignore safely all
@@ -123,7 +120,7 @@ After loading the labels, they are used by VICE in the disassembler listing,
 and you may use them whereever you need to specify an address. Try
 
 <tscreen><verb>
-       d ._main
+        d ._main
 </verb></tscreen>
 
 as an example (note that VICE needs a leading dot before all labels, and that
@@ -131,38 +128,25 @@ the compiler prepends an underline under most named labels).
 
 
 
-<sect>Problems and workarounds<label id="problems"><p>
-
-Older versions of VICE had several problems with labels. However, even those
-versions were still tremendously useful, and all known problems are gone in
-current versions. So, here is a list of the problems known to me as of version
-0.16.1:
+<sect>How to use the label file with Oricutron<p>
 
-<itemize>
-
-<item>The "<tt/ll/" command does not work. Worse, it seems that internal
-memory gets corrupted when using this command, so VICE will crash after use.
-Use the "<tt/pb/" command to load the label file in this case.
-
-<item>VICE will crash if you use a label that is undefined. This is probably
-the worst problem of all, since it needs just one typo to kill VICE. So, watch
-your steps:-)
+Load your program, then enter the monitor and use the "<tt/sl/" command to
+load your label file like this:
 
-<item>Cheap labels, that is, labels starting with '@' or '?' are not accepted.
+<tscreen><verb>
+        sl hello.sym
+</verb></tscreen>
 
-<item>The disassembly output is somewhat suboptimal. However, most things are
-just cosmetical, e.g. labels appended to the right side of the disassembled
-code.
+After loading the labels, they are used by Oricutron in the disassembler listing,
+and you may use them whereever you need to specify an address. Try
 
-</itemize>
+<tscreen><verb>
+        d ._main
+</verb></tscreen>
 
-<bf>Note</bf>: All these problems are fixed in current (&gt;= 1.0) VICE
-versions. If you're really using such an old version, you should think about
-an upgrade.
+as an example (note that VICE needs a leading dot before all labels, and that
+the compiler prepends an underline under most named labels).
 
 
 
 </article>
-
-
-