comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 19:07e7ca48b49d

1.56 rc1
author heinrichsweikamp
date Tue, 20 Apr 2010 15:53:37 +0200
parents 68825abc35f7
children 73014f788032
comparison
equal deleted inserted replaced
18:1cdf96a7946f 19:07e7ca48b49d
1145 call word_processor 1145 call word_processor
1146 1146
1147 movlw d'3' ; list all three SP 1147 movlw d'3' ; list all three SP
1148 cpfseq temp5 ; All gases shown? 1148 cpfseq temp5 ; All gases shown?
1149 bra PLED_pre_dive_screen3_loop ;no 1149 bra PLED_pre_dive_screen3_loop ;no
1150
1151 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
1152 movff EEDATA,active_gas ; Read start gas (1-5)
1153 decf active_gas,W ; Gas 0-4
1154 mullw d'4'
1155 movf PRODL,W
1156 addlw d'7' ; = address for He ratio
1157 movwf EEADR
1158 call read_eeprom ; Read He ratio
1159 movff EEDATA,hi ; And copy into hold register
1160 decf active_gas,W ; Gas 0-4
1161 mullw d'4'
1162 movf PRODL,W
1163 addlw d'6' ; = address for O2 ratio
1164 movwf EEADR
1165 call read_eeprom ; Read O2 ratio
1166 movff EEDATA, lo ; O2 ratio
1167
1168 WIN_LEFT .90
1169 WIN_TOP .100
1170 lfsr FSR2,letter
1171 movlw 'D'
1172 movwf POSTINC2
1173 movlw 'i'
1174 movwf POSTINC2
1175 movlw 'l'
1176 movwf POSTINC2
1177 movlw ':'
1178 movwf POSTINC2
1179 output_8 ; O2 Ratio
1180 movlw '/'
1181 movwf POSTINC2
1182 movff hi,lo
1183 output_8 ; He Ratio
1184 call word_processor
1150 1185
1151 bcf leftbind 1186 bcf leftbind
1152 return ; Return (CC Mode) 1187 return ; Return (CC Mode)
1153 1188
1154 PLED_active_gas_surfmode: ; Displays start gas/SP 1 1189 PLED_active_gas_surfmode: ; Displays start gas/SP 1
2442 movff hi,lo ; copy gas number 2477 movff hi,lo ; copy gas number
2443 PLED_gas_list_loop1: 2478 PLED_gas_list_loop1:
2444 rrcf EEDATA ; roll flags into carry 2479 rrcf EEDATA ; roll flags into carry
2445 decfsz lo,F ; max. 5 times... 2480 decfsz lo,F ; max. 5 times...
2446 bra PLED_gas_list_loop1 2481 bra PLED_gas_list_loop1
2447 2482
2448 movlw .015 2483 movlw color_grey
2449 btfss STATUS,C ; test carry 2484 btfss STATUS,C ; test carry
2450 movlw .010 2485 call PLED_set_color ; grey out inactive gases!
2451 movwf grayvalue ; grey out inactive gases!
2452 2486
2453 call word_processor 2487 call word_processor
2454 movlw .015 2488 call PLED_standard_color
2455 movwf grayvalue ; reset grey value for compatibility
2456 2489
2457 movlw d'5' ; list all five gases 2490 movlw d'5' ; list all five gases
2458 cpfseq hi ; All gases shown? 2491 cpfseq hi ; All gases shown?
2459 bra PLED_gas_list_loop ; No 2492 bra PLED_gas_list_loop ; No
2460 2493
2658 movff WREG,box_temp+3 ; column left (0-159) 2691 movff WREG,box_temp+3 ; column left (0-159)
2659 movlw .159 2692 movlw .159
2660 movff WREG,box_temp+4 ; column right (0-159) 2693 movff WREG,box_temp+4 ; column right (0-159)
2661 call PLED_box 2694 call PLED_box
2662 2695
2663 2696 ; Draw Frame
2664 GETCUSTOM8 d'35' ; Standard output color 2697 GETCUSTOM8 d'35' ; Standard output color
2665 movff WREG,box_temp+0 ; Data 2698 movff WREG,box_temp+0 ; Data
2666 movlw .25 2699 movlw .25
2667 movff WREG,box_temp+1 ; row top (0-239) 2700 movff WREG,box_temp+1 ; row top (0-239)
2668 movlw .120 2701 movlw .120
2671 movff WREG,box_temp+3 ; column left (0-159) 2704 movff WREG,box_temp+3 ; column left (0-159)
2672 movlw .159 2705 movlw .159
2673 movff WREG,box_temp+4 ; column right (0-159) 2706 movff WREG,box_temp+4 ; column right (0-159)
2674 call PLED_frame 2707 call PLED_frame
2675 2708
2709 ; Draw N2 Tissues
2676 lfsr FSR2, char_O_tissue_saturation+.000 ; N2 2710 lfsr FSR2, char_O_tissue_saturation+.000 ; N2
2677 movlw d'16' 2711 movlw d'16'
2678 movwf wait_temp ; 16 tissues 2712 movwf wait_temp ; 16 tissues
2679 clrf waitms_temp ; Row offset 2713 clrf waitms_temp ; Row offset
2680 PLED_tissue_saturation_graph3: 2714 PLED_tissue_saturation_graph3:
2708 call PLED_box 2742 call PLED_box
2709 2743
2710 decfsz wait_temp,F 2744 decfsz wait_temp,F
2711 bra PLED_tissue_saturation_graph3 2745 bra PLED_tissue_saturation_graph3
2712 2746
2747 ; Draw He Tissues
2713 lfsr FSR2, char_O_tissue_saturation+.016 ; He 2748 lfsr FSR2, char_O_tissue_saturation+.016 ; He
2714 movlw d'16' 2749 movlw d'16'
2715 movwf wait_temp ; 16 tissues 2750 movwf wait_temp ; 16 tissues
2716 clrf waitms_temp ; Row offset 2751 clrf waitms_temp ; Row offset
2717 PLED_tissue_saturation_graph2: 2752 PLED_tissue_saturation_graph2:
2745 call PLED_box 2780 call PLED_box
2746 2781
2747 decfsz wait_temp,F 2782 decfsz wait_temp,F
2748 bra PLED_tissue_saturation_graph2 2783 bra PLED_tissue_saturation_graph2
2749 2784
2785 ; Draw Text
2750 WIN_LEFT .84 2786 WIN_LEFT .84
2751 WIN_TOP .32 2787 WIN_TOP .32
2752 call PLED_standard_color 2788 call PLED_standard_color
2753 lfsr FSR2,letter 2789 lfsr FSR2,letter
2754 movlw 'N' 2790 movlw 'N'
2755 movwf POSTINC2 2791 movwf POSTINC2
2756 movlw '2' 2792 movlw '2'
2757 movwf POSTINC2 2793 movwf POSTINC2
2758 call word_processor 2794 call word_processor
2759
2760 WIN_LEFT .84 2795 WIN_LEFT .84
2761 WIN_TOP .90 2796 WIN_TOP .90
2762 call PLED_standard_color 2797 call PLED_standard_color
2763 lfsr FSR2,letter 2798 lfsr FSR2,letter
2764 movlw 'H' 2799 movlw 'H'
2765 movwf POSTINC2 2800 movwf POSTINC2
2766 movlw 'e' 2801 movlw 'e'
2767 movwf POSTINC2 2802 movwf POSTINC2
2768 call word_processor 2803 call word_processor
2804
2805 movff char_O_gtissue_no,wait_temp ; used as temp
2806
2807 lfsr FSR2,letter
2808 lfsr FSR1,char_O_tissue_saturation+0
2809 incf wait_temp,F ; make 1-16 of 0-15
2810 PLED_tissue_saturation_graph4: ; point to leading tissue...
2811 movff POSTINC1,lo ; copy/overwrite to lo register
2812 decfsz wait_temp,F ; count until zero
2813 bra PLED_tissue_saturation_graph4 ;loop
2814 output_8
2815 movlw '%'
2816 movwf POSTINC2
2817 movlw ' '
2818 movwf POSTINC2
2819 WIN_LEFT .84
2820 WIN_TOP .62
2821 WIN_FONT FT_SMALL
2822 call PLED_standard_color
2823 call word_processor
2824 bcf leftbind
2825
2826 ; Draw Scale
2827 GETCUSTOM8 d'35' ; Standard output color
2828 movff WREG,box_temp+0 ; Data
2829 movlw .73
2830 movff WREG,box_temp+1 ; row top (0-239)
2831 movlw .74
2832 movff WREG,box_temp+2 ; row bottom (0-239)
2833 movlw .121
2834 movff WREG,box_temp+3 ; column left (0-159)
2835 movlw .157
2836 movff WREG,box_temp+4 ; column right (0-159)
2837 call PLED_frame
2838
2839 GETCUSTOM8 d'35' ; Standard output color
2840 movff WREG,box_temp+0 ; Data
2841 movlw .61
2842 movff WREG,box_temp+1 ; row top (0-239)
2843 movlw .84
2844 movff WREG,box_temp+2 ; row bottom (0-239)
2845 movlw .121
2846 movff WREG,box_temp+3 ; column left (0-159)
2847 movlw .122
2848 movff WREG,box_temp+4 ; column right (0-159)
2849 call PLED_box
2850 GETCUSTOM8 d'35' ; Standard output color
2851 movff WREG,box_temp+0 ; Data
2852 movlw .65
2853 movff WREG,box_temp+1 ; row top (0-239)
2854 movlw .80
2855 movff WREG,box_temp+2 ; row bottom (0-239)
2856 movlw .121+.9
2857 movff WREG,box_temp+3 ; column left (0-159)
2858 movlw .122+.9
2859 movff WREG,box_temp+4 ; column right (0-159)
2860 call PLED_box
2861 GETCUSTOM8 d'35' ; Standard output color
2862 movff WREG,box_temp+0 ; Data
2863 movlw .65
2864 movff WREG,box_temp+1 ; row top (0-239)
2865 movlw .80
2866 movff WREG,box_temp+2 ; row bottom (0-239)
2867 movlw .121+.18
2868 movff WREG,box_temp+3 ; column left (0-159)
2869 movlw .122+.18
2870 movff WREG,box_temp+4 ; column right (0-159)
2871 call PLED_box
2872 GETCUSTOM8 d'35' ; Standard output color
2873 movff WREG,box_temp+0 ; Data
2874 movlw .65
2875 movff WREG,box_temp+1 ; row top (0-239)
2876 movlw .80
2877 movff WREG,box_temp+2 ; row bottom (0-239)
2878 movlw .121+.27
2879 movff WREG,box_temp+3 ; column left (0-159)
2880 movlw .122+.27
2881 movff WREG,box_temp+4 ; column right (0-159)
2882 call PLED_box
2883 GETCUSTOM8 d'35' ; Standard output color
2884 movff WREG,box_temp+0 ; Data
2885 movlw .61
2886 movff WREG,box_temp+1 ; row top (0-239)
2887 movlw .84
2888 movff WREG,box_temp+2 ; row bottom (0-239)
2889 movlw .121+.36
2890 movff WREG,box_temp+3 ; column left (0-159)
2891 movlw .122+.36
2892 movff WREG,box_temp+4 ; column right (0-159)
2893 call PLED_box
2894
2769 return 2895 return
2770 2896
2771 2897
2772 PLED_startupscreen1: 2898 PLED_startupscreen1:
2773 call PLED_topline_box 2899 call PLED_topline_box