beautypg.com

Maxim Integrated DS4830 Optical Microcontroller User Manual

Page 208

background image

DS4830 User’s Guide

208


Operation:

SP  ++SP


Encoding:

15

0

f000

1101

ssss

ssss


Example(s):

PUSH GR

; GR=0F3Fh

PUSH #40h

Stack Data:

xxxxh

0040h

 SP (after PUSH #40h)

0F3Fh

 SP (after PUSH GR)

xxxxh

 SP (initial)

xxxxh

RET

Return from subroutine


Description:

RET pops a single word from the stack (@SP) into the Instruction Pointer (IP) and decrements
the stack pointer (SP). The decremented SP is saved as the new stack pointer (SP).


Status Flags:

None


Operation:

IP  @ SP--

Encoding:

15

0

1000

1100

0000

1101


Example(s):

RET

Code Execution:

Addr (IP)

Opcode

0311h

0312h

RET

0103h



Stack Data:

xxxxh

xxxxh

0103h

 SP (before RET)

xxxxh

 SP (after RET)

xxxxh