diff code_part1/OSTC_code_asm_part1/divemode.asm @ 69:df2d3b28947f

1.71beta for Mk.2
author heinrichsweikamp
date Tue, 19 Oct 2010 15:35:23 +0200
parents d0b677e1e9a5
children 6beb680a6130
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Wed Oct 13 13:02:20 2010 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Tue Oct 19 15:35:23 2010 +0200
@@ -451,15 +451,7 @@
 	tstfsz	deco_status							; deco_status=0 if decompression calculation done
 	return										; calculation not yet finished!
 
-	;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32)
-	lfsr	FSR0,0x250			; Source
-	lfsr	FSR1,0x0E0			; Target
-	movlw	d'32'
-	movwf	wait_temp			; Counter
-copy_gf_deco_list:
-	movff	POSTINC0,POSTINC1	; Copy Source to Target
-	decfsz	wait_temp,F			; All done?
-	bra		copy_gf_deco_list	; No, continue!
+	rcall	divemode_copy_decolist				;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32)
 
 	movff	char_O_array_decodepth+0,wait_temp	; copy ceiling to temp register
 	tstfsz	wait_temp							; Ceiling<0m?
@@ -475,6 +467,18 @@
 	call	PLED_display_ndl				; display no deco limit
 	return
 
+divemode_copy_decolist:
+	;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32)
+	lfsr	FSR0,0x250			; Source
+	lfsr	FSR1,0x0E0			; Target
+	movlw	d'24'				; Copy 24 stops
+	movwf	wait_temp			; Counter
+copy_gf_deco_list:
+	movff	POSTINC0,POSTINC1	; Copy Source to Target
+	decfsz	wait_temp,F			; All done?
+	bra		copy_gf_deco_list	; No, continue!
+	return
+
 divemode_prepare_flags_for_deco:	
 	movff	amb_pressure+0,int_I_pres_respiration+0		; lo  and copy result to deco routine
 	movff	amb_pressure+1,int_I_pres_respiration+1		; hi