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. |
- | 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]
|
|
|
|
|
|
PUSHM src-src2
|
|
Rs
(Rs=R1~R14)
|
Rs2
(Rs2=R2~R15)
|
|
[Flag Change]
- | This instruction does not affect the states of flags. |
[Description Example]
PUSHM R1-R3
PUSHM R4-R8