diff code_part1/OSTC_code_asm_part1/start.asm @ 45:985607cfb813

1.65beta
author heinrichsweikamp
date Sun, 11 Jul 2010 20:26:43 +0200
parents 65d5b0c8da41
children 56aea9fcdd8f
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/start.asm	Thu Jul 01 17:45:01 2010 +0200
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Sun Jul 11 20:26:43 2010 +0200
@@ -199,33 +199,34 @@
 	bcf		gauge_mode
 	bcf		FLAG_const_ppO2_mode
 	bcf		FLAG_apnoe_mode			
+
+; Pre-load modes for OC, GF 90/90 and no Aponoe or Gauge.
+	movlw	d'0'
+	movwf	wait_temp
+	movff	wait_temp,char_I_deco_model	; Clear Flagbyte 
+; Load GF values into RAM
+	movlw	d'90'
+	movwf	wait_temp
+	movff	wait_temp,char_I_GF_Lo_percentage
+	movff	wait_temp,char_I_GF_Hi_percentage		; Set to 90/90...
 	clrf	EEADRH
 	read_int_eeprom d'34'			; Read deco data	
 	movlw	d'1'					; Gauge mode
 	cpfseq	EEDATA
 	 bra	restart_3_test_ppO2_mode; check for ppO2 mode
 	bsf		gauge_mode				; Set flag for gauge mode
-	movlw	d'0'
-	movwf	wait_temp
-	movff	wait_temp,char_I_deco_model	; Clear Flagbyte 
 	return							; start in Surfacemode
 restart_3_test_ppO2_mode:
 	movlw	d'2'					; const ppO2 mode
 	cpfseq	EEDATA
 	 bra	restart_3_test_apnoe_mode; check for apnoe mode
 	bsf		FLAG_const_ppO2_mode	; Set flag for ppO2 mode
-	movlw	d'0'
-	movwf	wait_temp
-	movff	wait_temp,char_I_deco_model	; Clear Flagbyte 
 	return							; start in Surfacemode
 restart_3_test_apnoe_mode:
 	movlw	d'3'					; Apnoe mode
 	cpfseq	EEDATA
 	 bra	restart_4_test_gf_mode	; check for GF OC mode
 	bsf		FLAG_apnoe_mode			; Set flag for Apnoe Mode
-	movlw	d'0'
-	movwf	wait_temp
-	movff	wait_temp,char_I_deco_model	; Clear Flagbyte 
 	return							; start in Surfacemode
 restart_4_test_gf_mode:
 	movlw	d'4'					; GF OC mode
@@ -234,6 +235,11 @@
 	movlw	d'1'
 	movwf	wait_temp
 	movff	wait_temp,char_I_deco_model	; Set Flagbyte for GF method
+; Load GF values into RAM
+	GETCUSTOM8	d'32'			; GF low
+	movff		EEDATA,char_I_GF_Lo_percentage
+	GETCUSTOM8	d'33'			; GF high
+	movff		EEDATA,char_I_GF_Hi_percentage
 	return							; start in Surfacemode
 restart_5_test_gfO2_mode:
 	movlw	d'5'					; GF CC mode
@@ -243,6 +249,11 @@
 	movlw	d'1'
 	movwf	wait_temp
 	movff	wait_temp,char_I_deco_model	; Set Flagbyte for GF method
+; Load GF values into RAM
+	GETCUSTOM8	d'32'			; GF low
+	movff		EEDATA,char_I_GF_Lo_percentage
+	GETCUSTOM8	d'33'			; GF high
+	movff		EEDATA,char_I_GF_Hi_percentage
 	return							; start in Surfacemode
 
 startup_screen1: