EasyManua.ls Logo

Intel 8080 - B2_Page_29

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...
LXI
Chapter 3. Instruction Set
LOAD REGISTER
PAIR
IMMEDIATE
LXI
is
a three-byte instruction; its second and third bytes contain the source data to
be
loaded into a register
pair.
LXI
loads a register pair
by
copying its second and third bytes into the specified destination register pair.
Opcode Operand
LXI
The first operand must specify the register pair
to
be
loaded.
LXI
can load the
Band
C register pair, the D and
E register pair, the
Hand
L register pair, or the Stack Pointer.
The second operand specifies the two bytes of data to
be
loaded. This data may
be
coded
in
the form
of
a num-
ber, an
ASCII constant, the label of some previously defined value, or an expression. The d,fta must not exceed
two bytes.
LXI
is
the only immediate instruction
that
accepts a 16-bit value.
All
other immediate instructions require 8-bit
values.
Notice
that
the assembler inverts the two bytes of data to create the format of an address stored
in
memory.
LXI
loads its third byte into the first register of the pair and its second byte into the second register
of
the
pair. This has the effect
of
reinverting the data into the format required for an address stored
in
registers. Thus,
the instruction
LXI
B,'AZ' loads A into register
Band
Z into register
C.
Examples:
o olR plo 0 0
low-order data
~--------------------------
high
-order data
Cycles:
S
ta
tes:
Addressing:
Flags:
3
10
immediate
none
A common
use
for
LXI
is
to establish a memory address for use
in
subsequent instructions.
In
the following
sequence, the
LXI
instruction loads the address of STRNG into the
Hand
L registers. The
MOY
instruction then
loads the data stored
at
that
address into the accumulator.
LXI
H,STRNG
;SET ADDRESS
MOY
A,M
;LOAD STRNG INTO ACCUMULATOR
The following
LXI
instruction
is
used to initialize the stack pointer
in
a relocatable module. The LOCATE pro-
gram provides
an
address for the special reserved label STACK.
LXI
SP,STACK
3-35

Table of Contents

Related product manuals