rx: make field type enum
[deliverable/binutils-gdb.git] / gas / doc / c-z80.texi
index f650581c0e9399755f8b4ce19d73ceffbbb5d7de..1b24f4ab8376a41b2db99cb584306489ba0c20a0 100644 (file)
@@ -1,3 +1,4 @@
+@c Copyright (C) 2011-2016 Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 
@@ -7,7 +8,6 @@
 @chapter Z80 Dependent Features
 @end ifset
 
-@c DO-NOT-COMMIT
 
 @ifclear GENERIC
 @node Machine Dependencies
@@ -60,7 +60,7 @@ Treat undocumented z80-instructions that do not work on R800 as errors.
 @item -r800
 Produce code for the R800 processor. The assembler does not support
 undocumented instructions for the R800.
-In line with common practice, @code{@value{AS}} uses Z80 instriction names
+In line with common practice, @code{@value{AS}} uses Z80 instruction names
 for the R800 processor, as far as they exist.
 @end table
 
@@ -70,14 +70,14 @@ for the R800 processor, as far as they exist.
 The assembler syntax closely follows the 'Z80 family CPU User Manual' by
 Zilog.
 In expressions a single @samp{=} may be used as ``is equal to''
-comparison operator.  
+comparison operator.
 
 Suffices can be used to indicate the radix of integer constants;
 @samp{H} or @samp{h} for hexadecimal, @samp{D} or @samp{d} for decimal,
 @samp{Q}, @samp{O}, @samp{q} or @samp{o} for octal, and @samp{B} for
 binary.
 
-The suffix @samp{b} denotes a backreference to local label.  
+The suffix @samp{b} denotes a backreference to local label.
 
 @menu
 * Z80-Chars::                Special Characters
@@ -90,7 +90,17 @@ The suffix @samp{b} denotes a backreference to local label.
 
 @cindex line comment character, Z80
 @cindex Z80 line comment character
-The semicolon @samp{;} is the line comment character; 
+The semicolon @samp{;} is the line comment character;
+
+If a @samp{#} appears as the first character of a line then the whole
+line is treated as a comment, but in this case the line could also be
+a logical line number directive (@pxref{Comments}) or a preprocessor
+control command (@pxref{Preprocessing}).
+
+@cindex line separator, Z80
+@cindex statement separator, Z80
+@cindex Z80 line separator
+The Z80 assembler does not support a line separator character.
 
 @cindex location counter, Z80
 @cindex hexadecimal prefix, Z80
@@ -101,12 +111,12 @@ and as a symbol denoting the current location counter.
 @cindex character escapes, Z80
 @cindex Z80, \
 A backslash @samp{\} is an ordinary character for the Z80 assembler.
+
 @cindex character constant, Z80
 @cindex single quote, Z80
 @cindex Z80 '
 The single quote @samp{'} must be followed by a closing quote. If there
-is one character inbetween, it is a character constant, otherwise it is
+is one character in between, it is a character constant, otherwise it is
 a string constant.
 
 @node Z80-Regs
@@ -115,9 +125,9 @@ a string constant.
 @cindex register names, Z80
 
 The registers are referred to with the letters assigned to them by
-Zilog. In addition @command{@value{AS}} recognises @samp{ixl} and 
+Zilog. In addition @command{@value{AS}} recognizes @samp{ixl} and
 @samp{ixh} as the least and most significant octet in @samp{ix}, and
-similarly @samp{iyl} and  @samp{iyh} as parts of @samp{iy}. 
+similarly @samp{iyl} and  @samp{iyh} as parts of @samp{iy}.
 
 @c The @samp{'} in @samp{ex af,af'} may be omitted.
 
@@ -127,7 +137,7 @@ similarly @samp{iyl} and  @samp{iyh} as parts of @samp{iy}.
 @cindex case sensitivity, Z80
 
 Upper and lower case are equivalent in register names, opcodes,
-condition codes  and assembler directives. 
+condition codes  and assembler directives.
 The case of letters is significant in labels and symbol names. The case
 is also important to distinguish the suffix @samp{b} for a backward reference
 to a local label from the suffix @samp{B} for a number in binary notation.
@@ -142,7 +152,7 @@ Floating-point numbers are not supported.
 @section Z80 Assembler Directives
 
 @command{@value{AS}} for the Z80 supports some additional directives for
-compatibility with other assemblers. 
+compatibility with other assemblers.
 
 @cindex Z80-only directives
 These are the additional directives in @code{@value{AS}} for the Z80:
@@ -151,35 +161,45 @@ These are the additional directives in @code{@value{AS}} for the Z80:
 @item db @var{expression}|@var{string}[,@var{expression}|@var{string}...]
 @itemx defb @var{expression}|@var{string}[,@var{expression}|@var{string}...]
 For each @var{string} the characters are copied to the object file, for
-each other @var{expression} the value is stored in one byte, ignoring
-overflow. 
+each other @var{expression} the value is stored in one byte.
+A warning is issued in case of an overflow.
 
 @item dw @var{expression}[,@var{expression}...]
 @itemx defw @var{expression}[,@var{expression}...]
 For each @var{expression} the value is stored in two bytes, ignoring
-overflow. 
+overflow.
+
+@item d24 @var{expression}[,@var{expression}...]
+@itemx def24 @var{expression}[,@var{expression}...]
+For each @var{expression} the value is stored in three bytes, ignoring
+overflow.
+
+@item d32 @var{expression}[,@var{expression}...]
+@itemx def32 @var{expression}[,@var{expression}...]
+For each @var{expression} the value is stored in four bytes, ignoring
+overflow.
 
 @item ds @var{count}[, @var{value}]
 @itemx defs @var{count}[, @var{value}]
-@c Synonyms for @code{ds.b}, 
-@c which should have been described elsewhre
+@c Synonyms for @code{ds.b},
+@c which should have been described elsewhere
 Fill @var{count} bytes in the object file with @var{value}, if
 @var{value} is omitted it defaults to zero.
 
 @item @var{symbol} equ @var{expression}
 @itemx @var{symbol} defl @var{expression}
-These directives set the value of @var{symbol} to @var{expression}.  To
-keep code portable to other assemblers it is best to use @samp{equ} for
-the first definition and @samp{defl} for redefinitions.
+These directives set the value of @var{symbol} to @var{expression}. If
+@code{equ} is used, it is an error if @var{symbol} is already defined.
+Symbols defined with @code{equ} are not protected from redefinition.
 
 @item set
-This is a normal instruction on Z80, and not an assembler directive. 
+This is a normal instruction on Z80, and not an assembler directive.
 
 @item psect @var{name}
-A synonym for @xref{Section}, no second argument should be given. 
+A synonym for @xref{Section}, no second argument should be given.
 @ignore
 
-The following attributes will possibly be recognised in the future
+The following attributes will possibly be recognized in the future
 @table @code
 @item abs
 The section is to be absolute. @code{@value{AS}} will issue an error
@@ -203,8 +223,8 @@ The section is marked as read only.
 
 @node Z80 Opcodes
 @section Opcodes
-In line with commmon practice Z80 mnonics are used for both the Z80 and
-the R800. 
+In line with common practice, Z80 mnemonics are used for both the Z80 and
+the R800.
 
 In many instructions it is possible to use one of the half index
 registers (@samp{ixl},@samp{ixh},@samp{iyl},@samp{iyh}) in stead of an
@@ -225,7 +245,7 @@ be any operand that is valid for @samp{sla}. One can use @samp{sll} as a
 synonym for @samp{sli}.
 
 @item @var{op} (ix+@var{d}), @var{r}
-This is equivalent to 
+This is equivalent to
 
 @example
 ld @var{r}, (ix+@var{d})
This page took 0.032824 seconds and 4 git commands to generate.