Ldcpi/Ldepi Load Memory With Pre-Increment - Samsung S3F80JB User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

S3F80JB
LDCPI/LDEPI
LDCPI/
LDEPI
dst,src
rr ← rr + 1
Operation:
dst ← src
These instructions are used for block transfers of data from program or data memory from the
register file. The address of the memory location is specified by a working register pair and is first
incremented. The contents of the source location are loaded into the destination location. The
contents of the source are unaffected.
LDCPI refers to program memory and LDEPI refers to external data memory. The assembler
makes 'Irr' an even number for program memory and an odd number for data memory.
Flags:
No flags are affected.
Format:
opc
Examples:
Given: R0 = 7FH, R6 = 21H, and R7 = 0FFH:
LDCPI
LDEPI
— Load Memory with Pre-Increment
src | dst
; (RR6 ← RR6 + 1)
@RR6,R0
; 7FH (contents of R0) is loaded into program memory
; location 2200H (21FFH + 1H)
; R0 = 7FH, R6 = 22H, R7 = 00H
; (RR6 ← RR6 + 1)
@RR6,R0
; 7FH (contents of R0) is loaded into external data memory
; location 2200H (21FFH + 1H)
; R0 = 7FH, R6 = 22H, R7 = 00H
Bytes
Cycles
Opcode
(Hex)
2
14
INSTRUCTION SET
Addr Mode
dst
src
F3
Irr
r
6-57

Advertisement

Table of Contents
loading

Table of Contents