Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/outputs.asm @ 784:46ef1e1388f1
Merge
author | heinrichsweikamp |
---|---|
date | Mon, 23 Jun 2014 17:29:59 +0200 |
parents | 9635f6276c3e |
children | b0c96aaa86e4 |
comparison
equal
deleted
inserted
replaced
783:e57e8045527d | 784:46ef1e1388f1 |
---|---|
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 | 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 .91 | |
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 .91 | |
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 | |
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. |
589 DISP_simulator_data: | 635 DISP_simulator_data: |
829 return | 875 return |
830 | 876 |
831 | 877 |
832 DISP_diveclock: | 878 DISP_diveclock: |
833 call DISP_divemask_color ; Set Color for Divemode mask | 879 call DISP_divemask_color ; Set Color for Divemode mask |
834 DISPLAYTEXT d'255' ; Clock | 880 DISPLAYTEXT d'255' ; Time: |
835 call DISP_standard_color | 881 call DISP_standard_color |
836 | 882 |
837 DISP_diveclock2: | 883 DISP_diveclock2: |
838 WIN_TOP .192 | 884 WIN_TOP .192 |
839 WIN_LEFT .123 | 885 WIN_LEFT .123 |
845 output_99x | 891 output_99x |
846 PUTC ':' | 892 PUTC ':' |
847 movff mins,lo | 893 movff mins,lo |
848 output_99x | 894 output_99x |
849 call word_processor | 895 call word_processor |
850 return | 896 |
897 DISP_diveclock3: ; Update end of divetime only | |
898 return | |
899 WIN_TOP .216 | |
900 WIN_LEFT .116 | |
901 WIN_FONT FT_SMALL | |
902 WIN_INVERT .0 | |
903 call DISP_standard_color | |
904 | |
905 btfss dekostop_active ; Already in nodeco mode ? | |
906 bra DISP_diveclock4 ; No, overwrite with some spaces | |
907 | |
908 STRCPY 0x94 ; "End of dive" icon | |
909 movff hours,WREG | |
910 mullw .60 | |
911 movf mins,W | |
912 addwf PRODL | |
913 movlw .0 | |
914 addwfc PRODH | |
915 movff PRODL, lo | |
916 movff PRODH, hi | |
917 | |
918 ; Add TTS | |
919 movff int_O_ascenttime+0,WREG ; TTS | |
920 addwf lo,F | |
921 movff int_O_ascenttime+1,WREG ; TTS is 16bits | |
922 addwfc hi,F | |
923 | |
924 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) | |
925 movf hi,W | |
926 movff lo,hi | |
927 movwf lo ; exchange lo and hi | |
928 output_99x | |
929 PUTC ':' | |
930 movff hi,lo | |
931 output_99x | |
932 STRCAT_PRINT "" | |
933 return | |
934 | |
935 DISP_diveclock4: | |
936 STRCPY_PRINT " " | |
937 return | |
851 | 938 |
852 DISP_clock: | 939 DISP_clock: |
853 ostc_debug 'c' | 940 ostc_debug 'c' |
854 WIN_TOP .50 | 941 WIN_TOP .50 |
855 WIN_LEFT .1 | 942 WIN_LEFT .1 |
1493 movwf EEADR | 1580 movwf EEADR |
1494 call read_eeprom ; get byte (stored in EEDATA) | 1581 call read_eeprom ; get byte (stored in EEDATA) |
1495 movff EEDATA,lo ; copy to lo | 1582 movff EEDATA,lo ; copy to lo |
1496 output_8 ; outputs into Postinc2! | 1583 output_8 ; outputs into Postinc2! |
1497 PUTC '/' | 1584 PUTC '/' |
1498 movlw .4 | 1585 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM |
1499 mulwf hi,W ; 1-5 | |
1500 movf PRODL,W | |
1501 addlw .3 ; Gas #x: %He - Set address in internal EEPROM | |
1502 movwf EEADR | |
1503 call read_eeprom ; get byte (stored in EEDATA) | 1586 call read_eeprom ; get byte (stored in EEDATA) |
1504 movff EEDATA,lo ; copy to lo | 1587 movff EEDATA,lo ; copy to lo |
1505 output_8 ; outputs into Postinc2! | 1588 output_8 ; outputs into Postinc2! |
1506 bcf leftbind | 1589 bcf leftbind |
1507 call word_processor | 1590 call word_processor |
1641 WIN_LEFT .90 | 1724 WIN_LEFT .90 |
1642 WIN_FONT FT_SMALL | 1725 WIN_FONT FT_SMALL |
1643 WIN_INVERT .0 ; Init new Wordprocessor | 1726 WIN_INVERT .0 ; Init new Wordprocessor |
1644 call DISP_standard_color | 1727 call DISP_standard_color |
1645 | 1728 |
1646 lfsr FSR2,letter | 1729 lfsr FSR2,letter |
1647 read_int_eeprom d'36' | 1730 read_int_eeprom d'36' |
1648 movff EEDATA,lo ; copy to lo | 1731 movff EEDATA,lo ; copy to lo |
1649 clrf hi | 1732 clrf hi |
1650 output_16dp d'3' ; outputs into Postinc2! | 1733 output_16dp d'3' ; outputs into Postinc2! |
1651 bcf leftbind | |
1652 | |
1653 STRCAT_PRINT TXT_BAR3 | 1734 STRCAT_PRINT TXT_BAR3 |
1735 | |
1736 bsf leftbind | |
1737 call get_first_diluent ; Read first diluent into lo(O2) and hi(He) | |
1738 WIN_TOP .160 | |
1739 WIN_LEFT .104 | |
1740 lfsr FSR2,letter | |
1741 output_8 ; O2 Ratio | |
1742 PUTC '/' | |
1743 movff hi,lo | |
1744 output_8 ; He Ratio | |
1745 STRCAT_PRINT "" | |
1746 bcf leftbind | |
1654 return ; Done. | 1747 return ; Done. |
1655 | 1748 |
1656 DISP_active_gas_surfmode2: | 1749 DISP_active_gas_surfmode2: |
1657 clrf EEADRH ; Select EEPROM lower page. | 1750 clrf EEADRH ; Select EEPROM lower page. |
1658 read_int_eeprom d'33' ; Get First gas (1-5) | 1751 read_int_eeprom d'33' ; Get First gas (1-5) |