                device pic16c71,hs_osc,wdt_off,pwrt_off,protect_off
                id 'ST01'
    INCLUDE 'mheader.src'

msgcnt      ds      1    
    
RA0         =       ra.0
RA1         =       ra.1
RA2         =       ra.2
RA3         =       ra.3
RA4         =       ra.4
RB5         =       rb.5

                   org      0h
                    jmp start
                    org 5h
doint               reti                    
                    
start       nop
            clr     PCLATH
            clr     FSR
            clrb    rp0
            mov     ADCON0, #00000000b
            mov	    INTCON, #00000000b	
;            mov	    INTCON, #10101000b	;RTCC, INT IRQ enabled
            setb    rp0
            mov     TRISA, #0000b
            mov     TRISB, #00000000b
            mov     OPTION, #00000000b	;RTCC=inst,RB pull-up, /16   
            clrb    rp0
            clrb    TXSWTCH

playmsg            mov      msgcnt, #0
playbyte           movf     msgcnt, 0
                   call     string
                   movwf      txbyte
                    mov     quad, txbyte
                   mov      framect, #25
:txl               mov     txbyte, quad
                   call     dotxmit
                   call     wait
                   djnz     framect, :txl
                   mov      txbyte, #13
                   call     dotxmit
                   inc      msgcnt
                   cjbe     msgcnt, #29, playbyte
                   jmp      playmsg
                   

string             jmp      pc+w
;                   retw      255, 255, 255, 255, 255, 255, 255,255,255,255,255,255,255,255,255, 255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255
;                   retw     'U', 'U', 'U', 'U', 'U', 'U', 'U','U','U','U','U','U','U','U','U', 'U', 'U','U','U','U','U','U','U','U','U','U','U','U','U','U'
                    retw     'M', 'o', 't', 'o', 'r', 'o', 'l','a',' '
                    retw     'a','n','d',' ','M','I', 'T', ' ','-','-',' '
                    retw     'P','C','S',' ','9','6'
                    retw     13, 13, 13, 13
;                   retw     200, 'M', 'a', 't', 't', 'h', 'e','w',' ','G','r','a','y',#13,'O', 'O', 'K','2',' ','i','s',' ','w','o','r','k','i','n','g', #13

                   INCLUDE  'txmitook.src'

                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                    nop
                   
wait		mov	tempb,#255
:oloop          mov     tempa,#90
:wloop		djnz	tempa, :wloop
                djnz    tempb, :oloop
		ret
                

                    