]> git.sur5r.net Git - cc65/blobdiff - doc/da65.sgml
Added note on the necessity of tab chars at the beginning of make command lines.
[cc65] / doc / da65.sgml
index 4dea352685cdf1f83190ad57642d1f7fd124d9a8..0ce43976c2e54d61574aee730eb928571680b22c 100644 (file)
@@ -55,14 +55,20 @@ Short options:
   -V                    Print the disassembler version
 
 Long options:
+  --argument-column n   Specify argument start column
+  --comment-column n    Specify comment start column
   --comments n          Set the comment level for the output
   --cpu type            Set cpu type
   --debug-info          Add debug info to object file
   --formfeeds           Add formfeeds to the output
   --help                Help (this text)
+  --hexoffs             Use hexadecimal label offsets
   --info name           Specify an info file
+  --label-break n       Add newline if label exceeds length n
+  --mnemonic-column n   Specify mnemonic start column
   --pagelength n        Set the page length for the listing
   --start-addr addr     Set the start/load address
+  --text-column n       Specify text start column
   --verbose             Increase verbosity
   --version             Print the disassembler version
 ---------------------------------------------------------------------------
@@ -75,6 +81,19 @@ Here is a description of all the command line options:
 
 <descrip>
 
+  <label id="option--argument-column">
+  <tag><tt>--argument-column n</tt></tag>
+
+  Specifies the column where the argument for a mnemonic or pseudo instruction
+  starts.
+
+
+  <label id="option--comment-column">
+  <tag><tt>--comment-column n</tt></tag>
+
+  Specifies the column where the comment for an instruction starts.
+
+
   <label id="option--comments">
   <tag><tt>--comments n</tt></tag>
 
@@ -132,6 +151,23 @@ Here is a description of all the command line options:
   the output will go to the terminal.
 
 
+  <label id="option--label-break">
+  <tag><tt>--label-break n</tt></tag>
+
+  Adds a newline if the length of a label exceeds the given length.
+  Note: If the label would run into the code in the mid column, a
+  linefeed is always inserted regardless of this setting.
+
+  This option overrides the <ref id="global-options" name="global option">
+  <tt><ref id="LABELBREAK" name="LABELBREAK"></tt>.
+
+
+  <label id="option--mnemonic-column">
+  <tag><tt>--mnemonic-column n</tt></tag>
+
+  Specifies the column where a mnemonic or pseudo instrcuction is output.
+
+
   <label id="option--pagelength">
   <tag><tt>--pagelength n</tt></tag>
 
@@ -153,6 +189,13 @@ Here is a description of all the command line options:
   start address is specified, $10000 minus the size of the input file is used.
 
 
+  <label id="option--text-column">
+  <tag><tt>--text-column n</tt></tag>
+
+  Specifies the column where additional text is output. This additional text
+  consists of the bytes encoded in this line in text representation.
+
+
   <tag><tt>-v, --verbose</tt></tag>
 
   Increase the disassembler verbosity. Usually only needed for debugging
@@ -247,38 +290,70 @@ following attributes are recognized:
 
 <descrip>
 
-  <tag><tt>COMMENTS</tt></tag>
+  <tag><tt/ARGUMENTCOLUMN/</tag>
+  This attribute specifies the column in the output, where the argument for
+  an opcode or pseudo instruction starts. The corresponding command line
+  option is
+  <tt><ref id="option--argument-column" name="--argument-column"></tt>.
+
+
+  <tag><tt/COMMENTCOLUMN/</tag>
+  This attribute specifies the column in the output, where the comment starts
+  in a line. It is only used for in-line comments. The corresponding command
+  line option is
+  <tt><ref id="option--comment-column" name="--comment-column"></tt>.
+
+
+  <label id="COMMENTS">
+  <tag><tt/COMMENTS/</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
   written to the output file in form of comments.
 
 
-  <tag><tt>CPU</tt></tag>
+  <tag><tt/CPU/</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>
+  <tag><tt/INPUTNAME/</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>
+  <tag><tt/INPUTOFFS/</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>
+  <tag><tt/INPUTSIZE/</tag>
   <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="LABELBREAK">
+  <tag><tt/LABELBREAK/</tag>
+  <tt/LABELBREAK/ is followed by a numerical value that specifies the label
+  length that will force a newline. To have all labels on their own lines,
+  you may set this value to zero.
+
+  See also the <tt><ref id="option--label-break" name="--label-break"></tt>
+  command line option. A <tt/LABELBREAK/ statement in the info file will
+  override any value given on the command line.
+
+
+  <tag><tt/MNEMONICCOLUMN/</tag>
+  This attribute specifies the column in the output, where the mnemonic or
+  pseudo instruction is placed. The corresponding command line option is
+  <tt><ref id="option--mnemonic-column" name="--mnemonic-column"></tt>.
+
+
   <label id="OUTPUTNAME">
-  <tag><tt>OUTPUTNAME</tt></tag>
+  <tag><tt/OUTPUTNAME/</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
@@ -289,20 +364,28 @@ following attributes are recognized:
   the output will go to the terminal.
 
 
-  <tag><tt>PAGELENGTH</tt></tag>
+  <tag><tt/PAGELENGTH/</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
   pages are generated.
 
 
-  <tag><tt>STARTADDR</tt></tag>
+  <tag><tt/STARTADDR/</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
   the input file (this assumes that the input file is a ROM that contains the
   reset and irq vectors).
 
+
+  <tag><tt/TEXTCOLUMN/</tag>
+  This attribute specifies the column, where the data bytes are output
+  translated into ASCII text. It is only used if
+  <tt><ref id="COMMENTS" name="COMMENTS"></tt> is set to at least 4. The
+  corresponding command line option is
+  <tt><ref id="option--text-column" name="--text-column"></tt>.
+
 </descrip>
 
 
@@ -409,7 +492,9 @@ code. The following attributes are recognized:
 
   <tag><tt>NAME</tt></tag>
   The attribute is followed by a string value which gives the name of the
-  label.
+  label. Empty names are allowed, in this case the disassembler will create
+  an unnamed label (see the assembler docs for more information about unnamed
+  labels).
 
   <tag><tt>SIZE</tt></tag>
   This attribute is optional and may be used to specify the size of the data
@@ -421,6 +506,32 @@ code. The following attributes are recognized:
 </descrip>
 
 
+<sect1>Specifying Segments<label id="infofile-segment"><p>
+
+The <tt/SEGMENT/ directive is used to specify a segment within the
+disassembled code. The following attributes are recognized:
+
+<descrip>
+
+  <tag><tt>START</tt></tag>
+  Followed by a numerical value. Specifies the start address of the segment.
+
+  <tag><tt>END</tt></tag>
+  Followed by a numerical value. Specifies the end address of the segment. The
+  end address is last the address that is part of the segment.
+
+  <tag><tt>NAME</tt></tag>
+  The attribute is followed by a string value which gives the name of the
+  segment.
+</descrip>
+
+All attributes are mandatory. Segments may not overlap. Since there is no
+explicit "end this segment" pseudo op, the disassembler cannot notify the
+assembler that one segment has ended. This may lead to errors if you don't
+define your segments carefully. As a rule of thumb, if you're using segments,
+your should define segments for all disassembled code.
+
+
 <sect1>Specifying Assembler Includes<label id="infofile-asminc"><p>
 
 The <tt/ASMINC/ directive is used to give the names of input files containing
@@ -476,6 +587,8 @@ directives explained above:
             CPU             "6502";
         };
 
+        # One segment for the whole stuff
+        SEGMENT { START $E000;  END   $FFFF; NAME kernal; };
 
         RANGE {        START $E612;    END   $E631; TYPE Code;      };
         RANGE {        START $E632;    END   $E640; TYPE ByteTable; };
@@ -524,7 +637,7 @@ name="uz@cc65.org">).
 
 <sect>Copyright<p>
 
-da65 (and all cc65 binutils) are (C) Copyright 1998-2003 Ullrich von
+da65 (and all cc65 binutils) are (C) Copyright 1998-2007 Ullrich von
 Bassewitz. For usage of the binaries and/or sources the following
 conditions do apply: