EasyManua.ls Logo

Intel 8080 - B3_Page_21

Intel 8080
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
XRI
Chapter
3.
Instruction
Set
XRA Memory with Accumulator
Opcode
Operand
XRA M
The
contents
of
the memory location specified by the
Hand
L registers
is
exclusive-ORed with the
contents
of
the
accumulator.
The result
is
stored
in
the accumulator. The carry and auxiliary carry flags are reset to zero.
Examples:
[_1
_O
__
O
___
.~
Cycles:
S ta tes:
Ad
dressing:
Flags:
2
7
register indirect
Z,S,P,CY,AC
Since
any bit exclusive-ORed with itself produces zero, XRA
is
frequently used
to
zero the accumulator. The
following instructions zero the accumulator and the
Band
C registers.
XRA A
MOV
B,A
MOV
C,A
Any bit exclusive·ORed with a one bit
is
complemented. Thus,
if
the ,lccumulator contains
all
one~
(OFFH),
the instruction XRA B produce', the one's complement
of
the B register
in
the accumulator
EXCLUSIVE
OR
IMMEDIATE
WITH
ACCUMULATOR
XRI performs an exclusive
OR
operation using the
contenb
of
the second instruction byte
,1Ild
the
contents
of
the accumulator. The result
is
placed
in
the accumulator. XRI also resets the carry dnd auxiliary carry flags to
zero.
Opcode
Operand
XRI data
The operand must specify the data to
be
used
in
the OR operation. This data may
be
in
the form
of
a number,
an
ASCII
constant,
the label
of
some previously defined value, or
an
expression. The data may not exceed one
byte.
The assembler's relocation feature treats
all
external and relocatable
symboh
as
16-bit addresse'>. When
one
of
these symbols
appears
in
the operand expression
of
an
immediate instruction,
it
must
be
preceded
by
either the
HIGH or
LOW
operator
to specify which byte
of
the address
is
to
be
used
in
the evaluation
of
the expression.
When neither
operator
is
present, the assembler assumes the
LOW
operator and issues
an
error message.
3-67

Table of Contents

Related product manuals