Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 220:3cf6649e89ac
If gas is inactive, overwrite char_I_deco_gas_changex with zero
author | heinrichsweikamp |
---|---|
date | Tue, 01 Mar 2011 10:07:58 +0100 |
parents | f4b79292e31f |
children | 448478ceccea |
comparison
equal
deleted
inserted
replaced
219:b6dd54b3567c | 220:3cf6649e89ac |
---|---|
355 subfwb wait_temp,W ; minus He | 355 subfwb wait_temp,W ; minus He |
356 subfwb EEDATA,F ; minus O2 | 356 subfwb EEDATA,F ; minus O2 |
357 movff EEDATA, char_I_deco_N2_ratio1; = N2! | 357 movff EEDATA, char_I_deco_N2_ratio1; = N2! |
358 | 358 |
359 ; Now, set change depth. Inactive gases have depth=0! | 359 ; Now, set change depth. Inactive gases have depth=0! |
360 | |
361 read_int_eeprom d'118' ; read gas_change_depth Gas1 | 360 read_int_eeprom d'118' ; read gas_change_depth Gas1 |
362 movff EEDATA,char_I_deco_gas_change5 | 361 movff EEDATA,char_I_deco_gas_change5 |
363 read_int_eeprom d'119' ; read gas_change_depth Gas2 | 362 read_int_eeprom d'119' ; read gas_change_depth Gas2 |
364 movff EEDATA,char_I_deco_gas_change4 | 363 movff EEDATA,char_I_deco_gas_change4 |
365 read_int_eeprom d'120' ; read gas_change_depth Gas3 | 364 read_int_eeprom d'120' ; read gas_change_depth Gas3 |
366 movff EEDATA,char_I_deco_gas_change3 | 365 movff EEDATA,char_I_deco_gas_change3 |
367 read_int_eeprom d'121' ; read gas_change_depth Gas4 | 366 read_int_eeprom d'121' ; read gas_change_depth Gas4 |
368 movff EEDATA,char_I_deco_gas_change2 | 367 movff EEDATA,char_I_deco_gas_change2 |
369 read_int_eeprom d'122' ; read gas_change_depth Gas5 | 368 read_int_eeprom d'122' ; read gas_change_depth Gas5 |
370 movff EEDATA,char_I_deco_gas_change1 | 369 movff EEDATA,char_I_deco_gas_change1 |
371 | 370 ; If gas is inactive, overwrite char_I_deco_gas_changex with zero |
371 read_int_eeprom d'27' ; read flag register | |
372 clrf WREG ; Clear WREG | |
373 | |
374 btfss EEDATA,0 | |
375 movff WREG,char_I_deco_gas_change1; Gas1 | |
376 btfss EEDATA,1 | |
377 movff WREG,char_I_deco_gas_change2; Gas2 | |
378 btfss EEDATA,2 | |
379 movff WREG,char_I_deco_gas_change3; Gas3 | |
380 btfss EEDATA,3 | |
381 movff WREG,char_I_deco_gas_change4; Gas4 | |
382 btfss EEDATA,4 | |
383 movff WREG,char_I_deco_gas_change5; Gas5 | |
384 | |
372 | 385 |
373 ; Debugger | 386 ; Debugger |
374 ; call enable_rs232 | 387 ; call enable_rs232 |
375 ; movff char_I_deco_He_ratio5,TXREG | 388 ; movff char_I_deco_He_ratio5,TXREG |
376 ; call rs232_wait_tx ; wait for UART | 389 ; call rs232_wait_tx ; wait for UART |