      PROGRAM RMOUSE
C
C     TO READ MOUSE DRIVER
C     OLYMPIC SOFTWARE  --  9/23/88
C
      EXTERNAL MOUSDR,VBIOS
      INTEGER*2 IAR(4),IBR(8)
C
      IAR(1)=0
      CALL MOUSDR(IAR)
      IF(IAR(1).EQ.0)THEN
        WRITE(*,80)
 80     FORMAT(' MOUSE DOES NOT EXIST!')
        GOTO 99
      ELSE
        WRITE(*,81)IAR(2)
 81     FORMAT(' MOUSE WITH ',I2,' BUTTONS INSTALLED',/,
     1         ' PRESS ^C TO END THIS PROGRAM',/)
      ENDIF
C
C***    READ MOUSE DRIVER
      IAR(1)=3
 1    CALL MOUSDR(IAR)
      WRITE(*,20)(IAR(I),I=2,4)
 20   FORMAT(' BUTTON STATUS: [',I2,']   X,Y COORD.: [',I4,',',I4,']')
C
C***    READ CURSOR POSITION
      IBR(1)=3
      IBR(3)=0
      CALL VBIOS(IBR)
C***    TAKE CURSOR BACK UP BY 1 ROW
      IBR(1)=2
      IBR(7)=IBR(7)-1
      CALL VBIOS(IBR)
      GOTO 1
C
 99   STOP
      END



