bsf T0CON,0,0 ; }
panic_loop
+ mov_lw 0x5a
+ mov_wf TESTFLASH
call led_black
call waiting
call waiting
clrf WREG3,0 ; clear loop counter (WREG3)
morse_loop
- movlw MORSE_MSG_LENGTH
- cpfslt WREG3,0 ; if loop counter >=MORSE_MSG_LENGTH,
- ; retun to panic
- return
- tblrd*+
- movff TABLAT,WREG2
- call morse_readout
- incf WREG3,1,0
- goto morse_loop
+ mov_lw MORSE_MSG_LENGTH
+ cmp_fw_ifge WREG3 ; if loop counter >=MORSE_MSG_LENGTH,
+ return ; return to panic
+
+ tblrd *+
+ mov_ff TABLAT,WREG2
+ call morse_readout
+ inc_f WREG3
+ goto morse_loop
;--------------------------
; WREG2 flash pattern preserved
; WREG4 any undefined
- clrf WREG4,0 ; clear loop counter (WREG4)
- rrncf WREG2,1
+ clr_f WREG4 ; clear loop counter (WREG4)
+ rr_f WREG2
morse_readout_loop
- movlw 8
- cpfslt WREG4,0 ; if loop counter >=8, return
+ mov_lw 8
+ cmp_fw_ifge WREG4 ; if loop counter >=8, return
return
- rlncf WREG2,1 ; top bit goes into N flag, ie Negative if 1
- bn morse_readout_if_led_1
+ rl_f WREG2 ; top bit goes into N, ie Negative if 1
+ bra_n morse_readout_if_led_1
morse_readout_if_led_0
- call led_black
- bra morse_readout_endif_led
+ call led_black
+ bra morse_readout_endif_led
morse_readout_if_led_1
- call led_red
+ call led_red
morse_readout_endif_led
- incf WREG4,1,0 ; increment loop counter
- call waiting
- bra morse_readout_loop
+ inc_f WREG4 ; increment loop counter
+ call waiting
+ bra morse_readout_loop
;--------------------------
;--------------------------