you could use GPUTCHR to test for the X character