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	LD	A,D
	DEC	L
	JR	NZ,DA88
	CP	30H
	JR	Z,DA6
DA88	CALL	OUT
DA6	LD	A,30H
	ADD	E
	CALL	OUT
	POP	HL
	POP	DE
	INC	HL
	PUSH	HL
	AND	A
	SBC	HL,DE
	POP	HL
	JR	Z,DATEND
	DEC	B
	JR	Z,DA7
	LD	A,','
	CALL	OUT
	JR	DA8
;
DA7	LD	A,0DH
	CALL	OUT
	LD	A,0AH
	CALL	OUT
	JP	DA9
;
DATEND	LD	A,0DH
	CALL	OUT
	LD	A,0AH
	CALL	OUT
	LD	A,3
	CALL	OUT
	LD	D,40H	;CLOSE
	CALL	VERT
	DEFB	38H
	RET
;***************************************
;    E N D E
