comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 290:4dbff2aa31ee

Hunting for refusing to ignore disabled gas in list... + Keep gaslist in order.
author JeanDo
date Fri, 22 Apr 2011 00:13:39 +0200
parents 6d8a2550c9ea
children 21a0f7393468
comparison
equal deleted inserted replaced
289:6d8a2550c9ea 290:4dbff2aa31ee
2532 rcall PLED_decoplan_clear_bottom ; Clear from next line 2532 rcall PLED_decoplan_clear_bottom ; Clear from next line
2533 return 2533 return
2534 ;----------------------------------------------------------------------------- 2534 ;-----------------------------------------------------------------------------
2535 ; Toggle gas activity flag during dive. 2535 ; Toggle gas activity flag during dive.
2536 ; 2536 ;
2537 ; Input: sorted_gaslist_active 2537 ; Input: gaslist_active
2538 ; Gaslist from eeprom[2...] 2538 ; Gaslist from eeprom[2...]
2539 ; 2539 ;
2540 ; Output: sorted_gaslist_active 2540 ; Output: gaslist_active
2541 ; 2541 ;
2542 ; Note: Gas with a zero depth cannot be used in deco simulation, hence 2542 ; Note: Gas with a zero depth cannot be used in deco simulation, hence
2543 ; should not be displayed as selected here... 2543 ; should not be displayed as selected here...
2544 ; 2544 ;
2545 PLED_de_activelist: ; show (de)active gaslist 2545 PLED_de_activelist: ; show (de)active gaslist
2587 2587
2588 movf lo,w ; Gas with a zero depth 2588 movf lo,w ; Gas with a zero depth
2589 bz PLED_de_activelist_grey ; should be displayed inactive. 2589 bz PLED_de_activelist_grey ; should be displayed inactive.
2590 2590
2591 ; Check if gas needs to be greyed-out (inactive) 2591 ; Check if gas needs to be greyed-out (inactive)
2592 movff sorted_gaslist_active,EEDATA ; Get flag register 2592 movff gaslist_active,EEDATA ; Get flag register
2593 movff hi,lo ; copy gas number 2593 movff hi,lo ; copy gas number
2594 PLED_de_activelist_loop1: 2594 PLED_de_activelist_loop1:
2595 rrcf EEDATA ; roll flags into carry 2595 rrcf EEDATA ; roll flags into carry
2596 decfsz lo,F ; max. 5 times... 2596 decfsz lo,F ; max. 5 times...
2597 bra PLED_de_activelist_loop1 2597 bra PLED_de_activelist_loop1
2650 2650
2651 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM 2651 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM
2652 call read_eeprom ; get byte (stored in EEDATA) 2652 call read_eeprom ; get byte (stored in EEDATA)
2653 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") 2653 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA")
2654 ; Check if gas needs to be greyed-out (inactive) 2654 ; Check if gas needs to be greyed-out (inactive)
2655 movff sorted_gaslist_active, EEDATA ; Work with sorted list 2655 movff gaslist_active, EEDATA ; Work with sorted list
2656 ; read_int_eeprom d'27' ; read flag register 2656 ; read_int_eeprom d'27' ; read flag register
2657 movff hi,lo ; copy gas number 2657 movff hi,lo ; copy gas number
2658 PLED_gas_list_loop1: 2658 PLED_gas_list_loop1:
2659 rrcf EEDATA ; roll flags into carry 2659 rrcf EEDATA ; roll flags into carry
2660 decfsz lo,F ; max. 5 times... 2660 decfsz lo,F ; max. 5 times...