comparison code_part1/OSTC_code_asm_part1/outputs.asm @ 780:de7fa2316913

add simple gas change countdown
author heinrichsweikamp
date Mon, 26 May 2014 23:15:59 +0200
parents d2b7d78b0019
children 9635f6276c3e
comparison
equal deleted inserted replaced
779:d2b7d78b0019 780:de7fa2316913
579 output_99x 579 output_99x
580 STRCAT_PRINT "" 580 STRCAT_PRINT ""
581 WIN_FONT FT_SMALL 581 WIN_FONT FT_SMALL
582 call DISP_standard_color 582 call DISP_standard_color
583 return 583 return
584
585 DISP_show_gas_change_countdown:
586 btfss gaschange_cnt_active
587 return
588 decf apnoe_surface_secs,F ; Reduce countdown
589 btfss STATUS,N
590 bra DISP_show_gas_change_countdown2
591 movlw .59
592 movwf apnoe_surface_secs
593 decf apnoe_surface_mins,F
594 btfss STATUS,N
595 bra DISP_show_gas_change_countdown2
596 bcf gaschange_cnt_active ; Clear flag
597 WIN_TOP .86
598 WIN_LEFT .64
599 WIN_FONT FT_SMALL
600 movlw d'4'
601 movwf temp1
602 call DISP_display_clear_common_y1
603 ; Reload countdown
604 GETCUSTOM8 d'55'
605 movwf apnoe_surface_mins
606 clrf apnoe_surface_secs
607 return
608
609 DISP_show_gas_change_countdown2:
610 btfsc menubit ; Divemode menu active?
611 return ; Yes, do not show
612 movlw color_yellow ; show in yellow
613 call DISP_set_color
614 WIN_TOP .86
615 WIN_LEFT .64
616 WIN_FONT FT_SMALL
617 WIN_INVERT .0 ; Init new Wordprocessor
618 lfsr FSR2,letter
619 movff apnoe_surface_mins,lo
620 bsf leftbind
621 output_8
622 PUTC ':'
623 movff apnoe_surface_secs,lo
624 output_99x
625 STRCAT_PRINT ""
626 call DISP_standard_color
627 bcf leftbind
628 return
629
584 630
585 ;============================================================================= 631 ;=============================================================================
586 ; Update simulator menu with time/depth 632 ; Update simulator menu with time/depth
587 ; Note: because translations might change a bit the string length, we reprint 633 ; Note: because translations might change a bit the string length, we reprint
588 ; that part of the mask to be sure the numbers fit in the right places. 634 ; that part of the mask to be sure the numbers fit in the right places.