SAVE

Save the current values of registers [V3.00.00 or later]

SAVE


[Syntax]

SAVE src

 

[Operation]

register_bank(src) = { R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, USP, FPSW, ACC0, ACC1};

 

[Function]

-

The values of registers of the CPU (R1 to R15, USP, FPSW, ACC0, and ACC1) are saved in the register bank.

-

The bank number of the destination for saving is specified by src.

-

This instruction is privileged. Attempting to execute it in user mode leads to a privileged instruction exception.

-

Regarding whether or not a device has register bank and, if so, its capacity and the actual range of bank numbers (determined by the capacity of the memory provided for register banks) that is available, refer to the hardware manuals for the respective products.

-

When a bank number that does not exist is specified, the operation is not defined.

-

You can assemble assembly-language code that includes this instruction if you have specified the assembler option -isa with selection of the instruction set of the RXv3 or a later version.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

src

SAVE src

#UIMM:8

4

Rs

4

 

[Flag Change]

This instruction does not affect the states of flags.

 

[Description Example]

SAVE #5

SAVE R1