diff code_part1/OSTC_code_asm_part1/menu_reset.asm @ 341:2144f19fa1eb

BUGFIX protect against ISR changing pressure/temperature while reading it.
author JeanDo
date Fri, 20 May 2011 00:48:30 +0200
parents a86c9d1219ce
children 7250ca7c8d24 f49d6f0fc870
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Fri May 20 00:39:05 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Fri May 20 00:48:30 2011 +0200
@@ -284,8 +284,7 @@
 ; reset deco data
 	call	PLED_ClearScreen
 	DISPLAYTEXT	.25					; "Reset..."
-	movff	amb_pressure+0,int_I_pres_respiration+0		; copy surface air pressure to deco routine
-	movff	amb_pressure+1,int_I_pres_respiration+1		
+    SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration	; copy surface air pressure to deco routine
 	call	deco_clear_tissue
 	movlb	b'00000001'				; RAM Bank1 selected
 	goto	restart					; done. quit to surfmode
@@ -303,8 +302,7 @@
 
 reset_start:
 ; reset deco data
-	movff	amb_pressure+0,int_I_pres_respiration+0		; copy surface air pressure to deco routine
-	movff	amb_pressure+1,int_I_pres_respiration+1		
+    SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration	; copy surface air pressure to deco routine
 	call	deco_clear_tissue
 	movlb	b'00000001'				; RAM Bank1 selected