comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 3:3cf8af30b36e

v1.51 beta
author heinrichsweikamp
date Thu, 04 Feb 2010 14:56:12 +0100
parents d11ef8dc4b2c
children 2b5c52ae3923
comparison
equal deleted inserted replaced
2:d11ef8dc4b2c 3:3cf8af30b36e
88 88
89 ; Tasks only for ppO2 mode 89 ; Tasks only for ppO2 mode
90 diveloop_loop1c: 90 diveloop_loop1c:
91 call PLED_const_ppO2_value ; display const ppO2 setting in [Bar] 91 call PLED_const_ppO2_value ; display const ppO2 setting in [Bar]
92 call calc_deko_divemode ; calculate decompression and display result (any two seconds) 92 call calc_deko_divemode ; calculate decompression and display result (any two seconds)
93 btfsc is_bailout ; Are we in Bailout mode?
94 call check_ppO2_bail ; Yes, display ppO2 (If required)
95
93 bra diveloop_loop1x ; Common Tasks 96 bra diveloop_loop1x ; Common Tasks
94 97
95 ; Common Tasks for all modes 98 ; Common Tasks for all modes
96 diveloop_loop1x: 99 diveloop_loop1x:
97 call timeout_divemode ; dive finished? This routine sets the required flags 100 call timeout_divemode ; dive finished? This routine sets the required flags
798 801
799 check_ppO2: ; check current ppO2 and display warning if required 802 check_ppO2: ; check current ppO2 and display warning if required
800 btfsc FLAG_const_ppO2_mode ; ignore in ppO2 mode.... 803 btfsc FLAG_const_ppO2_mode ; ignore in ppO2 mode....
801 return 804 return
802 805
806 check_ppO2_bail: ; In CC mode but bailout active!
803 movff amb_pressure+0,xA+0 807 movff amb_pressure+0,xA+0
804 movff amb_pressure+1,xA+1 808 movff amb_pressure+1,xA+1
805 movlw d'10' 809 movlw d'10'
806 movwf xB+0 810 movwf xB+0
807 clrf xB+1 811 clrf xB+1
1427 clrf AlarmType ; Clear all alarms 1431 clrf AlarmType ; Clear all alarms
1428 bcf event_occured ; clear flag 1432 bcf event_occured ; clear flag
1429 bcf depth_greater_100m ; clear flag 1433 bcf depth_greater_100m ; clear flag
1430 setf last_diluent ; to be displayed after first calculation (range: 0 to 100 [%]) 1434 setf last_diluent ; to be displayed after first calculation (range: 0 to 100 [%])
1431 clrf char_last_pointer 1435 clrf char_last_pointer
1432 bcf dekostop_active 1436 bcf dekostop_active
1437 bcf is_bailout ;=1: CC mode, but bailout active!
1433 call get_free_EEPROM_location ; get last position in external EEPROM, may be up to 2 secs! 1438 call get_free_EEPROM_location ; get last position in external EEPROM, may be up to 2 secs!
1434 1439
1435 movff last_surfpressure_30min+1,int_I_pres_surface+1 ; HIGH copy surfacepressure to deco routine 1440 movff last_surfpressure_30min+1,int_I_pres_surface+1 ; HIGH copy surfacepressure to deco routine
1436 movff last_surfpressure_30min+0,int_I_pres_surface+0 ; LOW copy surfacepressure to deco routine 1441 movff last_surfpressure_30min+0,int_I_pres_surface+0 ; LOW copy surfacepressure to deco routine
1437 movff temperature+0,mintemp+0 ; Reset Min-Temp registers 1442 movff temperature+0,mintemp+0 ; Reset Min-Temp registers