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

     	IF( IPL.GT.NBS-10 ) CALL IFINIT_DUMP
     	IPB(IPL+1) = 'R'		!RESET AXIS ALIGNMENT
    	IPB(IPL+2) = 'O'
    	IPB(IPL+3) = 'S'		!RETURN PEN TO STALL
    	IPB(IPL+4) = 'P'
    	IPL = IPL + 4
    	IF( ICODE.NE.0 ) THEN
    	    IPB(IPL+1) = 'P'
    	    IPB(IPL+2) = 'G'
     	    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

