[ -o @var{objfile} ] [ -R ] [ -v ] [ -w ]
@c am29k has no machine-dependent assembler options
@c h8/300 has no machine-dependent assembler options
+@c Z8000 has no machine-dependent assembler options
@c see md_parse_option in i960.c
[ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ]
[ -b ] [ -norelax ]
@samp{|} on the 680x0;
@samp{;} for the AMD 29K family;
@samp{;} for the machine specific family;
+@samp{!} for the Z8000.
@pxref{Machine Dependent}. @refill
@c FIXME: fill in SPARC line comment char
* i960-Dependent:: Intel 80960 Dependent Features
* M68K-Dependent:: M680x0 Dependent Features
* Sparc-Dependent:: SPARC Dependent Features
+* Z8000-Dependent:: Z8000 Dependent Features
* i386-Dependent:: 80386 Dependent Features
@end menu
example, can be done with @samp{imul $69, %eax} rather than @samp{imul
$69, %eax, %eax}.
+@node Z8000-Dependent
+@section Z8000 Dependent Features
+
+@cindex Z8000 support
+@menu
+* Z8000 Options:: Options
+* Z8000 Syntax:: Syntax
+* Z8000 Directives:: Z8000 Machine Directives
+* Z8000 Opcodes:: Opcodes
+@end menu
+
+@node Z8000 Options
+@subsection Options
+
+@cindex Z8000 options
+@cindex options, Z8000
+@code{as} has no additional command-line options for the Zilog
+Z8000 family.
+
+@node Z8000 Syntax
+@subsection Syntax
+@menu
+* Z8000-Chars:: Special Characters
+* Z8000-Regs:: Register Names
+* Z8000-Addressing:: Addressing Modes
+@end menu
+
+@node Z8000-Chars
+@subsubsection Special Characters
+
+@cindex line comment character, Z8000
+@cindex Z8000 line comment character
+@samp{!} is the line comment character.
+
+@cindex line separator, Z8000
+@cindex statement separator, Z8000
+@cindex Z8000 line separator
+@samp{;} can be used instead of a newline to separate statements.
+
+@node Z8000
+@subsubsection Register Names
+
+@cindex Z8000 registers
+@cindex registers, Z8000
+The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can refer to different
+sized groups of registers with the prefix @samp{r} for 16 bit registers, @samp{rr}
+for 32 bit registers and @samp{rq} for 64 bit registers. The first eight of the sixteen
+16 bit registers may also be accessed by bytes. They are named @samp{r@var{n}h} and @samp{r@var{n}l}}.
+@example
+byte registers
+ r0l r0h r1h r1l r2h r2l r3h r3l r4h r4l r5h r5l r6h r6l r7h r7l
+
+word registers
+ r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
+
+long word registers
+ rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14
+
+quad word registers
+ rq0 rq4 rq8 rq12
+@end example
+@node Z8000-Addressing
+@subsubsection Addressing Modes
+@cindex addressing modes, Z8000
+@cindex Z800 addressing modes
+as understands the following addressing modes for the Z8000:
+@table @code
+@item r@var{n}
+Register direct
+
+@item @@r@var{n}
+Indirect register
+
+@item var{address}
+Direct: the 16/24 bit address of the operand is in the instruction.
+
+@item address(r@var{n})
+Indexed: the 16/24 bit address is added to the 16 bit register to produce
+the final address in memory of the operand.
+
+@item r@var{n}(#@var{imm})
+Base Address: the 16/24 bit register is added to the 16 bit sign extended immediate displacement to produce the final address in memory of the operand.
+
+@item r@var{n}(r@var{m})
+Base Index: the 16/24 bit register r@var{n} is added to the sign extended
+16 bit index register r@var{m} to produce the final address in memory of the operand.
+
+@item #@var{xx}
+Immediate data @var{xx}.
+@end table
+@node Z8000 Opcodes
+@subsection Opcodes
+
+@cindex Z8000 opcode summary
+@cindex opcode summary, Z8000
+@cindex mnemonics, Z8000
+@cindex instruction summary, Z8000
+For detailed information on the Z8000 machine instruction set, see
+@cite{Z8000 Technical Manual}.
+
+@cindex Z8000 pseudo ops
+
+The Z8000 port of gas provides a superficial resemblance to YASM, and
+provides these YASM compatible pseudo ops:
+@table @code
+@item segm
+@cindex segm
+Generates code for the segmented Z8001.
+@item unsegm
+Generates code for the unsegmented Z8002.
+@item name
+Synonym for @code{.file}
+@item global
+Synonum for @code{.global}
+@item wval
+Synonym for .word
+@item lval
+Synonym for .long
+@item bval
+Synonym for .byte
+@item sval
+Assemble a string.
+@code {sval} expects one string literal, delimited by single quotes. It assembles each byte of the string into consecutive addresses. Single quote
+and other non-representable characters may be descrbed by escaping them
+with a percent sign and their ascii value as a two digit hex number.
+
+@example
+char *a = "he said \"it's 50% off\"";
+
+0000 68652073 sval 'he said %22it%27s 50%25 off%22%00'
+ 61696420
+ 22697427
+ 73203530
+ 25206F66
+ 662200
+
+@end example
+@item rsect
+synonym for @code{.section}
+@item block
+synonym for @code{.space}
+@item even
+synonym for @code{.align 1}
+@end table
+
+The following table summarizes the opcodes and their arguments:
+@c kluge due to lack of group outside example
+@page
+@group
+@smallexample
+
+ rs @r{16 bit source register}
+ rd @r{16 bit destination register}
+ rbs @r{8 bit source register}
+ rbd @r{8 bit destination register}
+ rrs @r{32 bit source register}
+ rrd @r{32 bit destination register}
+ rqs @r{64 bit source register}
+ rqd @r{64 bit destination register}
+ addr @r{16/24 bit address}
+ imm @r{immediate data}
+
+adc rd,rs clrb addr cpsir @@rd,@@rs,rr,cc
+adcb rbd,rbs clrb addr(rd) cpsirb @@rd,@@rs,rr,cc
+add rd,@@rs clrb rbd dab rbd
+add rd,addr com @@rd dbjnz rbd,disp7
+add rd,addr(rs) com addr dec @@rd,imm4m1
+add rd,imm16 com addr(rd) dec addr(rd),imm4m1
+add rd,rs com rd dec addr,imm4m1
+addb rbd,@@rs comb @@rd dec rd,imm4m1
+addb rbd,addr comb addr decb @@rd,imm4m1
+addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1
+addb rbd,imm8 comb rbd decb addr,imm4m1
+addb rbd,rbs comflg flags decb rbd,imm4m1
+addl rrd,@@rs cp @@rd,imm16 di i2
+addl rrd,addr cp addr(rd),imm16 div rrd,@@rs
+addl rrd,addr(rs) cp addr,imm16 div rrd,addr
+addl rrd,imm32 cp rd,@@rs div rrd,addr(rs)
+addl rrd,rrs cp rd,addr div rrd,imm16
+and rd,@@rs cp rd,addr(rs) div rrd,rs
+and rd,addr cp rd,imm16 divl rqd,@@rs
+and rd,addr(rs) cp rd,rs divl rqd,addr
+and rd,imm16 cpb @@rd,imm8 divl rqd,addr(rs)
+and rd,rs cpb addr(rd),imm8 divl rqd,imm32
+andb rbd,@@rs cpb addr,imm8 divl rqd,rrs
+andb rbd,addr cpb rbd,@@rs djnz rd,disp7
+andb rbd,addr(rs) cpb rbd,addr ei i2
+andb rbd,imm8 cpb rbd,addr(rs) ex rd,@@rs
+andb rbd,rbs cpb rbd,imm8 ex rd,addr
+bit @@rd,imm4 cpb rbd,rbs ex rd,addr(rs)
+bit addr(rd),imm4 cpd rd,@@rs,rr,cc ex rd,rs
+bit addr,imm4 cpdb rbd,@@rs,rr,cc exb rbd,@@rs
+bit rd,imm4 cpdr rd,@@rs,rr,cc exb rbd,addr
+bit rd,rs cpdrb rbd,@@rs,rr,cc exb rbd,addr(rs)
+bitb @@rd,imm4 cpi rd,@@rs,rr,cc exb rbd,rbs
+bitb addr(rd),imm4 cpib rbd,@@rs,rr,cc ext0e imm8
+bitb addr,imm4 cpir rd,@@rs,rr,cc ext0f imm8
+bitb rbd,imm4 cpirb rbd,@@rs,rr,cc ext8e imm8
+bitb rbd,rs cpl rrd,@@rs ext8f imm8
+bpt cpl rrd,addr exts rrd
+call @@rd cpl rrd,addr(rs) extsb rd
+call addr cpl rrd,imm32 extsl rqd
+call addr(rd) cpl rrd,rrs halt
+calr disp12 cpsd @@rd,@@rs,rr,cc in rd,@@rs
+clr @@rd cpsdb @@rd,@@rs,rr,cc in rd,imm16
+clr addr cpsdr @@rd,@@rs,rr,cc inb rbd,@@rs
+clr addr(rd) cpsdrb @@rd,@@rs,rr,cc inb rbd,imm16
+clr rd cpsi @@rd,@@rs,rr,cc inc @@rd,imm4m1
+clrb @@rd cpsib @@rd,@@rs,rr,cc inc addr(rd),imm4m1
+@end group
+@group
+inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs)
+inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16
+incb @@rd,imm4m1 ldb rd(rx),rbs mult rrd,rs
+incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@@rs
+incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr
+incb rbd,imm4m1 ldd @@rs,@@rd,rr multl rqd,addr(rs)
+ind @@rd,@@rs,ra lddb @@rs,@@rd,rr multl rqd,imm32
+indb @@rd,@@rs,rba lddr @@rs,@@rd,rr multl rqd,rrs
+inib @@rd,@@rs,ra lddrb @@rs,@@rd,rr neg @@rd
+inibr @@rd,@@rs,ra ldi @@rd,@@rs,rr neg addr
+iret ldib @@rd,@@rs,rr neg addr(rd)
+jp cc,@@rd ldir @@rd,@@rs,rr neg rd
+jp cc,addr ldirb @@rd,@@rs,rr negb @@rd
+jp cc,addr(rd) ldk rd,imm4 negb addr
+jr cc,disp8 ldl @@rd,rrs negb addr(rd)
+ld @@rd,imm16 ldl addr(rd),rrs negb rbd
+ld @@rd,rs ldl addr,rrs nop
+ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@@rs
+ld addr(rd),rs ldl rd(rx),rrs or rd,addr
+ld addr,imm16 ldl rrd,@@rs or rd,addr(rs)
+ld addr,rs ldl rrd,addr or rd,imm16
+ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs
+ld rd(rx),rs ldl rrd,imm32 orb rbd,@@rs
+ld rd,@@rs ldl rrd,rrs orb rbd,addr
+ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs)
+ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8
+ld rd,imm16 ldm @@rd,rs,n orb rbd,rbs
+ld rd,rs ldm addr(rd),rs,n out @@rd,rs
+ld rd,rs(imm16) ldm addr,rs,n out imm16,rs
+ld rd,rs(rx) ldm rd,@@rs,n outb @@rd,rbs
+lda rd,addr ldm rd,addr(rs),n outb imm16,rbs
+lda rd,addr(rs) ldm rd,addr,n outd @@rd,@@rs,ra
+lda rd,rs(imm16) ldps @@rs outdb @@rd,@@rs,rba
+lda rd,rs(rx) ldps addr outib @@rd,@@rs,ra
+ldar rd,disp16 ldps addr(rs) outibr @@rd,@@rs,ra
+ldb @@rd,imm8 ldr disp16,rs pop @@rd,@@rs
+ldb @@rd,rbs ldr rd,disp16 pop addr(rd),@@rs
+ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@@rs
+ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@@rs
+ldb addr,imm8 ldrl disp16,rrs popl @@rd,@@rs
+ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@@rs
+ldb rbd,@@rs mbit popl addr,@@rs
+ldb rbd,addr mreq rd popl rrd,@@rs
+ldb rbd,addr(rs) mres push @@rd,@@rs
+ldb rbd,imm8 mset push @@rd,addr
+ldb rbd,rbs mult rrd,@@rs push @@rd,addr(rs)
+ldb rbd,rs(imm16) mult rrd,addr push @@rd,imm16
+@end group
+@group
+push @@rd,rs set addr,imm4 subl rrd,imm32
+pushl @@rd,@@rs set rd,imm4 subl rrd,rrs
+pushl @@rd,addr set rd,rs tcc cc,rd
+pushl @@rd,addr(rs) setb @@rd,imm4 tccb cc,rbd
+pushl @@rd,rrs setb addr(rd),imm4 test @@rd
+res @@rd,imm4 setb addr,imm4 test addr
+res addr(rd),imm4 setb rbd,imm4 test addr(rd)
+res addr,imm4 setb rbd,rs test rd
+res rd,imm4 setflg imm4 testb @@rd
+res rd,rs sinb rbd,imm16 testb addr
+resb @@rd,imm4 sinb rd,imm16 testb addr(rd)
+resb addr(rd),imm4 sind @@rd,@@rs,ra testb rbd
+resb addr,imm4 sindb @@rd,@@rs,rba testl @@rd
+resb rbd,imm4 sinib @@rd,@@rs,ra testl addr
+resb rbd,rs sinibr @@rd,@@rs,ra testl addr(rd)
+resflg imm4 sla rd,imm8 testl rrd
+ret cc slab rbd,imm8 trdb @@rd,@@rs,rba
+rl rd,imm1or2 slal rrd,imm8 trdrb @@rd,@@rs,rba
+rlb rbd,imm1or2 sll rd,imm8 trib @@rd,@@rs,rbr
+rlc rd,imm1or2 sllb rbd,imm8 trirb @@rd,@@rs,rbr
+rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @@ra,@@rb,rbr
+rldb rbb,rba sout imm16,rs trtib @@ra,@@rb,rr
+rr rd,imm1or2 soutb imm16,rbs trtirb @@ra,@@rb,rbr
+rrb rbd,imm1or2 soutd @@rd,@@rs,ra trtrb @@ra,@@rb,rbr
+rrc rd,imm1or2 soutdb @@rd,@@rs,rba tset @@rd
+rrcb rbd,imm1or2 soutib @@rd,@@rs,ra tset addr
+rrdb rbb,rba soutibr @@rd,@@rs,ra tset addr(rd)
+rsvd36 sra rd,imm8 tset rd
+rsvd38 srab rbd,imm8 tsetb @@rd
+rsvd78 sral rrd,imm8 tsetb addr
+rsvd7e srl rd,imm8 tsetb addr(rd)
+rsvd9d srlb rbd,imm8 tsetb rbd
+rsvd9f srll rrd,imm8 xor rd,@@rs
+rsvdb9 sub rd,@@rs xor rd,addr
+rsvdbf sub rd,addr xor rd,addr(rs)
+sbc rd,rs sub rd,addr(rs) xor rd,imm16
+sbcb rbd,rbs sub rd,imm16 xor rd,rs
+sc imm8 sub rd,rs xorb rbd,@@rs
+sda rd,rs subb rbd,@@rs xorb rbd,addr
+sdab rbd,rs subb rbd,addr xorb rbd,addr(rs)
+sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8
+sdl rd,rs subb rbd,imm8 xorb rbd,rbs
+sdlb rbd,rs subb rbd,rbs xorb rbd,rbs
+sdll rrd,rs subl rrd,@@rs
+set @@rd,imm4 subl rrd,addr
+set addr(rd),imm4 subl rrd,addr(rs)
+@end group
+@end smallexample
+
@node Copying
@unnumbered GNU GENERAL PUBLIC LICENSE
instead of in the original English.
@end titlepage
@page
-@node Top, Overview, (dir), (dir)
@ifinfo
+@node Top
+@top Using _AS__
+
This file is a user guide to the GNU assembler @code{_AS__}.
_if__(!_GENERIC__)
This version of the file describes @code{_AS__} configured to generate
code for _HOST__ architectures.
_fi__(!_GENERIC__)
-@end ifinfo
@menu
* Overview:: Overview
* Invoking:: Command-Line Options
* Copying:: GNU GENERAL PUBLIC LICENSE
* Index:: Index
@end menu
+@end ifinfo
-@node Overview, Invoking, Top, Top
+@node Overview
@chapter Overview
@iftex
This manual is a user guide to the GNU assembler @code{_AS__}.
_if__(_H8__)
@c h8/300 has no machine-dependent assembler options
_fi__(_H8__)
+_if__(_Z8000__)
+@c Z8000 has no machine-dependent assembler options
+_fi__(_Z8000__)
_if__(_I960__)
@c see md_parse_option in i960.c
[ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ]
* Errors:: Error and Warning Messages
@end menu
-@node Manual, GNU Assembler, Overview, Overview
+@node Manual
@section Structure of this Manual
@cindex manual, structure and purpose
For information on the H8/300 machine instruction set, see @cite{H8/300
Series Programming Manual} (Hitachi ADE--602--025).
_fi__(_H8__&&!_GENERIC__)
+_if__(_Z8000__&&!_GENERIC__)
+For information on the Z8000 machine instruction set, see @cite{Z8000 CPU Technical Manual}
+_fi__(_Z8000__&&!_GENERIC__)
@c I think this is premature---pesch@cygnus.com, 17jan1991
@c this draft makes an effort to avoid them (except in names of
@c directives).
-@node GNU Assembler, Object Formats, Manual, Overview
+@node GNU Assembler
@section _AS__, the GNU Assembler
GNU @code{as} is really a family of assemblers.
program in one pass of the source file. This has a subtle impact on the
@kbd{.org} directive (@pxref{Org,,@code{.org}}).
-@node Object Formats, Command Line, GNU Assembler, Overview
+@node Object Formats
@section Object File Formats
@cindex object file format
_fi__(_I960__)
_fi__(!_GENERIC__)
-@node Command Line, Input Files, Object Formats, Overview
+@node Command Line
@section Command Line
@cindex command line conventions
_AS__ -omy-object-file.o mumble.s
@end smallexample
-@node Input Files, Object, Command Line, Overview
+@node Input Files
@section Input Files
@cindex input
source is itself synthesized from other files.
@xref{App-File,,@code{.app-file}}.
-@node Object, Errors, Input Files, Overview
+@node Object
@section Output (Object) File
@cindex object file
@c link above to some info file(s) like the description of a.out.
@c don't forget to describe GNU info as well as Unix lossage.
-@node Errors, , Object, Overview
+@node Errors
@section Error and Warning Messages
@cindex error messsages
messages. The actual message text may be rather less explanatory
because many of them aren't supposed to happen.
-@node Invoking, Syntax, Overview, Top
+@node Invoking
@chapter Command-Line Options
@cindex options, all versions of @code{_AS__}
@code{_AS__} assembles your file. Errors, which stop the assembly, are
still reported.
-@node Syntax, Sections, Invoking, Top
+@node Syntax
@chapter Syntax
@cindex machine-independent syntax
* Constants:: Constants
@end menu
-@node Pre-processing, Whitespace, Syntax, Syntax
+@node Pre-processing
@section Pre-Processing
@cindex preprocessing
mainly intend to support @code{asm} statements in compilers whose output
normally does not need to be pre-processed.
-@node Whitespace, Comments, Pre-processing, Syntax
+@node Whitespace
@section Whitespace
@cindex whitespace
(@pxref{Characters,,Character Constants}), any whitespace means the same
as exactly one space.
-@node Comments, Symbol Intro, Whitespace, Syntax
+@node Comments
@section Comments
@cindex comments
_if__(_H8__)
@samp{;} for the _HOST__ family;
_fi__(_H8__)
+_if__(_Z8000__)
+@samp{!} for the Z8000.
+_fi__(_Z8000__)
@pxref{_MACH_DEP__}. @refill
@c FIXME: fill in SPARC line comment char
This feature is deprecated, and may disappear from future versions
of @code{_AS__}.
-@node Symbol Intro, Statements, Comments, Syntax
+@node Symbol Intro
@section Symbols
@cindex characters used in symbols
not a possible symbol delimiter). @xref{Symbols}.
@cindex length of symbols
-@node Statements, Constants, Symbol Intro, Syntax
+@node Statements
@section Statements
@cindex statements, structure of
instruction operand_1, operand_2, @dots{}
@end smallexample
-@node Constants, , Statements, Syntax
+@node Constants
@section Constants
@cindex constants
* Numbers:: Number Constants
@end menu
-@node Characters, Numbers, Constants, Constants
+@node Characters
@subsection Character Constants
@cindex character constants
* Chars:: Characters
@end menu
-@node Strings, Chars, Characters, Characters
+@node Strings
@subsubsection Strings
@cindex string constants
compilers recognize. If you are in doubt, don't use an escape
sequence.
-@node Chars, , Strings, Characters
+@node Chars
@subsubsection Characters
@cindex single character constant
that character. @code{_AS__} assumes your character code is ASCII:
@kbd{'A} means 65, @kbd{'B} means 66, and so on. @refill
-@node Numbers, , Characters, Constants
+@node Numbers
@subsection Number Constants
@cindex constants, number
_fi__(_I960__&&!_GENERIC__)
@end menu
-@node Integers, Bignums, Numbers, Numbers
+@node Integers
@subsubsection Integers
@cindex integers
@cindex constants, integer
the prefix operator @samp{-} discussed under expressions
(@pxref{Prefix Ops,,Prefix Operators}).
-@node Bignums, Flonums, Integers, Numbers
+@node Bignums
@subsubsection Bignums
@cindex bignums
represent in binary. The distinction is made because in some places
integers are permitted while bignums are not.
-_if__(_I960__&&!_GENERIC__)
-@node Flonums, Bit Fields, Bignums, Numbers
-_fi__(_I960__&&!_GENERIC__)
-_if__(_GENERIC__||!_I960__)
-@node Flonums, , Bignums, Numbers
-_fi__(_GENERIC__||!_I960__)
+@node Flonums
@subsubsection Flonums
@cindex flonums
@cindex floating point numbers
@c Bit fields are written as a general facility but are also controlled
@c by a conditional-compilation flag---which is as of now (21mar91)
@c turned on only by the i960 config of GAS.
-@node Bit Fields, , Flonums, Numbers
+@node Bit Fields
@subsubsection Bit Fields
@cindex bit fields
@code{.short}, and @code{.word} accept bit-field arguments.
_fi__(_I960__&&!_GENERIC__)
-@node Sections, Symbols, Syntax, Top
+@node Sections
@chapter Sections and Relocation
@cindex sections
@cindex relocation
* bss:: bss Section
@end menu
-@node Secs Background, _LD__ Sections, Sections, Sections
+@node Secs Background
@section Background
Roughly, a section is a range of addresses, with no gaps; all data
Some sections are manipulated by @code{_LD__}; others are invented for
use of @code{_AS__} and have no meaning except during assembly.
-@node _LD__ Sections, _AS__ Sections, Secs Background, Sections
+@node _LD__ Sections
@section _LD__ Sections
@code{_LD__} deals with just four kinds of sections, summarized below.
@end tex
@c END TEXI2ROFF-KILL
-@node _AS__ Sections, Sub-Sections, _LD__ Sections, Sections
+@node _AS__ Sections
@section _AS__ Internal Sections
@cindex internal @code{_AS__} sections
@c FIXME item register
@end table
-@node Sub-Sections, bss, _AS__ Sections, Sections
+@node Sub-Sections
@section Sub-Sections
@cindex numbered subsections
section that statements are being assembled into is said to be the
@dfn{active} location counter.
-@node bss, , Sub-Sections, Sections
+@node bss
@section bss Section
@cindex bss section
are no bss subsections. @xref{Comm,,@code{.comm}},
@pxref{Lcomm,,@code{.lcomm}}.
-@node Symbols, Expressions, Sections, Top
+@node Symbols
@chapter Symbols
@cindex symbols
* Symbol Attributes:: Symbol Attributes
@end menu
-@node Labels, Setting Symbols, Symbols, Symbols
+@node Labels
@section Labels
@cindex labels
different locations: the first definition overrides any other
definitions.
-@node Setting Symbols, Symbol Names, Labels, Symbols
+@node Setting Symbols
@section Giving Symbols Other Values
@cindex assigning values to symbols
(@pxref{Expressions}). This is equivalent to using the @code{.set}
directive. @xref{Set,,@code{.set}}.
-@node Symbol Names, Dot, Setting Symbols, Symbols
+@node Symbol Names
@section Symbol Names
@cindex symbol names
For instance, the first @code{1:} is named @code{L1@ctrl{A}1}, the 44th
@code{3:} is named @code{L3@ctrl{A}44}.
-@node Dot, Symbol Attributes, Symbol Names, Symbols
+@node Dot
@section The Special Dot Symbol
@cindex dot (symbol)
@samp{.block 4}.
_fi__(_A29K__)
-@node Symbol Attributes, , Dot, Symbols
+@node Symbol Attributes
@section Symbol Attributes
@cindex symbol attributes
_fi__(_COFF__)
@end menu
-@node Symbol Value, Symbol Type, Symbol Attributes, Symbol Attributes
+@node Symbol Value
@subsection Value
@cindex value of a symbol
bytes (addresses). The symbol refers to the first address of the
allocated storage.
-_if__(!(_AOUT__||_BOUT__))
-@node Symbol Type, COFF Symbols, Symbol Value, Symbol Attributes
-_fi__(!(_AOUT__||_BOUT__))
-_if__((_AOUT__||_BOUT__))
-@node Symbol Type, a.out Symbols, Symbol Value, Symbol Attributes
-_fi__((_AOUT__||_BOUT__))
+@node Symbol Type
@subsection Type
@cindex type of a symbol
format depends on the object-code output format in use.
_if__(_AOUT__||_BOUT__)
-_if__(_COFF__)
-@node a.out Symbols, COFF Symbols, Symbol Type, Symbol Attributes
-_fi__(_COFF__)
-_if__(!_COFF__)
-@node a.out Symbols, , Symbol Type, Symbol Attributes
-_fi__(!_COFF__)
+@node a.out Symbols
_if__(_BOUT__&&!_GENERIC__)
@subsection Symbol Attributes: @code{a.out}, @code{b.out}
* Symbol Other:: Other
@end menu
-@node Symbol Desc, Symbol Other, a.out Symbols, a.out Symbols
+@node Symbol Desc
@subsubsection Descriptor
@cindex descriptor, of @code{a.out} symbol
(@pxref{Desc,,@code{.desc}}). A descriptor value means nothing to
@code{_AS__}.
-@node Symbol Other, , Symbol Desc, a.out Symbols
+@node Symbol Other
@subsubsection Other
@cindex other attribute, of @code{a.out} symbol
_fi__(_AOUT__||_BOUT__)
_if__(_COFF__)
-_if__(!(_AOUT__||_BOUT__))
-@node COFF Symbols, , Symbol Type, Symbol Attributes
-_fi__(!(_AOUT__||_BOUT__))
-_if__(_AOUT__||_BOUT__)
-@node COFF Symbols, , a.out Symbols, Symbol Attributes
-_fi__(_AOUT__||_BOUT__)
+@node COFF Symbols
@subsection Symbol Attributes for COFF
@cindex COFF symbol attributes
information for COFF.
_fi__(_COFF__)
-@node Expressions, Pseudo Ops, Symbols, Top
+@node Expressions
@chapter Expressions
@cindex expressions
* Integer Exprs:: Integer Expressions
@end menu
-@node Empty Exprs, Integer Exprs, Expressions, Expressions
+@node Empty Exprs
@section Empty Expressions
@cindex empty expressions
expression and @code{_AS__} will assume a value of (absolute) 0. This
is compatible with other assemblers.
-@node Integer Exprs, , Empty Exprs, Expressions
+@node Integer Exprs
@section Integer Expressions
@cindex integer expressions
* Infix Ops:: Infix Operators
@end menu
-@node Arguments, Operators, Integer Exprs, Integer Exprs
+@node Arguments
@subsection Arguments
@cindex expression arguments
expression, followed by a right parenthesis @samp{)}; or a prefix
operator followed by an argument.
-@node Operators, Prefix Ops, Arguments, Integer Exprs
+@node Operators
@subsection Operators
@cindex operators, in expressions
between their arguments. Operators may be preceded and/or followed by
whitespace.
-@node Prefix Ops, Infix Ops, Operators, Integer Exprs
+@node Prefix Ops
@subsection Prefix Operator
@cindex prefix operators
\global\advance\leftskip by -\itemindent
@end tex
-@node Infix Ops, , Prefix Ops, Integer Exprs
+@node Infix Ops
@subsection Infix Operators
@cindex infix operators
Similarly, you can't subtract quantities from two different sections.
-@node Pseudo Ops, _MACH_DEP__, Expressions, Top
+@node Pseudo Ops
@chapter Assembler Directives
@cindex directives, machine independent
* Ln:: @code{.ln @var{line-number}}
* List:: @code{.list}
* Long:: @code{.long @var{expressions}}
+_if__(0)
* Lsym:: @code{.lsym @var{symbol}, @var{expression}}
+_fi__(0)
* Nolist:: @code{.nolist}
* Octa:: @code{.octa @var{bignums}}
* Org:: @code{.org @var{new-lc} , @var{fill}}
* Deprecated:: Deprecated Directives
@end menu
-_if__(_COFF__)
-@node Abort, coff-ABORT, Pseudo Ops, Pseudo Ops
-_fi__(_COFF__)
-_if__((!_COFF__) && _BOUT__)
-@node Abort, bout-ABORT, Pseudo Ops, Pseudo Ops
-_fi__((!_COFF__) && _BOUT__)
-_if__(! (_BOUT__ || _COFF__) )
-@node Abort, Align, Pseudo Ops, Pseudo Ops
-_fi__(! (_BOUT__ || _COFF__) )
+@node Abort
@section @code{.abort}
@cindex @code{abort} directive
quit also. One day @code{.abort} will not be supported.
_if__(_COFF__)
-@node coff-ABORT, Align, Abort, Pseudo Ops
+@node coff-ABORT
@section @code{.ABORT}
@cindex @code{ABORT} directive
_if__(_BOUT__)
_if__(!_COFF__)
-@node bout-ABORT, Align, Abort, Pseudo Ops
+@node bout-ABORT
@section @code{.ABORT}
@cindex @code{ABORT} directive
but ignores it.
_fi__(_BOUT__)
-_if__( ! (_COFF__ || _BOUT__) )
-@node Align, App-File, Abort, Pseudo Ops
-_fi__( ! (_COFF__ || _BOUT__) )
-_if__( _COFF__)
-@node Align, App-File, coff-ABORT, Pseudo Ops
-_fi__( _COFF__)
-_if__( _BOUT__ && (! _COFF__))
-@node Align, App-File, bout-ABORT, Pseudo Ops
-_fi__( _BOUT__ && (! _COFF__))
+@node Align
@section @code{.align @var{abs-expr} , @var{abs-expr}}
@cindex padding the location counter
the padding bytes. It (and the comma) may be omitted. If it is
omitted, the padding bytes are zero.
-@node App-File, Ascii, Align, Pseudo Ops
+@node App-File
@section @code{.app-file @var{string}}
@cindex logical file name
future: it is only recognized to be compatible with old @code{_AS__}
programs.@refill
-@node Ascii, Asciz, App-File, Pseudo Ops
+@node Ascii
@section @code{.ascii "@var{string}"}@dots{}
@cindex @code{ascii} directive
separated by commas. It assembles each string (with no automatic
trailing zero byte) into consecutive addresses.
-@node Asciz, Byte, Ascii, Pseudo Ops
+@node Asciz
@section @code{.asciz "@var{string}"}@dots{}
@cindex @code{asciz} directive
@code{.asciz} is just like @code{.ascii}, but each string is followed by
a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''.
-@node Byte, Comm, Asciz, Pseudo Ops
+@node Byte
@section @code{.byte @var{expressions}}
@cindex @code{byte} directive
@code{.byte} expects zero or more expressions, separated by commas.
Each expression is assembled into the next byte.
-@node Comm, Data, Byte, Pseudo Ops
+@node Comm
@section @code{.comm @var{symbol} , @var{length} }
@cindex @code{comm} directive
long as the longest @code{.comm} request in any of the partial programs
linked. @var{length} is an absolute expression.
-_if__(_COFF__ || _BOUT__)
-@node Data, Def, Comm, Pseudo Ops
-_fi__(_COFF__ || _BOUT__)
-_if__(!(_COFF__ || _BOUT__) && _AOUT__)
-@node Data, Desc, Comm, Pseudo Ops
-_fi__(!(_COFF__ || _BOUT__) && _AOUT__)
-_if__(! (_COFF__ || _BOUT__ || _AOUT__) )
-@c Well, this *might* happen...
-@node Data, Double, Comm, Pseudo Ops
-_fi__(! (_COFF__ || _BOUT__ || _AOUT__) )
+@node Data
@section @code{.data @var{subsection}}
@cindex @code{data} directive
to zero.
_if__(_COFF__ || _BOUT__)
-_if__(_AOUT__ || _BOUT__)
-@node Def, Desc, Data, Pseudo Ops
-_fi__(_AOUT__ || _BOUT__)
-_if__(!(_AOUT__ || _BOUT__))
-@node Def, Dim, Data, Pseudo Ops
-_fi__(!(_AOUT__ || _BOUT__))
+@node Def
@section @code{.def @var{name}}
@cindex @code{def} directive
_fi__(_COFF__ || _BOUT__)
_if__(_AOUT__||_BOUT__)
-_if__(_COFF__||_BOUT__)
-@node Desc, Dim, Def, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Desc, Double, Data, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Desc
@section @code{.desc @var{symbol}, @var{abs-expression}}
@cindex @code{desc} directive
_fi__(_AOUT__||_BOUT__)
_if__(_COFF__ || _BOUT__)
-_if__(_AOUT__ || _BOUT__)
-@node Dim, Double, Desc, Pseudo Ops
-_fi__(_AOUT__ || _BOUT__)
-_if__(!(_AOUT__ || _BOUT__))
-@node Dim, Double, Def, Pseudo Ops
-_fi__(!(_AOUT__ || _BOUT__))
+@node Dim
@section @code{.dim}
@cindex @code{dim} directive
_fi__(_BOUT__)
_fi__(_COFF__ || _BOUT__)
-_if__(_COFF__||_BOUT__)
-@node Double, Eject, Dim, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Double, Eject, Desc, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Double
@section @code{.double @var{flonums}}
@cindex @code{double} directive
in @sc{ieee} format.
_fi__((!_GENERIC__) && _IEEEFLOAT__)
-@node Eject, Else, Double, Pseudo Ops
+@node Eject
@section @code{.eject}
@cindex @code{eject} directive
@cindex listing control: new page
Force a page break at this point, when generating assembly listings.
-_if__(_COFF__||_BOUT__)
-@node Else, Endef, Eject, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Else, Endif, Eject, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Else
@section @code{.else}
@cindex @code{else} directive
_fi__(0)
_if__(_COFF__||_BOUT__)
-@node Endef, Endif, Else, Pseudo Ops
+@node Endef
@section @code{.endef}
@cindex @code{endef} directive
_fi__(_BOUT__)
_fi__(_COFF__||_BOUT__)
-_if__(_COFF__||_BOUT__)
-@node Endif, Equ, Endef, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Endif, Equ, Else, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Endif
@section @code{.endif}
@cindex @code{endif} directive
it marks the end of a block of code that is only assembled
conditionally. @xref{If,,@code{.if}}.
-@node Equ, Extern, Endif, Pseudo Ops
+@node Equ
@section @code{.equ @var{symbol}, @var{expression}}
@cindex @code{equ} directive
This directive sets the value of @var{symbol} to @var{expression}.
It is synonymous with @samp{.set}; @pxref{Set,,@code{.set}}.
-_if__(_GENERIC__||!_A29K__)
-@node Extern, File, Equ, Pseudo Ops
-_fi__(_GENERIC__||!_A29K__)
-_if__(_A29K__&&!_GENERIC__)
-@node Extern, Fill, Equ, Pseudo Ops
-_fi__(_A29K__&&!_GENERIC__)
+@node Extern
@section @code{.extern}
@cindex @code{extern} directive
all undefined symbols as external.
_if__(_GENERIC__||!_A29K__)
-@node File, Fill, Extern, Pseudo Ops
+@node File
@section @code{.file @var{string}}
@cindex @code{file} directive
_fi__(_A29K__)
_fi__(_GENERIC__||!_A29K__)
-_if__(_GENERIC__||!_A29K__)
-@node Fill, Float, File, Pseudo Ops
-_fi__(_GENERIC__||!_A29K__)
-_if__(_A29K__&&!_GENERIC__)
-@node Fill, Float, Extern, Pseudo Ops
-_fi__(_A29K__&&!_GENERIC__)
+@node Fill
@section @code{.fill @var{repeat} , @var{size} , @var{value}}
@cindex @code{fill} directive
assumed zero. If the first comma and following tokens are absent,
@var{size} is assumed to be 1.
-@node Float, Global, Fill, Pseudo Ops
+@node Float
@section @code{.float @var{flonums}}
@cindex floating point numbers (single)
in @sc{ieee} format.
_fi__((!_GENERIC__) && _IEEEFLOAT__)
-@node Global, hword, Float, Pseudo Ops
+@node Global
@section @code{.global @var{symbol}}, @code{.globl @var{symbol}}
@cindex @code{global} directive
Both spellings (@samp{.globl} and @samp{.global}) are accepted, for
compatibility with other assemblers.
-_if__(_AOUT__||_BOUT__||_COFF__)
-@node hword, Ident, Global, Pseudo Ops
-_fi__(_AOUT__||_BOUT__||_COFF__)
-_if__(!(_AOUT__||_BOUT__||_COFF__))
-@node hword, If, Global, Pseudo Ops
-_fi__(!(_AOUT__||_BOUT__||_COFF__))
+@node hword
@section @code{.hword @var{expressions}}
@cindex @code{hword} directive
_fi__(_W16__ && !_GENERIC__ )
_if__(_AOUT__||_BOUT__||_COFF__)
-@node Ident, If, hword, Pseudo Ops
+@node Ident
@section @code{.ident}
@cindex @code{ident} directive
for it.
_fi__(_AOUT__||_BOUT__||_COFF__)
-_if__(_AOUT__||_BOUT__||_COFF__)
-@node If, Include, Ident, Pseudo Ops
-_fi__(_AOUT__||_BOUT__||_COFF__)
-_if__(!(_AOUT__||_BOUT__||_COFF__))
-@node If, Include, hword, Pseudo Ops
-_fi__(!(_AOUT__||_BOUT__||_COFF__))
+@node If
@section @code{.if @var{absolute expression}}
@cindex conditional assembly
_fi__(0)
@end table
-@node Include, Int, If, Pseudo Ops
+@node Include
@section @code{.include "@var{file}"}
@cindex @code{include} directive
(@pxref{Invoking,,Command-Line Options}). Quotation marks are required
around @var{file}.
-@node Int, Lcomm, Include, Pseudo Ops
+@node Int
@section @code{.int @var{expressions}}
@cindex @code{int} directive
time, be the value of that expression. The byte order of the
expression depends on what kind of computer will run the program.
-@node Lcomm, Lflags, Int, Pseudo Ops
+@node Lcomm
@section @code{.lcomm @var{symbol} , @var{length}}
@cindex @code{lcomm} directive
is not declared global (@pxref{Global,,@code{.global}}), so is normally
not visible to @code{_LD__}.
-_if__(_GENERIC__||(!_A29K__))
-@node Lflags, Line, Lcomm, Pseudo Ops
-_fi__(_GENERIC__||(!_A29K__))
-_if__((!_GENERIC__)&& _A29K__)
-@node Lflags, Ln, Lcomm, Pseudo Ops
-_fi__((!_GENERIC__)&& _A29K__)
+@node Lflags
@section @code{.lflags}
@cindex @code{lflags} directive (ignored)
assemblers, but ignores it.
_if__(_GENERIC__ || !_A29K__)
-@node Line, Ln, Lflags, Pseudo Ops
+@node Line
@section @code{.line @var{line-number}}
@cindex @code{line} directive
_fi__(_GENERIC__ || (!_A29K__))
-_if__(_A29K__ && (!_GENERIC__))
-@node Ln, List, Lflags, Pseudo Ops
+_if__(_A29K__ && (!_GENERIC__) && !_COFF__)
+@node Ln
@section @code{.ln @var{line-number}}
@cindex @code{ln} directive
-_fi__(_A29K__ && (!_GENERIC__))
+_fi__(_A29K__ && (!_GENERIC__) && !_COFF__)
@cindex logical line number
_if__(_AOUT__||_BOUT__)
Tell @code{_AS__} to change the logical line number. @var{line-number} must be
@code{.line} or @code{.ln}.
_fi__(_GENERIC__ && _A29K__)
_fi__(_AOUT__||_BOUT__)
-_if__(_COFF__)
+_if__(_COFF__ && !_A29K__)
Even though this is a directive associated with the @code{a.out} or
@code{b.out} object-code formats, @code{_AS__} will still recognize it
Inside a @code{.def}, @samp{.line} is, instead, one of the directives
used by compilers to generate auxiliary symbol information for
debugging.
-_fi__(_COFF__)
+_fi__(_COFF__ && !_A29K__)
_if__(_AOUT__&&(_GENERIC__||!_A29K__))
-@node Ln, List, Line, Pseudo Ops
+@node Ln
@section @code{.ln @var{line-number}}
@cindex @code{ln} directive
@samp{.ln} is a synonym for @samp{.line}.
_fi__(_AOUT__&&(_GENERIC__||!_A29K__))
_if__(_COFF__&&!_AOUT__)
-@node Ln, List, Line, Pseudo Ops
+@node Ln
@section @code{.ln @var{line-number}}
@cindex @code{ln} directive
_fi__(_BOUT__)
_fi__(_COFF__&&!_AOUT__)
-@node List, Long, Ln, Pseudo Ops
+@node List
@section @code{.list}
@cindex @code{list} directive
@samp{-a} command line option; @pxref{Invoking,,Command-Line Options}),
the initial value of the listing counter is one.
-@node Long, Lsym, List, Pseudo Ops
+@node Long
@section @code{.long @var{expressions}}
@cindex @code{long} directive
@code{.long} is the same as @samp{.int}, @pxref{Int,,@code{.int}}.
-@node Lsym, Nolist, Long, Pseudo Ops
+@ignore
+@c no one seems to know what this is for or whether this description is
+@c what it really ought to do
+@node Lsym
@section @code{.lsym @var{symbol}, @var{expression}}
@cindex @code{lsym} directive
@end smallexample
@noindent
The new symbol is not flagged as external.
+@end ignore
-@node Nolist, Octa, Lsym, Pseudo Ops
+@node Nolist
@section @code{.nolist}
@cindex @code{nolist} directive
counter, and @code{.nolist} decrements it. Assembly listings are
generated whenever the counter is greater than zero.
-@node Octa, Org, Nolist, Pseudo Ops
+@node Octa
@section @code{.octa @var{bignums}}
@c FIXME: double size emitted for "octa" on i960, others? Or warn?
The term ``octa'' comes from contexts in which a ``word'' is two bytes;
hence @emph{octa}-word for 16 bytes.
-@node Org, Psize, Octa, Pseudo Ops
+@node Org
@section @code{.org @var{new-lc} , @var{fill}}
@cindex @code{org} directive
absolute expression. If the comma and @var{fill} are omitted,
@var{fill} defaults to zero.
-@node Psize, Quad, Org, Pseudo Ops
+@node Psize
@section @code{.psize @var{lines} , @var{columns}}
@cindex @code{psize} directive
If you specify @var{lines} as @code{0}, no formfeeds are generated save
those explicitly specified with @code{.eject}.
-@node Quad, Sbttl, Psize, Pseudo Ops
+@node Quad
@section @code{.quad @var{bignums}}
@cindex @code{quad} directive
@cindex integer, 16-byte
_fi__(_I960__&&(!_GENERIC__))
-_if__(_COFF__||_BOUT__)
-@node Sbttl, Scl, Quad, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Sbttl, Set, Quad, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Sbttl
@section @code{.sbttl "@var{subheading}"}
@cindex @code{sbttl} directive
it appears within ten lines of the top of a page.
_if__(_COFF__||_BOUT__)
-_if__(!_COFF__)
-@node Scl, Set, Sbttl, Pseudo Ops
-_fi__(!_COFF__)
-_if__(_COFF__)
-@node Scl, Section, Sbttl, Pseudo Ops
-_fi__(_COFF__)
+@node Scl
@section @code{.scl @var{class}}
@cindex @code{scl} directive
_fi__(_COFF__||_BOUT__)
_if__(_COFF__)
-@node Section, Set, Scl, Pseudo Ops
+@node Section
@section @code{.section @var{name}, @var{subsection}}
@cindex @code{section} directive
@var{subsection}, @code{_AS__} uses subsection number zero.
@samp{.section .text} is equivalent to the @code{.text} directive;
@samp{.section .data} is equivalent to the @code{.data} directive.
-
-@node Set, Short, Section, Pseudo Ops
_fi__(_COFF__)
-_if__(_BOUT__&&!_COFF__)
-@node Set, Short, Scl, Pseudo Ops
-_fi__(_BOUT__&&!_COFF__)
-_if__(!(_COFF__||_BOUT__))
-@node Set, Short, Quad, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+
+@node Set
@section @code{.set @var{symbol}, @var{expression}}
@cindex @code{set} directive
If you @code{.set} a global symbol, the value stored in the object
file is the last value stored into it.
-@node Short, Single, Set, Pseudo Ops
+@node Short
@section @code{.short @var{expressions}}
@cindex @code{short} directive
This expects zero or more @var{expressions}, and emits
a 16 bit number for each.
_fi__((!_GENERIC__) && _W32__)
-_if__(_COFF__||_BOUT__)
-@node Single, Size, Short, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Single, Space, Short, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+
+@node Single
@section @code{.single @var{flonums}}
@cindex @code{single} directive
_fi__((!_GENERIC__) && _IEEEFLOAT__)
_if__(_COFF__||_BOUT__)
-@node Size, Space, Single, Pseudo Ops
+@node Size
@section @code{.size}
@cindex @code{size} directive
_fi__(_BOUT__)
_fi__(_COFF__||_BOUT__)
-_if__(_H8__&&!_GENERIC__)
-@node Space, Tag, Size, Pseudo Ops
-_fi__(_H8__&&!_GENERIC__)
-_if__(_GENERIC__||!_H8__)
-_if__(_COFF__||_BOUT__)
-@node Space, Stab, Size, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Space, Stab, Single, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
-_fi__(_GENERIC__||!_H8__)
+@node Space
_if__(_GENERIC__ || !_A29K__)
@section @code{.space @var{size} , @var{fill}}
_if__(_GENERIC__||!_H8__)
_if__(_AOUT__||_BOUT__||_COFF__)
-_if__(_COFF__||_BOUT__)
-@node Stab, Tag, Space, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Stab, Text, Space, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Stab
@section @code{.stabd, .stabn, .stabs}
@cindex symbolic debuggers, information for
_fi__(_GENERIC__||!_H8__)
_if__(_COFF__||_BOUT__)
-_if__(_GENERIC__||!_H8__)
-@node Tag, Text, Stab, Pseudo Ops
-_fi__(_GENERIC__||!_H8__)
-_if__(_H8__&&!_GENERIC__)
-@node Tag, Text, Space, Pseudo Ops
-_fi__(_H8__&&!_GENERIC__)
+@node Tag
@section @code{.tag @var{structname}}
@cindex COFF structure debugging
_fi__(_BOUT__)
_fi__(_COFF__||_BOUT__)
-_if__(_COFF__||_BOUT__)
-@node Text, Title, Tag, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Text, Title, Stab, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Text
@section @code{.text @var{subsection}}
@cindex @code{text} directive
expression. If @var{subsection} is omitted, subsection number zero
is used.
-_if__(_COFF__||_BOUT__)
-@node Title, Type, Text, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Title, Word, Text, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Title
@section @code{.title "@var{heading}"}
@cindex @code{title} directive
it appears within ten lines of the top of a page.
_if__(_COFF__||_BOUT__)
-@node Type, Val, Title, Pseudo Ops
+@node Type
@section @code{.type @var{int}}
@cindex COFF symbol type
_fi__(_COFF__||_BOUT__)
_if__(_COFF__||_BOUT__)
-@node Val, Word, Type, Pseudo Ops
+@node Val
@section @code{.val @var{addr}}
@cindex @code{val} directive
_fi__(_BOUT__)
_fi__(_COFF__||_BOUT__)
-_if__(_COFF__||_BOUT__)
-@node Word, Deprecated, Val, Pseudo Ops
-_fi__(_COFF__||_BOUT__)
-_if__(!(_COFF__||_BOUT__))
-@node Word, Deprecated, Text, Pseudo Ops
-_fi__(!(_COFF__||_BOUT__))
+@node Word
@section @code{.word @var{expressions}}
@cindex @code{word} directive
_fi__(_INTERNALS__)
_fi__(_GENERIC__ || _DIFFTABKLUG__)
-@node Deprecated, , Word, Pseudo Ops
+@node Deprecated
@section Deprecated Directives
@cindex deprecated directives
@item .line
@end table
-@node _MACH_DEP__, Copying, Pseudo Ops, Top
+@node _MACH_DEP__
_if__(_GENERIC__)
@chapter Machine Dependent Features
* AMD29K-Dependent:: AMD 29K Dependent Features
_fi__(_A29K__)
_if__(_H8__)
-* H8/300-Dependent:: AMD 29K Dependent Features
+* H8/300-Dependent:: Hitachi H8/300 Dependent Features
_fi__(_H8__)
_if__(_I960__)
* i960-Dependent:: Intel 80960 Dependent Features
_if__(_SPARC__)
* Sparc-Dependent:: SPARC Dependent Features
_fi__(_SPARC__)
+_if__(_Z8000__)
+* Z8000-Dependent:: Z8000 Dependent Features
+_fi__(_Z8000__)
_if__(_I80386__)
* i386-Dependent:: 80386 Dependent Features
_fi__(_I80386__)
_fi__(_GENERIC__)
_if__(_VAX__)
_if__(_GENERIC__)
-@node Vax-Dependent, AMD29K-Dependent, Machine Dependent, Machine Dependent
+@node Vax-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) VAX Dependent Features
* VAX-no:: Not Supported on VAX
@end menu
-@node Vax-Opts, VAX-float, Vax-Dependent, Vax-Dependent
+@node Vax-Opts
_CHAPSEC__(1+_GENERIC__) VAX Command-Line Options
@cindex command-line options ignored, VAX
symbol so that the object file will be compatible with Vax-11
"C".
-@node VAX-float, VAX-directives, Vax-Opts, Vax-Dependent
+@node VAX-float
_CHAPSEC__(1+_GENERIC__) VAX Floating Point
@cindex VAX floating point
The @code{.float} directive produces @code{f} format numbers.
The @code{.double} directive produces @code{d} format numbers.
-@node VAX-directives, VAX-opcodes, VAX-float, Vax-Dependent
+@node VAX-directives
_CHAPSEC__(1+_GENERIC__) Vax Machine Directives
@cindex machine directives, VAX
@end table
-@node VAX-opcodes, VAX-branch, VAX-directives, Vax-Dependent
+@node VAX-opcodes
_CHAPSEC__(1+_GENERIC__) VAX Opcodes
@cindex VAX opcode mnemonics
@code{.word} statements. This is compatible with all unix
assemblers we know of.
-@node VAX-branch, VAX-operands, VAX-opcodes, Vax-Dependent
+@node VAX-branch
_CHAPSEC__(1+_GENERIC__) VAX Branch Improvement
@cindex VAX branch improvement
@end table
@end table
-@node VAX-operands, VAX-no, VAX-branch, Vax-Dependent
+@node VAX-operands
_CHAPSEC__(1+_GENERIC__) VAX Operands
@cindex VAX operand notation
@c a syntax clash because () is used as an address mode
@c and to encapsulate sub-expressions.
-@node VAX-no, , VAX-operands, Vax-Dependent
+@node VAX-no
_CHAPSEC__(1+_GENERIC__) Not Supported on VAX
@cindex VAX bitfields not supported
_fi__(_VAX__)
_if__(_A29K__)
_if__(_GENERIC__)
-@node AMD29K-Dependent, H8/300-Dependent, Vax-Dependent, Machine Dependent
+@node AMD29K-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) AMD 29K Dependent Features
* AMD29K Opcodes:: Opcodes
@end menu
-@node AMD29K Options, AMD29K Syntax, AMD29K-Dependent, AMD29K-Dependent
+@node AMD29K Options
_CHAPSEC__(1+_GENERIC__) Options
@cindex AMD 29K options (none)
@cindex options for AMD29K (none)
@code{_AS__} has no additional command-line options for the AMD
29K family.
-@node AMD29K Syntax, AMD29K Floating Point, AMD29K Options, AMD29K-Dependent
+@node AMD29K Syntax
_CHAPSEC__(1+_GENERIC__) Syntax
@menu
* AMD29K-Chars:: Special Characters
* AMD29K-Regs:: Register Names
@end menu
-@node AMD29K-Chars, AMD29K-Regs, AMD29K Syntax, AMD29K Syntax
+@node AMD29K-Chars
_CHAPSEC__(2+_GENERIC__) Special Characters
@cindex line comment character, AMD 29K
The character @samp{?} is permitted in identifiers (but may not begin
an identifier).
-@node AMD29K-Regs, , AMD29K-Chars, AMD29K Syntax
+@node AMD29K-Regs
_CHAPSEC__(2+_GENERIC__) Register Names
@cindex AMD 29K register names
q cr exop
@end smallexample
-@node AMD29K Floating Point, AMD29K Directives, AMD29K Syntax, AMD29K-Dependent
+@node AMD29K Floating Point
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex floating point, AMD 29K (@sc{ieee})
@cindex AMD 29K floating point (@sc{ieee})
The AMD 29K family uses @sc{ieee} floating-point numbers.
-@node AMD29K Directives, AMD29K Opcodes, AMD29K Floating Point, AMD29K-Dependent
+@node AMD29K Directives
_CHAPSEC__(1+_GENERIC__) AMD 29K Machine Directives
@cindex machine directives, AMD 29K
This directive is ignored; it is accepted for compatibility with other
AMD 29K assemblers.
+@ignore
+@c since we're ignoring .lsym...
@item .reg @var{symbol}, @var{expression}
@cindex @code{reg} directive, AMD 29K
@code{.reg} has the same effect as @code{.lsym}; @pxref{Lsym,,@code{.lsym}}.
+@end ignore
@item .sect
@cindex @code{sect} directive, AMD 29K
@samp{.data 200}.
@end table
-@node AMD29K Opcodes, , AMD29K Directives, AMD29K-Dependent
+@node AMD29K Opcodes
_CHAPSEC__(1+_GENERIC__) Opcodes
@cindex AMD 29K opcodes
_fi__(_A29K__)
_if__(_H8__)
_if__(_GENERIC__)
-@node H8/300-Dependent, i960-Dependent, AMD29K-Dependent, Machine Dependent
+@node H8/300-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) H8/300 Dependent Features
* H8/300 Opcodes:: Opcodes
@end menu
-@node H8/300 Options, H8/300 Syntax, H8/300-Dependent, H8/300-Dependent
+@node H8/300 Options
_CHAPSEC__(1+_GENERIC__) Options
@cindex H8/300 options (none)
@code{_AS__} has no additional command-line options for the Hitachi
H8/300 family.
-@node H8/300 Syntax, H8/300 Floating Point, H8/300 Options, H8/300-Dependent
+@node H8/300 Syntax
_CHAPSEC__(1+_GENERIC__) Syntax
@menu
* H8/300-Chars:: Special Characters
* H8/300-Addressing:: Addressing Modes
@end menu
-@node H8/300-Chars, H8/300-Regs, H8/300 Syntax, H8/300 Syntax
+@node H8/300-Chars
_CHAPSEC__(2+_GENERIC__) Special Characters
@cindex line comment character, H8/300
@samp{$} can be used instead of a newline to separate statements.
Therefore @emph{you may not use @samp{$} in symbol names} on the H8/300.
-@node H8/300-Regs, H8/300-Addressing, H8/300-Chars, H8/300 Syntax
+@node H8/300-Regs
_CHAPSEC__(2+_GENERIC__) Register Names
@cindex H8/300 registers
register). @code{r7} is used as the stack pointer, and can also be
called @code{sp}.
-@node H8/300-Addressing, , H8/300-Regs, H8/300 Syntax
+@node H8/300-Addressing
_CHAPSEC__(2+_GENERIC__) Addressing Modes
@cindex addressing modes, H8/300
wish; but @code{_AS__} neither requires this nor uses it.
@end table
-@node H8/300 Floating Point, H8/300 Directives, H8/300 Syntax, H8/300-Dependent
+@node H8/300 Floating Point
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex floating point, H8/300 (@sc{ieee})
@cindex H8/300 floating point (@sc{ieee})
The H8/300 family uses @sc{ieee} floating-point numbers.
-@node H8/300 Directives, H8/300 Opcodes, H8/300 Floating Point, H8/300-Dependent
+@node H8/300 Directives
_CHAPSEC__(1+_GENERIC__) H8/300 Machine Directives
@cindex H8/300 machine directives (none)
However, on this platform the @samp{.int} and @samp{.word} directives
generate 16-bit numbers.
-@node H8/300 Opcodes, , H8/300 Directives, H8/300-Dependent
+@node H8/300 Opcodes
_CHAPSEC__(1+_GENERIC__) Opcodes
@cindex H8/300 opcode summary
_fi__(_H8__)
_if__(_I960__)
_if__(_GENERIC__)
-@node i960-Dependent, M68K-Dependent, H8/300-Dependent, Machine Dependent
+@node i960-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) Intel 80960 Dependent Features
@c FIXME! Add Syntax sec with discussion of bitfields here, at least so
@c long as they're not turned on for other machines than 960.
-@node Options-i960, Floating Point-i960, i960-Dependent, i960-Dependent
+
+@node Options-i960
_CHAPSEC__(1+_GENERIC__) i960 Command-line Options
displacement size), regardless of whether you use @samp{-norelax}.
@end table
-@node Floating Point-i960, Directives-i960, Options-i960, i960-Dependent
+@node Floating Point-i960
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex floating point, i960 (@sc{ieee})
@code{_AS__} generates @sc{ieee} floating-point numbers for the directives
@samp{.float}, @samp{.double}, @samp{.extended}, and @samp{.single}.
-@node Directives-i960, Opcodes for i960, Floating Point-i960, i960-Dependent
+@node Directives-i960
_CHAPSEC__(1+_GENERIC__) i960 Machine Directives
@cindex machine directives, i960
(inclusive).
@end table
-@node Opcodes for i960, , Directives-i960, i960-Dependent
+@node Opcodes for i960
_CHAPSEC__(1+_GENERIC__) i960 Opcodes
@cindex opcodes, i960
* Compare-and-branch-i960:: Compare-and-Branch
@end menu
-@node callj-i960, Compare-and-branch-i960, Opcodes for i960, Opcodes for i960
+@node callj-i960
_CHAPSEC__(2+_GENERIC__) @code{callj}
@cindex @code{callj}, i960 pseudo-opcode
@code{callj}; if not, it will simply emit the @code{callj}, leaving it
for the linker to resolve.
-@node Compare-and-branch-i960, , callj-i960, Opcodes for i960
+@node Compare-and-branch-i960
_CHAPSEC__(2+_GENERIC__) Compare-and-Branch
@cindex i960 compare/branch instructions
_if__(_M680X0__)
_if__(_GENERIC__)
-@c FIXME! node conds are only sufficient for m68k alone, all, and vintage
-_if__(_I960__)
-@node M68K-Dependent, Sparc-Dependent, i960-Dependent, Machine Dependent
-_fi__(_I960__)
-_if__(!_I960__)
-@node M68K-Dependent, Sparc-Dependent, Machine Dependent, Machine Dependent
-_fi__(!_I960__)
+@node M68K-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) M680x0 Dependent Features
* M68K-opcodes:: Opcodes
@end menu
-@node M68K-Opts, M68K-Syntax, M68K-Dependent, M68K-Dependent
+@node M68K-Opts
_CHAPSEC__(1+_GENERIC__) M680x0 Options
@cindex options, M680x0
@samp{-m68020}, and @samp{-mc68020} to tell it what processor is the
target.
-@node M68K-Syntax, M68K-Float, M68K-Opts, M68K-Dependent
+@node M68K-Syntax
_CHAPSEC__(1+_GENERIC__) Syntax
@cindex M680x0 syntax
@end ignore
@end table
-@node M68K-Float, M68K-Directives, M68K-Syntax, M68K-Dependent
+@node M68K-Float
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex floating point, M680x0
directive to create extended precision numbers would not be
hard, but it has not yet seemed necessary.
-@node M68K-Directives, M68K-opcodes, M68K-Float, M68K-Dependent
+@node M68K-Directives
_CHAPSEC__(1+_GENERIC__) 680x0 Machine Directives
@cindex M680x0 directives
This directive is identical to a @code{.space} directive.
@end table
-@node M68K-opcodes, , M68K-Directives, M68K-Dependent
+@node M68K-opcodes
_CHAPSEC__(1+_GENERIC__) Opcodes
@cindex M680x0 opcodes
* M68K-Chars:: Special Characters
@end menu
-@node M68K-Branch, M68K-Chars, M68K-opcodes, M68K-opcodes
+@node M68K-Branch
_CHAPSEC__(2+_GENERIC__) Branch Improvement
@cindex pseudo-opcodes, M680x0
For the cases of non-PC relative displacements and long displacements on
the 68000 or 68010, @code{_AS__} will issue a longer code fragment in terms of
-@var{NX}, the opposite condition to @var{XX}:
+@var{NX}, the opposite condition to @var{XX}. For example, for the
+non-PC relative case:
@smallexample
j@var{XX} foo
@end smallexample
@end table
-@node M68K-Chars, , M68K-Branch, M68K-opcodes
+@node M68K-Chars
_CHAPSEC__(2+_GENERIC__) Special Characters
@cindex special characters, M680x0
_fi__(0)
_if__(_SPARC__)
_if__(_GENERIC__)
-_if__(_I80386__&&_M680X0__)
-@node Sparc-Dependent, i386-Dependent, M68K-Dependent, Machine Dependent
-_fi__(_I80386__&&_M680X0__)
-_if__(_I80386__&&_I960__&&!_M680X0__)
-@node Sparc-Dependent, i386-Dependent, i960-Dependent, Machine Dependent
-_fi__(_I80386__&&_I960__&&!_M680X0__)
-_if__(_I80386__&&_A29K__&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, i386-Dependent, AMD29K-Dependent, Machine Dependent
-_fi__(_I80386__&&_A29K__&&(!_I960__)&&!_M680X0__)
-_if__(_I80386__&&_VAX__&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, i386-Dependent, Vax-Dependent, Machine Dependent
-_fi__(_I80386__&&_VAX__&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-_if__(_I80386__&&(!_VAX__)&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, i386-Dependent, Machine Dependent, Machine Dependent
-_fi__(_I80386__&&(!_VAX__)&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-_if__((!_I80386__)&&_M680X0__)
-@node Sparc-Dependent, , M68K-Dependent, Machine Dependent
-_fi__((!_I80386__)&&_M680X0__)
-_if__((!_I80386__)&&_I960__&&!_M680X0__)
-@node Sparc-Dependent, , i960-Dependent, Machine Dependent
-_fi__((!_I80386__)&&_I960__&&!_M680X0__)
-_if__((!_I80386__)&&_A29K__&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, , AMD29K-Dependent, Machine Dependent
-_fi__((!_I80386__)&&_A29K__&&(!_I960__)&&!_M680X0__)
-_if__((!_I80386__)&&_VAX__&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, , Vax-Dependent, Machine Dependent
-_fi__((!_I80386__)&&_VAX__&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-_if__((!_I80386__)&&(!_VAX__)&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
-@node Sparc-Dependent, , Machine Dependent, Machine Dependent
-_fi__((!_I80386__)&&(!_VAX__)&&(!_A29K__)&&(!_I960__)&&!_M680X0__)
+@node Sparc-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) SPARC Dependent Features
* Sparc-Directives:: Sparc Machine Directives
@end menu
-@node Sparc-Opts, Sparc-Float, Sparc-Dependent, Sparc-Dependent
+@node Sparc-Opts
_CHAPSEC__(1+_GENERIC__) Options
@cindex options for SPARC (none)
will have to write this section.
@end ignore
-@node Sparc-Float, Sparc-Directives, Sparc-Opts, Sparc-Dependent
+@node Sparc-Float
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex floating point, SPARC (@sc{ieee})
@cindex SPARC floating point (@sc{ieee})
The Sparc uses @sc{ieee} floating-point numbers.
-@node Sparc-Directives, , Sparc-Float, Sparc-Dependent
+@node Sparc-Directives
_CHAPSEC__(1+_GENERIC__) Sparc Machine Directives
@cindex SPARC machine directives
_fi__(_SPARC__)
_if__(_I80386__)
_if__(_GENERIC__)
-@c FIXME! Conditionalize for all combinations in this section
-@node i386-Dependent, , Sparc-Dependent, Machine Dependent
+@node i386-Dependent
_fi__(_GENERIC__)
_CHAPSEC__(0+_GENERIC__) 80386 Dependent Features
* i386-Notes:: Notes
@end menu
-@node i386-Options, i386-Syntax, i386-Dependent, i386-Dependent
+@node i386-Options
_CHAPSEC__(1+_GENERIC__) Options
@cindex options for i386 (none)
@cindex i386 options (none)
The 80386 has no machine dependent options.
-@node i386-Syntax, i386-Opcodes, i386-Options, i386-Dependent
+@node i386-Syntax
_CHAPSEC__(1+_GENERIC__) AT&T Syntax versus Intel Syntax
@cindex i386 syntax compatibility
programs. Unix style systems expect all programs to be single sections.
@end itemize
-@node i386-Opcodes, i386-Regs, i386-Syntax, i386-Dependent
+@node i386-Opcodes
_CHAPSEC__(1+_GENERIC__) Opcode Naming
@cindex i386 opcode naming
AT&T syntax, but are @samp{call far} and @samp{jump far} in Intel
convention.
-@node i386-Regs, i386-prefixes, i386-Opcodes, i386-Dependent
+@node i386-Regs
_CHAPSEC__(1+_GENERIC__) Register Naming
@cindex i386 registers
@samp{%st(4)}, @samp{%st(5)}, @samp{%st(6)}, and @samp{%st(7)}.
@end itemize
-@node i386-prefixes, i386-Memory, i386-Regs, i386-Dependent
+@node i386-prefixes
_CHAPSEC__(1+_GENERIC__) Opcode Prefixes
@cindex i386 opcode prefixes
to string instructions to make them repeat @samp{%ecx} times.
@end itemize
-@node i386-Memory, i386-jumps, i386-prefixes, i386-Dependent
+@node i386-Memory
_CHAPSEC__(1+_GENERIC__) Memory References
@cindex i386 memory references
word, or long) with an opcode suffix (@samp{b}, @samp{w}, or @samp{l},
respectively).
-@node i386-jumps, i386-Float, i386-Memory, i386-Dependent
+@node i386-jumps
_CHAPSEC__(1+_GENERIC__) Handling of Jump Instructions
@cindex jump optimization, i386
cx_nonzero:
@end smallexample
-@node i386-Float, i386-Notes, i386-jumps, i386-Dependent
+@node i386-Float
_CHAPSEC__(1+_GENERIC__) Floating Point
@cindex i386 floating point
instructions are made equivalent to @samp{f@dots{}} instructions. If
@samp{fwait} is desired it must be explicitly coded.
-@node i386-Notes, , i386-Float, i386-Dependent
+@node i386-Notes
_CHAPSEC__(1+_GENERIC__) Notes
@cindex i386 @code{mul}, @code{imul} instructions
$69, %eax, %eax}.
_fi__(_I80386__)
+_if__(_Z8000__)
+_if__(_GENERIC__)
+@node Z8000-Dependent
+_fi__(_GENERIC__)
+_CHAPSEC__(0+_GENERIC__) Z8000 Dependent Features
+
+@cindex Z8000 support
+@menu
+* Z8000 Options:: Options
+* Z8000 Syntax:: Syntax
+* Z8000 Directives:: Z8000 Machine Directives
+* Z8000 Opcodes:: Opcodes
+@end menu
+
+@node Z8000 Options
+_CHAPSEC__(1+_GENERIC__) Options
+
+@cindex Z8000 options
+@cindex options, Z8000
+@code{_AS__} has no additional command-line options for the Zilog
+Z8000 family.
+
+@node Z8000 Syntax
+_CHAPSEC__(1+_GENERIC__) Syntax
+@menu
+* Z8000-Chars:: Special Characters
+* Z8000-Regs:: Register Names
+* Z8000-Addressing:: Addressing Modes
+@end menu
+
+@node Z8000-Chars
+_CHAPSEC__(2+_GENERIC__) Special Characters
+
+@cindex line comment character, Z8000
+@cindex Z8000 line comment character
+@samp{!} is the line comment character.
+
+@cindex line separator, Z8000
+@cindex statement separator, Z8000
+@cindex Z8000 line separator
+@samp{;} can be used instead of a newline to separate statements.
+
+@node Z8000
+_CHAPSEC__(2+_GENERIC__) Register Names
+
+@cindex Z8000 registers
+@cindex registers, Z8000
+The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can refer to different
+sized groups of registers with the prefix @samp{r} for 16 bit registers, @samp{rr}
+for 32 bit registers and @samp{rq} for 64 bit registers. The first eight of the sixteen
+16 bit registers may also be accessed by bytes. They are named @samp{r@var{n}h} and @samp{r@var{n}l}}.
+@example
+byte registers
+ r0l r0h r1h r1l r2h r2l r3h r3l r4h r4l r5h r5l r6h r6l r7h r7l
+
+word registers
+ r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
+
+long word registers
+ rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14
+
+quad word registers
+ rq0 rq4 rq8 rq12
+@end example
+@node Z8000-Addressing
+_CHAPSEC__(2+_GENERIC__) Addressing Modes
+@cindex addressing modes, Z8000
+@cindex Z800 addressing modes
+_AS__ understands the following addressing modes for the Z8000:
+@table @code
+@item r@var{n}
+Register direct
+
+@item @@r@var{n}
+Indirect register
+
+@item var{address}
+Direct: the 16/24 bit address of the operand is in the instruction.
+
+@item address(r@var{n})
+Indexed: the 16/24 bit address is added to the 16 bit register to produce
+the final address in memory of the operand.
+
+@item r@var{n}(#@var{imm})
+Base Address: the 16/24 bit register is added to the 16 bit sign extended immediate displacement to produce the final address in memory of the operand.
+
+@item r@var{n}(r@var{m})
+Base Index: the 16/24 bit register r@var{n} is added to the sign extended
+16 bit index register r@var{m} to produce the final address in memory of the operand.
+
+@item #@var{xx}
+Immediate data @var{xx}.
+@end table
+@node Z8000 Opcodes
+_CHAPSEC__(1+_GENERIC__) Opcodes
+
+@cindex Z8000 opcode summary
+@cindex opcode summary, Z8000
+@cindex mnemonics, Z8000
+@cindex instruction summary, Z8000
+For detailed information on the Z8000 machine instruction set, see
+@cite{Z8000 Technical Manual}.
+
+@cindex Z8000 pseudo ops
+
+The Z8000 port of gas provides a superficial resemblance to YASM, and
+provides these YASM compatible pseudo ops:
+@table @code
+@item segm
+@cindex segm
+Generates code for the segmented Z8001.
+@item unsegm
+Generates code for the unsegmented Z8002.
+@item name
+Synonym for @code{.file}
+@item global
+Synonum for @code{.global}
+@item wval
+Synonym for .word
+@item lval
+Synonym for .long
+@item bval
+Synonym for .byte
+@item sval
+Assemble a string.
+@code {sval} expects one string literal, delimited by single quotes. It assembles each byte of the string into consecutive addresses. Single quote
+and other non-representable characters may be descrbed by escaping them
+with a percent sign and their ascii value as a two digit hex number.
+
+@example
+char *a = "he said \"it's 50% off\"";
+
+0000 68652073 sval 'he said %22it%27s 50%25 off%22%00'
+ 61696420
+ 22697427
+ 73203530
+ 25206F66
+ 662200
+
+@end example
+@item rsect
+synonym for @code{.section}
+@item block
+synonym for @code{.space}
+@item even
+synonym for @code{.align 1}
+@end table
+
+The following table summarizes the opcodes and their arguments:
+@c kluge due to lack of group outside example
+@page
+@group
+@smallexample
+
+ rs @r{16 bit source register}
+ rd @r{16 bit destination register}
+ rbs @r{8 bit source register}
+ rbd @r{8 bit destination register}
+ rrs @r{32 bit source register}
+ rrd @r{32 bit destination register}
+ rqs @r{64 bit source register}
+ rqd @r{64 bit destination register}
+ addr @r{16/24 bit address}
+ imm @r{immediate data}
+
+adc rd,rs clrb addr cpsir @@rd,@@rs,rr,cc
+adcb rbd,rbs clrb addr(rd) cpsirb @@rd,@@rs,rr,cc
+add rd,@@rs clrb rbd dab rbd
+add rd,addr com @@rd dbjnz rbd,disp7
+add rd,addr(rs) com addr dec @@rd,imm4m1
+add rd,imm16 com addr(rd) dec addr(rd),imm4m1
+add rd,rs com rd dec addr,imm4m1
+addb rbd,@@rs comb @@rd dec rd,imm4m1
+addb rbd,addr comb addr decb @@rd,imm4m1
+addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1
+addb rbd,imm8 comb rbd decb addr,imm4m1
+addb rbd,rbs comflg flags decb rbd,imm4m1
+addl rrd,@@rs cp @@rd,imm16 di i2
+addl rrd,addr cp addr(rd),imm16 div rrd,@@rs
+addl rrd,addr(rs) cp addr,imm16 div rrd,addr
+addl rrd,imm32 cp rd,@@rs div rrd,addr(rs)
+addl rrd,rrs cp rd,addr div rrd,imm16
+and rd,@@rs cp rd,addr(rs) div rrd,rs
+and rd,addr cp rd,imm16 divl rqd,@@rs
+and rd,addr(rs) cp rd,rs divl rqd,addr
+and rd,imm16 cpb @@rd,imm8 divl rqd,addr(rs)
+and rd,rs cpb addr(rd),imm8 divl rqd,imm32
+andb rbd,@@rs cpb addr,imm8 divl rqd,rrs
+andb rbd,addr cpb rbd,@@rs djnz rd,disp7
+andb rbd,addr(rs) cpb rbd,addr ei i2
+andb rbd,imm8 cpb rbd,addr(rs) ex rd,@@rs
+andb rbd,rbs cpb rbd,imm8 ex rd,addr
+bit @@rd,imm4 cpb rbd,rbs ex rd,addr(rs)
+bit addr(rd),imm4 cpd rd,@@rs,rr,cc ex rd,rs
+bit addr,imm4 cpdb rbd,@@rs,rr,cc exb rbd,@@rs
+bit rd,imm4 cpdr rd,@@rs,rr,cc exb rbd,addr
+bit rd,rs cpdrb rbd,@@rs,rr,cc exb rbd,addr(rs)
+bitb @@rd,imm4 cpi rd,@@rs,rr,cc exb rbd,rbs
+bitb addr(rd),imm4 cpib rbd,@@rs,rr,cc ext0e imm8
+bitb addr,imm4 cpir rd,@@rs,rr,cc ext0f imm8
+bitb rbd,imm4 cpirb rbd,@@rs,rr,cc ext8e imm8
+bitb rbd,rs cpl rrd,@@rs ext8f imm8
+bpt cpl rrd,addr exts rrd
+call @@rd cpl rrd,addr(rs) extsb rd
+call addr cpl rrd,imm32 extsl rqd
+call addr(rd) cpl rrd,rrs halt
+calr disp12 cpsd @@rd,@@rs,rr,cc in rd,@@rs
+clr @@rd cpsdb @@rd,@@rs,rr,cc in rd,imm16
+clr addr cpsdr @@rd,@@rs,rr,cc inb rbd,@@rs
+clr addr(rd) cpsdrb @@rd,@@rs,rr,cc inb rbd,imm16
+clr rd cpsi @@rd,@@rs,rr,cc inc @@rd,imm4m1
+clrb @@rd cpsib @@rd,@@rs,rr,cc inc addr(rd),imm4m1
+@end group
+@group
+inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs)
+inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16
+incb @@rd,imm4m1 ldb rd(rx),rbs mult rrd,rs
+incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@@rs
+incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr
+incb rbd,imm4m1 ldd @@rs,@@rd,rr multl rqd,addr(rs)
+ind @@rd,@@rs,ra lddb @@rs,@@rd,rr multl rqd,imm32
+indb @@rd,@@rs,rba lddr @@rs,@@rd,rr multl rqd,rrs
+inib @@rd,@@rs,ra lddrb @@rs,@@rd,rr neg @@rd
+inibr @@rd,@@rs,ra ldi @@rd,@@rs,rr neg addr
+iret ldib @@rd,@@rs,rr neg addr(rd)
+jp cc,@@rd ldir @@rd,@@rs,rr neg rd
+jp cc,addr ldirb @@rd,@@rs,rr negb @@rd
+jp cc,addr(rd) ldk rd,imm4 negb addr
+jr cc,disp8 ldl @@rd,rrs negb addr(rd)
+ld @@rd,imm16 ldl addr(rd),rrs negb rbd
+ld @@rd,rs ldl addr,rrs nop
+ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@@rs
+ld addr(rd),rs ldl rd(rx),rrs or rd,addr
+ld addr,imm16 ldl rrd,@@rs or rd,addr(rs)
+ld addr,rs ldl rrd,addr or rd,imm16
+ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs
+ld rd(rx),rs ldl rrd,imm32 orb rbd,@@rs
+ld rd,@@rs ldl rrd,rrs orb rbd,addr
+ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs)
+ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8
+ld rd,imm16 ldm @@rd,rs,n orb rbd,rbs
+ld rd,rs ldm addr(rd),rs,n out @@rd,rs
+ld rd,rs(imm16) ldm addr,rs,n out imm16,rs
+ld rd,rs(rx) ldm rd,@@rs,n outb @@rd,rbs
+lda rd,addr ldm rd,addr(rs),n outb imm16,rbs
+lda rd,addr(rs) ldm rd,addr,n outd @@rd,@@rs,ra
+lda rd,rs(imm16) ldps @@rs outdb @@rd,@@rs,rba
+lda rd,rs(rx) ldps addr outib @@rd,@@rs,ra
+ldar rd,disp16 ldps addr(rs) outibr @@rd,@@rs,ra
+ldb @@rd,imm8 ldr disp16,rs pop @@rd,@@rs
+ldb @@rd,rbs ldr rd,disp16 pop addr(rd),@@rs
+ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@@rs
+ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@@rs
+ldb addr,imm8 ldrl disp16,rrs popl @@rd,@@rs
+ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@@rs
+ldb rbd,@@rs mbit popl addr,@@rs
+ldb rbd,addr mreq rd popl rrd,@@rs
+ldb rbd,addr(rs) mres push @@rd,@@rs
+ldb rbd,imm8 mset push @@rd,addr
+ldb rbd,rbs mult rrd,@@rs push @@rd,addr(rs)
+ldb rbd,rs(imm16) mult rrd,addr push @@rd,imm16
+@end group
+@group
+push @@rd,rs set addr,imm4 subl rrd,imm32
+pushl @@rd,@@rs set rd,imm4 subl rrd,rrs
+pushl @@rd,addr set rd,rs tcc cc,rd
+pushl @@rd,addr(rs) setb @@rd,imm4 tccb cc,rbd
+pushl @@rd,rrs setb addr(rd),imm4 test @@rd
+res @@rd,imm4 setb addr,imm4 test addr
+res addr(rd),imm4 setb rbd,imm4 test addr(rd)
+res addr,imm4 setb rbd,rs test rd
+res rd,imm4 setflg imm4 testb @@rd
+res rd,rs sinb rbd,imm16 testb addr
+resb @@rd,imm4 sinb rd,imm16 testb addr(rd)
+resb addr(rd),imm4 sind @@rd,@@rs,ra testb rbd
+resb addr,imm4 sindb @@rd,@@rs,rba testl @@rd
+resb rbd,imm4 sinib @@rd,@@rs,ra testl addr
+resb rbd,rs sinibr @@rd,@@rs,ra testl addr(rd)
+resflg imm4 sla rd,imm8 testl rrd
+ret cc slab rbd,imm8 trdb @@rd,@@rs,rba
+rl rd,imm1or2 slal rrd,imm8 trdrb @@rd,@@rs,rba
+rlb rbd,imm1or2 sll rd,imm8 trib @@rd,@@rs,rbr
+rlc rd,imm1or2 sllb rbd,imm8 trirb @@rd,@@rs,rbr
+rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @@ra,@@rb,rbr
+rldb rbb,rba sout imm16,rs trtib @@ra,@@rb,rr
+rr rd,imm1or2 soutb imm16,rbs trtirb @@ra,@@rb,rbr
+rrb rbd,imm1or2 soutd @@rd,@@rs,ra trtrb @@ra,@@rb,rbr
+rrc rd,imm1or2 soutdb @@rd,@@rs,rba tset @@rd
+rrcb rbd,imm1or2 soutib @@rd,@@rs,ra tset addr
+rrdb rbb,rba soutibr @@rd,@@rs,ra tset addr(rd)
+rsvd36 sra rd,imm8 tset rd
+rsvd38 srab rbd,imm8 tsetb @@rd
+rsvd78 sral rrd,imm8 tsetb addr
+rsvd7e srl rd,imm8 tsetb addr(rd)
+rsvd9d srlb rbd,imm8 tsetb rbd
+rsvd9f srll rrd,imm8 xor rd,@@rs
+rsvdb9 sub rd,@@rs xor rd,addr
+rsvdbf sub rd,addr xor rd,addr(rs)
+sbc rd,rs sub rd,addr(rs) xor rd,imm16
+sbcb rbd,rbs sub rd,imm16 xor rd,rs
+sc imm8 sub rd,rs xorb rbd,@@rs
+sda rd,rs subb rbd,@@rs xorb rbd,addr
+sdab rbd,rs subb rbd,addr xorb rbd,addr(rs)
+sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8
+sdl rd,rs subb rbd,imm8 xorb rbd,rbs
+sdlb rbd,rs subb rbd,rbs xorb rbd,rbs
+sdll rrd,rs subl rrd,@@rs
+set @@rd,imm4 subl rrd,addr
+set addr(rd),imm4 subl rrd,addr(rs)
+@end group
+@end smallexample
+
+_fi__(_Z8000__)
_if__(0)
@c pesch@cygnus.com: we ignore the following chapters, since internals are
@c changing rapidly. These may need to be moved to another
@c book anyhow, if we adopt the model of user/modifier
@c books.
-@node Maintenance, Retargeting, _MACH_DEP__, Top
+@node Maintenance
@chapter Maintaining the Assembler
[[this chapter is still being built]]
Structure for doing section fixups.
@end table
-@comment ~subsection Test Directory
-@comment (Note: The test directory seems to have disappeared somewhere
-@comment along the line. If you want it, you'll probably have to find a
-@comment REALLY OLD dump tape~dots{})
-@comment
-@comment The ~file{test/} directory is used for regression testing.
-@comment After you modify ~@code{_AS__}, you can get a quick go/nogo
-@comment confidence test by running the new ~@code{_AS__} over the source
-@comment files in this directory. You use a shell script ~file{test/do}.
-@comment
-@comment The tests in this suite are evolving. They are not comprehensive.
-@comment They have, however, caught hundreds of bugs early in the debugging
-@comment cycle of ~@code{_AS__}. Most test statements in this suite were naturally
-@comment selected: they were used to demonstrate actual ~@code{_AS__} bugs rather
-@comment than being written ~i{a prioi}.
-@comment
-@comment Another testing suggestion: over 30 bugs have been found simply by
-@comment running examples from this manual through ~@code{_AS__}.
-@comment Some examples in this manual are selected
-@comment to distinguish boundary conditions; they are good for testing ~@code{_AS__}.
-@comment
-@comment ~subsubsection Regression Testing
-@comment Each regression test involves assembling a file and comparing the
-@comment actual output of ~@code{_AS__} to ``known good'' output files. Both
-@comment the object file and the error/warning message file (stderr) are
-@comment inspected. Optionally the ~@code{_AS__} exit status may be checked.
-@comment Discrepencies are reported. Each discrepency means either that
-@comment you broke some part of ~@code{_AS__} or that the ``known good'' files
-@comment are now out of date and should be changed to reflect the new
-@comment definition of ``good''.
-@comment
-@comment Each regression test lives in its own directory, in a tree
-@comment rooted in the directory ~file{test/}. Each such directory
-@comment has a name ending in ~file{.ret}, where `ret' stands for
-@comment REgression Test. The ~file{.ret} ending allows ~code{find
-@comment (1)} to find all regression tests in the tree, without
-@comment needing to list them explicitly.
-@comment
-@comment Any ~file{.ret} directory must contain a file called
-@comment ~file{input} which is the source file to assemble. During
-@comment testing an object file ~file{output} is created, as well as
-@comment a file ~file{stdouterr} which contains the output to both
-@comment stderr and stderr. If there is a file ~file{output.good} in
-@comment the directory, and if ~file{output} contains exactly the
-@comment same data as ~file{output.good}, the file ~file{output} is
-@comment deleted. Likewise ~file{stdouterr} is removed if it exactly
-@comment matches a file ~file{stdouterr.good}. If file
-@comment ~file{status.good} is present, containing a decimal number
-@comment before a newline, the exit status of ~@code{_AS__} is compared
-@comment to this number. If the status numbers are not equal, a file
-@comment ~file{status} is written to the directory, containing the
-@comment actual status as a decimal number followed by newline.
-@comment
-@comment Should any of the ~file{*.good} files fail to match their corresponding
-@comment actual files, this is noted by a 1-line message on the screen during
-@comment the regression test, and you can use ~@code{find (1)} to find any
-@comment files named ~file{status}, ~file {output} or ~file{stdouterr}.
-@comment
-@node Retargeting, Copying, Maintenance, Top
+@c ~subsection Test Directory
+@c (Note: The test directory seems to have disappeared somewhere
+@c along the line. If you want it, you'll probably have to find a
+@c REALLY OLD dump tape~dots{})
+@c
+@c The ~file{test/} directory is used for regression testing.
+@c After you modify ~@code{_AS__}, you can get a quick go/nogo
+@c confidence test by running the new ~@code{_AS__} over the source
+@c files in this directory. You use a shell script ~file{test/do}.
+@c
+@c The tests in this suite are evolving. They are not comprehensive.
+@c They have, however, caught hundreds of bugs early in the debugging
+@c cycle of ~@code{_AS__}. Most test statements in this suite were naturally
+@c selected: they were used to demonstrate actual ~@code{_AS__} bugs rather
+@c than being written ~i{a prioi}.
+@c
+@c Another testing suggestion: over 30 bugs have been found simply by
+@c running examples from this manual through ~@code{_AS__}.
+@c Some examples in this manual are selected
+@c to distinguish boundary conditions; they are good for testing ~@code{_AS__}.
+@c
+@c ~subsubsection Regression Testing
+@c Each regression test involves assembling a file and comparing the
+@c actual output of ~@code{_AS__} to ``known good'' output files. Both
+@c the object file and the error/warning message file (stderr) are
+@c inspected. Optionally the ~@code{_AS__} exit status may be checked.
+@c Discrepencies are reported. Each discrepency means either that
+@c you broke some part of ~@code{_AS__} or that the ``known good'' files
+@c are now out of date and should be changed to reflect the new
+@c definition of ``good''.
+@c
+@c Each regression test lives in its own directory, in a tree
+@c rooted in the directory ~file{test/}. Each such directory
+@c has a name ending in ~file{.ret}, where `ret' stands for
+@c REgression Test. The ~file{.ret} ending allows ~code{find
+@c (1)} to find all regression tests in the tree, without
+@c needing to list them explicitly.
+@c
+@c Any ~file{.ret} directory must contain a file called
+@c ~file{input} which is the source file to assemble. During
+@c testing an object file ~file{output} is created, as well as
+@c a file ~file{stdouterr} which contains the output to both
+@c stderr and stderr. If there is a file ~file{output.good} in
+@c the directory, and if ~file{output} contains exactly the
+@c same data as ~file{output.good}, the file ~file{output} is
+@c deleted. Likewise ~file{stdouterr} is removed if it exactly
+@c matches a file ~file{stdouterr.good}. If file
+@c ~file{status.good} is present, containing a decimal number
+@c before a newline, the exit status of ~@code{_AS__} is compared
+@c to this number. If the status numbers are not equal, a file
+@c ~file{status} is written to the directory, containing the
+@c actual status as a decimal number followed by newline.
+@c
+@c Should any of the ~file{*.good} files fail to match their corresponding
+@c actual files, this is noted by a 1-line message on the screen during
+@c the regression test, and you can use ~@code{find (1)} to find any
+@c files named ~file{status}, ~file {output} or ~file{stdouterr}.
+@c
+
+@node Retargeting
@chapter Teaching the Assembler about a New Machine
This chapter describes the steps required in order to make the
@end table
_fi__(0)
-@node Copying, Index, _MACH_DEP__, Top
+@node Copying
@unnumbered GNU GENERAL PUBLIC LICENSE
@cindex license
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
-@node Index, , Copying, Top
+@node Index
@unnumbered Index
@printindex cp