diff code_part1/OSTC_code_asm_part1/simulator.asm @ 59:2ff1b30b1bdf

1.70 stable release
author heinrichsweikamp
date Thu, 05 Aug 2010 09:44:43 +0200
parents 0338aac9a267
children 2972a06b0785
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/simulator.asm	Wed Aug 04 21:36:50 2010 +0200
+++ b/code_part1/OSTC_code_asm_part1/simulator.asm	Thu Aug 05 09:44:43 2010 +0200
@@ -125,10 +125,10 @@
 	clrf	xB+1
 	call	mult16x16	;xA*xB=xC			; Depth in m*100
 
-	movlw	LOW		d'1000'
+	movf	amb_pressure+0,W
 	addwf	xC+0,F
-	movlw	HIGH	d'1000'
-	addwfc	xC+1,F							; Add 1000mBar
+	movf	amb_pressure+1,W
+	addwfc	xC+1,F							; Add ambient pressure
 	
 	movff	xC+0,sim_pressure+0
 	movff	xC+1,sim_pressure+1
@@ -224,21 +224,6 @@
 	WIN_INVERT	.0
 
 simulator_calc_deco_loop1:
-
-;	movlw	.011
-;	call	PLED_SetColumn
-;	movlw	.009
-;	call	PLED_SetRow
-;	lfsr	FSR2,letter
-;	movff	char_O_array_decodepth+0,lo		; Get Depth
-;	bsf		leftbind
-;	output_8
-;	bcf		leftbind
-;	movlw	' '
-;	movwf	POSTINC2
-;call	word_processor	
-
-
 	call	divemode_check_decogases			; Checks for decogases and sets the gases
 	call	divemode_prepare_flags_for_deco
 
@@ -258,40 +243,6 @@
 simulator_calc_deco_loop2:
 	call	PLED_simulator_data
 
-; Debugger
-;	call	enable_rs232	
-;	movff	char_I_deco_He_ratio5,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_N2_ratio5,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_He_ratio4,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_N2_ratio4,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_He_ratio3,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_N2_ratio3,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_He_ratio2,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_N2_ratio2,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_He_ratio,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_N2_ratio,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_gas_change5,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_gas_change4,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_gas_change3,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_gas_change2,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;	movff	char_I_deco_gas_change,TXREG
-;	call	rs232_wait_tx				; wait for UART
-;
-
 	btg		LED_red
 
 	call	divemode_check_decogases			; Checks for decogases and sets the gases