anchor.diff:  C     MOVE LAST HALF OF A(J)S DOWN ONE SLOT AND ADD A(N) AT BOTTOM TO
   C     GIVE ARRAY FOR A1PRIME AND A2PRIME CALCULATION
   C
  -      do 30 I=1,NTOT,2
  -      J0=NTOT2+2-I
  -      A(J0)=A(J0-2)
  -30    A(J0+1)=A(J0-1)
  +      do I=1,NTOT,2
  +        J0=NTOT2+2-I
  +        A(J0)=A(J0-2)
  +        A(J0+1)=A(J0-1)
  +      end do
         A(NTOT2+3)=A(1)
         A(NTOT2+4)=A(2)
   C
  
positive.code: C    otherwise, periods are specified by user (maximum is 200 periods)
  C -------------------------------------------------------------------
        if (KPER.eq. 0) go to 99
          read(5,'(A32)') FPERIOD
          write(6,60) FPERIOD
     60   format(' File from which periods were read: ' A32)
          open(8,FILE=FPERIOD,STATUS='OLD')
          read (8,4) NLINES, NNM
          do I = 1, NLINES
            read(8,*) headerd
            write(6,*) headerd
          end do
          read(8,*) (T(I), I=1, NNM)
          close(8)
          go to 101
  C ----------------------------------------------------------------------
  C  default periods for calculating response spectra
  C  ---------------------------------------------------------------------
  
negative.code:         CIRE= A(2*I-1) + A(K6)
          CIIM=A(2*I)-A(K6+1)
          CNIRE=(-SI*(A(2*I)+A(K6+1))+CO*(A(2*I-1)-A(K6)))
          if (SI .ne. 0) then
            CNIIM=(A(2*I-1)-A(K6)-CO*CNIRE)/SI
          else
            CNIIM=0.
          end if
          A(2*I-1)=CIRE
          A(2*I)=CIIM
          A(K6)=CNIRE
          A(K6+1)=CNIIM
  