Ex (sp), hl, Operation, Description – Zilog EZ80F916 User Manual
Page 154: Condition bits affected, Attributes
                                    Advertising
                                    
                                        
                                    
                                
                                
eZ80
®
CPU
User Manual
UM007715-0415
CPU Instruction Set
145
EX (SP), HL
Exchange Stack and HL Register
Operation
if ADL = 1 {
(SPL)  HL[7:0]
(SPL+1)  HL[15:8]
(SPL+2)  HL[23:16]
}
else if ADL = 0 {
SPS  HL[7:0]
(SPS+1)  HL[15:8]
}
Description
The CPU exchanges the contents of the multibyte CPU register HL with the contents of
the memory location specified by the Stack Pointer (SP). In ADL mode, or when the .L
suffix is employed, SPL is used for SP. In Z80 mode, or when the .S suffix is employed,
SPS is used for SP.
Condition Bits Affected
None.
Attributes
Mnemonic
Operand
ADL Mode
Cycle
Opcode (hex)
EX
(SP)
,HL
0/1
5/7
E3
EX.S
(SP)
,HL
1
6
52, E3
EX.L
(SP)
,HL
0
8
49, E3
                                    Advertising
                    
                        
                    
                            
                            
                    This manual is related to the following products: