      subroutine swap32(a, n)
c
c     reverse order of bytes in integer*4 word, or real*4
c
      integer*4 a(n)
c
      character*1 jtemp(4)
      character*1 ktemp
c
      equivalence (jtemp(1), itemp)
c
      do 10 i = 1, n
        itemp    = a(i)
        ktemp    = jtemp(4)
        jtemp(4) = jtemp(1)
        jtemp(1) = ktemp
        ktemp    = jtemp(3)
        jtemp(3) = jtemp(2)
        jtemp(2) = ktemp
        a(i)     = itemp
  10  continue
      return
      end
