comparison src/simulator.asm @ 542:a346aff513c4

minor simulator fix
author heinrichsweikamp
date Tue, 05 Sep 2017 15:32:51 +0200
parents 377d958252fb
children 7e6df19264b6
comparison
equal deleted inserted replaced
541:ad7dc231c180 542:a346aff513c4
78 incf lo,F ; ++ 78 incf lo,F ; ++
79 movlw NUM_GAS+1 79 movlw NUM_GAS+1
80 cpfseq lo ; All done? 80 cpfseq lo ; All done?
81 bra get_first_dil_to_WREG2 ; Not yet 81 bra get_first_dil_to_WREG2 ; Not yet
82 ; No first dil found, use #1 82 ; No first dil found, use #1
83 movlw .1 83 movlw .0
84 movff WREG,opt_dil_type+0 ; Set Dil1 to First 84 movff WREG,opt_dil_type+0 ; Set Dil1 to First
85 return 85 return
86 get_first_dil_to_WREG3: 86 get_first_dil_to_WREG3:
87 movf lo,W ; Put into Wreg 87 movf lo,W ; Put into Wreg
88 return ; Done 88 return ; Done
99 incf lo,F ; ++ 99 incf lo,F ; ++
100 movlw NUM_GAS+1 100 movlw NUM_GAS+1
101 cpfseq lo ; All done? 101 cpfseq lo ; All done?
102 bra get_first_gas_to_WREG2 ; Not yet 102 bra get_first_gas_to_WREG2 ; Not yet
103 ; No first gas found, use #1 103 ; No first gas found, use #1
104 movlw .1 104 movlw .0
105 movff WREG,opt_gas_type+0 ; Set Gas1 to First 105 movff WREG,opt_gas_type+0 ; Set Gas1 to First
106 return 106 return
107 get_first_gas_to_WREG3: 107 get_first_gas_to_WREG3:
108 movf lo,W ; Put into Wreg 108 movf lo,W ; Put into Wreg
109 return ; Done 109 return ; Done
177 sublw .100 ; 100 - (O2 + He) -> WREG 177 sublw .100 ; 100 - (O2 + He) -> WREG
178 movff WREG,char_I_deco_N2_ratio+0 178 movff WREG,char_I_deco_N2_ratio+0
179 movff opt_dil_type+0,WREG ; 0=Disabled, 1=First, 2=Normal 179 movff opt_dil_type+0,WREG ; 0=Disabled, 1=First, 2=Normal
180 tstfsz WREG ; Disabled? 180 tstfsz WREG ; Disabled?
181 bra $+4 ; No 181 bra $+4 ; No
182 movff WREG,char_I_dil_change+0 ; Yes, clear char_I_deco_gas_change 182 movff WREG,char_I_dil_change+0 ; Yes, clear char_I_deco_gas_change (Bank safe)
183 183
184 movff opt_dil_He_ratio+1,char_I_deco_He_ratio+1 184 movff opt_dil_He_ratio+1,char_I_deco_He_ratio+1
185 movff char_I_deco_He_ratio+1,lo 185 movff char_I_deco_He_ratio+1,lo
186 movff opt_dil_O2_ratio+1,WREG 186 movff opt_dil_O2_ratio+1,WREG
187 addwf lo,W ; O2 + He -> WREG 187 addwf lo,W ; O2 + He -> WREG
806 bra simulator_show_decoplan5_loop ; No 806 bra simulator_show_decoplan5_loop ; No
807 807
808 WIN_COLOR color_greenish 808 WIN_COLOR color_greenish
809 WIN_SMALL .80,.25 809 WIN_SMALL .80,.25
810 810
811 btfsc FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active 811 ; btfsc FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active
812 bra simulator_show_decoplan5_4 ; YES: This is bailout mode 812 ; bra simulator_show_decoplan5_4 ; YES: This is bailout mode
813 813
814 STRCPY_TEXT tGasUsage ; OC: "Gas Usage" 814 STRCPY_TEXT tGasUsage ; OC: "Gas Usage"
815 bra simulator_show_decoplan5_5 815 ; bra simulator_show_decoplan5_5
816 816
817 simulator_show_decoplan5_4: 817 ;simulator_show_decoplan5_4:
818 STRCPY_TEXT tDiveBailout ; CCR: "Bailout" 818 ; STRCPY_TEXT tDiveBailout ; CCR: "Bailout"
819 819
820 simulator_show_decoplan5_5 820 ;simulator_show_decoplan5_5:
821 STRCAT_PRINT ":" 821 STRCAT_PRINT ":"
822 call TFT_standard_color 822 call TFT_standard_color
823 823
824 call logbook_preloop_tasks 824 call logbook_preloop_tasks
825 simulator_show_decoplan5_3: 825 simulator_show_decoplan5_3: