comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 440:a17b85b0fbcc

NEW: Decoplanner Warms in red if CNS is too high.
author JeanDo
date Tue, 09 Aug 2011 18:16:03 +0200
parents b9cf06de8aca
children 4826dd98514b
comparison
equal deleted inserted replaced
439:b9cf06de8aca 440:a17b85b0fbcc
214 output_16 214 output_16
215 STRCAT_PRINT "'" 215 STRCAT_PRINT "'"
216 216
217 simulator_decoplan_notts: 217 simulator_decoplan_notts:
218 WIN_TOP .190 ; Print calculated CNS before and after dive 218 WIN_TOP .190 ; Print calculated CNS before and after dive
219
220 incf sim_CNS,W ; Detect CNS simulation overflow.
221 bz simulator_decoplan_cns_1
222
223 movlw .100 ; Detect if CNS > 100%
224 cpfslt sim_CNS
225 call PLED_warnings_color ; Yes: draw in red !
226
219 STRCPY "CNS:" 227 STRCPY "CNS:"
220 movff char_O_CNS_fraction,lo ; Current CNS, before dive. 228 movff char_O_CNS_fraction,lo ; Current CNS, before dive.
221 output_8 229 output_8
222
223 STRCAT "%\x92" ; Right-arrow 230 STRCAT "%\x92" ; Right-arrow
231
224 movff sim_CNS,lo ; Get back CNS value. 232 movff sim_CNS,lo ; Get back CNS value.
225 output_8 ; CNS after dive. 233 output_8 ; CNS after dive.
226 STRCAT_PRINT "%" 234 STRCAT_PRINT "%"
227 235 bra simulator_decoplan_cns_2
236
237 simulator_decoplan_cns_1:
238 call PLED_warnings_color ; Yes: draw in red !
239 STRCPY_PRINT "CNS > 250%"
240
241 simulator_decoplan_cns_2:
242 call PLED_standard_color ; Back to normal.
228 WIN_INVERT .1 ; Init new Wordprocessor 243 WIN_INVERT .1 ; Init new Wordprocessor
229 DISPLAYTEXT .188 ; Sim. Results: 244 DISPLAYTEXT .188 ; Sim. Results:
230 WIN_INVERT .0 ; Init new Wordprocessor 245 WIN_INVERT .0 ; Init new Wordprocessor
231 246
232 simulator_show_decoplan1: 247 simulator_show_decoplan1: