PUSHM

Saving multiple registers

PUSHM

PUSH Multiple registers


[Syntax]

PUSHM src-src2

 

[Operation]

signed char i;

for ( i = register_num(src2); i >= register_num(src); i-- ) {

tmp = register(i);

SP = SP - 4;

*SP = tmp;

}

 

[Function]

-

This instruction saves values to the stack from the block of registers in the range specified by src and src2.

-

The range is specified by first and last register numbers. Note that the condition (first register number < last register number) must be satisfied.

-

R0 cannot be specified.

-

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

-

Registers are saved in the stack from R15 to R1.

 

[Instruction Format]

Syntax

Processng Size

src

src2

Code size

(Byte)

PUSHM src-src2

L

Rs

Rs=R1R14

Rs2

Rs2=R2R15

2

[Flag Change]

-

This instruction does not affect the states of flags.

 

[Description Example]

PUSHM R1-R3

PUSHM R4-R8