diff code_part1/OSTC_code_asm_part1/simulator.asm @ 240:d995e220ddac

BUGFIX Gas Usage when first gas is not #1 (bug BB22).
author JeanDo
date Mon, 21 Mar 2011 23:27:46 +0100
parents 3dbeacf42e9e
children a9f8c87dda06
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/simulator.asm	Mon Mar 21 13:31:38 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/simulator.asm	Mon Mar 21 23:27:46 2011 +0100
@@ -240,10 +240,15 @@
     btfsc   FLAG_const_ppO2_mode        ; In CCR mode ?
     bra     simulator_show_decoplan4    ; YES: finished.
 
-   ; Re-read gas change depth, from the unsorted list.
+    ; Re-read gas change depth, from the unsorted list.
+    movlw   .33                         ; First gas.
+    movwf   EEADR
+    clrf    EEADRH
+    call    read_eeprom
+    movff   EEDATA,char_I_first_gas
+    
     movlw   .27                         ; Active flags.
     movwf   EEADR
-    clrf    EEADRH
     call    read_eeprom
     movff   EEDATA,waitms_temp          ; Save activity flags.
     incf    EEADR,F                     ; 28 == Gas#1's change depth.