]> git.sur5r.net Git - cc65/blobdiff - doc/da65.sgml
Apple 2 mouse driver and other stuff from Oliver Schmidt
[cc65] / doc / da65.sgml
index 8f9ec91ec554ca395a3892fa1da0729a80878939..f4174618df36750b4ef267129ac24da1a2af5790 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>
 
@@ -140,7 +176,7 @@ Here is a description of all the command line options:
   name="--formfeeds"></tt> is also given, a formfeed is inserted before
   generating the page header.
 
-  A value of -1 for the page length will disable paging of the output.
+  A value of zero for the page length will disable paging of the output.
 
 
   <label id="option--start-addr">
@@ -148,9 +184,16 @@ Here is a description of all the command line options:
 
   Specify the start/load address of the binary code that is going to be
   disassembled. The given address is interpreted as an octal value if
-  preceeded with a '0' digit, as a hexadecimal value if preceeded with '0x',
-  '0X', or '$', and as a decimal value in all other cases. If no start address
-  is specified, $10000 minus the size of the input file is used.
+  preceded with a '0' digit, as a hexadecimal value if preceded
+  with '0x', '0X', or '$', and as a decimal value in all other cases. If no
+  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>
@@ -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>
 
 
@@ -313,6 +396,11 @@ following attributes are recognized:
 
 <descrip>
 
+  <tag><tt>COMMENT</tt></tag>
+  This attribute is only allowed if a label is also given. It takes a string
+  as argument. See the description of the <tt><ref id="infofile-label"
+  name="LABEL"></tt> directive for an explanation.
+
   <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
@@ -388,12 +476,28 @@ code. The following attributes are recognized:
   <tag><tt>ADDR</tt></tag>
   Followed by a numerical value. Specifies the value of the label.
 
+  <tag><tt>COMMENT</tt></tag>
+  Attribute argument is a string. The comment will show up in a separate line
+  before the label, if the label is within code or data range, or after the
+  label if it is outside.
+
+  Example output:
+
+<tscreen><verb>
+        foo     := $0001        ; Comment for label named "foo"
+
+        ; Comment for label named "bar"
+        bar:
+</verb></tscreen>
+
   <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 specifiy the size of the data
+  This attribute is optional and may be used to specify 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
   range, where <tt/label/ is the label name given with the <tt/NAME/
@@ -402,6 +506,46 @@ code. The following attributes are recognized:
 </descrip>
 
 
+<sect1>Specifying Assembler Includes<label id="infofile-asminc"><p>
+
+The <tt/ASMINC/ directive is used to give the names of input files containing
+symbol assignments in assembler syntax:
+
+<tscreen><verb>
+               Name = value
+       Name := value
+</verb></tscreen>
+
+The usual conventions apply for symbol names. Values may be specified as hex
+(leading &dollar;), binary (leading %) or decimal. The values may optionally
+be signed.
+
+NOTE: The include file parser is very simple. Expressions are not allowed, and
+anything but symbol assignments is flagged as an error (but see the
+<tt/IGNOREUNKNOWN/ directive below).
+
+The following attributes are recognized:
+
+<descrip>
+
+  <tag><tt>FILE</tt></tag>
+  Followed by a string value. Specifies the name of the file to read.
+
+  <tag><tt>COMMENTSTART</tt></tag>
+  The optional attribute is followed by a character constant. It specifies the
+  character that starts a comment. The default value is a semicolon. This
+  value is ignored if <tt/IGNOREUNKNOWN/ is true.
+
+  <tag><tt>IGNOREUNKNOWN</tt></tag>
+  This attribute is optional and is followed by a boolean value. It allows to
+  ignore input lines that don't have a valid syntax. This allows to read in
+  assembler include files that contain more than just symbol assignments.
+  Note: When this attribute is used, the disassembler will ignore any errors
+  in the given include file. This may have undesired side effects.
+
+</descrip>
+
+
 <sect1>An Info File Example<p>
 
 The following is a short example for an info file that contains most of the