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

     	IF( IPL.GT.NBS-12 ) CALL IFINIT_DUMP
     	IPB(IPL+1) = 'v'			!RETURN PEN TO STALL
     	IPB(IPL+2) = 'p'			!MOVE PEN HOLDER TO CORNER
     	IPL = IPL + 2
     	CALL IFINIT_MBP(16000,11400)
     	IF( ICODE.NE.0 ) THEN
     	    IF( IPL.GT.NBS-10 ) CALL IFINIT_DUMP
     	    IPB(IPL+1) = '~'			!ADVANCE AND CUT THE PAPER
     	    IPB(IPL+2) = '('
     	    IPB(IPL+3) = '~'
     	    IPB(IPL+4) = '+'
     	    IPB(IPL+5) = '~'
     	    IPB(IPL+6) = ')'
     	    IPL = IPL + 6
     	ENDIF
     	IPB(IPL+1) = '}'
     	IPB(IPL+2) = 27			!TURN OFF THE PLOTTER
    	IPB(IPL+3) = '.'
    	IPB(IPL+4) = ')'
    	IPL =  IPL + 4
    	CALL IFINIT_DUMP		!DUMP THE LAST BUFFER
    	CLOSE(UNIT=LUN)

999	RETURN
     	END

