LD SP, (Mmn)
Load Stack Pointer
Operation
SP ← (Mmn)
Description
The 16- or 24-bit operand (Mmn) specifies a location in memory. The 16- or 24-bit value
stored at this memory location is written to the multibyte Stack Pointer register (SP). In
ADL mode, or when the .L suffix is employed, Stack Pointer Long (SPL) is the destina-
tion. In Z80 mode, or when the .S suffix is employed, Stack Pointer Short (SPS) is the des-
tination.
Condition Bits Affected
None.
Attributes
Mnemonic Operand
LD
LD
LD.LIL
LD.SIS
Note:
Zilog recommends against using the .SIL and .LIS suffixes with this instruction. The .SIL
instruction fetches a 24-bit value, Mmn. However, this instruction ignores the upper byte
and uses address {MBASE, mm, nn} instead. The .LIS instruction fetches a 16-bit value,
mn. However, the .LIS instruction does not use the MBASE value. Instead, it uses address
{00, mm, nn}.
UM007714-0908
ADL
Mode Cycle Opcode (hex)
0
5
SP,(mn)
SP,(Mmn) 1
6
SP,(Mmn) 0
7
1
6
SP,(mn)
ED, 7B, nn, mm
ED, 7B, nn, mm, MM
5B, ED, 7B, nn, mm, MM
40, ED, 7B, nn, mm
®
eZ80
CPU
User Manual
237
CPU Instruction Set
Need help?
Do you have a question about the eZ80 and is the answer not in the manual?
Questions and answers