comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 111:ed7826c740a0

1.74beta rc1
author heinrichsweikamp
date Wed, 22 Dec 2010 09:37:24 +0100
parents 2a31948dbcb7
children deb004054279
comparison
equal deleted inserted replaced
110:8aa8acada0fd 111:ed7826c740a0
678 call word_processor 678 call word_processor
679 return 679 return
680 680
681 PLED_clock: 681 PLED_clock:
682 ostc_debug 'c' 682 ostc_debug 'c'
683
684 ;If > 0 display surface_interval:2 and clock changing every 5 seconds
685 ;use timeout_counter for this
686 WIN_TOP .50 683 WIN_TOP .50
687 WIN_LEFT .1 684 WIN_LEFT .1
688 WIN_FONT FT_SMALL 685 WIN_FONT FT_SMALL
689 WIN_INVERT .0 ; Init new Wordprocessor 686 WIN_INVERT .0 ; Init new Wordprocessor
690 call PLED_standard_color 687 call PLED_standard_color
691 688 lfsr FSR2,letter
692 lfsr FSR2,letter 689 movff hours,lo
693 690 output_99x
694 movff surface_interval+0,lo 691 movlw ':'
695 tstfsz lo 692 movwf POSTINC2
696 bra PLED_clock0 ; Not Zero, switch between Interval and clock 693 movff mins,lo
697 movff surface_interval+1,lo 694 output_99x
698 tstfsz lo 695 movlw ':'
699 bra PLED_clock0 ; Not Zero, switch between Interval and clock 696 movwf POSTINC2
700 bra PLED_clock3 ; surface_interval=0, always display clock! 697 movff secs,lo
701 698 output_99x
702 PLED_clock0: 699 movlw ' '
703 btfss show_interval ; Show Interval? 700 movwf POSTINC2
704 bra PLED_clock2 ; No, display clock and reset counter 701 call word_processor
705 702 return
706 PLED_clock1: 703
707 decfsz timeout_counter,F ; =0? 704 PLED_interval:
708 bra PLED_clock1a ; No... 705 WIN_TOP .75
709 bra PLED_clock3 ; Yes, display clock and reset counter 706 WIN_LEFT .90
710 707 WIN_FONT FT_SMALL
711 PLED_clock1a: 708 WIN_INVERT .0 ; Init new Wordprocessor
712 bsf show_interval 709 call PLED_standard_color
713 movlw d'6' 710 lfsr FSR2,letter
714 cpfslt timeout_counter ; f < w? -> timeout_counter>5?
715 rcall PLED_clock_reload_timer ; No, reload counter
716 711
717 movff surface_interval+0,lo 712 movff surface_interval+0,lo
718 movff surface_interval+1,hi 713 movff surface_interval+1,hi
719 call convert_time ; lo=mins, hi=hours 714 call convert_time ; lo=mins, hi=hours
720 715
721 movf hi,W 716 movf hi,W
722 movff lo,hi 717 movff lo,hi
723 movwf lo ; exchange lo and hi 718 movwf lo ; exchange lo and hi
724
725 movlw 'I'
726 movwf POSTINC2
727 movlw 'n'
728 movwf POSTINC2
729 movlw 't'
730 movwf POSTINC2
731 movlw ':'
732 movwf POSTINC2
733 output_99x 719 output_99x
734 movlw ':' 720 movlw ':'
735 movwf POSTINC2 721 movwf POSTINC2
736 movff hi,lo 722 movff hi,lo
737 output_99x 723 output_99x
738 movlw ' ' 724 movlw ' '
739 movwf POSTINC2 725 movwf POSTINC2
740 call word_processor 726 call word_processor
741 return 727 return
742 728
743 PLED_clock_reload_timer: 729
744 bcf show_interval 730 PLED_show_cf11_cf12_cf29:; Display saturations/desaturation multiplier and last deco in the customview field
745 movlw d'5' 731 WIN_TOP .25
746 movwf timeout_counter 732 WIN_LEFT .90
747 return 733 WIN_FONT FT_SMALL
748 734 WIN_INVERT .0 ; Init new Wordprocessor
749 PLED_interval_reload_timer: 735 call PLED_standard_color
750 bsf show_interval 736 lfsr FSR2,letter
751 movlw d'5' 737 GETCUSTOM8 d'11'
752 movwf timeout_counter 738 movwf lo
753 return 739 movlw 'C'
754 740 movwf POSTINC2
755 PLED_clock2: 741 movlw 'F'
756 decfsz timeout_counter,F ; =0? 742 movwf POSTINC2
757 bra PLED_clock3 ; No... 743 movlw '1'
758 bra PLED_clock1a ; Yes, display interval and reset counter 744 movwf POSTINC2
759 745 movlw '1'
760 PLED_clock3: 746 movwf POSTINC2
761 bcf show_interval
762 movlw d'6'
763 cpfslt timeout_counter ; f < w? -> timeout_counter>5?
764 rcall PLED_interval_reload_timer; No, reload counter
765
766 movff hours,lo
767 output_99x
768 movlw ':' 747 movlw ':'
769 movwf POSTINC2 748 movwf POSTINC2
770 movff mins,lo 749 bsf leftbind
771 output_99x 750 output_8
751 movlw '%'
752 movwf POSTINC2
753 call word_processor
754
755 WIN_TOP .50
756 lfsr FSR2,letter
757 GETCUSTOM8 d'12'
758 movwf lo
759 movlw 'C'
760 movwf POSTINC2
761 movlw 'F'
762 movwf POSTINC2
763 movlw '1'
764 movwf POSTINC2
765 movlw '2'
766 movwf POSTINC2
772 movlw ':' 767 movlw ':'
773 movwf POSTINC2 768 movwf POSTINC2
774 movff secs,lo 769 bsf leftbind
775 output_99x 770 output_8
776 movlw ' ' 771 movlw '%'
777 movwf POSTINC2 772 movwf POSTINC2
778 call word_processor 773 call word_processor
779 return 774
775 PLED_show_cf11_cf12_cf29_2:
776 WIN_TOP .75
777 lfsr FSR2,letter
778 GETCUSTOM8 d'29'
779 movwf lo
780 movlw 'C'
781 movwf POSTINC2
782 movlw 'F'
783 movwf POSTINC2
784 movlw '2'
785 movwf POSTINC2
786 movlw '9'
787 movwf POSTINC2
788 movlw ':'
789 movwf POSTINC2
790 bsf leftbind
791 output_8
792 movlw 'm'
793 movwf POSTINC2
794 call word_processor
795 bcf leftbind
796 return
797
798
799 PLED_show_cf32_cf33_cf29:; Display GF_LOW, GF_HIGH and last deco in the customview field
800 WIN_TOP .25
801 WIN_LEFT .90
802 WIN_FONT FT_SMALL
803 WIN_INVERT .0 ; Init new Wordprocessor
804 call PLED_standard_color
805 lfsr FSR2,letter
806 GETCUSTOM8 d'32'
807 movwf lo
808 movlw 'G'
809 movwf POSTINC2
810 movlw 'F'
811 movwf POSTINC2
812 movlw '_'
813 movwf POSTINC2
814 movlw 'l'
815 movwf POSTINC2
816 movlw 'o'
817 movwf POSTINC2
818 movlw ':'
819 movwf POSTINC2
820 bsf leftbind
821 output_8
822 movlw '%'
823 movwf POSTINC2
824 call word_processor
825
826 WIN_TOP .50
827 lfsr FSR2,letter
828 GETCUSTOM8 d'33'
829 movwf lo
830 movlw 'G'
831 movwf POSTINC2
832 movlw 'F'
833 movwf POSTINC2
834 movlw '_'
835 movwf POSTINC2
836 movlw 'h'
837 movwf POSTINC2
838 movlw 'i'
839 movwf POSTINC2
840 movlw ':'
841 movwf POSTINC2
842 bsf leftbind
843 output_8
844 movlw '%'
845 movwf POSTINC2
846 call word_processor
847
848 bra PLED_show_cf11_cf12_cf29_2 ; Display CF29 in the third row and RETURN
849
780 850
781 PLED_logbook_cursor: 851 PLED_logbook_cursor:
782 852
783 PLED_menu_cursor: 853 PLED_menu_cursor:
784 movlw .0 854 movlw .0
1230 1300
1231 call word_processor 1301 call word_processor
1232 return 1302 return
1233 1303
1234 PLED_pre_dive_screen: ;Display Pre-Dive Screen 1304 PLED_pre_dive_screen: ;Display Pre-Dive Screen
1235 movlw .0 1305 ; movlw .0
1236 movff WREG,box_temp+0 ; Data 1306 ; movff WREG,box_temp+0 ; Data
1237 movlw .25 1307 ; movlw .25
1238 movff WREG,box_temp+1 ; row top (0-239) 1308 ; movff WREG,box_temp+1 ; row top (0-239)
1239 movlw .120 1309 ; movlw .120
1240 movff WREG,box_temp+2 ; row bottom (0-239) 1310 ; movff WREG,box_temp+2 ; row bottom (0-239)
1241 movlw .82 1311 ; movlw .82
1242 movff WREG,box_temp+3 ; column left (0-159) 1312 ; movff WREG,box_temp+3 ; column left (0-159)
1243 movlw .159 1313 ; movlw .159
1244 movff WREG,box_temp+4 ; column right (0-159) 1314 ; movff WREG,box_temp+4 ; column right (0-159)
1245 call PLED_box 1315 ; call PLED_box
1246 1316
1247 ; List active gases/Setpoints 1317 ; List active gases/Setpoints
1248 1318
1249 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? 1319 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
1250 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list 1320 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list
2909 2979
2910 WIN_INVERT .0 ; Init new Wordprocessor 2980 WIN_INVERT .0 ; Init new Wordprocessor
2911 call PLED_standard_color 2981 call PLED_standard_color
2912 return 2982 return
2913 2983
2914 PLED_saturation_graph_divemode: 2984 ;PLED_saturation_graph_divemode:
2915 ostc_debug 'h' ; Sends debug-information to screen if debugmode active 2985 ; ostc_debug 'h' ; Sends debug-information to screen if debugmode active
2916 PLED_tissue_saturation_graph: 2986 PLED_tissue_saturation_graph:
2917 ostc_debug 'i' ; Sends debug-information to screen if debugmode active 2987 ostc_debug 'i' ; Sends debug-information to screen if debugmode active
2918 2988
2919 ; Clear graph area... 2989 ;; Clear graph area...
2920 movlw .0 2990 ; movlw .0
2921 movff WREG,box_temp+0 ; Data 2991 ; movff WREG,box_temp+0 ; Data
2922 movlw .25 2992 ; movlw .25
2923 movff WREG,box_temp+1 ; row top (0-239) 2993 ; movff WREG,box_temp+1 ; row top (0-239)
2924 movlw .120 2994 ; movlw .120
2925 movff WREG,box_temp+2 ; row bottom (0-239) 2995 ; movff WREG,box_temp+2 ; row bottom (0-239)
2926 movlw .82 2996 ; movlw .82
2927 movff WREG,box_temp+3 ; column left (0-159) 2997 ; movff WREG,box_temp+3 ; column left (0-159)
2928 movlw .159 2998 ; movlw .159
2929 movff WREG,box_temp+4 ; column right (0-159) 2999 ; movff WREG,box_temp+4 ; column right (0-159)
2930 call PLED_box 3000 ; call PLED_box
2931 3001
2932 ; Draw Frame 3002 ; Draw Frame
2933 GETCUSTOM8 d'35' ; Standard output color 3003 GETCUSTOM8 d'35' ; Standard output color
2934 movff WREG,box_temp+0 ; Data 3004 movff WREG,box_temp+0 ; Data
2935 movlw .25 3005 movlw .25