EasyManua.ls Logo

Intel 8080 - ORI

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...
Chapter
3.
Instruction
Sct
ORI
3-40
Example:
Since any bit
inclusive·ORed with a one produces a one and any bit ORed with a zero remains unchanged,
ORA
is
frequently used
to
set
ON
particular bits or groups
of
bits. The following example ensures
that
bit 3
of
the
accumulator
is
set ON,
but
the remaining bits are not disturbed. This
is
frequently done when individual bits
are used
as
status flags
in
a program. Assume
that
I·egister D contains the value 08H:
Accumulator
Register D
o 0 0 0 0 1
o 0 0 0
000
000
0
INCLUSIVE OR
IMMEDIATE
ORI performs an inciu,ive
OR
logical operation using the
contents
of
the second byte
of
the instruction and the
contents
of
the accumulator. The
re,ult
is
placed
in
the accumulator. ORI also resets the carry and auxiliary
carry flags to zero.
Opcode Operand
ORI
data
The operand must specify the data to
be
used
in
the inclusive
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 symbols
a,
16·bit addresses. 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 assume the
LOW
operator
and i,sues
(In
error message.
Cycles:
S ta te'):
Addressing:
Flags:
Summary
of
Logical Operations
o
data
o
2
7
immediate
Z,S,P,SY,AC
AND
produce,
a one bit
in
the result only when the corresponding
bib
in
both the test data and the mask data
are ones.
OR
produce,
a one bit
in
the result when the corresponding bits
in
either the test data or the ma,k data arc ones.
Exclusive
OR
produce" a one bit only when the corresponding
bit>
in
the test data and the ma,k data arc
different; i.e., a one bit
in
either the test data or the mask data
...
but not both produces a one bit
in
the
re,ult.

Table of Contents

Related product manuals