INSTRUCTION SET

S3C84E5/C84E9/P84E9

 

 

LDW — Load Word

LDWdst,src

Operation: dst src

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

src

dst

 

 

 

Bytes

Cycles

Opcode

Addr Mode

 

 

(Hex)

dst

src

3

8

C4

RR

RR

 

8

C5

RR

IR

opc

dst

src

4

8

C6

RR

IML

Examples: Given: R4 = 06H, R5 = 1CH, R6 = 05H, R7 = 02H, register 00H = 1AH, register 01H = 02H, register 02H = 03H,and register 03H = 0FH

LDW

RR6,RR4

R6 = 06H, R7

= 1CH, R4 = 06H, R5 = 1CH

LDW

00H,02H

Register 00H

=

03H, register 01H

=

0FH,

 

 

 

register 02H

=

03H, register 03H

=

0FH

LDW

RR2,@R7

R2 = 03H, R3

= 0FH,

 

 

LDW

04H,@01H

Register 04H

=

03H, register 05H

=

0FH

LDW

RR6,#1234H

R6 = 12H, R7

= 34H

 

 

LDW

02H,#0FEDH

Register 02H

=

0FH, register 03H

=

0EDH

In the second example, please note that the statement "LDW 00H,02H" loads the contents of the source word 02H and 03H into the destination word 00H and 01H. This leaves the value 03H in the general register 00H and the value 0FH in the register 01H.

Other examples show how to use the LDW instruction with various addressing modes and formats.

6-58

Page 185
Image 185
Samsung S3C84E5 user manual LDW Load Word, LDW RR6,RR4, 0FH, 0EDH