]> git.sur5r.net Git - cc65/blobdiff - doc/apple2.sgml
Small fixes by Greg King
[cc65] / doc / apple2.sgml
index 359793077ec86ae153f8d7d360d09abb5b8feb68..e74408609dc319ba6327090630b2ab7ad46f9c05 100644 (file)
@@ -8,7 +8,7 @@
 
 <abstract>
 An overview over the Apple&nbsp;&rsqb;&lsqb; runtime system as it is
-implemented for the cc65 C compiler.   
+implemented for the cc65 C compiler.
 </abstract>
 
 <!-- Table of contents -->
@@ -36,7 +36,7 @@ The standard binary output format generated by the linker for the
 Apple&nbsp;&rsqb;&lsqb; target is a machine language program with a 4 byte DOS
 3.3 header. The standard load address is &dollar;800.
 
-The DOS header is in it's own segment named <tt/EXEHDR/. If you don't want the
+The DOS header is in its own segment named <tt/EXEHDR/. If you don't want the
 header for some reason, you can change
 
 <verb>
@@ -51,19 +51,25 @@ to
 
 in the linker configuration to have the linker remove it.
 
+Please note that there is a "Apple&nbsp;&rsqb;&lsqb; ProDOS 8 system program
+for loading binary programs" available in the cc65 User Contributions section.
+It adds all benefits of a ProDOS 8 system program to the standard binary
+program generated by the linker for the Apple&nbsp;&rsqb;&lsqb; target.
+
 
 
 <sect>Memory layout<p>
 
 In the standard setup, cc65 generated programs use the memory from
-&dollar;800 to &dollar;8E00, so 33.5K of memory (including the stack) is
-available. ROM calls are possible without further precautions.
+&dollar;800 to &dollar;95FF, so 35.5K of memory are available. ROM calls are
+possible without further precautions.
 
 Special locations:
 
 <descrip>
   <tag/Stack/
-  The C runtime stack is located at &dollar;8DFF and growing downwards.
+  The C runtime stack is located at HIMEM and grows downwards, regardless of
+  how your linker config file is setup.
 
   <tag/Heap/
   The C heap is located at the end of the program and grows towards the C
@@ -85,6 +91,7 @@ the <htmlurl url="funcref.html" name="function reference"> for declaration and
 usage.
 
 <itemize>
+<item>_dos_type
 <item>get_ostype
 </itemize>
 
@@ -117,28 +124,37 @@ this may seem overhead, it has two advantages:
 
 <sect1>Graphics drivers<p>
 
-<em>Note:</em> Since memory for the graphics has to be allocated, programs
-using graphics drivers will have to be linked using a special linker
+<em>Note:</em> Since memory for the high resolution graphics has to be allocated,
+programs using graphics drivers will have to be linked using a special linker
 configuration. See the <tt/apple2-tgi.cfg/ file in the documentation
 directory, and the <htmlurl url="ld65.html" name="linker documentation"> on
 how to use it.
 
 <descrip>
 
-  <tag><tt/a2-lo.tgi/</tag>
-  This driver features a resolution of 40x40 with 16 colors. At the bottom of
-  the screen, 4 additional text lines are available.
+  <tag><tt/a2.lo.tgi/</tag>
+  This driver was written by Stefan Haubenthal. It features a resolution of
+  40&times;40 with 16 colors. At the bottom of the screen, 4 additional text lines
+  are available.
 
-  <tag><tt/a2-hi.tgi/</tag>
-  This driver features a resolution of 280x192 with 6 colors.
+  <tag><tt/a2.hi.tgi/</tag>
+  This driver was written by Stefan Haubenthal. It features a resolution of
+  280&times;192 with 6 colors.
 
 </descrip><p>
 
 
 <sect1>Extended memory drivers<p>
 
-No extended memory drivers are currently available for the 
-Apple&nbsp;&rsqb;&lsqb;.
+<descrip>
+
+  <tag><tt/a2.lc.emd/</tag>
+  Gives access to 12KB RAM (48 pages of 256 bytes each) on the
+  Apple&nbsp;&rsqb;&lsqb; language card. The driver was contributed by
+  Stefan Haubenthal. Note: This driver is incompatible with any DOS using 
+  the language card memory!
+
+</descrip><p>
 
 
 
@@ -146,8 +162,8 @@ Apple&nbsp;&rsqb;&lsqb;.
 
 <descrip>
 
-  <tag><tt/a2-stdjoy.joy/</tag>
-  Supports up to two standard joysticks connected to the joysticks port of
+  <tag><tt/a2.stdjoy.joy/</tag>
+  Supports up to two standard analog joysticks connected to the game port of
   the Apple&nbsp;&rsqb;&lsqb;.
 
 </descrip><p>
@@ -195,8 +211,27 @@ following functions (and a few others):
 
 <sect1>Passing arguments to the program<p>
 
-Command line argument passing is currently not supported for the
-Apple&nbsp;&rsqb;&lsqb;.
+Command line arguments can be passed to <tt/main()/ after BLOAD. Since this is not
+supported by BASIC, the following syntax was chosen:
+
+<tscreen><verb>
+]CALL2048:REM ARG1 " ARG2 IS QUOTED" ARG3 "" ARG5
+</verb></tscreen>
+
+<enum>
+<item>Arguments are separated by spaces.
+<item>Arguments may be quoted.
+<item>Leading and trailing spaces around an argument are ignored. Spaces within
+      a quoted argument are allowed.
+<item>The first argument passed to <tt/main/ is the program name.
+<item>A maximum number of 10 arguments (including the program name) are
+      supported.
+</enum>
+
+
+<sect1>Function keys<p>
+
+These are defined to be OpenApple + number key.