Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 57:152fbe7f121d
small update simulator
author | heinrichsweikamp |
---|---|
date | Tue, 03 Aug 2010 21:42:43 +0200 |
parents | a63d63a8612e |
children |
comparison
equal
deleted
inserted
replaced
55:a63d63a8612e | 57:152fbe7f121d |
---|---|
196 call diveloop_boot ; configure gases, etc. | 196 call diveloop_boot ; configure gases, etc. |
197 | 197 |
198 bsf simulatormode_active ; normal simulator mode | 198 bsf simulatormode_active ; normal simulator mode |
199 bsf standalone_simulator ; Standalone Simulator active | 199 bsf standalone_simulator ; Standalone Simulator active |
200 | 200 |
201 | |
202 movff logbook_temp2,xA+0 | 201 movff logbook_temp2,xA+0 |
203 clrf xA+1 | 202 clrf xA+1 |
204 movlw d'100' | 203 movlw d'100' |
205 movwf xB+0 | 204 movwf xB+0 |
206 clrf xB+1 | 205 clrf xB+1 |
207 call mult16x16 ;xA*xB=xC ; Depth in m*100 | 206 call mult16x16 ;xA*xB=xC ; Depth in m*100 |
208 | 207 |
209 movlw LOW d'1000' | 208 ; movlw LOW d'1000' |
209 movf amb_pressure+0,W | |
210 addwf xC+0,F | 210 addwf xC+0,F |
211 movlw HIGH d'1000' | 211 movf amb_pressure+1,W |
212 addwfc xC+1,F ; Add 1000mBar | 212 ; movlw HIGH d'1000' |
213 addwfc xC+1,F ; Add ambient pressure | |
213 | 214 |
214 movff xC+0,sim_pressure+0 | 215 movff xC+0,sim_pressure+0 |
215 movff xC+1,sim_pressure+1 | 216 movff xC+1,sim_pressure+1 |
216 | 217 |
217 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values | 218 movff sim_pressure+0,amb_pressure+0 ; override readings with simulator values |