do-Com1key.f
: do-Com1key ( c1 -- f1 ) \ process keys pressed on user keyboard
dup k_ESC = \ was ESC pressed?
if drop \ if so, discard c1 and shut down
Com1Hndl ComClose \ close the com port
0 to Com1Hndl \ clear handle value
." Done" TRUE \ return TRUE, we are terminating
else Com1emit FALSE \ else emit char and continue
then ;