save the pointer to its right subtree on stack s

push (right(p),&s);