.def	rint=r1
.def	rsav=r2
.def	tmp1=r16
.def	tmp2=r17
.def	tmp3=r18
.def	op1l=r19
.def	count=r20

.dseg
buf_adc:	.byte	10
buf_rx:		.byte	9
buf_tx:		.byte	9
stat_rx:	.byte	1	;0 - none other -pack lenght
stat_tx:	.byte	1	; no. of byte ramasi de transmis
ack_nak:	.byte	1


.equ	f_baud=51		;ptr 8 mhz este 9600 la f_baud 51
.equ	stx=2		; start of text
.equ	eot=4		;end of transmision
.equ	slave_addr='3'	;slave address 
.equ	pack_len=9	;lungimea pachetului
.equ	ack=6		
.equ	nak=$15
.equ	s_opc0='3'	;SLAVE opcode1 -read adc0
.equ	s_opc1='4'	;SLAVE opcode1 -read adc1
.equ	s_opc2='5'	;SLAVE opcode1 -read adc2
.equ	ad_maxch=3
.equ	prescaler_adc=7	; for 7 prescaler= ck/128