bsf SPBRG,7,0
bsf SPBRG,0,0
- call initialise-ascii
+ call initialiseascii
main
movff 00h,TXREG ; move 00h to transmit buffer (ascii s)
- call wait-for-tsr
+ call waitfortsr
movff 01h,TXREG ; move 01h to transmit buffer (ascii q)
- call wait-for-tsr
+ call waitfortsr
movff 02h,TXREG ; move 02h to transmit buffer (ascii o)
- call wait-for-tsr
+ call waitfortsr
movff 02h,TXREG ; move 02h to transmit buffer (ascii o)
- call wait-for-tsr
+ call waitfortsr
movff 03h,TXREG ; move 03h to transmit buffer (ascii k)
- call wait-for-tsr
+ call waitfortsr
movff 04h,TXREG ; move 04h to transmit buffer (ascii SPACE)
- call wait-for-tsr
+ call waitfortsr
goto main
-wait-for-tsr
+waitfortsr
btfss TXSTA,1,0 ; check whether TRMT is set (i.e. TSR is empty)
- bra wait-for-tsr
+ bra waitfortsr
return
-initialise-ascii ; set up ascii letter bytes
+initialiseascii ; set up ascii letter bytes
; there must be a faster way to do this...
- crlf 00h,0 ; clear data registers
- crlf 01h,0
- crlf 02h,0
- crlf 03h,0
- crlf 04h,0
+ clrf 00h,0 ; clear data registers
+ clrf 01h,0
+ clrf 02h,0
+ clrf 03h,0
+ clrf 04h,0
bsf 00h,6,0 ; set 00h to be ascii s
bsf 00h,5,0