Changed stack overflow/underflow detection so that it allows the stack location to be changed at runtime