	PROGRAM BINARY
	INTEGER*2 ASCII(128),ICNT,IBASE,IRAST,ILEN
	BYTE X(5000),Y(5000)
	READ(5,987)ICNT,IBASE,IRAST
987	FORMAT(1X,I2,2I4)
	IF(ICNT.EQ.99)THEN
	READ(5,985)(ASCII(IJ),IJ=1,128)
	ILEN=ASCII(128)
	ELSE
	READ(5,985)(ASCII(IJ),IJ=1,ICNT+1)
	ILEN=ASCII(ICNT+1)
	DO 1010 IJ=ICNT+1,128
1010	ASCII(IJ)=1
	ENDIF
985	FORMAT(1X,20I4)
	READ(5,984)(X(IJ),IJ=1,ILEN)
	READ(5,984)(Y(IJ),IJ=1,ILEN)
984	FORMAT(1X,40I2)
	CLOSE(5)
	WRITE(6)ICNT,IBASE,IRAST,ILEN
	WRITE(6)(ASCII(I),I=1,127)
	WRITE(6)(X(I),I=1,ILEN)
	WRITE(6)(Y(I),I=1,ILEN)
	CLOSE(6)
	END
