POPC

Restoring a control register

POPC

POP Control register


[Syntax]

POPC dest

 

[Operation]

tmp = *SP;

SP = SP + 4;

dest = tmp;

 

[Function]

-

This instruction restores data from the stack and transfers it to the control register specified as dest.

-

The stack pointer in use is specified by the U bit in the PSW.

-

EXTB is also specifiable as dest if you have specified the assembler option -isa with selection of the instruction set of the RXv2 or a later version. [V2.01.00 or later]

-

In user mode, writing to the ISP, INTB, EXTB, BPC, BPSW, and FINTV, and the IPL[3:0], PM, U, and I bits in the PSW is ignored. In supervisor mode, writing to the PM bit in the PSW is ignored.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

dest*

POPC dest

L

Rx

2

Note

* Selectable dest: Registers ISP, USP, INTB, EXTB, PSW, BPC, BPSW, FINTV, and FPSW
Note that the PC cannot be specified as dest

 

[Flag Change]

Flag

C

Z

S

O

Change

*

*

*

*

Note

* The flag changes only when dest is the PSW.

 

[Description Example]

POPC PSW