RosettaCodeData/Task/Stack/Z80-Assembly/stack-5.z80

3 lines
105 B
Z80 Assembly

ld hl,0
add hl,sp ;the z80 doesn't allow you to load SP directly into HL, so this is the quickest way