10 REM > EscTest
   20 REM Test Escape state hanging on after *FX229
   30 :
   40 PRINT "Program starting (! to end)"
   50 *FX 229
   60 A$=FNs("hello"):REM We shouldn't get Escape here
   70 ON ERROR PRINT:REPORT:PRINT:IF ERR=17:RUN ELSE END
   80 PRINT "Escape should generate Escape here, CR+CR to exit"
   90 key%=0:REPEAT:last%=key%:key%=GET:PRINT FNh0(key%,2);" ";:UNTIL (key%=13 AND last%=13) OR key%=33
  100 IF key%=33:PRINT:END
  110 :
  120 *FX229,1
  130 PRINT'"Escape should not generate Escape here, ESC+ESC to exit"
  140 key%=0:REPEAT:last%=key%:key%=GET:PRINT FNh0(key%,2);" ";:UNTIL (key%=27 AND last%=27) OR key%=33
  150 IF key%=33:PRINT:END
  160 PRINT'"Exit loop, Escape should not be left pending"
  170 RUN
  180 :
  190 DEFFNh0(A%,N%)=RIGHT$("0000000"+STR$~A%,N%)
  200 DEFFNs(A$):IFLEFT$(A$,1)=" ":REPEATA$=MID$(A$,2):UNTILLEFT$(A$,1)<>" "
  210 IFRIGHT$(A$,1)=" ":REPEATA$=LEFT$(A$,LENA$-1):UNTILRIGHT$(A$,1)<>" "
  220 =A$
  230 :
  240 REM Escape Key seems to be setting EscapeState, with interpreter not acting on it
  250 REM instead of Escape Key *not* setting EscapeState at all.