comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 62:2972a06b0785

1.71 beta in work
author heinrichsweikamp
date Mon, 20 Sep 2010 21:51:18 +0200
parents 2ff1b30b1bdf
children fee7c62b4de1
comparison
equal deleted inserted replaced
61:f254a568e73d 62:2972a06b0785
123 movlw d'100' 123 movlw d'100'
124 movwf xB+0 124 movwf xB+0
125 clrf xB+1 125 clrf xB+1
126 call mult16x16 ;xA*xB=xC ; Depth in m*100 126 call mult16x16 ;xA*xB=xC ; Depth in m*100
127 127
128 movf amb_pressure+0,W 128 movlw LOW d'1000'
129 addwf xC+0,F 129 addwf xC+0,F
130 movf amb_pressure+1,W 130 movlw HIGH d'1000'
131 addwfc xC+1,F ; Add ambient pressure 131 addwfc xC+1,F ; add 1000mBar
132 132
133 ; movf amb_pressure+0,W
134 ; addwf xC+0,F
135 ; movf amb_pressure+1,W
136 ; addwfc xC+1,F ; Add ambient pressure
137 ;
133 movff xC+0,sim_pressure+0 138 movff xC+0,sim_pressure+0
134 movff xC+1,sim_pressure+1 139 movff xC+1,sim_pressure+1
135 140
136 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values 141 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values
137 movff sim_pressure+1,amb_pressure+1 142 movff sim_pressure+1,amb_pressure+1
204 movlw d'100' 209 movlw d'100'
205 movwf xB+0 210 movwf xB+0
206 clrf xB+1 211 clrf xB+1
207 call mult16x16 ;xA*xB=xC ; Depth in m*100 212 call mult16x16 ;xA*xB=xC ; Depth in m*100
208 213
209 movf amb_pressure+0,W 214 movlw LOW d'1000'
210 addwf xC+0,F 215 addwf xC+0,F
211 movf amb_pressure+1,W 216 movlw HIGH d'1000'
212 addwfc xC+1,F ; Add ambient pressure 217 addwfc xC+1,F ; add 1000mBar
213 218
219 ; movf amb_pressure+0,W
220 ; addwf xC+0,F
221 ; movf amb_pressure+1,W
222 ; addwfc xC+1,F ; Add ambient pressure
223 ;
214 movff xC+0,sim_pressure+0 224 movff xC+0,sim_pressure+0
215 movff xC+1,sim_pressure+1 225 movff xC+1,sim_pressure+1
216 226
217 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values 227 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values
218 movff sim_pressure+1,amb_pressure+1 228 movff sim_pressure+1,amb_pressure+1