Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 251:f0cba9cff25c
Still hunting for bb13...
author | JeanDo |
---|---|
date | Tue, 29 Mar 2011 23:47:34 +0200 |
parents | 4ef3bcbc7091 |
children | 3a4096f32526 |
comparison
equal
deleted
inserted
replaced
250:4ef3bcbc7091 | 251:f0cba9cff25c |
---|---|
983 | 983 |
984 calculate_noflytime: | 984 calculate_noflytime: |
985 ; calculate nofly time | 985 ; calculate nofly time |
986 movff int_O_desaturation_time+0,xA+0 | 986 movff int_O_desaturation_time+0,xA+0 |
987 movff int_O_desaturation_time+1,xA+1 | 987 movff int_O_desaturation_time+1,xA+1 |
988 | |
989 btfsc xA+1,7 ; Is desat time negatif ? | |
990 bra calculate_noflytime_3 ; Then surely not valid ! | |
991 | |
988 tstfsz xA+0 ; Desat=0? | 992 tstfsz xA+0 ; Desat=0? |
989 bra calculate_noflytime2 | 993 bra calculate_noflytime2 |
990 tstfsz xA+1 ; Desat=0? | 994 tstfsz xA+1 ; Desat=0? |
991 bra calculate_noflytime2 | 995 bra calculate_noflytime2 |
992 | 996 |
1034 | 1038 |
1035 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives | 1039 btfsc FLAG_apnoe_mode ; Calc max. depth (again) for very short apnoe dives |
1036 rcall apnoe_calc_maxdepth | 1040 rcall apnoe_calc_maxdepth |
1037 | 1041 |
1038 ; calculate desaturation time | 1042 ; calculate desaturation time |
1039 movff last_surfpressure_30min+0,int_I_pres_respiration+0 ; copy surface air pressure to deco routine | 1043 movff last_surfpressure_30min+0,int_I_pres_surface+0 ; Pass surface to desat routine ! |
1040 movff last_surfpressure_30min+1,int_I_pres_respiration+1 ; 30min old values | 1044 movff last_surfpressure_30min+1,int_I_pres_surface+1 |
1041 | 1045 |
1042 GETCUSTOM8 d'12' ; Desaturation multiplier % | 1046 GETCUSTOM8 d'12' ; Desaturation multiplier % |
1043 movff WREG,char_I_desaturation_multiplier | 1047 movff WREG,char_I_desaturation_multiplier |
1044 | 1048 |
1045 ostc_debug 'G' ; Sends debug-information to screen if debugmode active | 1049 ostc_debug 'G' ; Sends debug-information to screen if debugmode active |
1046 call deco_calc_desaturation_time ; calculate desaturation time | 1050 call deco_calc_desaturation_time ; calculate desaturation time |
1047 movlb b'00000001' ; select ram bank 1 | 1051 movlb b'00000001' ; select ram bank 1 |
1048 rcall calculate_noflytime ; Calc NoFly time | 1052 rcall calculate_noflytime ; Calc NoFly time |
1049 ostc_debug 'H' ; Sends debug-information to screen if debugmode active | 1053 ostc_debug 'H' ; Sends debug-information to screen if debugmode active |
1050 ; store header and ... | 1054 ; store header and ... |
1051 movlw 0xFD ; .... End-of-Profile Bytes | 1055 movlw 0xFD ; .... End-of-Profile Bytes |