SAM47 INSTRUCTION SET

KS57C2308/P2308/C2316/P2316

 

 

LDD — Load Data Memory and Decrement

LDD Operation:

dst

Operand

Operation Summary

Bytes

Cycles

 

 

 

 

A,@HL

Load indirect data memory contents to A; decrement

1

2 + S

 

register L contents and skip on borrow

 

 

 

 

 

 

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

1

0

0

0

1

0

1

1

A (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.

5-68

Page 142
Image 142
Samsung KS57C2308 manual LDD Load Data Memory and Decrement, LDD Operation