I am having problems using the stack pointer on the Z80. Here is basically what I am trying to do.
LD SP, 27FFh
LD HL, ABCD
PUSH HL
HLT
I look at address 27FFh and neither CDh or ABh is there. I also look at address 27FEh and it is not there. The memory logic is working because I can do this:
LD HL, 27FFh
LD (HL), AB
HLT
The value will be there. Any suggestions?
LD SP, 27FFh
LD HL, ABCD
PUSH HL
HLT
I look at address 27FFh and neither CDh or ABh is there. I also look at address 27FEh and it is not there. The memory logic is working because I can do this:
LD HL, 27FFh
LD (HL), AB
HLT
The value will be there. Any suggestions?