SAM47 INSTRUCTION SET KS57C2308/P2308/C2316/P2316
5-68
LDD Load Data Memory and Decrement
LDD dst
Operation: Operand Operation Summary Bytes Cycles
A,@HL Load indirect data memory contents to A; decrement
register L contents and skip on borrow 12 + S
Description: The contents of a data memory location are loaded into the accumulator, and the contents of the
register L are decreased by one. If a "borrow" occurs (e.g., if the resulting value in register L is
0FH), the next instruction is skipped. The contents of data memory and the carry flag value are
not affected.
Operand Binary Code Operation Notation
A,@HL 10001011A (HL), then L L–1;
skip if L = 0FH
Example: In this example, assume that register pair HL contains 20H and internal RAM location 20H
contains the value 0FH:
LD HL,#20H
LDD A,@HL ;A (HL) and L L–1
PS XXX ;Skip
PS YYY ;H 2H and L 0FH
he instruction “JPS XXX” is skipped since a "borrow" occurred after the “LDD A,@HL” and
instruction “JPS YYY” is executed.