]> git.sur5r.net Git - cc65/blobdiff - doc/plus4.sgml
Do not try to dump an expression that has errors (circular references in this
[cc65] / doc / plus4.sgml
index 712afbabe31c588fe152bead427f54bd97c123ea..c247cd78cfb2064cebfbaa4e7fafea38e8e203ab 100644 (file)
@@ -31,8 +31,8 @@ information.
 Since the Plus/4 and the Commodore 16/116 are almost identical (the latter are
 missing the 6551 ACIA and do only have 16KB of memory), the <htmlurl
 url="c16.html" name="C16 documentation"> is also worth a look. The difference
-between both targets is that the Plus/4 runtime uses banking to support full
-64K RAM, while the C16 does not use banking and supports up to 32K RAM.
+between both cc65 targets is that the Plus/4 runtime uses banking to support
+full 64K RAM, while the C16 does not use banking and supports up to 32K RAM.
 Because banking is not needed, most C16 programs will be somewhat smaller than
 the same program compiled for the Plus/4. However, programs compiled for the
 C16 will always run on the Plus/4, while the reverse is not necessarily true.
@@ -41,10 +41,10 @@ C16 will always run on the Plus/4, while the reverse is not necessarily true.
 <sect>Binary format<p>
 
 The standard binary output format generated by the linker for the Plus/4
-target is a machine language program with a one line BASIC stub. This means
-that a program can be loaded as BASIC program and started with RUN. It is of
-course possible to change this behaviour by using a modified startup file and
-linker config.
+target is a machine language program with a one line BASIC stub, which calls
+the machine language part via SYS. This means that a program can be loaded as
+BASIC program and started with RUN. It is of course possible to change this
+behaviour by using a modified startup file and linker config.
 
 
 <sect>Memory layout<p>
@@ -138,7 +138,7 @@ structures, accessing the struct fields will access the chip registers.
   declaration of the structure.
 
   <tag><tt/COLOR_RAM/</tag>
-  A character array that mirrors the color RAM of the C64 at &dollar;D800.
+  A character array that mirrors the color RAM of the Plus/4 at &dollar;0800.
 
 </descrip><p>
 
@@ -180,29 +180,55 @@ does not exist).
 <descrip>
 
   <tag><tt/plus4-stdser.ser/</tag>
-  Driver for the 6551 ACIA chip built into the Plus/4 Supports up to 19200
+  Driver for the 6551 ACIA chip built into the Plus/4. Supports up to 19200
   baud, hardware flow control (RTS/CTS) and interrupt driven receives. Note
   that because of the peculiarities of the 6551 chip transmits are not
   interrupt driven, and the transceiver blocks if the receiver asserts flow
   control because of a full buffer.
 
-  Note that you need an adapter to use the builtin port, since the output
-  levels available at the user port don't follow the RS232 standard.
+  You need an adapter to use the builtin port, since the output levels
+  available at the user port don't follow the RS232 standard.
 
 </descrip><p>
 
 
 
+<sect>Limitations<p>
+
+
+
 <sect>Other hints<p>
 
 <sect1>Passing arguments to the program<p>
 
-Command line argument passing is currently not supported for the Plus/4.
+Command line arguments can be passed to <tt/main()/. Since this is not
+supported by BASIC, the following syntax was chosen:
+
+<tscreen><verb>
+    RUN: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>Program return code<p>
+
+The program return code (low byte) is passed back to BASIC by use of the
+<tt/ST/ variable.
 
 
 <sect1>Interrupts<p>
 
-The runtime for the Plus/4 uses routines marked as <tt/.CONDES/ type 2 for
+The runtime for the Plus/4 uses routines marked as <tt/.INTERRUPTOR/ for
 interrupt handlers. Such routines must be written as simple machine language
 subroutines and will be called automatically by the interrupt handler code
 when they are linked into a program. See the discussion of the <tt/.CONDES/
@@ -241,7 +267,3 @@ freely, subject to the following restrictions:
 </enum>
 
 </article>
-
-
-
-