
; Tested OK with 89c51RD2 kit running with 12Mhz crystal.
; Just configure COM2 port in Hyperterminal (Win_9x) for 4800/8/N/1 and set it to Auto Detect.
; Works with all types of terminal emulation in Hyper Terminal. Only in ViewData type there is 
; some extra characters at the end. But still message can be read.
	
	 

	V24SPD  	EQU 256-26
		
          	        ORG  0000H

	V24SET:    	MOV PCON,   #80H
          		MOV TMOD,   #22H
          		MOV TH1,   #V24SPD
          		MOV TL1,   #V24SPD
          		SETB TCON.6 
          		MOV SCON,   #052H
          			
        ;----------------------------------	
	
	MAIN:      	MOV  R7,  #5	; To print message 5 times 
	NEXT:		MOV  DPTR,  #MSG
			LCALL  STXT
			LCALL  CRLF
			MOV  R4,  #10
			MOV  R5,  #255
			MOV  R6,  #255
	DLYLUP:	        DJNZ  R5,  $
			MOV  R5,  #255
			DJNZ  R6,  DLYLUP
			MOV  R6,  #255
			DJNZ  R4, DLYLUP
			DJNZ  R7,  NEXT
			 
			SJMP  $
	;---------------------------------    

	STXT:     	NOP             ; send text from program store at DPTR
          		MOV   A,   #0   ; destroy ACC and DPTR
          		MOVC  A,  @A+DPTR
          		JZ    ETXT
          		LCALL SEND
          		INC   DPTR
          		SJMP  STXT
	ETXT:      	RET


	BLANK:     	MOV   A, #' '   ; send BLANK
          		SJMP  SEND

	CRLF:      	MOV   A,   #13  ; send a Carriage Return + Line Feed
          		LCALL SEND
          		MOV   A,   #10
          		LCALL  SEND
          		RET

