]> git.sur5r.net Git - cc65/blobdiff - doc/da65.sgml
Fixed several address size issues
[cc65] / doc / da65.sgml
index 9513ab9f333b4a950551a2a95a8a6ac92dec53ff..8f9ec91ec554ca395a3892fa1da0729a80878939 100644 (file)
@@ -126,10 +126,10 @@ Here is a description of all the command line options:
   <label id="option-o">
   <tag><tt>-o name</tt></tag>
 
-  The default output name is the name of the input file with the extension
-  replaced by ".dis". If you don't like that, you may give another name with
-  the -o option. The output file will be placed in the same directory as
-  the source file, or, if -o is given, the full path in this name is used.
+  Specify a name for an output file. The default is to use <tt/stdout/, so
+  without this switch or the corresponding <ref id="global-options"
+  name="global option"> <tt><ref id="OUTPUTNAME" name="OUTPUTNAME"></tt>,
+  the output will go to the terminal.
 
 
   <label id="option--pagelength">
@@ -217,7 +217,7 @@ name="next section"> for more information.
 
 
 
-<sect>Info File Format<p><label id="infofile">
+<sect>Info File Format<label id="infofile"><p>
 
 The info file contains lists of specifications grouped together. Each group
 directive has an identifying token and an attribute list enclosed in curly
@@ -233,7 +233,14 @@ anything). Each attribute is terminated by a semicolon.
 </verb></tscreen>
 
 
-<sect1>Specifying global options<p>
+<sect1>Comments<p>
+
+Comments start with a hash mark (<tt/#/)  and extend from the position of
+the mark to the end of the current line. Hash marks inside of strings will
+of course <em/not/ start a comment.
+
+
+<sect1>Specifying global options<label id="global-options"><p>
 
 Global options may be specified in a group with the name <tt/GLOBAL/. The
 following attributes are recognized:
@@ -241,7 +248,6 @@ following attributes are recognized:
 <descrip>
 
   <tag><tt>COMMENTS</tt></tag>
-
   This attribute may be used instead of the <tt><ref id="option--comments"
   name="--comments"></tt> option on the command line. It takes a numerical
   parameter between 0 and 4. Higher values increase the amount of information
@@ -249,45 +255,41 @@ following attributes are recognized:
 
 
   <tag><tt>CPU</tt></tag>
-
   This attribute may be used instead of the <tt><ref id="option--cpu"
   name="--cpu"></tt> option on the command line. It takes a string parameter.
 
 
   <tag><tt>INPUTNAME</tt></tag>
-
   The attribute is followed by a string value, which gives the name of the
   input file to read. If it is present, the disassembler does not accept an
   input file name on the command line.
 
 
   <tag><tt>INPUTOFFS</tt></tag>
-
   The attribute is followed by a numerical value that gives an offset into
   the input file which is skipped before reading data. The attribute may be
   used to skip headers or unwanted code sections in the input file.
 
 
   <tag><tt>INPUTSIZE</tt></tag>
-
-  INPUTSIZE is followed by a numerical value that gives the amount of data
-  to read from the input file. Data beyond <tt/INPUTOFFS+INPUTSIZE/ is 
-  ignored.
+  <tt/INPUTSIZE/ is followed by a numerical value that gives the amount of
+  data to read from the input file. Data beyond <tt/INPUTOFFS + INPUTSIZE/
+  is ignored.
 
 
+  <label id="OUTPUTNAME">
   <tag><tt>OUTPUTNAME</tt></tag>
-
   The attribute is followed by string value, which gives the name of the
   output file to write. If it is present, specification of an output file on
   the command line using the <tt><ref id="option-o" name="-o"></tt> option is
   not allowed.
 
-  If no output name is specified, the name of the input file with the
-  extension replaced by ".dis" is used.
+  The default is to use <tt/stdout/ for output, so without this attribute or
+  the corresponding command line option <tt/<ref id="option-o" name="-o">/
+  the output will go to the terminal.
 
 
   <tag><tt>PAGELENGTH</tt></tag>
-
   This attribute may be used instead of the <tt><ref id="option--pagelength"
   name="--pagelength"></tt> option on the command line. It takes a numerical
   parameter. Using zero as page length (which is the default) means that no
@@ -295,7 +297,6 @@ following attributes are recognized:
 
 
   <tag><tt>STARTADDR</tt></tag>
-
   This attribute may be used instead of the <tt><ref id="option--start-addr"
   name="--start-addr"></tt> option on the command line. It takes a numerical
   parameter. The default for the start address is $10000 minus the size of
@@ -312,48 +313,45 @@ following attributes are recognized:
 
 <descrip>
 
-  <tag><tt>START</tt></tag>
-
-  This gives the start address of the range.
-
-
   <tag><tt>END</tt></tag>
-
   This gives the end address of the range. The end address is inclusive, that
   means, it is part of the range. Of course, it may not be smaller than the
   start address.
 
+  <tag><tt>NAME</tt></tag>
+  This is a convenience attribute. It takes a string argument and will cause
+  the disassembler to define a label for the start of the range with the
+  given name. So a separate <tt><ref id="infofile-label" name="LABEL"></tt>
+  directive is not needed.
 
-  <tag><tt>TYPE</tt></tag>
+  <tag><tt>START</tt></tag>
+  This gives the start address of the range.
 
+  <tag><tt>TYPE</tt></tag>
   This attribute specifies the type of data within the range. The attribute
   value is one of the following keywords:
 
   <descrip>
-    <tag><tt>CODE</tt></tag>
-    The range consists of code.
+    <tag><tt>ADDRTABLE</tt></tag>
+    The range consists of data and is disassembled as a table of words
+    (16 bit values). The difference to the <tt/WORDTABLE/ type is that
+    a label is defined for each entry in the table.
 
     <tag><tt>BYTETABLE</tt></tag>
     The range consists of data and is disassembled as a byte table.
 
+    <tag><tt>CODE</tt></tag>
+    The range consists of code.
+
     <tag><tt>DBYTETABLE</tt></tag>
     The range consists of data and is disassembled as a table of dbytes
     (double byte values, 16 bit values with the low byte containing the
     most significant byte of the 16 bit value).
 
-    <tag><tt>WORDTABLE</tt></tag>
-    The range consists of data and is disassembled as a table of words
-    (16 bit values).
-
     <tag><tt>DWORDTABLE</tt></tag>
     The range consists of data and is disassembled as a table of double
     words (32 bit values).
 
-    <tag><tt>ADDRTABLE</tt></tag>
-    The range consists of data and is disassembled as a table of words
-    (16 bit values). The difference to the <tt/WORDTABLE/ type is that
-    a label is defined for each entry in the table.
-
     <tag><tt>RTSTABLE</tt></tag>
     The range consists of data and is disassembled as a table of words (16 bit
     values). The values are interpreted as words that are pushed onto the
@@ -361,33 +359,40 @@ following attributes are recognized:
     <tt/address-1/ of a function, for which a label will get defined by the
     disassembler.
 
+    <tag><tt>SKIP</tt></tag>
+    The range is simply ignored when generating the output file. Please note
+    that this means that reassembling the output file will <em/not/ generate
+    the original file, not only because the missing piece in between, but also
+    because the following code will be located on wrong addresses. Output
+    generated with <tt/SKIP/ ranges will need manual rework.
+
     <tag><tt>TEXTTABLE</tt></tag>
     The range consists of readable text.
+
+    <tag><tt>WORDTABLE</tt></tag>
+    The range consists of data and is disassembled as a table of words
+    (16 bit values).
+
   </descrip>
 
 </descrip>
 
 
-<sect1>Specifying Labels<p>
+<sect1>Specifying Labels<label id="infofile-label"><p>
 
 The <tt/LABEL/ directive is used to give names for labels in the disassembled
 code. The following attributes are recognized:
 
 <descrip>
 
-  <tag><tt>NAME</tt></tag>
-
-  The attribute is followed by a string value which gives the name of the
-  label.
-
-
   <tag><tt>ADDR</tt></tag>
-
   Followed by a numerical value. Specifies the value of the label.
 
+  <tag><tt>NAME</tt></tag>
+  The attribute is followed by a string value which gives the name of the
+  label.
 
   <tag><tt>SIZE</tt></tag>
-
   This attribute is optional and may be used to specifiy the size of the data
   that follows. If a size greater than 1 is specified, the disassembler will
   create labels in the form <tt/label+offs/ for all bytes within the given
@@ -403,12 +408,13 @@ The following is a short example for an info file that contains most of the
 directives explained above:
 
 <tscreen><verb>
+        # This is a comment. It extends to the end of the line
         GLOBAL {
-                OUTPUTNAME "kernal.s";
-                INPUTNAME  "kernal.bin";
-                STARTADDR  $E000;
-                PAGELENGTH 0;          # No paging
-                CPU        "6502";
+            OUTPUTNAME      "kernal.s";
+            INPUTNAME       "kernal.bin";
+            STARTADDR       $E000;
+            PAGELENGTH      0;                  # No paging
+            CPU             "6502";
         };