comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 74:a1ccb92b59cd

1.72beta release
author heinrichsweikamp
date Mon, 15 Nov 2010 15:19:24 +0100
parents 6beb680a6130
children 35d947d7a6e7
comparison
equal deleted inserted replaced
73:2227459e8ef2 74:a1ccb92b59cd
814 movff xC+1,xA+1 814 movff xC+1,xA+1
815 movff char_I_O2_ratio,xB+0 815 movff char_I_O2_ratio,xB+0
816 clrf xB+1 816 clrf xB+1
817 call mult16x16 ; char_I_O2_ratio * p_amb/10 817 call mult16x16 ; char_I_O2_ratio * p_amb/10
818 818
819 ; Check very high ppO2 manually
820 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar?
821 bra check_ppO2_bail2 ; Yes, display Value!
822
819 ; Check if ppO2 should be displayed 823 ; Check if ppO2 should be displayed
820 movff xC+0,sub_b+0 824 movff xC+0,sub_b+0
821 movff xC+1,sub_b+1 825 movff xC+1,sub_b+1
822 GETCUSTOM8 d'19' ; ppo2_display_high 826 GETCUSTOM8 d'19' ; ppo2_display_high
823 mullw d'100' ; ppo2_display_high*100 827 mullw d'100' ; ppo2_display_high*100
838 movff PRODH,sub_a+1 842 movff PRODH,sub_a+1
839 call sub16 843 call sub16
840 btfss neg_flag 844 btfss neg_flag
841 bra check_ppO2_0 ; Not too high 845 bra check_ppO2_0 ; Not too high
842 846
847 check_ppO2_bail2:
848 bsf ppO2_show_value ; set flag if required
843 bsf ppO2_warn_value ; set flag 849 bsf ppO2_warn_value ; set flag
844 movlw d'5' ; Type of Alarm 850 movlw d'5' ; Type of Alarm
845 movwf AlarmType ; Copy to Alarm Register 851 movwf AlarmType ; Copy to Alarm Register
846 bsf event_occured ; Set Event Flag 852 bsf event_occured ; Set Event Flag
847 853