comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 158:3fd7d304a0fe

Restore simulator inputs
author heinrichsweikamp
date Tue, 18 Jan 2011 11:52:06 +0100
parents 4f9f477bb452
children aaa6e8720a7d
comparison
equal deleted inserted replaced
157:54cc1346ac15 158:3fd7d304a0fe
233 call diveloop_boot ; configure gases, etc. 233 call diveloop_boot ; configure gases, etc.
234 234
235 bsf simulatormode_active ; normal simulator mode 235 bsf simulatormode_active ; normal simulator mode
236 bsf standalone_simulator ; Standalone Simulator active 236 bsf standalone_simulator ; Standalone Simulator active
237 237
238 movff logbook_temp2,logbook_temp3 ; store bottom time
238 239
239 movff logbook_temp2,xA+0 240 movff logbook_temp2,xA+0
240 clrf xA+1 241 clrf xA+1
241 movlw d'100' 242 movlw d'100'
242 movwf xB+0 243 movwf xB+0
246 movlw LOW d'1000' 247 movlw LOW d'1000'
247 addwf xC+0,F 248 addwf xC+0,F
248 movlw HIGH d'1000' 249 movlw HIGH d'1000'
249 addwfc xC+1,F ; add 1000mBar 250 addwfc xC+1,F ; add 1000mBar
250 251
251 ; movf amb_pressure+0,W
252 ; addwf xC+0,F
253 ; movf amb_pressure+1,W
254 ; addwfc xC+1,F ; Add ambient pressure
255 ;
256 movff xC+0,sim_pressure+0 252 movff xC+0,sim_pressure+0
257 movff xC+1,sim_pressure+1 253 movff xC+1,sim_pressure+1
258 254
259 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values 255 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values
260 movff sim_pressure+1,amb_pressure+1 256 movff sim_pressure+1,amb_pressure+1
324 movlw d'1' 320 movlw d'1'
325 movwf logbook_temp1 ; Bottom time>0! 321 movwf logbook_temp1 ; Bottom time>0!
326 322
327 movlw d'5' ; Pre-Set Cursor to "Show Decoplan" 323 movlw d'5' ; Pre-Set Cursor to "Show Decoplan"
328 movwf menupos 324 movwf menupos
325 movff logbook_temp3,logbook_temp2 ; restore bottom time
329 bra menu_simulator1 ; Done. 326 bra menu_simulator1 ; Done.
330 327
331 simulator_calc_deco2: 328 simulator_calc_deco2:
332 call divemode_check_decogases ; Checks for decogases and sets the gases 329 call divemode_check_decogases ; Checks for decogases and sets the gases
333 call divemode_prepare_flags_for_deco 330 call divemode_prepare_flags_for_deco