As Pkyoshi19 has said, a subroutine which can be called by GOSUB has to be followed by RETURN. RETURN removes a program counter which has been stacked by GOSUB from memory. However GOSUB without RETURN keeps memory stacking and stack overflow will occur soon.