Maxim Integrated DS4830A Optical Microcontroller User Manual

Page 220

Advertising
background image

DS4830A User’s Guide

220

RET C / RET NC

Conditional Return on Status Flag

RET Z / RET NZ
RET S


Description:

Performs conditional return (RET) based upon the state of a specific processor status flag.
RET C returns if the Carry flag is set while RET NC returns if the Carry flag is clear. RET Z
returns if the Zero flag is set while RET NZ returns if the Zero flag is clear. RET S returns if
the Sign flag is set. See RET for additional information on the return operation.

Status Flags:

None


RET C
Operation:

C=1: IP

 @SP--

C=0: IP

 IP + 1


Encoding:

15

0

1010

1100

0000

1101


Example(s):

RET C

; C=1, return (RET) is performed.


RET NC
Operation:

C=0: IP

 @SP--

C=1: IP

 IP +1


Encoding:

15

0

1110

1100

0000

1101


Example(s):

RET NC

; C=1, return (RET) does not occur


RET Z
Operation:

Z=1: IP

 @SP--

Z=0: IP

 IP + 1


Encoding:

15

0

1001

1100

0000

1101


Example(s):

RET Z

; Z=0, return (RET) does not occur


RET NZ
Operation:

Z=0: IP

 @SP--

Z=1: IP

 IP + 1


Encoding:

15

0

1101

1100

0000

1101


Example(s):

RET NZ

; Z=0, return (RET) is performed



RET S
Operation:

S=1: IP

 @SP--

S=0: IP

 IP + 1


Encoding:

15

0

1100

1100

0000

1101


Example(s):

RET S

; S=0, return (RET) does not occur


Advertising