From: ian Date: Sun, 15 May 2005 21:35:49 +0000 (+0000) Subject: put something in testflash; some opcodes changed X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=c835b5ee3f8dc8197ddc90b9031c25eed88eb7e1;p=trains.git put something in testflash; some opcodes changed --- diff --git a/cebpic/morsepanic.asm b/cebpic/morsepanic.asm index bfcafc7..0b73780 100644 --- a/cebpic/morsepanic.asm +++ b/cebpic/morsepanic.asm @@ -139,6 +139,8 @@ informative_panic bsf T0CON,0,0 ; } panic_loop + mov_lw 0x5a + mov_wf TESTFLASH call led_black call waiting call waiting @@ -172,15 +174,15 @@ morse_msg_start 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 ;-------------------------- @@ -196,28 +198,28 @@ morse_readout ; 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 ;-------------------------- ;--------------------------