]> git.sur5r.net Git - cc65/blobdiff - doc/c16.sgml
Build files in the extra directory.
[cc65] / doc / c16.sgml
index 494e6d8c68777d70ef42f27f1080c051318d4df1..e1b2cbc54493451cc626f6061d85a7a1efbc8db5 100644 (file)
@@ -50,9 +50,9 @@ linker config.
 <sect>Memory layout<p>
 
 cc65 generated programs with the default setup run with the kernal and basic
-banked out. This gives a usable memory range of &dollar;1000 - &dollar;4000
-(or &dollar;8000 i the machine is equipped with 32K RAM or more). Having the
-kernal and basic ROMs banked out means, that no ROM entry points may be called
+banked in. This gives a usable memory range of &dollar;1000 - &dollar;4000
+(or &dollar;8000 if the machine is equipped with 32K RAM or more). Having the
+kernal and basic ROMs banked in means, that ROM entry points may be called
 directly from user code.
 
 Special locations:
@@ -200,8 +200,28 @@ library, because the latter does not support interrupts needed by the driver.
 
 <sect1>Passing arguments to the program<p>
 
-Command line argument passing is currently not supported for the C16/C116.
+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.