Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 629:237931377539
3.07 stable release
author | heinrichsweikamp |
---|---|
date | Fri, 29 Nov 2019 18:48:11 +0100 |
parents | cd58f7fc86db |
children | 185ba2f91f59 |
comparison
equal
deleted
inserted
replaced
628:cd58f7fc86db | 629:237931377539 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File tft_outputs.asm next combined generation V3.04.3 | 3 ; File tft_outputs.asm next combined generation V3.06.2 |
4 ; | 4 ; |
5 ; high-level Display Outputs | 5 ; high-level Display Outputs |
6 ; | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
8 ;============================================================================= | 8 ;============================================================================= |
4617 SMOVII int_O_desaturation_time,mpr ; ISR-safe copy of the desaturation time | 4617 SMOVII int_O_desaturation_time,mpr ; ISR-safe copy of the desaturation time |
4618 movf mpr+0,W ; get low byte into WREG | 4618 movf mpr+0,W ; get low byte into WREG |
4619 iorwf mpr+1,W ; inclusive-or with high byte, check if desaturation time is zero | 4619 iorwf mpr+1,W ; inclusive-or with high byte, check if desaturation time is zero |
4620 bz TFT_surface_lastdive_1 ; YES - show last dive time | 4620 bz TFT_surface_lastdive_1 ; YES - show last dive time |
4621 ; NO - show surface interval | 4621 ; NO - show surface interval |
4622 SMOVII surface_interval,mpr ; - ISR-safe copy of surface interval | 4622 SMOVII surface_interval_mins,mpr ; - ISR-safe copy of surface interval in minutes |
4623 call convert_time ; - convert hi:lo in minutes to hours (up:hi) and minutes (lo) | 4623 call convert_time ; - convert hi:lo in minutes to hours (up:hi) and minutes (lo) |
4624 movf hi,W ; - swap hi and lo | 4624 movf hi,W ; - swap hi and lo |
4625 movff lo,hi ; ... | 4625 movff lo,hi ; ... |
4626 movwf lo ; ... | 4626 movwf lo ; ... |
4627 bsf leftbind ; | 4627 bsf leftbind ; |
4630 movff hi,lo ; | 4630 movff hi,lo ; |
4631 output_99x ; | 4631 output_99x ; |
4632 STRCAT_PRINT "m " ; | 4632 STRCAT_PRINT "m " ; |
4633 bra TFT_surface_lastdive_2 ; | 4633 bra TFT_surface_lastdive_2 ; |
4634 TFT_surface_lastdive_1: | 4634 TFT_surface_lastdive_1: |
4635 SMOVFF lastdive_time,xC ; ISR-safe copy of lastdive_time:4 to xC:4 | 4635 SMOVFF surface_interval_secs,xC ; ISR-safe copy of surface_interval_secs:4 to xC:4 |
4636 call info_menu_uptime_com ; use part of info_menu_uptime to convert and display in days and hours | 4636 call info_menu_uptime_com ; use part of info_menu_uptime to convert and display in days and hours |
4637 TFT_surface_lastdive_2: | 4637 TFT_surface_lastdive_2: |
4638 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.1) | 4638 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.1) |
4639 MOVII lastdive_duration,mpr ; get duration of last dive, minutes | 4639 MOVII lastdive_duration,mpr ; get duration of last dive, minutes |
4640 bsf leftbind ; print without leading spaces | 4640 bsf leftbind ; print without leading spaces |
4644 output_99x ; print seconds | 4644 output_99x ; print seconds |
4645 rcall TFT_surface_common ; finalize output | 4645 rcall TFT_surface_common ; finalize output |
4646 TFT_surface_lastdive_3: | 4646 TFT_surface_lastdive_3: |
4647 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.2) | 4647 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.2) |
4648 MOVII lastdive_maxdepth,mpr | 4648 MOVII lastdive_maxdepth,mpr |
4649 call adjust_depth_with_salinity ; compute (current) salinity setting into hi:lo [mbar] | |
4649 bsf leftbind ; print without leading spaces | 4650 bsf leftbind ; print without leading spaces |
4650 TSTOSS opt_units ; 0=Meter, 1=Feet | 4651 TSTOSS opt_units ; 0=Meter, 1=Feet |
4651 bra TFT_surface_lastdive_metric ; 0 - metric | 4652 bra TFT_surface_lastdive_metric ; 0 - metric |
4652 rcall TFT_surface_imperial ; 1 - imperial | 4653 rcall TFT_surface_imperial ; 1 - imperial |
4653 bra TFT_surface_lastdive_4 ; - continue | 4654 bra TFT_surface_lastdive_4 ; - continue |
4654 TFT_surface_lastdive_metric: | 4655 TFT_surface_lastdive_metric: |
4655 rcall TFT_surface_metric ; print depth in meters | 4656 rcall TFT_surface_metric ; print depth in meters |
4656 TFT_surface_lastdive_4: | 4657 TFT_surface_lastdive_4: |
4657 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.3) | 4658 WIN_SMALL surf_gaslist_column+.48,surf_gaslist_row+(surf_gaslist_spacing*.3) |
4658 MOVII lastdive_avgdepth,mpr | 4659 MOVII lastdive_avgdepth,mpr |
4660 call adjust_depth_with_salinity ; compute (current) salinity setting into hi:lo [mbar] | |
4659 bsf leftbind ; print without leading spaces | 4661 bsf leftbind ; print without leading spaces |
4660 TSTOSS opt_units ; 0=Meter, 1=Feet | 4662 TSTOSS opt_units ; 0=Meter, 1=Feet |
4661 bra TFT_surface_metric ; 0 - metric and return | 4663 bra TFT_surface_metric ; 0 - metric and return |
4662 ;bra TFT_surface_imperial ; 1 - imperial and return | 4664 ;bra TFT_surface_imperial ; 1 - imperial and return |
4663 | 4665 |