Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 210:f60acc323701
mini-cleanup
author | heinrichsweikamp |
---|---|
date | Sun, 20 Feb 2011 19:57:14 +0100 |
parents | 2d9af08ed0ac |
children | f4b79292e31f |
comparison
equal
deleted
inserted
replaced
209:cdba979821ee | 210:f60acc323701 |
---|---|
810 bsf event_occured ; Set Event Flag | 810 bsf event_occured ; Set Event Flag |
811 | 811 |
812 check_ppO2_0: | 812 check_ppO2_0: |
813 movff xC+0,sub_b+0 | 813 movff xC+0,sub_b+0 |
814 movff xC+1,sub_b+1 | 814 movff xC+1,sub_b+1 |
815 GETCUSTOM8 d'17' ; ppo2_warning_low | 815 GETCUSTOM8 d'17' ; ppo2_warning_low |
816 mullw d'100' ; ppo2_warning_low*100 | 816 mullw d'100' ; ppo2_warning_low*100 |
817 movff PRODL,sub_a+0 | 817 movff PRODL,sub_a+0 |
818 movff PRODH,sub_a+1 | 818 movff PRODH,sub_a+1 |
819 call sub16 | 819 call sub16 |
820 btfsc neg_flag | 820 btfsc neg_flag |
821 bra check_ppO2_1 ; Not too low | 821 bra check_ppO2_1 ; Not too low |
843 | 843 |
844 check_ppO2_3: | 844 check_ppO2_3: |
845 return ; done | 845 return ; done |
846 | 846 |
847 | 847 |
848 check_gas_change: ; Checks if a better gas should be selected (by user) | 848 check_gas_change: ; Checks if a better gas should be selected (by user) |
849 bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode | 849 bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode |
850 | 850 |
851 movff rel_pressure+0,xA+0 | 851 movff rel_pressure+0,xA+0 |
852 movff rel_pressure+1,xA+1 | 852 movff rel_pressure+1,xA+1 |
853 movlw d'100' | 853 movlw d'100' |
959 subwf EEDATA,W ; Change depth-3m | 959 subwf EEDATA,W ; Change depth-3m |
960 cpfslt xC+0 ; current depth<Change depth-3m? | 960 cpfslt xC+0 ; current depth<Change depth-3m? |
961 bsf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode | 961 bsf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode |
962 | 962 |
963 check_gas_change6: ;Done | 963 check_gas_change6: ;Done |
964 call PLED_active_gas_divemode ; Display gas, if required (and with "*" if irequired...) | 964 call PLED_active_gas_divemode; Display gas, if required (and with "*" if irequired...) |
965 return | 965 return |
966 | 966 |
967 calculate_noflytime: | 967 calculate_noflytime: |
968 ; calculate nofly time | 968 ; calculate nofly time |
969 movff int_O_desaturation_time+0,xA+0 | 969 movff int_O_desaturation_time+0,xA+0 |