        SUBROUTINE SWAP
        COMMON/LINEND/ XFIRST,YFIRST,XLAST,YLAST
        TEMP = XFIRST
        XFIRST = XLAST
        XLAST = TEMP
        TEMP = YFIRST
        YFIRST = YLAST
        YLAST = TEMP
        RETURN
        END
