       PROGRAM BINSCH
       PARAMETER(LIM=50)
       INTEGER LIST(LIM),N,LOC,ITEM,FIRST,LAST
       LOGICAL FOUND
       OPEN(1,FILE='newlst.dat',STATUS='OLD')
       ITEM = 84
       N = 20
       READ(1,*) (LIST(I),I=1,N)
       FIRST = 1
       LAST = N
       FOUND = .FALSE.
 10    IF ((FIRST .LE. LAST) .AND. .NOT. FOUND) THEN
          MIDDLE = (FIRST + LAST)/2
          IF (ITEM .LT. LIST(MIDDLE)) THEN
             LAST = MIDDLE - 1
          ELSE IF (ITEM .GT. LIST(MIDDLE)) THEN
             FIRST = MIDDLE + 1
          ELSE
             FOUND = .TRUE.
             LOC = MIDDLE
          ENDIF
          GOTO 10
       ENDIF
       WRITE(*,*) 'Item:',ITEM,', Position:',LOC
       STOP
       END

       
