comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 291:916df3161d52

Fix gaslist: use current value instead of default.
author JeanDo
date Fri, 22 Apr 2011 10:02:18 +0200
parents 4dbff2aa31ee
children 21a0f7393468
comparison
equal deleted inserted replaced
290:4dbff2aa31ee 291:916df3161d52
334 bra reset_decompression_gases ; While in NDL, do not set deompression gas 334 bra reset_decompression_gases ; While in NDL, do not set deompression gas
335 335
336 ; Copy all gases to char_I_deco_N2_ratio and char_I_deco_He_ratio 336 ; Copy all gases to char_I_deco_N2_ratio and char_I_deco_He_ratio
337 divemode_check_decogases: ; CALLed from Simulator, too 337 divemode_check_decogases: ; CALLed from Simulator, too
338 338
339 clrf EEADRH, ; Make sure to select eeprom bank 0 339 clrf EEADRH ; Make sure to select eeprom bank 0
340 read_int_eeprom d'5' ; Read He ratio 340 read_int_eeprom d'7' ; Read He ratio
341 movff EEDATA,char_I_deco_He_ratio+0 ; And copy into hold register 341 movff EEDATA,char_I_deco_He_ratio+0 ; And copy into hold register
342 read_int_eeprom d'4' ; Read O2 ratio 342 read_int_eeprom d'6' ; Read O2 ratio
343 movff char_I_deco_He_ratio+0, wait_temp ; copy into bank1 register 343 movff char_I_deco_He_ratio+0, wait_temp ; copy into bank1 register
344 bsf STATUS,C ; 344 bsf STATUS,C ;
345 movlw d'100' ; 100% 345 movlw d'100' ; 100%
346 subfwb wait_temp,W ; minus He 346 subfwb wait_temp,W ; minus He
347 subfwb EEDATA,F ; minus O2 347 subfwb EEDATA,F ; minus O2
348 movff EEDATA, char_I_deco_N2_ratio+0; = N2! 348 movff EEDATA, char_I_deco_N2_ratio+0; = N2!
349 349
350 read_int_eeprom d'9' ; Read He ratio 350 read_int_eeprom d'11' ; Read He ratio
351 movff EEDATA,char_I_deco_He_ratio+1 ; And copy into hold register 351 movff EEDATA,char_I_deco_He_ratio+1 ; And copy into hold register
352 read_int_eeprom d'8' ; Read O2 ratio 352 read_int_eeprom d'10' ; Read O2 ratio
353 movff char_I_deco_He_ratio+1, wait_temp ; copy into bank1 register 353 movff char_I_deco_He_ratio+1, wait_temp ; copy into bank1 register
354 bsf STATUS,C ; 354 bsf STATUS,C ;
355 movlw d'100' ; 100% 355 movlw d'100' ; 100%
356 subfwb wait_temp,W ; minus He 356 subfwb wait_temp,W ; minus He
357 subfwb EEDATA,F ; minus O2 357 subfwb EEDATA,F ; minus O2
358 movff EEDATA, char_I_deco_N2_ratio+1; = N2! 358 movff EEDATA, char_I_deco_N2_ratio+1; = N2!
359 359
360 read_int_eeprom d'13' ; Read He ratio 360 read_int_eeprom d'15' ; Read He ratio
361 movff EEDATA,char_I_deco_He_ratio+2 ; And copy into hold register 361 movff EEDATA,char_I_deco_He_ratio+2 ; And copy into hold register
362 read_int_eeprom d'12' ; Read O2 ratio 362 read_int_eeprom d'14' ; Read O2 ratio
363 movff char_I_deco_He_ratio+2, wait_temp ; copy into bank1 register 363 movff char_I_deco_He_ratio+2, wait_temp ; copy into bank1 register
364 bsf STATUS,C ; 364 bsf STATUS,C ;
365 movlw d'100' ; 100% 365 movlw d'100' ; 100%
366 subfwb wait_temp,W ; minus He 366 subfwb wait_temp,W ; minus He
367 subfwb EEDATA,F ; minus O2 367 subfwb EEDATA,F ; minus O2
368 movff EEDATA, char_I_deco_N2_ratio+2; = N2! 368 movff EEDATA, char_I_deco_N2_ratio+2; = N2!
369 369
370 read_int_eeprom d'17' ; Read He ratio 370 read_int_eeprom d'19' ; Read He ratio
371 movff EEDATA,char_I_deco_He_ratio+3 ; And copy into hold register 371 movff EEDATA,char_I_deco_He_ratio+3 ; And copy into hold register
372 read_int_eeprom d'16' ; Read O2 ratio 372 read_int_eeprom d'17' ; Read O2 ratio
373 movff char_I_deco_He_ratio+3, wait_temp ; copy into bank1 register 373 movff char_I_deco_He_ratio+3, wait_temp ; copy into bank1 register
374 bsf STATUS,C ; 374 bsf STATUS,C ;
375 movlw d'100' ; 100% 375 movlw d'100' ; 100%
376 subfwb wait_temp,W ; minus He 376 subfwb wait_temp,W ; minus He
377 subfwb EEDATA,F ; minus O2 377 subfwb EEDATA,F ; minus O2
378 movff EEDATA, char_I_deco_N2_ratio+3; = N2! 378 movff EEDATA, char_I_deco_N2_ratio+3; = N2!
379 379
380 read_int_eeprom d'21' ; Read He ratio 380 read_int_eeprom d'23' ; Read He ratio
381 movff EEDATA,char_I_deco_He_ratio+4; And copy into hold register 381 movff EEDATA,char_I_deco_He_ratio+4; And copy into hold register
382 read_int_eeprom d'20' ; Read O2 ratio 382 read_int_eeprom d'22' ; Read O2 ratio
383 movff char_I_deco_He_ratio+4, wait_temp ; copy into bank1 register 383 movff char_I_deco_He_ratio+4, wait_temp ; copy into bank1 register
384 bsf STATUS,C ; 384 bsf STATUS,C ;
385 movlw d'100' ; 100% 385 movlw d'100' ; 100%
386 subfwb wait_temp,W ; minus He 386 subfwb wait_temp,W ; minus He
387 subfwb EEDATA,F ; minus O2 387 subfwb EEDATA,F ; minus O2