Samsung S3F80P5X User Manual page 180

S3f80p5 microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
LDW
— Load Word
LDW
dst,src
dst ← src
Operation:
The contents of the source (a word) are loaded into the destination. The contents of the source
are unaffected.
Flags:
No flags are affected.
Format:
opc
opc
Examples:
Given: R4 = 06H, R5 = 1CH, R6 = 05H, R7 = 02H, register 00H = 1AH,
register 01H = 02H, register 02H = 03H, and register 03H = 0FH:
LDW
LDW
LDW
LDW
LDW
LDW
In the second example, please note that the statement "LDW 00H,02H" loads the contents of the
source word 02H, 03H into the destination word 00H, 01H. This leaves the value 03H in general
register 00H and the value 0FH in register 01H.
The other examples show how to use the LDW instruction with various addressing modes and
formats.
6-58
src
dst
dst
src
RR6,RR4
R6 = 06H, R7 = 1CH, R4 = 06H, R5 = 1CH
00H,02H
Register 00H = 03H, register 01H = 0FH,
register 02H = 03H, register 03H = 0FH
RR2,@R7
R2 = 03H, R3 = 0FH,
04H,@01H →
Register 04H = 03H, register 05H = 0FH
RR6,#1234H →
R6 = 12H, R7 = 34H
02H,#0FEDH →
Register 02H = 0FH, register 03H = 0EDH
Bytes
Cycles
Opcode
3
8
8
4
8
S3F80P5_UM_ REV1.00
Addr Mode
(Hex)
dst
src
C4
RR
RR
C5
RR
IR
C6
RR
IML

Advertisement

Table of Contents
loading

Table of Contents