comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 311:91371c7553f5

BUGFIX typo when passing Gas#4 to deko model (bug#43)
author JeanDo
date Mon, 02 May 2011 16:14:07 +0200
parents a5fd8777a598
children b7e4e74c0e17
comparison
equal deleted inserted replaced
310:b20fc8c4ac92 311:91371c7553f5
290 290
291 ; Copy all gases to char_I_deco_N2_ratio and char_I_deco_He_ratio 291 ; Copy all gases to char_I_deco_N2_ratio and char_I_deco_He_ratio
292 divemode_check_decogases: ; CALLed from Simulator, too 292 divemode_check_decogases: ; CALLed from Simulator, too
293 293
294 clrf EEADRH ; Make sure to select eeprom bank 0 294 clrf EEADRH ; Make sure to select eeprom bank 0
295
295 read_int_eeprom d'7' ; Read He ratio 296 read_int_eeprom d'7' ; Read He ratio
296 movff EEDATA,char_I_deco_He_ratio+0 ; And copy into hold register 297 movff EEDATA,char_I_deco_He_ratio+0 ; And copy into hold register
297 read_int_eeprom d'6' ; Read O2 ratio 298 read_int_eeprom d'6' ; Read O2 ratio
298 movff char_I_deco_He_ratio+0, wait_temp ; copy into bank1 register 299 movff char_I_deco_He_ratio+0, wait_temp ; copy into bank1 register
299 bsf STATUS,C ; 300 bsf STATUS,C ;
322 subfwb EEDATA,F ; minus O2 323 subfwb EEDATA,F ; minus O2
323 movff EEDATA, char_I_deco_N2_ratio+2; = N2! 324 movff EEDATA, char_I_deco_N2_ratio+2; = N2!
324 325
325 read_int_eeprom d'19' ; Read He ratio 326 read_int_eeprom d'19' ; Read He ratio
326 movff EEDATA,char_I_deco_He_ratio+3 ; And copy into hold register 327 movff EEDATA,char_I_deco_He_ratio+3 ; And copy into hold register
327 read_int_eeprom d'17' ; Read O2 ratio 328 read_int_eeprom d'18' ; Read O2 ratio
328 movff char_I_deco_He_ratio+3, wait_temp ; copy into bank1 register 329 movff char_I_deco_He_ratio+3, wait_temp ; copy into bank1 register
329 bsf STATUS,C ; 330 bsf STATUS,C ;
330 movlw d'100' ; 100% 331 movlw d'100' ; 100%
331 subfwb wait_temp,W ; minus He 332 subfwb wait_temp,W ; minus He
332 subfwb EEDATA,F ; minus O2 333 subfwb EEDATA,F ; minus O2
1763 movff char_I_He_ratio, wait_temp ; copy into bank1 register 1764 movff char_I_He_ratio, wait_temp ; copy into bank1 register
1764 bsf STATUS,C ; Borrow bit 1765 bsf STATUS,C ; Borrow bit
1765 movlw d'100' ; 100% 1766 movlw d'100' ; 100%
1766 subfwb wait_temp,W ; minus He 1767 subfwb wait_temp,W ; minus He
1767 bsf STATUS,C ; Borrow bit 1768 bsf STATUS,C ; Borrow bit
1768 subfwb EEDATA,F ; minus O2 1769 subfwb EEDATA,W ; minus O2
1769 movff EEDATA, char_I_N2_ratio ; = N2! 1770 movff WREG, char_I_N2_ratio ; = N2!
1770 1771
1771 ; Configure gaslist_active flag register 1772 ; Configure gaslist_active flag register
1772 read_int_eeprom d'27' 1773 read_int_eeprom d'27'
1773 movff EEDATA, gaslist_active 1774 movff EEDATA, gaslist_active
1774 return 1775 return