comparison 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
comparison
equal deleted inserted replaced
685:aebb6d039249 686:8ffbd5cb4b42
1771 bra set_dive_modes0 ; No. 1771 bra set_dive_modes0 ; No.
1772 1772
1773 ; in Divemode, check threshold from CF01 1773 ; in Divemode, check threshold from CF01
1774 GETCUSTOM8 .1 ; loads dive_threshold in WREG 1774 GETCUSTOM8 .1 ; loads dive_threshold in WREG
1775 movwf sub_a+0 ; dive_treshold is in cm 1775 movwf sub_a+0 ; dive_treshold is in cm
1776
1777 movlw .20
1778 cpfsgt sub_a+0
1779 movwf sub_a+0 ; Make sure to have at least 20cm threshold
1780
1776 clrf sub_a+1 1781 clrf sub_a+1
1777 bra set_dive_modes1 ; Done. 1782 bra set_dive_modes1 ; Done.
1778 1783
1779 set_dive_modes0: 1784 set_dive_modes0:
1780 GETCUSTOM8 .0 ; loads dive_threshold in WREG 1785 GETCUSTOM8 .0 ; loads dive_threshold in WREG
1781 movwf sub_a+0 ; dive_treshold is in cm 1786 movwf sub_a+0 ; dive_treshold is in cm
1787
1788 movlw .20
1789 cpfsgt sub_a+0
1790 movwf sub_a+0 ; Make sure to have at least 20cm threshold
1791
1782 clrf sub_a+1 1792 clrf sub_a+1
1783 bra set_dive_modes1 ; Done. 1793 bra set_dive_modes1 ; Done.
1784 1794
1785 set_dive_modes1: 1795 set_dive_modes1:
1786 SAFE_2BYTE_COPY rel_pressure, sub_b 1796 SAFE_2BYTE_COPY rel_pressure, sub_b