Ldci/Ldei — Load Memory And Increment - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.41 LDCI/LDEI — LOAD MEMORY AND INCREMENT
dst,src
LDCI/LDEI
dst  src
Operation:
rr  rr + 1
These instructions are used for user stacks or block transfers of data from program or data
memory to the register file. The address of memory location is specified by a working register
pair. The contents of source location are loaded into destination location, following which the
memory address is incremented automatically. The contents of source remain unaffected.
LDCI refers to the program memory and LDEI refers to the external data memory. The assembler
makes 'Irr' even for program memory and odd for data memory.
No flags are affected.
Flags:
Format:
opc
Given R6 = 10H, R7 = 33H, R8 = 12H; program memory locations 1033H = 0CDH and 1034H =
Examples:
0C5H; external data memory locations 1033H = 0DDH and 1034H = 0D5H:
LDCI
LDEI
dst | src
R8,@RR6
; 0CDH (contents of program memory location 1033H) is loaded
; into R8 and RR6 is incremented by one (RR6  RR6 + 1)
; R8 = 0CDH, R6 = 10H, R7 = 34H
R8,@RR6
; 0DDH (contents of data memory location 1033H) is loaded
; into R8 and RR6 is incremented by one (RR6  RR6 + 1)
; R8 = 0DDH, R6 = 10H, R7 = 34H
Bytes
Cycles
2
6-54
6 INSTRUCTION SET
Opcode
Addr Mode
(Hex)
dst
10
E3
src
r
Irr

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents