     	SUBROUTINE IFFEED( ICODE )
C
C  PROGRAMMER: R.S. ZHOU		SEP-1986
C
C	THIS ROUTINE ENDS THE CURRENT PLOT SESSION...
C
    	INCLUDE 'IMAGEM.CBS'

     	IF( IPL.GT.NBS-6 ) CALL IFINIT_DUMP
    	IF( ICODE.NE.0 ) THEN
     	    IPB(IPL+1) = 'A'		!FILM FEED
     	    IPB(IPL+2) = 'F'
     	    IPL = IPL + 2
    	ENDIF
    	IPB(IPL+1) = ';'		!TURN OFF THE PLOTTER
     	IPB(IPL+2) = 27
    	IPB(IPL+3) = '.'
    	IPB(IPL+4) = ')'
    	IPL =  IPL + 4
    	CALL IFINIT_DUMP		!DUMP THE LAST BUFFER
    	CLOSE(UNIT=LUN)

999	RETURN
     	END

