comparison src/simulator.asm @ 174:932e91074bdb

CHANGE: Clarify Travel Gases with "---" as change depth CHANGE: Enable "Change Depth" Menu only for deco gases
author heinrichsweikamp
date Sun, 05 Oct 2014 15:36:17 +0200
parents 022b886eddaf
children 39f6c07ce2f6
comparison
equal deleted inserted replaced
173:3de05d9b7716 174:932e91074bdb
228 movff char_I_deco_He_ratio+0,lo 228 movff char_I_deco_He_ratio+0,lo
229 movff opt_gas_O2_ratio+0,WREG 229 movff opt_gas_O2_ratio+0,WREG
230 addwf lo,W ; O2 + He -> WREG 230 addwf lo,W ; O2 + He -> WREG
231 sublw .100 ; 100 - (O2 + He) -> WREG 231 sublw .100 ; 100 - (O2 + He) -> WREG
232 movff WREG,char_I_deco_N2_ratio+0 232 movff WREG,char_I_deco_N2_ratio+0
233 movff opt_gas_type+0,WREG ; 0=Disabled, 1=First, 2=Travel, 3=Deco 233 banksel opt_gas_type+0
234 tstfsz WREG ; Disabled? 234 movlw .3 ; 3=Deco
235 bra $+4 ; No 235 cpfseq opt_gas_type+0 ; Gas is deco type?
236 movff WREG,opt_OC_bail_gas_change+0 ; Yes, clear opt_OC_bail_gas_change 236 clrf opt_OC_bail_gas_change+0 ; No, clear depth for 0=Disabled, 1=First and 2=Travel
237 banksel common
237 238
238 movff opt_gas_He_ratio+1,char_I_deco_He_ratio+1 239 movff opt_gas_He_ratio+1,char_I_deco_He_ratio+1
239 movff char_I_deco_He_ratio+1,lo 240 movff char_I_deco_He_ratio+1,lo
240 movff opt_gas_O2_ratio+1,WREG 241 movff opt_gas_O2_ratio+1,WREG
241 addwf lo,W ; O2 + He -> WREG 242 addwf lo,W ; O2 + He -> WREG
242 sublw .100 ; 100 - (O2 + He) -> WREG 243 sublw .100 ; 100 - (O2 + He) -> WREG
243 movff WREG,char_I_deco_N2_ratio+1 244 movff WREG,char_I_deco_N2_ratio+1
244 movff opt_gas_type+1,WREG ; 0=Disabled, 1=First, 2=Travel, 3=Deco 245 banksel opt_gas_type+1
245 tstfsz WREG ; Disabled? 246 movlw .3 ; 3=Deco
246 bra $+4 ; No 247 cpfseq opt_gas_type+1 ; Gas is deco type?
247 movff WREG,opt_OC_bail_gas_change+1 ; Yes, clear opt_OC_bail_gas_change 248 clrf opt_OC_bail_gas_change+1 ; No, clear depth for 0=Disabled, 1=First and 2=Travel
249 banksel common
248 250
249 movff opt_gas_He_ratio+2,char_I_deco_He_ratio+2 251 movff opt_gas_He_ratio+2,char_I_deco_He_ratio+2
250 movff char_I_deco_He_ratio+2,lo 252 movff char_I_deco_He_ratio+2,lo
251 movff opt_gas_O2_ratio+2,WREG 253 movff opt_gas_O2_ratio+2,WREG
252 addwf lo,W ; O2 + He -> WREG 254 addwf lo,W ; O2 + He -> WREG
253 sublw .100 ; 100 - (O2 + He) -> WREG 255 sublw .100 ; 100 - (O2 + He) -> WREG
254 movff WREG,char_I_deco_N2_ratio+2 256 movff WREG,char_I_deco_N2_ratio+2
255 movff opt_gas_type+2,WREG ; 0=Disabled, 1=First, 2=Travel, 3=Deco 257 banksel opt_gas_type+2
256 tstfsz WREG ; Disabled? 258 movlw .3 ; 3=Deco
257 bra $+4 ; No 259 cpfseq opt_gas_type+2 ; Gas is deco type?
258 movff WREG,opt_OC_bail_gas_change+2 ; Yes, clear opt_OC_bail_gas_change 260 clrf opt_OC_bail_gas_change+2 ; No, clear depth for 0=Disabled, 1=First and 2=Travel
261 banksel common
259 262
260 movff opt_gas_He_ratio+3,char_I_deco_He_ratio+3 263 movff opt_gas_He_ratio+3,char_I_deco_He_ratio+3
261 movff char_I_deco_He_ratio+3,lo 264 movff char_I_deco_He_ratio+3,lo
262 movff opt_gas_O2_ratio+3,WREG 265 movff opt_gas_O2_ratio+3,WREG
263 addwf lo,W ; O2 + He -> WREG 266 addwf lo,W ; O2 + He -> WREG
264 sublw .100 ; 100 - (O2 + He) -> WREG 267 sublw .100 ; 100 - (O2 + He) -> WREG
265 movff WREG,char_I_deco_N2_ratio+3 268 movff WREG,char_I_deco_N2_ratio+3
266 movff opt_gas_type+3,WREG ; 0=Disabled, 1=First, 2=Travel, 3=Deco 269 banksel opt_gas_type+3
267 tstfsz WREG ; Disabled? 270 movlw .3 ; 3=Deco
268 bra $+4 ; No 271 cpfseq opt_gas_type+3 ; Gas is deco type?
269 movff WREG,opt_OC_bail_gas_change+3 ; Yes, clear opt_OC_bail_gas_change 272 clrf opt_OC_bail_gas_change+3 ; No, clear depth for 0=Disabled, 1=First and 2=Travel
273 banksel common
270 274
271 movff opt_gas_He_ratio+4,char_I_deco_He_ratio+4 275 movff opt_gas_He_ratio+4,char_I_deco_He_ratio+4
272 movff char_I_deco_He_ratio+4,lo 276 movff char_I_deco_He_ratio+4,lo
273 movff opt_gas_O2_ratio+4,WREG 277 movff opt_gas_O2_ratio+4,WREG
274 addwf lo,W ; O2 + He -> WREG 278 addwf lo,W ; O2 + He -> WREG
275 sublw .100 ; 100 - (O2 + He) -> WREG 279 sublw .100 ; 100 - (O2 + He) -> WREG
276 movff WREG,char_I_deco_N2_ratio+4 280 movff WREG,char_I_deco_N2_ratio+4
277 movff opt_gas_type+4,WREG ; 0=Disabled, 1=First, 2=Travel, 3=Deco 281 banksel opt_gas_type+4
278 tstfsz WREG ; Disabled? 282 movlw .3 ; 3=Deco
279 bra $+4 ; No 283 cpfseq opt_gas_type+4 ; Gas is deco type?
280 movff WREG,opt_OC_bail_gas_change+4 ; Yes, clear opt_OC_bail_gas_change 284 clrf opt_OC_bail_gas_change+4 ; No, clear depth for 0=Disabled, 1=First and 2=Travel
281 nop 285 banksel common
282 286
283 movlw .0 287 movlw .0
284 movff WREG,char_I_const_ppO2 ; Clear constant ppO2 for OC/bailout 288 movff WREG,char_I_const_ppO2 ; Clear constant ppO2 for OC/bailout
285 289
286 ; Setup char_I_deco_gas_change array 290 ; Setup char_I_deco_gas_change array