SAM47 INSTRUCTION SETKS57C2308/P2308/C2316/P2316

POP — Pop From Stack

POP

dst

 

 

 

 

 

 

 

 

Operation:

Operand

Operation Summary

Bytes

Cycles

 

 

 

 

 

 

RR

Pop to register pair from stack

1

1

 

 

 

 

 

 

SB

Pop SMB and SRB values from stack

2

2

 

 

 

 

 

Description: The contents of the RAM location addressed by the stack pointer is read, and the SP is incremented by two. The value read is then transferred to the variable indicated by the destination operand.

Operand

 

 

 

Binary Code

 

 

 

Operation Notation

 

 

 

 

 

 

 

 

 

 

 

 

RR

0

0

1

 

0

1

 

r2

r1

0

RRL (SP), RRH (SP+1)

 

 

 

 

 

 

 

 

 

 

 

SP SP+2

 

 

 

 

 

 

 

 

 

 

 

 

SB

1

1

0

 

1

1

 

1

0

1

(SRB) (SP), SMB (SP+1),

 

 

 

 

 

 

 

 

 

 

 

SP SP+2

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

1

 

0

0

 

1

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

Example: The SP value is equal to 0EDH, and RAM locations 0EFH through 0EDH contain the values 2H, 3H, and 4H, respectively. The instruction

POP HL

leaves the stack pointer set to 0EFH and the data pointer pair HL set to 34H.

5-72

Page 146
Image 146
Samsung KS57C2308 manual POP Pop From Stack, Pop Hl