diff 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
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Fri Feb 04 23:31:47 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sun Feb 06 09:37:07 2011 +0100
@@ -3013,6 +3013,7 @@
 	addlw	d'27'			; -> Adress of change depth register
 	call	read_int_eeprom_1
 	movff	EEDATA,lo		; Change depth in m
+	movff	lo,lo_temp		; Store for grey-out
 	output_99				; outputs into Postinc2!
     PUTC    'm'
 	read_int_eeprom		d'27'	; read flag register
@@ -3022,9 +3023,13 @@
 	decfsz	lo,F			; max. 5 times...
 	bra		PLED_simdata_screen2_loop1
 	
-	btfsc	STATUS,C		; test carry
-	bra		PLED_simdata_white
-
+	btfss	STATUS,C		; test inactive flag
+	bra		PLED_simdata_grey	; Is inactive!
+	
+	tstfsz	lo_temp			; Test change depth=0?
+	bra		PLED_simdata_white	; Is not zero
+
+PLED_simdata_grey:
 	movlw	color_grey
 	call	PLED_set_color	; grey out inactive gases!
 	bra		PLED_simdata_color_done