I am using CPU Sim to change wombat1 to wombat2 by adding stack.

I have done adding a Stack RAM and a Stack pointer SPR.

I have implemented a push instruction as such:

acc->mdr
mdr->Stack[SPR]
End

The implementation is able to push the acc value to Stack but not able to point to the next location to store the next value. For incrementing am I suppose to use Inc2-pc?

And the pop instruction is popping out the address of the value instead of the value. The implementation of pop is:

ir(4-15)->mar
Stack[SPR]->mdr
mdr->acc
End

Can anyone point out what I am doing wrong? Or any suggestions?