KS57C2308/P2308/C2316/P2316 SAM47 INSTRUCTION SET
5-63
LD Load
LD (Concluded)
Examples: Instruction Operation Description and Guidelines
LD EA,@HL Load data memory contents pointed to by 8-bit register HL to the A register,
and the contents of HL+1 to the E register. The contents of register L must
be an even number. If the number is odd, the LSB of register L is
recognized as a logic zero (an even number), and it is not replaced with the
true value. For example, “LD HL,#36H” loads immediate 36H to HL and the
next instruction “LD EA,@HL” loads the contents of 36H to register A and
the contents of 37H to register E.
LD EA,DA Load direct data memory contents of DA to the A register, and the next
direct data memory contents of DA + 1 to the E register. The DA value must
be an even number. If it is an odd number, the LSB of DA is recognized as
a logic zero (an even number), and it is not replaced with the true value. For
example, “LD EA,37H” loads the contents of 36H to the A register and the
contents of 37H to the E register.
LD EA,RRb Load 8-bit RRb register (HL, WX, YZ) to the EA register. H, W, and Y
register values are loaded into the E register, and the L, X, and Z values into
the A register.
LD @HL,A Load A register contents to data memory location pointed to by the 8-bit HL
register value.
LD DA,EA Load the A register contents to direct data memory and the E register
contents to the next direct data memory location. The DA value must be an
even number. If it is an odd number, the LSB of the DA value is recognized
as logic zero (an even number), and is not replaced with the true value.
LD RRb,EA Load contents of EA to the 8-bit RRb register (HL, WX, YZ). The E register
is loaded into the H, W, and Y register and the A register into the L, X, and
Z register.
LD @HL,EA Load the A register to data memory location pointed to by the 8-bit HL
register, and the E register contents to the next location, HL + 1. The
contents of the L register must be an even number. If the number is odd, the
LSB of the L register is recognized as logic zero (an even number), and is
not replaced with the true value. For example, “LD HL,#36H” loads
immediate 36H to register HL; the instruction “LD @HL,EA” loads the
contents of A into address 36H and the contents of E into address 37H.