Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/divemode.asm @ 686:8ffbd5cb4b42
Hard-coded min. Values for CF00 and CF01
Set cursor to "Exit" when leaving sub-menus
author | heinrichsweikamp |
---|---|
date | Sat, 26 Jan 2013 14:36:26 +0100 |
parents | aebb6d039249 |
children | 74878be38d4c |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Sat Jan 26 14:11:07 2013 +0100 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sat Jan 26 14:36:26 2013 +0100 @@ -1773,12 +1773,22 @@ ; in Divemode, check threshold from CF01 GETCUSTOM8 .1 ; loads dive_threshold in WREG movwf sub_a+0 ; dive_treshold is in cm + + movlw .20 + cpfsgt sub_a+0 + movwf sub_a+0 ; Make sure to have at least 20cm threshold + clrf sub_a+1 bra set_dive_modes1 ; Done. set_dive_modes0: GETCUSTOM8 .0 ; loads dive_threshold in WREG movwf sub_a+0 ; dive_treshold is in cm + + movlw .20 + cpfsgt sub_a+0 + movwf sub_a+0 ; Make sure to have at least 20cm threshold + clrf sub_a+1 bra set_dive_modes1 ; Done.