stack using memory shift procedure