Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_ppO2.asm @ 829:69bc5feca5da
BUGFIX: "First Diluent" and "SP Mode" used same EEPROM location
author | heinrichsweikamp |
---|---|
date | Tue, 20 Oct 2015 12:01:18 +0200 |
parents | e49a35ab7394 |
children |
comparison
equal
deleted
inserted
replaced
828:4b6d848cb7b8 | 829:69bc5feca5da |
---|---|
169 WIN_LEFT .40 | 169 WIN_LEFT .40 |
170 movf waitms_temp,W ; Load row into WREG | 170 movf waitms_temp,W ; Load row into WREG |
171 movff WREG,win_top | 171 movff WREG,win_top |
172 lfsr FSR2,letter | 172 lfsr FSR2,letter |
173 | 173 |
174 movlw d'116' | 174 movlw d'115' |
175 movwf EEADR | 175 movwf EEADR |
176 call read_eeprom ; Get current startgas 1-5 # into EEDATA | 176 call read_eeprom ; Get current startgas 1-5 # into EEDATA |
177 decf EEDATA,W ; 0-4 | 177 decf EEDATA,W ; 0-4 |
178 cpfseq decodata+0 ; =current displayed gas #? | 178 cpfseq decodata+0 ; =current displayed gas #? |
179 bra menu_diluentsetup_Tx; no, do not display * | 179 bra menu_diluentsetup_Tx; no, do not display * |
357 WIN_LEFT .20 | 357 WIN_LEFT .20 |
358 lfsr FSR2,letter | 358 lfsr FSR2,letter |
359 OUTPUTTEXT .88 ; First Gas? | 359 OUTPUTTEXT .88 ; First Gas? |
360 PUTC ' ' | 360 PUTC ' ' |
361 | 361 |
362 movlw d'116' | 362 movlw d'115' |
363 movwf EEADR | 363 movwf EEADR |
364 call read_eeprom ; Get current startgas 1-5 # into EEDATA | 364 call read_eeprom ; Get current startgas 1-5 # into EEDATA |
365 decf EEDATA,W ; 0-4 | 365 decf EEDATA,W ; 0-4 |
366 cpfseq decodata+0 ; =current displayed gas #? | 366 cpfseq decodata+0 ; =current displayed gas #? |
367 bra menu_firstdil0 ; no, display three spaces | 367 bra menu_firstdil0 ; no, display three spaces |
564 bra menu_diluentsetup_prelist | 564 bra menu_diluentsetup_prelist |
565 | 565 |
566 make_first_diluent: | 566 make_first_diluent: |
567 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA | 567 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA |
568 incf EEDATA,F ; current gas (1-5) into EEDATA | 568 incf EEDATA,F ; current gas (1-5) into EEDATA |
569 movlw d'116' | 569 movlw d'115' |
570 movwf EEADR | 570 movwf EEADR |
571 call write_eeprom ; store in internal EEPROM | 571 call write_eeprom ; store in internal EEPROM |
572 movlw d'1' | 572 movlw d'1' |
573 movwf menupos | 573 movwf menupos |
574 bra menu_diluentgas1 ; return | 574 bra menu_diluentgas1 ; return |
1052 movlw d'1' | 1052 movlw d'1' |
1053 movwf menupos | 1053 movwf menupos |
1054 bra menu_const_ppO21 | 1054 bra menu_const_ppO21 |
1055 | 1055 |
1056 get_first_diluent: ; Read first diluent into lo(O2) and hi(He) | 1056 get_first_diluent: ; Read first diluent into lo(O2) and hi(He) |
1057 read_int_eeprom d'116' ; Read First Diluent (1-5) | 1057 read_int_eeprom d'115' ; Read First Diluent (1-5) |
1058 movf EEDATA,W ; WREG: 0-4 | 1058 movf EEDATA,W ; WREG: 0-4 |
1059 mullw .4 ; PRODL: 0-16 | 1059 mullw .4 ; PRODL: 0-16 |
1060 movlw .93 ; Base address for O2 | 1060 movlw .93 ; Base address for O2 |
1061 addwf PRODL,W | 1061 addwf PRODL,W |
1062 movwf EEADR | 1062 movwf EEADR |