comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 171:7f3e1bf588bc

More p2_deco.c cleanups + char_I_table_deco_done[] was never initialised. + temp_deco (deco presure) in meter (instead of bars), p2_deco.c line 661 ! Gas switches: + Added check_gas_switch() and calc_gas_switch state.
author JeanDo
date Tue, 01 Feb 2011 00:24:46 +0100
parents e26f49674956
children 77ab44108c07
comparison
equal deleted inserted replaced
170:0f7ca37b1412 171:7f3e1bf588bc
644 GETCUSTOM8 d'26' 644 GETCUSTOM8 d'26'
645 movwf divisor_nuy2 ; Reload divisor from CF 645 movwf divisor_nuy2 ; Reload divisor from CF
646 return 646 return
647 647
648 store_dive_decodebug: 648 store_dive_decodebug:
649 movff 0x931,divisor_deco_debug ; Used as temp 649 ; Dump 9 bytes, int_O_DBS_bitfield .. char_O_NDL_at_20mtr
650 movf divisor_deco_debug,W ; copy to WREG 650 lfsr FSR2, int_O_DBS_bitfield
651 movf POSTINC2,W
651 call write_external_eeprom ; Store in EEPROM 652 call write_external_eeprom ; Store in EEPROM
652 movff 0x930,divisor_deco_debug ; Used as temp 653 movf POSTINC2,W
653 movf divisor_deco_debug,W ; copy to WREG
654 call write_external_eeprom ; Store in EEPROM 654 call write_external_eeprom ; Store in EEPROM
655 movff 0x933,divisor_deco_debug ; Used as temp 655 movf POSTINC2,W
656 movf divisor_deco_debug,W ; copy to WREG
657 call write_external_eeprom ; Store in EEPROM 656 call write_external_eeprom ; Store in EEPROM
658 movff 0x932,divisor_deco_debug ; Used as temp 657 movf POSTINC2,W
659 movf divisor_deco_debug,W ; copy to WREG
660 call write_external_eeprom ; Store in EEPROM 658 call write_external_eeprom ; Store in EEPROM
661 movff 0x935,divisor_deco_debug ; Used as temp 659 movf POSTINC2,W
662 movf divisor_deco_debug,W ; copy to WREG
663 call write_external_eeprom ; Store in EEPROM 660 call write_external_eeprom ; Store in EEPROM
664 movff 0x934,divisor_deco_debug ; Used as temp 661 movf POSTINC2,W
665 movf divisor_deco_debug,W ; copy to WREG
666 call write_external_eeprom ; Store in EEPROM 662 call write_external_eeprom ; Store in EEPROM
667 movff 0x937,divisor_deco_debug ; Used as temp 663 movf POSTINC2,W
668 movf divisor_deco_debug,W ; copy to WREG
669 call write_external_eeprom ; Store in EEPROM 664 call write_external_eeprom ; Store in EEPROM
670 movff 0x936,divisor_deco_debug ; Used as temp 665 movf POSTINC2,W
671 movf divisor_deco_debug,W ; copy to WREG
672 call write_external_eeprom ; Store in EEPROM 666 call write_external_eeprom ; Store in EEPROM
673 movff 0x938,divisor_deco_debug ; Used as temp 667 movf POSTINC2,W
674 movf divisor_deco_debug,W ; copy to WREG
675 call write_external_eeprom ; Store in EEPROM 668 call write_external_eeprom ; Store in EEPROM
676 GETCUSTOM8 d'25' 669 GETCUSTOM8 d'25'
677 movwf divisor_deco_debug ; Reload divisor from CF 670 movwf divisor_deco_debug ; Reload divisor from CF
678 return 671 return
679 672
1591 movff last_surfpressure_30min+1,int_I_pres_surface+1 ; HIGH copy surfacepressure to deco routine 1584 movff last_surfpressure_30min+1,int_I_pres_surface+1 ; HIGH copy surfacepressure to deco routine
1592 movff last_surfpressure_30min+0,int_I_pres_surface+0 ; LOW copy surfacepressure to deco routine 1585 movff last_surfpressure_30min+0,int_I_pres_surface+0 ; LOW copy surfacepressure to deco routine
1593 movff temperature+0,mintemp+0 ; Reset Min-Temp registers 1586 movff temperature+0,mintemp+0 ; Reset Min-Temp registers
1594 movff temperature+1,mintemp+1 ; Reset Min-Temp registers 1587 movff temperature+1,mintemp+1 ; Reset Min-Temp registers
1595 1588
1596 clrf wait_temp ; Used to clear Bankx registers
1597 movff wait_temp,char_O_GF_low_pointer
1598 movff wait_temp,char_O_actual_pointer
1599 lfsr FSR0,0x250
1600 movlw 0x20
1601 movwf wait_temp
1602 clear_deco_lists: ; Clear Deco list
1603 clrf POSTINC0
1604 decfsz wait_temp,F
1605 bra clear_deco_lists
1606 lfsr FSR0,0x270
1607 movlw 0x20
1608 movwf wait_temp
1609 set_no_forced_stops: ; Init Deco list
1610 movlw 0x01
1611 movwf POSTINC0
1612 decfsz wait_temp,F
1613 bra set_no_forced_stops
1614 lfsr FSR0,0x290 ; clear int_O_calc_tissue_call_counter (DEBUG)
1615 clrf POSTINC0
1616 clrf POSTINC0
1617
1618 ; Init profile recording parameters 1589 ; Init profile recording parameters
1619 GETCUSTOM8 d'20' ; sample rate 1590 GETCUSTOM8 d'20' ; sample rate
1620 movwf samplesecs_value ; to avoid EEPROM access in the ISR 1591 movwf samplesecs_value ; to avoid EEPROM access in the ISR
1621 GETCUSTOM8 d'21' 1592 GETCUSTOM8 d'21'
1622 movwf divisor_temperature ; load divisors for profile storage 1593 movwf divisor_temperature ; load divisors for profile storage