depends on the implementation of the stack, only because it must know the structure of the stack records
restore(pn,pi,pa,pf,ps)