INSTRUCTION SET

S3C84E5/C84E9/P84E9

 

 

SRP/SRP0/SRP1 — Set Register Pointer

SRP

src

 

 

 

 

 

 

 

SRP0

src

 

 

 

 

 

 

 

SRP1

src

 

 

 

 

 

 

 

Operation:

If src (1)

=

1 and src (0)

=

0 then:

RP0 (3–7)

src (3–7)

 

If src (1)

=

0 and src (0)

=

1 then:

RP1 (3–7)

src (3–7)

 

If src (1)

=

0 and src (0)

=

0 then:

RP0 (4–7)

src (4–7),

 

 

 

 

 

 

RP0 (3)

0

 

 

 

 

 

 

RP1 (4–7)

src (4–7),

 

 

 

 

 

 

RP1 (3)

1

The source data bits one and zero (LSB) determine whether to write one or both of the register pointers, RP0 and RP1. Bits 3–7 of the selected register pointer are written unless both register pointers are selected. RP0.3 is then cleared to logic zero and RP1.3 is set to logic one.

Flags: No flags are affected.

Format:

opc

src

 

 

Bytes

Cycles

Opcode

Addr Mode

 

 

(Hex)

src

2

4

31

IM

Examples: The statement SRP #40H sets the register pointer 0 (RP0) at the location 0D6H to 40H and the register pointer 1 (RP1) at the location 0D7H to 48 H.

The statement "SRP0 #50H" would set RP0 to 50H, and the statement "SRP1 #68H" would set RP1 to 68H.

NOTE:Before execute the STOP instruction, You must set the STPCON register as “10100101b”. Otherwise the STOP instruction will not execute.

6-80

Page 207
Image 207
Samsung S3C84E5 user manual SRP/SRP0/SRP1 Set Register Pointer, Srp, Hex Src