Pops the top of the stack into the program counter. Note that RET can be either conditional or unconditional.
ret ;no conditions ret cond. ;conditional
ret z ; Z flag is set ret nz ; Z flag is reset ret c ; Carry flag is set ret nc ; Carry flag is reset ret m ; S flag is set ret p ; S flag is reset ret pe ; P/V is set ret po ; P/V is reset
Preserves all flags.
RET is used mostly for exiting an assembly program or returning from a routine.
cc is condition: NZ, Z, NC, C, PO, PE, P, M
|condition true||condition false|