      PROGRAM do_loop
      IMPLICIT NONE
      INTEGER x
      INTEGER kbhit
      x = 0
      DO WHILE(kbhit() .EQ. 0)
         x = x + 1
         WRITE(*,*) x
      END DO
      WRITE(*,*) 'loop finished'
      END
