comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 223:2a0a446fa6c0

Show decoplan. + BUGFIX translate "more..." message for long deco plans. + BUGFIX put first+active gas in white, other in grey (bug #14)
author JeanDo
date Thu, 03 Mar 2011 02:23:56 +0100
parents 448478ceccea
children 6d4e29d80ff3
comparison
equal deleted inserted replaced
222:638f8e17bd51 223:2a0a446fa6c0
2474 movff PLUSW0,WREG ; char_O_deco_depth[gindex] 2474 movff PLUSW0,WREG ; char_O_deco_depth[gindex]
2475 iorwf WREG 2475 iorwf WREG
2476 bz PLED_decoplan_99 ; End of list... 2476 bz PLED_decoplan_99 ; End of list...
2477 2477
2478 ; Display the message "more..." 2478 ; Display the message "more..."
2479 bcf last_ceiling_gf_shown ; More page to display...
2480
2479 rcall PLED_decoplan_clear_bottom ; Clear from next line 2481 rcall PLED_decoplan_clear_bottom ; Clear from next line
2480 2482
2481 WIN_LEFT .130 - 7*3 2483 WIN_LEFT .130 - 7*3
2482 call PLED_standard_color 2484 call PLED_standard_color
2483 STRCPY_PRINT "more..." 2485 lfsr FSR2,letter
2484 bcf last_ceiling_gf_shown ; More page to display... 2486 OUTPUTTEXT .142 ; More...
2485 return 2487 goto word_processor
2486 2488
2487 PLED_decoplan_99: 2489 PLED_decoplan_99:
2488 bsf last_ceiling_gf_shown ; Nothing more in table to display. 2490 bsf last_ceiling_gf_shown ; Nothing more in table to display.
2489 rcall PLED_decoplan_clear_bottom ; Clear from next line 2491 rcall PLED_decoplan_clear_bottom ; Clear from next line
2490 return 2492 return
3213 PUTC ' ' 3215 PUTC ' '
3214 movf hi,W ; Gas number 3216 movf hi,W ; Gas number
3215 addlw d'27' ; -> Adress of change depth register 3217 addlw d'27' ; -> Adress of change depth register
3216 call read_int_eeprom_1 3218 call read_int_eeprom_1
3217 movff EEDATA,lo ; Change depth in m 3219 movff EEDATA,lo ; Change depth in m
3218 movff lo,lo_temp ; Store for grey-out 3220 movff lo,divemins ; Store for grey-out
3219 output_99 ; outputs into Postinc2! 3221 output_99 ; outputs into Postinc2!
3220 PUTC 'm' 3222 PUTC 'm'
3221 read_int_eeprom d'27' ; read flag register 3223
3222 movff hi,lo ; copy gas number 3224 ; Check if gas is first gas ?
3225 read_int_eeprom d'33' ; First gas (1-5)?
3226 movf hi,W ; Current gas in WREG
3227 cpfseq EEDATA ; Is equal first gas?
3228 bra PLED_simdata_screen2_loop2 ; No : more tests...
3229
3230 bra PLED_simdata_white ; Yes
3231
3232 PLED_simdata_screen2_loop2:
3233 ; Check if gas is inactive ?
3234 read_int_eeprom d'27' ; read flag register
3235 movff hi,lo ; copy gas number
3223 PLED_simdata_screen2_loop1: 3236 PLED_simdata_screen2_loop1:
3224 rrcf EEDATA ; roll flags into carry 3237 rrcf EEDATA ; roll flags into carry
3225 decfsz lo,F ; max. 5 times... 3238 decfsz lo,F ; max. 5 times...
3226 bra PLED_simdata_screen2_loop1 3239 bra PLED_simdata_screen2_loop1
3227 3240
3228 read_int_eeprom d'33' ; First gas (1-5)? 3241 btfss STATUS,C ; test inactive flag
3229 movf hi,W ; Current gas in WREG 3242 bra PLED_simdata_grey ; Is inactive!
3230 cpfseq EEDATA ; Is equal first gas? 3243
3231 bra PLED_simdata_screen2_loop2 ; No 3244 tstfsz divemins ; Test change depth=0?
3232 bra PLED_simdata_white ; Yes 3245 bra PLED_simdata_white ; Is not zero
3233
3234 PLED_simdata_screen2_loop2:
3235 btfss STATUS,C ; test inactive flag
3236 bra PLED_simdata_grey ; Is inactive!
3237
3238 tstfsz lo_temp ; Test change depth=0?
3239 bra PLED_simdata_white ; Is not zero
3240 3246
3241 PLED_simdata_grey: 3247 PLED_simdata_grey:
3242 movlw color_grey 3248 movlw color_grey
3243 call PLED_set_color ; grey out inactive gases! 3249 call PLED_set_color ; grey out inactive gases!
3244 bra PLED_simdata_color_done 3250 bra PLED_simdata_color_done
3245 3251
3246 PLED_simdata_white: 3252 PLED_simdata_white:
3247 call PLED_standard_color 3253 call PLED_standard_color
3248 3254