comparison code_part1/OSTC_code_asm_part1/start.asm @ 239:3ed240d60341

High altitude (Plane/Fly) mode added
author heinrichsweikamp
date Mon, 21 Mar 2011 13:31:38 +0100
parents 3dbeacf42e9e
children 1efd59d689f8
comparison
equal deleted inserted replaced
238:9581e48a914f 239:3ed240d60341
165 incf EEDATA,W ; serial == 65535 (emulation) ? 165 incf EEDATA,W ; serial == 65535 (emulation) ?
166 btfsc STATUS,Z 166 btfsc STATUS,Z
167 bcf flag1,0 167 bcf flag1,0
168 movff flag1,win_flags ; store in Bank0 register 168 movff flag1,win_flags ; store in Bank0 register
169 clrf flag1 ; Clear flag1 (again) 169 clrf flag1 ; Clear flag1 (again)
170
171 ; Select high altitude (Fly) mode?
172 movff last_surfpressure_30min+0,sub_b+0
173 movff last_surfpressure_30min+1,sub_b+1
174 movlw HIGH d'880'
175 movwf sub_a+1
176 movlw LOW d'880' ; Hard-wired 880mBar
177 movwf sub_a+0
178 call sub16 ; sub_c = sub_a - sub_b
179 btfss neg_flag ; Result negative (Ambient>880mBar)?
180 bsf high_altitude_mode ; No, Set Flag!
170 181
171 ; Should we disable sleep (hardware emulator) 182 ; Should we disable sleep (hardware emulator)
172 movlw .0 183 movlw .0
173 cpfsgt EEDATA ; >256 184 cpfsgt EEDATA ; >256
174 bsf nsm ; NO-SLEEP-MODE : for hardware debugging 185 bsf nsm ; NO-SLEEP-MODE : for hardware debugging