# HG changeset patch # User heinrichsweikamp # Date 1423138664 -3600 # Node ID 6256a891b2a0a50b3c008446c543a2390579a315 # Parent 7f3f79e53f66ef6ce37a12832fef9747a672b2e0 BUGFIX: Show dives with >999mins divetime correctly diff -r 7f3f79e53f66 -r 6256a891b2a0 code_part1/OSTC_code_asm_part1/valconv.asm --- a/code_part1/OSTC_code_asm_part1/valconv.asm Wed Feb 04 20:18:34 2015 +0100 +++ b/code_part1/OSTC_code_asm_part1/valconv.asm Thu Feb 05 13:17:44 2015 +0100 @@ -109,6 +109,23 @@ incf ignore_digits,F bsf show_last3 clrf WREG + ; Limit to 3 + movlw .4 + cpfslt hi + bra output16_3_call_2 + movlw .3 + cpfseq hi ; =3? + bra output16_3_call_3 ; No, done. + movlw .231 ; Limit to 231(+768=999...) + cpfslt lo + movwf lo + bra output16_3_call_3 ; done. +output16_3_call_2: ; Set to .999 + movlw LOW .999 + movwf lo + movlw HIGH .999 + movwf hi +output16_3_call_3: bra output16 output16_call: