comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 167:cb055a7d75f3

+ Use overlay local vars. + Make all private functions static. + Merge calc_tissue 2sec and 1min + Merge sim_tissue 1min and 10min + Expose basic display utilities for c-code. + Prepare stand-alone utilities for p2_main.c testing platform. + New c utility: int read_custom_function(cf#)
author JeanDo
date Mon, 24 Jan 2011 23:31:57 +0100
parents 144822282fa3
children e26f49674956
comparison
equal deleted inserted replaced
166:80de93d72a17 167:cb055a7d75f3
345 subfwb wait_temp,W ; minus He 345 subfwb wait_temp,W ; minus He
346 subfwb EEDATA,F ; minus O2 346 subfwb EEDATA,F ; minus O2
347 movff EEDATA, char_I_deco_N2_ratio2; = N2! 347 movff EEDATA, char_I_deco_N2_ratio2; = N2!
348 348
349 read_int_eeprom d'113' ; Read He ratio 349 read_int_eeprom d'113' ; Read He ratio
350 movff EEDATA,char_I_deco_He_ratio ; And copy into hold register 350 movff EEDATA,char_I_deco_He_ratio1; And copy into hold register
351 read_int_eeprom d'112' ; Read O2 ratio 351 read_int_eeprom d'112' ; Read O2 ratio
352 movff char_I_deco_He_ratio, wait_temp ; copy into bank1 register 352 movff char_I_deco_He_ratio1, wait_temp ; copy into bank1 register
353 bsf STATUS,C ; 353 bsf STATUS,C ;
354 movlw d'100' ; 100% 354 movlw d'100' ; 100%
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_ratio; = 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 360
361 read_int_eeprom d'118' ; read gas_change_depth Gas1 361 read_int_eeprom d'118' ; read gas_change_depth Gas1
362 movff EEDATA,char_I_deco_gas_change5 362 movff EEDATA,char_I_deco_gas_change5
365 read_int_eeprom d'120' ; read gas_change_depth Gas3 365 read_int_eeprom d'120' ; read gas_change_depth Gas3
366 movff EEDATA,char_I_deco_gas_change3 366 movff EEDATA,char_I_deco_gas_change3
367 read_int_eeprom d'121' ; read gas_change_depth Gas4 367 read_int_eeprom d'121' ; read gas_change_depth Gas4
368 movff EEDATA,char_I_deco_gas_change2 368 movff EEDATA,char_I_deco_gas_change2
369 read_int_eeprom d'122' ; read gas_change_depth Gas5 369 read_int_eeprom d'122' ; read gas_change_depth Gas5
370 movff EEDATA,char_I_deco_gas_change 370 movff EEDATA,char_I_deco_gas_change1
371 371
372 372
373 ; Debugger 373 ; Debugger
374 ; call enable_rs232 374 ; call enable_rs232
375 ; movff char_I_deco_He_ratio5,TXREG 375 ; movff char_I_deco_He_ratio5,TXREG
410 clrf lo 410 clrf lo
411 movff lo,char_I_deco_gas_change5 411 movff lo,char_I_deco_gas_change5
412 movff lo,char_I_deco_gas_change4 412 movff lo,char_I_deco_gas_change4
413 movff lo,char_I_deco_gas_change3 413 movff lo,char_I_deco_gas_change3
414 movff lo,char_I_deco_gas_change2 414 movff lo,char_I_deco_gas_change2
415 movff lo,char_I_deco_gas_change ; clear 415 movff lo,char_I_deco_gas_change1 ; clear
416 return 416 return
417 417
418 calc_deko_divemode2: 418 calc_deko_divemode2:
419 bcf twosecupdate 419 bcf twosecupdate
420 420