For the sake of testing, can you try moving the code in the getchar subroutine to the actual place where the GOSUB getchar is? In other words, don't use a GOSUB just place the actual code "in line"...