Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 326:a7ed48daf597
Fix minor rounding error in ppO2[flush].
author | JeanDo |
---|---|
date | Sat, 07 May 2011 14:08:51 +0200 |
parents | 4a28d7a1c620 |
children | cb77d1fa4535 |
comparison
equal
deleted
inserted
replaced
325:4a28d7a1c620 | 326:a7ed48daf597 |
---|---|
3087 WIN_FONT FT_SMALL | 3087 WIN_FONT FT_SMALL |
3088 WIN_LEFT .95 | 3088 WIN_LEFT .95 |
3089 WIN_TOP .192 | 3089 WIN_TOP .192 |
3090 lfsr FSR2,letter | 3090 lfsr FSR2,letter |
3091 OUTPUTTEXTH .299 ; EAD: | 3091 OUTPUTTEXTH .299 ; EAD: |
3092 call word_processor | 3092 call word_processor |
3093 | 3093 |
3094 WIN_TOP .216 | 3094 WIN_TOP .216 |
3095 lfsr FSR2,letter | 3095 lfsr FSR2,letter |
3096 OUTPUTTEXTH .298 ; END: | 3096 OUTPUTTEXTH .298 ; END: |
3097 call word_processor | 3097 call word_processor |
3098 | 3098 |
3099 call PLED_standard_color ; Back to white. | 3099 call PLED_standard_color ; Back to white. |
3100 WIN_LEFT .125 | 3100 WIN_LEFT .125 |
3101 WIN_TOP .192 | 3101 WIN_TOP .192 |
3102 lfsr FSR2,letter | 3102 lfsr FSR2,letter |
3103 movff char_O_EAD,lo | 3103 movff char_O_EAD,lo |
3104 bsf leftbind | 3104 bsf leftbind |
3105 output_8 ; Print EAD w/o leading space. | 3105 output_8 ; Print EAD w/o leading space. |
3106 STRCAT_PRINT "m " | 3106 STRCAT_PRINT "m " |
3107 | 3107 |
3108 WIN_TOP .216 | 3108 WIN_TOP .216 |
3109 lfsr FSR2,letter | 3109 lfsr FSR2,letter |
3110 movff char_O_END,lo | 3110 movff char_O_END,lo |
3111 output_8 ; Print END w/o leading space. | 3111 output_8 ; Print END w/o leading space. |
3112 bcf leftbind | 3112 bcf leftbind |
3113 STRCAT_PRINT "m " | 3113 STRCAT_PRINT "m " |
3114 | 3114 |
3115 btfsc is_bailout ; In bailout mode? | 3115 ; Show ppO2[Flush] iff in CCR mode & not in Bailout: |
3116 btfsc is_bailout ; In bailout mode? | |
3116 return ; Yes: done. | 3117 return ; Yes: done. |
3117 | 3118 |
3118 btfss FLAG_const_ppO2_mode ; In (true) CCR mode ? | 3119 btfss FLAG_const_ppO2_mode ; In (true) CCR mode ? |
3119 return ; No: done. | 3120 return ; No: done. |
3120 | |
3121 ; Show ppO2[Diluent] | |
3122 | 3121 |
3123 WIN_LEFT .95 | 3122 WIN_LEFT .95 |
3124 WIN_TOP .168 | 3123 WIN_TOP .168 |
3125 call PLED_divemask_color ; Set Color for Divemode mask | 3124 call PLED_divemask_color ; Set Color for Divemode mask |
3126 STRCPY_PRINT "ppO2:" ; ppO2 of diluent | 3125 STRCPY_PRINT "ppO2:" ; ppO2 of diluent |
3127 | 3126 |
3128 movff char_O_flush_ppO2,WREG ; copy to WREG | 3127 movff char_O_flush_ppO2,WREG ; copy to WREG |
3129 mullw .100 | 3128 mullw .100 |
3130 movff PRODH,xC+1 | 3129 movff PRODH,xC+1 |
3131 movff PRODL,xC+0 ; For color code | 3130 movff PRODL,xC+0 ; For color code |
3132 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) | 3131 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) |
3133 | 3132 |
3134 WIN_LEFT .130 | 3133 WIN_LEFT .130 |
3135 WIN_TOP .168 | 3134 WIN_TOP .168 |
3136 | 3135 |
3137 movff char_O_flush_ppO2, lo | 3136 movff char_O_flush_ppO2, lo |
3138 incf lo,W ; ppO2 == 2.55 ? | 3137 incf lo,W ; ppO2 == 2.55 ? |
3139 bnz PLED_show_end_ead_divemode_1 | 3138 bnz PLED_show_end_ead_divemode_1 |
3140 | 3139 |
3141 STRCPY_PRINT "----" ; YES: mark overflow. | 3140 STRCPY_PRINT "----" ; YES: mark overflow. |
3142 call PLED_standard_color ; Back to white. | 3141 goto PLED_standard_color ; Back to white. |
3143 | |
3144 return | |
3145 | 3142 |
3146 PLED_show_end_ead_divemode_1: | 3143 PLED_show_end_ead_divemode_1: |
3147 lfsr FSR2,letter | 3144 lfsr FSR2,letter |
3148 clrf hi | 3145 clrf hi |
3149 bsf leftbind | 3146 bsf leftbind |
3150 output_16dp d'3' ; Show ppO2 w/o leading zero | 3147 output_16dp d'3' ; Show ppO2 w/o leading zero |
3151 bcf leftbind | 3148 bcf leftbind |
3152 STRCAT_PRINT " " ; Display ppO2[Diluent] | 3149 STRCAT_PRINT " " ; Display ppO2[Diluent] |
3153 return | 3150 goto PLED_standard_color ; Back to white. |
3154 | 3151 |
3155 ;============================================================================= | 3152 ;============================================================================= |
3156 ; Display TTS after extra time at the same depth. | 3153 ; Display TTS after extra time at the same depth. |
3157 ; | 3154 ; |
3158 PLED_show_@5: | 3155 PLED_show_@5: |