Samsung S3C84E5 LDCPD/LDEPD Load Memory with Pre-Decrement, Ldcpd dst,src Ldepd dst,src

Models: S3C84E5

1 316
Download 316 pages 61.65 Kb
Page 183
Image 183

INSTRUCTION SET

S3C84E5/C84E9/P84E9

 

 

LDCPD/LDEPD — Load Memory with Pre-Decrement

LDCPD dst,src

LDEPD dst,src

Operation: rr rr – 1

dst src

These instructions are used for block transfers of data from program or data memory to the register file. The address of the memory location is specified by a working register pair and is first decremented. The contents of the source location are then loaded into the destination location. The contents of the source are unaffected.

LDCPD refers to program memory and LDEPD refers to external data memory. The assembler makes "Irr" an even number for program memory and an odd number for external data memory.

Flags: No flags are affected.

Format:

opc

src dst

 

 

Bytes

Cycles

Opcode

Addr Mode

 

 

(Hex)

dst

src

2

14

F2

Irr

r

Examples: Given: R0 = 77H, R6 = 30H, and R7 = 00H:

LDCPD

@RR6,R0

;

(RR6 RR6 – 1)

 

 

; 77H (the contents of R0) is loaded into program memory

 

 

;

location 2FFFH (3000H – 1H);

 

 

;

R0 = 77H, R6 = 2FH, R7 = 0FFH

LDEPD

@RR6,R0

;

(RR6 RR6 – 1)

 

 

; 77H (the contents of R0) is loaded into external data

 

 

 

memory

 

 

;

location 2FFFH (3000H – 1H);

NOTE:LDEPD instruction can be used to read/write the data of 64-Kbyte data memory.

6-56

Page 183
Image 183
Samsung S3C84E5 user manual LDCPD/LDEPD Load Memory with Pre-Decrement, Ldcpd dst,src Ldepd dst,src, Operation rr ← rr