comparison code_part1/OSTC_code_asm_part1/menu_reset.asm @ 412:b2c9cc018671

small cleanup
author heinrichsweikamp
date Wed, 13 Jul 2011 11:12:43 +0200
parents e6e1b89b7c3e
children 193520542496
comparison
equal deleted inserted replaced
411:e6e1b89b7c3e 412:b2c9cc018671
291 call PLED_ClearScreen 291 call PLED_ClearScreen
292 DISPLAYTEXT .25 ; "Reset..." 292 DISPLAYTEXT .25 ; "Reset..."
293 293
294 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine 294 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine
295 call deco_clear_tissue ; Reset Decodata 295 call deco_clear_tissue ; Reset Decodata
296 movlb b'00000001' ; select ram bank 1
297 call deco_calc_desaturation_time ; calculate desaturation time 296 call deco_calc_desaturation_time ; calculate desaturation time
298 movlb b'00000001' ; select ram bank 1
299 call deco_clear_CNS_fraction ; clear CNS 297 call deco_clear_CNS_fraction ; clear CNS
300 movlb b'00000001' ; select ram bank 1 298 movlb b'00000001' ; select ram bank 1
299 clrf nofly_time+0 ; Reset NoFly
300 clrf nofly_time+1 ; Reset NoFly
301 bcf nofly_active ; Clear flag
301 goto restart ; done. quit to surfmode 302 goto restart ; done. quit to surfmode
302 303
303 do_menu_reset_all: 304 do_menu_reset_all:
304 call PLED_confirmbox ; Returns WREG=0 for Cancel (Or Timeout) and WREG=1 for OK! 305 call PLED_confirmbox ; Returns WREG=0 for Cancel (Or Timeout) and WREG=1 for OK!
305 movwf menupos ; Used as temp 306 movwf menupos ; Used as temp
313 314
314 reset_start: 315 reset_start:
315 ; reset deco data 316 ; reset deco data
316 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine 317 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine
317 call deco_clear_tissue ; Reset Decodata 318 call deco_clear_tissue ; Reset Decodata
318 movlb b'00000001' ; select ram bank 1
319 call deco_calc_desaturation_time ; calculate desaturation time 319 call deco_calc_desaturation_time ; calculate desaturation time
320 movlb b'00000001' ; select ram bank 1
321 call deco_clear_CNS_fraction ; clear CNS 320 call deco_clear_CNS_fraction ; clear CNS
322 movlb b'00000001' ; select ram bank 1 321 clrf nofly_time+0 ; Reset NoFly
322 clrf nofly_time+1 ; Reset NoFly
323 bcf nofly_active ; Clear flag
323 324
324 ; reset gases 325 ; reset gases
325 clrf EEADRH ; EEPROM BANK 0 ! 326 clrf EEADRH ; EEPROM BANK 0 !
326 327
327 movlw d'3' ; address of first gas-1 328 movlw d'3' ; address of first gas-1