;Example of sending BCD data instead of binary on the serial line

exec_cmd:
	rcall	put_uartw
	rcall	asc_hex		;convert to hexa
	ldi	xl,low(buf_adc)
	ldi	xh,high(buf_adc)
	clr	tmp2
	add	tmp1,tmp1
	add	xl,tmp1
	adc	xh,tmp2
	adiw	xh:xl,2
	ldi	tmp1,':'
	rcall	put_uartw
	ld	tmp1,-x
	ld	tmp2,-x
;********* convert to BCD *********
	rcall	CBCD16
;**********************************
	push	tmp2
	rcall	hex_asc
	rcall	put_uartw
	mov	tmp1,tmp2
	rcall	put_uartw
	pop	tmp1
	rcall	hex_asc
	rcall	put_uartw
	mov	tmp1,tmp2
	rcall	put_uartw
	ldi	tmp1,$0d
	rcall	put_uartw
	ldi	tmp1,$0a
	rcall	put_uartw
	ret