]> git.sur5r.net Git - cc65/blobdiff - doc/intro.sgml
Change result of .CPU pseudo variable
[cc65] / doc / intro.sgml
index bc314c090220265c0dcfe627c42e15dd48939f88..51c7f567afacdcdb5e28dc4844247fc6c085664f 100644 (file)
@@ -3,8 +3,8 @@
 <article>
 
 <title>cc65 compiler intro
-<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org"> and CyberX
-<date>06.13.2002
+<author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org"> and CbmNut <htmlurl url="mailto:cbmnut@hushmail.com" name="cbmnut@hushmail.com">
+<date>07.13.2002
 
 <abstract>
 How to use the cc65 C compiler - an introduction.
@@ -25,10 +25,11 @@ detail.
 
 You are assumed to have downloaded and extracted the executables and the
 target specific files. For example, for Windows users targeting C64, you need
-cc65-win32-2.8.0.zip and cc65-c64-2.8.0.zip extracted to the same directory.
-If you received the files as a bzip2 archive (extension *.bz2), you will need
-to get the <htmlurl url="http://sources.redhat.com/bzip2/#bzip2-latest"
-name="bzip2 package"> to decompress it.
+cc65-win32-2.8.0.zip and cc65-c64-2.8.0.zip (or whatever the current cc65
+version is) extracted to the same directory. If you received the files as a
+bzip2 archive (extension *.bz2), you will need to get the <htmlurl
+url="http://sources.redhat.com/bzip2/#bzip2-latest" name="bzip2 package"> to
+decompress it.
 
 <bf>Note</bf>: There is a much simpler way to compile this example using the
 cl65 compiler and link utility. However, it makes sense to understand how the
@@ -237,14 +238,49 @@ url="cl65.html" name="cl65.html">.
 Depending on the target, the compiler chooses several methods of making a
 program available for execution.  Here we list sample emulators and
 instructions for running the program.  Unless noted, similar instructions
-would also apply to a real machine.
+would also apply to a real machine.  One word of advice: we suggest you clear
+the screen at the start, and wait for a keypress at the end of your program,
+as each target varies in it's start and exit conditions.
 
 <sect1>Apple<p>
 
-<bf>AppleWin 1.10.4</bf>: Emulates Apple II+/IIe computer, with sound, video,
-joysticks, serial port, and disk images. Roms and dos disk included. Includes
-monitor. Only for Windows. Unfortunately we were unable to find documentation
-on running programs.  Please help.
+<bf>AppleWin 1.10.4</bf> (available at
+<url url="http://www.jantzer-schmidt.de/applewin/">): Emulates Apple II+/IIe
+computer, with sound, video, joysticks, serial port, and disk images. Roms and
+dos disk included. Includes monitor. Only for Windows. The package comes with
+roms and dos3.3 disk (called master.dsk), however you will need a2tools
+(available at <url url="http://hotel04.ausys.se/pausch/apple2/#a2tools">).
+
+Compile the tutorial with
+
+<tscreen><verb>
+cl65 -O -t apple2 hello.c text.s
+</verb></tscreen>
+
+Then insert the file into an Apple disk image for use with an emulator.  Copy
+the master.dsk which comes with Applewin and rename it to cc65.dsk, then use
+a2tools:
+
+<tscreen><verb>
+a2tools in -r b cc65.dsk TEST hello
+</verb></tscreen>
+
+Note that a convention in the Apple world is that hello is the file which is
+automatically run upon booting a DOS disk, sort of like the Autoexec.bat of
+the PC world.  We've avoided this in the example however.  Also, the TEST
+parameter must be in caps, and is the name of the program as it will appear on
+the Apple disk.
+
+Start the emulator, click on the Disk 1 icon, and point to cc65.dsk, then
+click the big Apple logo to boot the system.  Then type this on the Apple:
+
+<tscreen><verb>
+BRUN TEST
+</verb></tscreen>
+
+You will see the "Hello, World!" appear on the same line.  Thanks to Oliver
+Schmidt, <htmlurl url="mailto:oliver@jantzer-schmidt.de"
+name="oliver@jantzer-schmidt.de"> for his help in completing this section.
 
 <sect1>Atari<p>
 
@@ -252,9 +288,8 @@ on running programs.  Please help.
 <url url="http://www.a800win.atari-area.prv.pl">): Emulates Atari
 400/800/65XE/130XE/800XL/1200XL/5200, with stereo sound, disk images, scanline
 exact NTSC/PAL video, joysticks, mouse, cartridges and ram expansions.
-Includes monitor. Unfortunately only for Windows. You will need the emulator
-only.  Optionally you will need atarixl.rom and/or atariosb.rom/ataribas.rom
-and dos25.xfd files (not supplied).
+Includes monitor. Unfortunately only for Windows. You will need the emulator,
+atarixl.rom or atariosb.rom/ataribas.rom and dos25.xfd files (not supplied).
 
 Compile the tutorial with
 
@@ -262,10 +297,10 @@ Compile the tutorial with
 cl65 -O -t atari hello.c text.s
 </verb></tscreen>
 
-Start the emulator, choose File>Autoboot image or File>Load executable, and point
-to the hello executable.  It is customary to rename executables of this type to
-hello.xex.  The file has a 7 byte header meant to be loaded directly from Atari
-DOS 2/2.5 or compatibles.
+Start the emulator, choose File>Autoboot image or File>Load executable, and
+point to the hello executable.  It is customary to rename executables of this
+type to hello.xex.  The file has a 7 byte header meant to be loaded directly
+from Atari DOS 2/2.5 or compatibles.
 
 On a real Atari, you would need a disk drive and Atari Dos 2.5 or compatible.
 Turn on the computer, type
@@ -280,10 +315,11 @@ and enter HELLO.
 The emulation also supports this method.  Look at Atari>Settings and check
 Enable H: Patch for Hard Disk Devices, then Atari>Hard disks and set the path
 of H1: to your executables directory, then use H0:HELLO.XEX in the above
-proceedure to access your hardrive directly.
+proceedure (after pressing L) to access your hardrive directly.
 
-<bf>Note:</bf> There is no delay after the program exits.  Your C program
-should wait for a keypress if you want to see any output.
+<bf>Note:</bf> There is no delay after the program exits, as you are returned
+to the DOS menu.  Your C program should wait for a keypress if you want to see
+any output.
 
 <sect1>Commodore<p>
 
@@ -321,7 +357,10 @@ on PET/CBM II/C128, then type
 RUN
 </verb></tscreen>
 
-We need your help! Recommended emulators and instructions for other machines
+The output will appear on a separate line, and you will be returned to a BASIC
+prompt.
+
+We need your help! Recommended emulators and instructions for other targets
 are missing. We suggest an emulator with good compatibility. Also, being able
 to run all computers in the target series is good for target compatibility
 testing. A machine language monitor is almost essential for debugging, but a
@@ -330,6 +369,3 @@ native debugger could be used as well.
 Finally, emulators which run on Unix/Windows would help reach a wider audience.
 
 </article>
-
-
-