Are data and return addresses both pushed on the same stack space? If yes, couldn't this piece of code cause problems:
CALL r1 //the PC is now the contents of register 1, return address is pushed on the stack. POP r2 //pop the top of the stack and put the data in register 2. RET //return from subroutine
POP instruction would delete the return address of the subroutine so the
RET instruction will return to the wrong location.