comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 179:77ab44108c07

BUGFIX: Inactive gases greyed-out in Simulator results BUGFIX: "Better Gas" now works for Gas 4 and Gas 5, as well
author Heinrichsweikamp
date Sun, 06 Feb 2011 09:37:07 +0100
parents 29ff788487fc
children 8aced3c7590c
comparison
equal deleted inserted replaced
178:29ff788487fc 179:77ab44108c07
3011 PUTC ' ' 3011 PUTC ' '
3012 movf hi,W ; Gas number 3012 movf hi,W ; Gas number
3013 addlw d'27' ; -> Adress of change depth register 3013 addlw d'27' ; -> Adress of change depth register
3014 call read_int_eeprom_1 3014 call read_int_eeprom_1
3015 movff EEDATA,lo ; Change depth in m 3015 movff EEDATA,lo ; Change depth in m
3016 movff lo,lo_temp ; Store for grey-out
3016 output_99 ; outputs into Postinc2! 3017 output_99 ; outputs into Postinc2!
3017 PUTC 'm' 3018 PUTC 'm'
3018 read_int_eeprom d'27' ; read flag register 3019 read_int_eeprom d'27' ; read flag register
3019 movff hi,lo ; copy gas number 3020 movff hi,lo ; copy gas number
3020 PLED_simdata_screen2_loop1: 3021 PLED_simdata_screen2_loop1:
3021 rrcf EEDATA ; roll flags into carry 3022 rrcf EEDATA ; roll flags into carry
3022 decfsz lo,F ; max. 5 times... 3023 decfsz lo,F ; max. 5 times...
3023 bra PLED_simdata_screen2_loop1 3024 bra PLED_simdata_screen2_loop1
3024 3025
3025 btfsc STATUS,C ; test carry 3026 btfss STATUS,C ; test inactive flag
3026 bra PLED_simdata_white 3027 bra PLED_simdata_grey ; Is inactive!
3027 3028
3029 tstfsz lo_temp ; Test change depth=0?
3030 bra PLED_simdata_white ; Is not zero
3031
3032 PLED_simdata_grey:
3028 movlw color_grey 3033 movlw color_grey
3029 call PLED_set_color ; grey out inactive gases! 3034 call PLED_set_color ; grey out inactive gases!
3030 bra PLED_simdata_color_done 3035 bra PLED_simdata_color_done
3031 3036
3032 PLED_simdata_white: 3037 PLED_simdata_white: