Exchanges the 16-bit contents of AF and AF'.
ex
Operands
ex rr,rr' | ex (rr),rr | ex rr,(rr)Loading...
Variants
Every form of ex the assembler accepts. The cycles column counts clock
cycles, written as taken/not taken for the conditional forms.
| Instruction | Description | Flags | Bytes | Cycles |
|---|---|---|---|---|
| ex af,af' | Exchanges the 16-bit contents of AF and AF'. | — | 1 | 4 |
| ex (sp),ix | Exchanges (SP) with IXL, and (SP+1) with IXH. | — | 2 | 23 |
| ex (sp),hl | Exchanges (SP) with L, and (SP+1) with H. | — | 1 | 19 |
| ex de,hl | Exchanges the 16-bit contents of DE and HL. | — | 1 | 4 |
| ex (sp),iy | Exchanges (SP) with IYL, and (SP+1) with IYH. | — | 2 | 23 |