If the zero flag is unset, the top stack entry is popped into PC.
ret
Operands
ret cc | retLoading...
Variants
Every form of ret the assembler accepts. The cycles column counts clock
cycles, written as taken/not taken for the conditional forms.
| Instruction | Description | Flags | Bytes | Cycles |
|---|---|---|---|---|
| ret nz | If the zero flag is unset, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret z | If the zero flag is set, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret | The top stack entry is popped into PC. | — | 1 | 10 |
| ret nc | If the carry flag is unset, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret c | If the carry flag is set, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret po | If the parity/overflow flag is unset, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret pe | If the parity/overflow flag is set, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret p | If the sign flag is unset, the top stack entry is popped into PC. | — | 1 | 11/5 |
| ret m | If the sign flag is set, the top stack entry is popped into PC. | — | 1 | 11/5 |