      SUBROUTINE RFLIST( I1, I2, I4, I3 )
C
C     I1 IS POINTER TO FIRST ELEMENT ON XREF LIST IN DSA
C     I2 IS COUNT OF HOW MANY REFS ARE RETURNED IN STACK
C     I4 IS 1 IF RFLIST MUST BE CALLED AGAIN; ELSE IS 0
C     I3 IS LAST OF LIST ELEMENTS
C
      INTEGER DSA, PDSA, STACK
      COMMON /CTABL/ LDSA, PDSA, DSA(5000)
      COMMON /CEXPRS/ LSTACK, STACK(620)
      I4 = 0
      I2 = 49
 10   IF ( I2+1.GE.LSTACK ) GOTO 30
      I2 = I2 + 1
      STACK(I2) = DSA(I1)
      IF( I1.EQ.I3 ) GOTO 20
      I1 = DSA(I1+1)
      GOTO 10
   20 RETURN
   30 I4 = 1
      GO TO 20
      END
