comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 313:11be2470b9eb @5 variant

Fix @5 preventing main computation New display style New display deco_state in debug mode.
author JeanDo
date Tue, 03 May 2011 15:54:09 +0200
parents b7e4e74c0e17
children 4159c31abe31
comparison
equal deleted inserted replaced
312:b7e4e74c0e17 313:11be2470b9eb
454 return 454 return
455 btfsc FLAG_apnoe_mode ; ignore decompression calculation in apnoe mode 455 btfsc FLAG_apnoe_mode ; ignore decompression calculation in apnoe mode
456 return 456 return
457 457
458 ostc_debug 'B' ; Sends debug-information to screen if debugmode active 458 ostc_debug 'B' ; Sends debug-information to screen if debugmode active
459 ; Send nes state to screen, if debugmode active
460 movff char_O_deco_status,WREG ; Status before call
461 addlw '0' ; Convert to ascii char
462 call ostc_debug1 ; and send.
463
459 call divemode_prepare_flags_for_deco 464 call divemode_prepare_flags_for_deco
460 clrf WREG 465 clrf WREG
461 movff WREG,char_I_step_is_1min ; Force 2 second deco mode 466 movff WREG,char_I_step_is_1min ; Force 2 second deco mode
462 467
463 clrf TMR3L 468 clrf TMR3L
529 534
530 ; Check if extra cycles are needed to compute @5 variant: 535 ; Check if extra cycles are needed to compute @5 variant:
531 btfss tts_extra_time ; Is @5 displayed ? 536 btfss tts_extra_time ; Is @5 displayed ?
532 return ; No: don't compute it. 537 return ; No: don't compute it.
533 538
534 dcfsnz apnoe_mins ; Reached count-down ? 539 decfsz apnoe_mins ; Reached count-down ?
535 return ; No: don't compute yet. 540 return ; No: don't compute yet.
536 541
537 movlw .6 542 movlw .6
538 movff WREG,char_O_deco_status ; Stole next cycles for @5 variant. 543 movff WREG,char_O_deco_status ; Stole next cycles for @5 variant.
539 544
540 movlw .2 ; Restart countdown. 545 movlw .2 ; Restart countdown.
541 movwf apnoe_mins 546 movwf apnoe_mins
542 return 547 return
548
543 ;----------------------------------------------------------------------------- 549 ;-----------------------------------------------------------------------------
544 550
545 divemode_prepare_flags_for_deco: 551 divemode_prepare_flags_for_deco:
546 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine 552 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine
547 movff amb_pressure+1,int_I_pres_respiration+1 ; hi 553 movff amb_pressure+1,int_I_pres_respiration+1 ; hi