comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 74:a1ccb92b59cd

1.72beta release
author heinrichsweikamp
date Mon, 15 Nov 2010 15:19:24 +0100
parents 2227459e8ef2
children 35d947d7a6e7
comparison
equal deleted inserted replaced
73:2227459e8ef2 74:a1ccb92b59cd
95 dcfsnz debug_temp,F 95 dcfsnz debug_temp,F
96 bra PLED_color_code_gaslist ; Color-code current row in Gaslist (%O2 in "EEDATA") 96 bra PLED_color_code_gaslist ; Color-code current row in Gaslist (%O2 in "EEDATA")
97 97
98 98
99 PLED_color_code_gaslist: ; %O2 in "EEDATA" 99 PLED_color_code_gaslist: ; %O2 in "EEDATA"
100 ; Check very high ppO2 manually
100 movff amb_pressure+0,xA+0 101 movff amb_pressure+0,xA+0
101 movff amb_pressure+1,xA+1 102 movff amb_pressure+1,xA+1
102 movlw d'10' 103 movlw d'10'
103 movwf xB+0 104 movwf xB+0
104 clrf xB+1 105 clrf xB+1
107 movff xC+1,xA+1 108 movff xC+1,xA+1
108 movff EEDATA,xB+0 109 movff EEDATA,xB+0
109 clrf xB+1 110 clrf xB+1
110 call mult16x16 ; EEDATA * p_amb/10 111 call mult16x16 ; EEDATA * p_amb/10
111 112
112 movff xC+0,sub_b+0 113 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar?
113 movff xC+1,sub_b+1 114 bra PLED_color_code_gaslist1 ; Yes, warn in warning color
114 GETCUSTOM8 d'18' ; ppo2_warning_high 115
116 movff xC+0,sub_a+0
117 movff xC+1,sub_a+1
118 GETCUSTOM8 d'46' ; color-code ppO2 warning [cBar]
115 mullw d'100' ; ppo2_warning_high*100 119 mullw d'100' ; ppo2_warning_high*100
116 movff PRODL,sub_a+0 120 movff PRODL,sub_b+0
117 movff PRODH,sub_a+1 121 movff PRODH,sub_b+1
118 call sub16 122 call sub16 ; sub_c = sub_a - sub_b
119 btfss neg_flag 123 btfss neg_flag
120 bra PLED_color_code_gaslist2; Not too high -> Standard Color! 124 bra PLED_color_code_gaslist1; too high -> Warning Color!
121 125 call PLED_standard_color
126 return
127
128 PLED_color_code_gaslist1:
122 call PLED_warnings_color 129 call PLED_warnings_color
123 return
124 PLED_color_code_gaslist2:
125 call PLED_standard_color
126 return 130 return
127 131
128 132
129 PLED_color_code_ceiling: 133 PLED_color_code_ceiling:
130 GETCUSTOM8 d'40' ; =1: Warn at all? 134 GETCUSTOM8 d'40' ; =1: Warn at all?
199 PLED_color_code_gf2: 203 PLED_color_code_gf2:
200 call PLED_warnings_color 204 call PLED_warnings_color
201 return 205 return
202 206
203 PLED_color_code_ppo2: 207 PLED_color_code_ppo2:
208 ; Check very high ppO2 manually
209 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar?
210 bra PLED_color_code_ppo22 ; Yes, warn in warning color
211
204 movff xC+0,sub_a+0 212 movff xC+0,sub_a+0
205 movff xC+1,sub_a+1 213 movff xC+1,sub_a+1
206 GETCUSTOM8 d'46' ; ppO2 warn [cBar] 214 GETCUSTOM8 d'46' ; color-code ppO2 warning [cBar]
207 mullw d'100' 215 mullw d'100'
208 movff PRODL,sub_b+0 216 movff PRODL,sub_b+0
209 movff PRODH,sub_b+1 217 movff PRODH,sub_b+1
210 call sub16 ; sub_c = sub_a - sub_b 218 call sub16 ; sub_c = sub_a - sub_b
211 btfss neg_flag 219 btfss neg_flag
956 PLED_show_ppO2: ; Show ppO2 964 PLED_show_ppO2: ; Show ppO2
957 ostc_debug 't' ; Sends debug-information to screen if debugmode active 965 ostc_debug 't' ; Sends debug-information to screen if debugmode active
958 WIN_TOP .120 966 WIN_TOP .120
959 WIN_LEFT .0 967 WIN_LEFT .0
960 WIN_FONT FT_SMALL 968 WIN_FONT FT_SMALL
961 PLED_color_code warn_ppo2 ; Color-code output 969 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC)
962 970
963 lfsr FSR2,letter 971 lfsr FSR2,letter
964 movlw 'p' 972 movlw 'p'
965 movwf POSTINC2 973 movwf POSTINC2
966 movlw 'p' 974 movlw 'p'
969 movwf POSTINC2 977 movwf POSTINC2
970 movlw '2' 978 movlw '2'
971 movwf POSTINC2 979 movwf POSTINC2
972 movlw ':' 980 movlw ':'
973 movwf POSTINC2 981 movwf POSTINC2
982
983 ; Check very high ppO2 manually
984 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar?
985 bra PLED_show_ppO2_3 ; Yes, display fixed Value!
986
974 movff xC+0,lo 987 movff xC+0,lo
975 movff xC+1,hi 988 movff xC+1,hi
976 bsf ignore_digit4 989 bsf ignore_digit4
977 output_16dp d'1' 990 output_16dp d'1'
978 bcf ignore_digit4 991 bcf ignore_digit4
992 PLED_show_ppO2_2:
979 movlw ' ' 993 movlw ' '
980 movwf POSTINC2 994 movwf POSTINC2
981 call word_processor 995 call word_processor
982 call PLED_standard_color 996 call PLED_standard_color
983 return 997 return
998
999 PLED_show_ppO2_3:
1000 movlw '>'
1001 movwf POSTINC2
1002 movlw '6'
1003 movwf POSTINC2
1004 movlw '.'
1005 movwf POSTINC2
1006 movlw '6'
1007 movwf POSTINC2
1008 bra PLED_show_ppO2_2
984 1009
985 PLED_show_ppO2_clear: ; Clear ppO2 1010 PLED_show_ppO2_clear: ; Clear ppO2
986 movlw d'10' 1011 movlw d'10'
987 movwf temp1 1012 movwf temp1
988 WIN_TOP .120 1013 WIN_TOP .120