Maxim Integrated MAX31782 User Manual
Page 202
MaximIntegrated 20-19
MAX31782 User’s Guide
Revision 0; 8/11
RET
ReturnfromSubroutine
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) .
StatusFlags:
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
RETC/RETNC,RETZ/RETNZ,RETS
ConditionalReturnonStatusFlag
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 .
StatusFlags:
None
RETC
C=1: IP
← @SP--
Operation:
C=0: IP
← IP + 1
Encoding:
15
0
1010
1100
0000
1101
Example(s):
RET C
; C=1, return (RET) is performed