      PROGRAM RDKEY
C
C     TO READ KEYBOARD & DISPLAY CODE
C     OLYMPIC SOFTWARE  --  9/23/88
C
      EXTERNAL KBIOS
      INTEGER*2 IAR(3)
C
      WRITE(*,20)
 20   FORMAT(' PRESS ^BREAK TO END THIS PROGRAM',/,
     1       ' PRESS ANY KEY: ',$)
 100  IAR(1)=1
      CALL KBIOS(IAR)
      IF(IAR(3).EQ.0)THEN
        IAR(1)=0
        CALL KBIOS(IAR)
        WRITE(*,51)IAR(1),IAR(2)
 51     FORMAT(' SCAN CODE= ',I4,'  CHARACTER CODE(ASCII)= ',I4,/,
     1         ' PRESS ANY KEY: ',$)
      ENDIF
      GOTO 100
      STOP
      END

        
      

