
	ORG	0023h
	LJMP	CARDswipe

	MOV	TMOD,#021h	;sets T1 as 8-bit reload/T0 as 16 bit
	mov	IE,#94h
	MOV	TCON,#14H
	MOV	SCON,#050h	;Sets serial port to mode 1
	MOV	A,PCON
	SETB	ACC.7		;Set Bit 7 SMOD
	MOV	PCON,A
	MOV	TH1,#0F2H	;sets reload value for baud rate
	SETB	TR1		;starts timer

LOOP:	SJMP	$		;Wait here

CARDswipe:
	JNB	RI,CARDswipe	; checek for interupt flag
	MOV	A,SBUF		; move serial data into Acc
	MOV	R0,#01h		;clear the LCD screen
	LCALL	wrLCDcom	; send clear command
	MOV	R0,A		; move ACC data to R0
	LCALL	wrLCDdata	; Write to screen from R0
	lcall	delay_1s	; wait a little
	RETI
