Samsung S3F80JB manual Push Push To Stack, Push src Operation SP ← SP, SPH = 0FFH, SPL = 0FFH

Models: S3F80JB

1 346
Download 346 pages 34.13 Kb
Page 194
Image 194

INSTRUCTION SETS3F80JB

PUSH — Push To Stack

PUSH src

Operation: SP SP – 1

@SP src

A PUSH instruction decrements the stack pointer value and loads the contents of the source (src) into the location addressed by the decremented stack pointer. The operation then adds the new value to the top of the stack.

Flags: No flags are affected.

Format:

opc

src

Bytes

Cycles

Opcode

Addr Mode

 

 

(Hex)

dst

2

8 (internal clock)

70

R

 

8 (external clock)

 

 

 

8 (internal clock)

 

 

 

8 (external clock)

71

IR

Examples: Given: Register 40H = 4FH, register 4FH = 0AAH, SPH = 00H, and SPL = 00H:

PUSH

40H

Register 40H

=

4FH, stack register 0FFH = 4FH,

 

 

 

SPH = 0FFH, SPL = 0FFH

PUSH

@40H

Register 40H

=

4FH, register 4FH = 0AAH, stack register

 

 

 

0FFH = 0AAH, SPH = 0FFH, SPL = 0FFH

In the first example, if the stack pointer contains the value 0000H, and general register 40H the value 4FH, the statement "PUSH 40H" decrements the stack pointer from 0000 to 0FFFFH. It then loads the contents of register 40H into location 0FFFFH and adds this new value to the top of the stack.

6-66

Page 194
Image 194
Samsung S3F80JB manual Push Push To Stack, Push src Operation SP ← SP, SPH = 0FFH, SPL = 0FFH