cnarHer
3. Instruction
.set
Example:
Assume
that
register D contains 93H and register E contains SBH. The following instruction loads the
accumulator
with the
contents
of
memory location 938BH:
LDAX D
LHLD
LOAD
HAND
L DIRECT
3·34
LHLD loads the L register with a copy of the byte stored itt the memory location specified
in
bytes two and
three of the LHLD instruction. LHLD then loads the H register with
a copy
of
the byte stored
at
the next
higher memory location.
Opcode
Operand
LHLD
address
The
address may
be
stated
as
a number, a label,
or
an
expression.
Certain instructions usc the symbolic reference M to access the memory location currently specified by the
Hand
L registers.
LH
LD
is
one
of
the instructions provided for loading new addresses into the H dnd L registers. The
user
may also load the
current
top
of
the stack into
t.he
Hand
L regiqers (POP instruction). Both LHLD and
POP
replace the
contents
of
the
Hand
L registers. You can also exchange the content>
of
H ,lnd L with the D
and E registers
(XCHG instruction) or the top
of
the stack (XTHL instruction)
if
you need
to
,ave the
current
Hand
L register'> fur subsequent use. SHLD stores
Hand
L
in
memury.
0
0
0 0
~
luw addr
high
addr
j
Cycles:
5
States:
16
Addres<,i
ng:
direct
Flags: none
Example:
Assume
that
location<, 3000 and 3001 H contain the addre'>, 064EH
,tored
in
the form.!t 4EO('.
In
the following
sequence,
the
MOV
instruction moves J copy
of
the byte stored at address
Oh4E
into the aC(Jmulator:
LHLD
MOV
3000H
A,M
;SET
UP
ADDRESS
;LOAD ACCur\1 FROM ADDRESS