diff code_part1/OSTC_code_asm_part1/divemode.asm @ 124:4f9f477bb452

Rewrite display of decoplan: * Common stuff - fix clearing bottom of list, for fleecker-free updates. - fix "Wait..." topline_box while computing deco in planning - fix 'No Deco" std color and mark last page. - Allow stops up to 240' * ZHL-16c model: - 6 lines max (sim or dive) - Print exceed stops as "add: ddd'" * GF model - 6 lines in divemode, 8 in planning. - any suitable number of pages. - "more..." when not the last page displayed. - fix displaying special depth for last stop (CF#29). - fix 0-time stops: just skip display. - fix end of list when reached the deepest stop. - fix no need to buffer decoplan twice.
author JeanDo
date Sat, 01 Jan 2011 01:57:50 +0100
parents 14a074e1a375
children 4c588c3d1f12 06c4899ddb4b
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Thu Dec 30 23:45:20 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Sat Jan 01 01:57:50 2011 +0100
@@ -433,11 +433,9 @@
 	movlb	b'00000001'						; rambank 1 selected
 	ostc_debug	'C'		; Sends debug-information to screen if debugmode active
 
-	movff	char_O_deco_status,deco_status		; 
-	tstfsz	deco_status							; deco_status=0 if decompression calculation done
-	return										; calculation not yet finished!
-
-	rcall	divemode_copy_decolist				;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32)
+	movff	char_O_deco_status,WREG
+	tstfsz	WREG                        ; deco_status=0 if decompression calculation done
+	return                              ; calculation not yet finished!
 
 	movff	char_O_array_decodepth+0,wait_temp	; copy ceiling to temp register
 	tstfsz	wait_temp							; Ceiling<0m?
@@ -453,17 +451,7 @@
 	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