PUSH

Saving data on the stack

PUSH

PUSH data onto the stack


[Syntax]

PUSH.size src

 

[Operation]

tmp = src;

SP = SP - 4 *;

*SP = tmp;

Note

* SP is always decremented by 4 even when the size specifier (.size) is .B or .W. The higher-order 24 and 16 bits in the respective cases (.B and .W) are undefined.

[Function]

-

This instruction pushes src onto the stack.

-

When src is in register and the size specifier for the PUSH instruction is .B or .W, the byte or word of data from the LSB in the register are saved respectively.

-

The transfer to the stack is processed in longwords. When the size specifier is .B or .W, the higher-order 24 or 16 bits are undefined respectively.

-

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

 

[Instruction Format]

Syntax

size

Processng Size

src

Code size

(Byte)

PUSH.size src

B/W/L

L

Rs

2

B/W/L

L

[Rs]

2

B/W/L

L

dsp:8[Rs]

3

B/W/L

L

dsp:16[Rs]

4

[Flag Change]

-

This instruction does not affect the states of flags.

 

[Description Example]

PUSH.B R1

PUSH.L [R1]